{"version":3,"file":"js/application-8a4bafd38fefd5bcd2d7.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/images/auth-logos/mpki.telia.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.aktia.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.alandsbanken.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.danskebank.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.handelsbanken.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.nordea.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.omasp.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.pop.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.sp.1.svg","webpack:///./app/javascript/images/auth-logos/oidc.spankki.1.svg","webpack:///./app/javascript/images/auth-logos/saml.op.1.svg","webpack:///./app/javascript/packs/app.scss?64ea","webpack:///./app/javascript/packs/application.js","webpack:///./app/javascript/src/assets/blood.svg","webpack:///./app/javascript/src/assets/calendar.svg","webpack:///./app/javascript/src/assets/check.svg","webpack:///./app/javascript/src/assets/chevron-down.svg","webpack:///./app/javascript/src/assets/chevron-up.svg","webpack:///./app/javascript/src/assets/clock.svg","webpack:///./app/javascript/src/assets/droplet.svg","webpack:///./app/javascript/src/assets/external-link.svg","webpack:///./app/javascript/src/assets/fonts/AlbertSans-Roman[wdth,wght].woff2","webpack:///./app/javascript/src/assets/help-circle.svg","webpack:///./app/javascript/src/assets/logo-symbol.svg","webpack:///./app/javascript/src/assets/printer.svg","webpack:///./app/javascript/src/assets/puhti-logo-white.svg","webpack:///./app/javascript/src/assets/puhti-logo.svg","webpack:///./app/javascript/src/assets/puhti-logotype.svg","webpack:///./app/javascript/src/assets/repurchase-graph.svg","webpack:///./app/javascript/src/assets/repurchase-graphic.svg","webpack:///./app/javascript/src/assets/vital-logo-white.svg","webpack:///./app/javascript/src/assets/vital-logo.svg","webpack:///./app/javascript/src/assets/vital-logotype.svg","webpack:///./app/javascript/src/cache.js","webpack:///./app/javascript/src/components/ErrorBoundary.js","webpack:///./app/javascript/src/components/ErrorMessage.js","webpack:///./app/javascript/src/components/FilteringHeader/FilteringHeader.js","webpack:///./app/javascript/src/components/FilteringHeader/FilteringHeader.module.scss?0656","webpack:///./app/javascript/src/components/Footer.js","webpack:///./app/javascript/src/components/LineChart.js","webpack:///./app/javascript/src/components/LoadingSpinner.js","webpack:///./app/javascript/src/components/LoginFooter.js","webpack:///./app/javascript/src/components/Logo.js","webpack:///./app/javascript/src/components/Markdown/Markdown.js","webpack:///./app/javascript/src/components/Markdown/Markdown.module.scss?43a2","webpack:///./app/javascript/src/components/Markdown/MarkdownRender.js","webpack:///./app/javascript/src/components/MicrobiomeSuggestionSection.js","webpack:///./app/javascript/src/components/MoreInfo.js","webpack:///./app/javascript/src/components/NewSuggestionItem/NewSuggestionItem.js","webpack:///./app/javascript/src/components/NewSuggestionItem/NewSuggestionItem.module.scss?b1af","webpack:///./app/javascript/src/components/NotFound.js","webpack:///./app/javascript/src/components/NoticeText.js","webpack:///./app/javascript/src/components/NumberInput.js","webpack:///./app/javascript/src/components/OrderSelector.js","webpack:///./app/javascript/src/components/Question.js","webpack:///./app/javascript/src/components/RangeChart.js","webpack:///./app/javascript/src/components/ResultCategory.js","webpack:///./app/javascript/src/components/ResultSummary/ResultSummaryCard.js","webpack:///./app/javascript/src/components/ResultSummary/ResultSummaryCard.module.scss?4993","webpack:///./app/javascript/src/components/Select.js","webpack:///./app/javascript/src/components/SuggestionLink/SuggestionLink.js","webpack:///./app/javascript/src/components/SuggestionLink/SuggestionLink.module.scss?6e3e","webpack:///./app/javascript/src/components/SuggestionSection.js","webpack:///./app/javascript/src/components/TestResult.js","webpack:///./app/javascript/src/components/UserDoctorReview.js","webpack:///./app/javascript/src/components/UserDoctorReviewAd.js","webpack:///./app/javascript/src/components/navigation/NavDropdownLink.js","webpack:///./app/javascript/src/components/navigation/NavLink.js","webpack:///./app/javascript/src/components/navigation/Navigation.js","webpack:///./app/javascript/src/containers/ActivationError.js","webpack:///./app/javascript/src/containers/ActivationSuccess.js","webpack:///./app/javascript/src/containers/App.js","webpack:///./app/javascript/src/containers/Home.js","webpack:///./app/javascript/src/containers/Login.js","webpack:///./app/javascript/src/containers/LoginGrandId.js","webpack:///./app/javascript/src/containers/LoginTeliaProviders.js","webpack:///./app/javascript/src/containers/Maintenance.js","webpack:///./app/javascript/src/containers/MicrobiomeOrdersContainer.js","webpack:///./app/javascript/src/containers/Onboarding.js","webpack:///./app/javascript/src/containers/OrdersContainer.js","webpack:///./app/javascript/src/containers/Profile.js","webpack:///./app/javascript/src/containers/Promotions.js","webpack:///./app/javascript/src/containers/Single.js","webpack:///./app/javascript/src/data.js","webpack:///./app/javascript/src/env.js","webpack:///./app/javascript/src/flipper.js","webpack:///./app/javascript/src/helpers.js","webpack:///./app/javascript/src/layouts/EmptyLayout.js","webpack:///./app/javascript/src/layouts/MainLayout.js","webpack:///./app/javascript/src/layouts/OnboardingLayout.js","webpack:///./app/javascript/src/links.js","webpack:///./app/javascript/src/localization sync ^\\.\\/.*\\/.*\\.json$","webpack:///./app/javascript/src/localization/i18n.js","webpack:///./app/javascript/src/styles/components/_suggestion-section.scss?ab33","webpack:///./app/javascript/src/styles/components/_test-result.scss?d64a","webpack:///./app/javascript/src/styles/components/_user-doctor-review.scss?dee5","webpack:///./app/javascript/src/theme/colorCoding.js","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/toPrimitive.js","webpack:///./node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/@emotion/cache/dist/cache.browser.esm.js","webpack:///./node_modules/@emotion/core/dist/core.browser.esm.js","webpack:///./node_modules/@emotion/core/dist/emotion-element-04d85134.browser.esm.js","webpack:///./node_modules/@emotion/core/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./node_modules/@emotion/core/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@emotion/core/node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./node_modules/@emotion/core/node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@emotion/css/dist/css.browser.esm.js","webpack:///./node_modules/@emotion/hash/dist/hash.browser.esm.js","webpack:///./node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack:///./node_modules/@emotion/serialize/dist/serialize.browser.esm.js","webpack:///./node_modules/@emotion/sheet/dist/sheet.browser.esm.js","webpack:///./node_modules/@emotion/stylis/dist/stylis.browser.esm.js","webpack:///./node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack:///./node_modules/@emotion/utils/dist/utils.browser.esm.js","webpack:///./node_modules/@emotion/weak-memoize/dist/weak-memoize.browser.esm.js","webpack:///./node_modules/@nivo/colors/dist/nivo-colors.esm.js","webpack:///./node_modules/@nivo/core/dist/nivo-core.esm.js","webpack:///./node_modules/@nivo/legends/dist/nivo-legends.esm.js","webpack:///./node_modules/@nivo/pie/dist/nivo-pie.esm.js","webpack:///./node_modules/@nivo/tooltip/dist/nivo-tooltip.esm.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/chunk-2HYBKCYP.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/focusManager.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/hydration.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/index.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/mutation.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/mutationCache.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/mutationObserver.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/notifyManager.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/onlineManager.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/queriesObserver.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/query.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/queryCache.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/queryClient.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/queryObserver.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/removable.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/retryer.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/subscribable.js","webpack:///./node_modules/@tanstack/query-core/build/legacy/utils.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/index.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/isRestoring.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/queryOptions.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/suspense.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useIsFetching.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useMutation.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useMutationState.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useQueries.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useQuery.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.js","webpack:///./node_modules/@tanstack/react-query/build/legacy/utils.js","webpack:///./node_modules/@vx/axis/dist/vx-axis.es.js","webpack:///./node_modules/@vx/bounds/dist/vx-bounds.es.js","webpack:///./node_modules/@vx/curve/dist/vx-curve.es.js","webpack:///./node_modules/@vx/event/dist/vx-event.es.js","webpack:///./node_modules/@vx/glyph/dist/vx-glyph.es.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientDarkgreenGreen.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientLightgreenGreen.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientOrangeRed.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientPinkBlue.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientPinkRed.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientPurpleOrange.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientPurpleRed.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientPurpleTeal.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientSteelPurple.js","webpack:///./node_modules/@vx/gradient/esm/gradients/GradientTealBlue.js","webpack:///./node_modules/@vx/gradient/esm/gradients/LinearGradient.js","webpack:///./node_modules/@vx/gradient/esm/gradients/RadialGradient.js","webpack:///./node_modules/@vx/gradient/esm/index.js","webpack:///./node_modules/@vx/grid/dist/vx-grid.es.js","webpack:///./node_modules/@vx/grid/node_modules/@vx/group/dist/vx-group.es.js","webpack:///./node_modules/@vx/grid/node_modules/@vx/point/dist/vx-point.es.js","webpack:///./node_modules/@vx/grid/node_modules/@vx/shape/dist/vx-shape.es.js","webpack:///./node_modules/@vx/group/dist/vx-group.es.js","webpack:///./node_modules/@vx/point/dist/vx-point.es.js","webpack:///./node_modules/@vx/responsive/dist/vx-responsive.es.js","webpack:///./node_modules/@vx/scale/dist/vx-scale.es.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/array.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/ascending.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/bisect.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/bisector.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/constant.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/cross.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/descending.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/deviation.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/extent.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/histogram.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/identity.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/index.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/max.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/mean.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/median.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/merge.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/min.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/number.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/pairs.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/permute.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/quantile.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/range.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/scan.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/shuffle.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/sum.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/threshold/freedmanDiaconis.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/threshold/scott.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/threshold/sturges.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/ticks.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/transpose.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/variance.js","webpack:///./node_modules/@vx/scale/node_modules/d3-array/src/zip.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/array.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/band.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/constant.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/continuous.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/diverging.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/identity.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/index.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/init.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/linear.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/log.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/nice.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/number.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/ordinal.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/pow.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/quantile.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/quantize.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/sequential.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/sequentialQuantile.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/symlog.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/threshold.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/tickFormat.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/time.js","webpack:///./node_modules/@vx/scale/node_modules/d3-scale/src/utcTime.js","webpack:///./node_modules/@vx/shape/dist/vx-shape.es.js","webpack:///./node_modules/@vx/text/dist/vx-text.es.js","webpack:///./node_modules/@vx/tooltip/dist/vx-tooltip.es.js","webpack:///./node_modules/axios/index.js","webpack:///./node_modules/axios/lib/adapters/xhr.js","webpack:///./node_modules/axios/lib/axios.js","webpack:///./node_modules/axios/lib/cancel/Cancel.js","webpack:///./node_modules/axios/lib/cancel/CancelToken.js","webpack:///./node_modules/axios/lib/cancel/isCancel.js","webpack:///./node_modules/axios/lib/core/Axios.js","webpack:///./node_modules/axios/lib/core/InterceptorManager.js","webpack:///./node_modules/axios/lib/core/buildFullPath.js","webpack:///./node_modules/axios/lib/core/createError.js","webpack:///./node_modules/axios/lib/core/dispatchRequest.js","webpack:///./node_modules/axios/lib/core/enhanceError.js","webpack:///./node_modules/axios/lib/core/mergeConfig.js","webpack:///./node_modules/axios/lib/core/settle.js","webpack:///./node_modules/axios/lib/core/transformData.js","webpack:///./node_modules/axios/lib/defaults.js","webpack:///./node_modules/axios/lib/helpers/bind.js","webpack:///./node_modules/axios/lib/helpers/buildURL.js","webpack:///./node_modules/axios/lib/helpers/combineURLs.js","webpack:///./node_modules/axios/lib/helpers/cookies.js","webpack:///./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack:///./node_modules/axios/lib/helpers/isAxiosError.js","webpack:///./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack:///./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack:///./node_modules/axios/lib/helpers/parseHeaders.js","webpack:///./node_modules/axios/lib/helpers/spread.js","webpack:///./node_modules/axios/lib/helpers/validator.js","webpack:///./node_modules/axios/lib/utils.js","webpack:///./node_modules/bail/index.js","webpack:///./node_modules/balanced-match/index.js","webpack:///./node_modules/ccount/index.js","webpack:///./node_modules/character-entities/index.js","webpack:///./node_modules/chroma-js/chroma.js","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/comma-separated-tokens/index.js","webpack:///./node_modules/core-js/fn/array/flat-map.js","webpack:///./node_modules/core-js/modules/_a-function.js","webpack:///./node_modules/core-js/modules/_add-to-unscopables.js","webpack:///./node_modules/core-js/modules/_an-object.js","webpack:///./node_modules/core-js/modules/_array-species-constructor.js","webpack:///./node_modules/core-js/modules/_array-species-create.js","webpack:///./node_modules/core-js/modules/_cof.js","webpack:///./node_modules/core-js/modules/_core.js","webpack:///./node_modules/core-js/modules/_ctx.js","webpack:///./node_modules/core-js/modules/_defined.js","webpack:///./node_modules/core-js/modules/_descriptors.js","webpack:///./node_modules/core-js/modules/_dom-create.js","webpack:///./node_modules/core-js/modules/_export.js","webpack:///./node_modules/core-js/modules/_fails.js","webpack:///./node_modules/core-js/modules/_flatten-into-array.js","webpack:///./node_modules/core-js/modules/_function-to-string.js","webpack:///./node_modules/core-js/modules/_global.js","webpack:///./node_modules/core-js/modules/_has.js","webpack:///./node_modules/core-js/modules/_hide.js","webpack:///./node_modules/core-js/modules/_ie8-dom-define.js","webpack:///./node_modules/core-js/modules/_is-array.js","webpack:///./node_modules/core-js/modules/_is-object.js","webpack:///./node_modules/core-js/modules/_library.js","webpack:///./node_modules/core-js/modules/_object-dp.js","webpack:///./node_modules/core-js/modules/_property-desc.js","webpack:///./node_modules/core-js/modules/_redefine.js","webpack:///./node_modules/core-js/modules/_shared.js","webpack:///./node_modules/core-js/modules/_to-integer.js","webpack:///./node_modules/core-js/modules/_to-length.js","webpack:///./node_modules/core-js/modules/_to-object.js","webpack:///./node_modules/core-js/modules/_to-primitive.js","webpack:///./node_modules/core-js/modules/_uid.js","webpack:///./node_modules/core-js/modules/_wks.js","webpack:///./node_modules/core-js/modules/es7.array.flat-map.js","webpack:///./node_modules/create-react-context/lib/index.js","webpack:///./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css","webpack:///./app/javascript/packs/app.scss","webpack:///./app/javascript/src/components/FilteringHeader/FilteringHeader.module.scss","webpack:///./app/javascript/src/components/Markdown/Markdown.module.scss","webpack:///./app/javascript/src/components/NewSuggestionItem/NewSuggestionItem.module.scss","webpack:///./app/javascript/src/components/ResultSummary/ResultSummaryCard.module.scss","webpack:///./app/javascript/src/components/SuggestionLink/SuggestionLink.module.scss","webpack:///./app/javascript/src/styles/components/_suggestion-section.scss","webpack:///./app/javascript/src/styles/components/_test-result.scss","webpack:///./app/javascript/src/styles/components/_user-doctor-review.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/css-loader/dist/runtime/getUrl.js","webpack:///./node_modules/d3-array/src/array.js","webpack:///./node_modules/d3-array/src/ascending.js","webpack:///./node_modules/d3-array/src/bin.js","webpack:///./node_modules/d3-array/src/bisect.js","webpack:///./node_modules/d3-array/src/bisector.js","webpack:///./node_modules/d3-array/src/constant.js","webpack:///./node_modules/d3-array/src/count.js","webpack:///./node_modules/d3-array/src/cross.js","webpack:///./node_modules/d3-array/src/cumsum.js","webpack:///./node_modules/d3-array/src/descending.js","webpack:///./node_modules/d3-array/src/deviation.js","webpack:///./node_modules/d3-array/src/difference.js","webpack:///./node_modules/d3-array/src/disjoint.js","webpack:///./node_modules/d3-array/src/every.js","webpack:///./node_modules/d3-array/src/extent.js","webpack:///./node_modules/d3-array/src/filter.js","webpack:///./node_modules/d3-array/src/fsum.js","webpack:///./node_modules/d3-array/src/greatest.js","webpack:///./node_modules/d3-array/src/greatestIndex.js","webpack:///./node_modules/d3-array/src/group.js","webpack:///./node_modules/d3-array/src/groupSort.js","webpack:///./node_modules/d3-array/src/identity.js","webpack:///./node_modules/d3-array/src/index.js","webpack:///./node_modules/d3-array/src/intersection.js","webpack:///./node_modules/d3-array/src/least.js","webpack:///./node_modules/d3-array/src/leastIndex.js","webpack:///./node_modules/d3-array/src/map.js","webpack:///./node_modules/d3-array/src/max.js","webpack:///./node_modules/d3-array/src/maxIndex.js","webpack:///./node_modules/d3-array/src/mean.js","webpack:///./node_modules/d3-array/src/median.js","webpack:///./node_modules/d3-array/src/merge.js","webpack:///./node_modules/d3-array/src/min.js","webpack:///./node_modules/d3-array/src/minIndex.js","webpack:///./node_modules/d3-array/src/nice.js","webpack:///./node_modules/d3-array/src/number.js","webpack:///./node_modules/d3-array/src/pairs.js","webpack:///./node_modules/d3-array/src/permute.js","webpack:///./node_modules/d3-array/src/quantile.js","webpack:///./node_modules/d3-array/src/quickselect.js","webpack:///./node_modules/d3-array/src/range.js","webpack:///./node_modules/d3-array/src/reduce.js","webpack:///./node_modules/d3-array/src/reverse.js","webpack:///./node_modules/d3-array/src/scan.js","webpack:///./node_modules/d3-array/src/set.js","webpack:///./node_modules/d3-array/src/shuffle.js","webpack:///./node_modules/d3-array/src/some.js","webpack:///./node_modules/d3-array/src/sort.js","webpack:///./node_modules/d3-array/src/subset.js","webpack:///./node_modules/d3-array/src/sum.js","webpack:///./node_modules/d3-array/src/superset.js","webpack:///./node_modules/d3-array/src/threshold/freedmanDiaconis.js","webpack:///./node_modules/d3-array/src/threshold/scott.js","webpack:///./node_modules/d3-array/src/threshold/sturges.js","webpack:///./node_modules/d3-array/src/ticks.js","webpack:///./node_modules/d3-array/src/transpose.js","webpack:///./node_modules/d3-array/src/union.js","webpack:///./node_modules/d3-array/src/variance.js","webpack:///./node_modules/d3-array/src/zip.js","webpack:///./node_modules/d3-collection/src/entries.js","webpack:///./node_modules/d3-collection/src/index.js","webpack:///./node_modules/d3-collection/src/keys.js","webpack:///./node_modules/d3-collection/src/map.js","webpack:///./node_modules/d3-collection/src/nest.js","webpack:///./node_modules/d3-collection/src/set.js","webpack:///./node_modules/d3-collection/src/values.js","webpack:///./node_modules/d3-color/src/color.js","webpack:///./node_modules/d3-color/src/cubehelix.js","webpack:///./node_modules/d3-color/src/define.js","webpack:///./node_modules/d3-color/src/index.js","webpack:///./node_modules/d3-color/src/lab.js","webpack:///./node_modules/d3-color/src/math.js","webpack:///./node_modules/d3-format/src/defaultLocale.js","webpack:///./node_modules/d3-format/src/exponent.js","webpack:///./node_modules/d3-format/src/formatDecimal.js","webpack:///./node_modules/d3-format/src/formatGroup.js","webpack:///./node_modules/d3-format/src/formatNumerals.js","webpack:///./node_modules/d3-format/src/formatPrefixAuto.js","webpack:///./node_modules/d3-format/src/formatRounded.js","webpack:///./node_modules/d3-format/src/formatSpecifier.js","webpack:///./node_modules/d3-format/src/formatTrim.js","webpack:///./node_modules/d3-format/src/formatTypes.js","webpack:///./node_modules/d3-format/src/identity.js","webpack:///./node_modules/d3-format/src/index.js","webpack:///./node_modules/d3-format/src/locale.js","webpack:///./node_modules/d3-format/src/precisionFixed.js","webpack:///./node_modules/d3-format/src/precisionPrefix.js","webpack:///./node_modules/d3-format/src/precisionRound.js","webpack:///./node_modules/d3-hierarchy/src/accessors.js","webpack:///./node_modules/d3-hierarchy/src/array.js","webpack:///./node_modules/d3-hierarchy/src/cluster.js","webpack:///./node_modules/d3-hierarchy/src/constant.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/ancestors.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/count.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/descendants.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/each.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/index.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/leaves.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/links.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/path.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/sort.js","webpack:///./node_modules/d3-hierarchy/src/hierarchy/sum.js","webpack:///./node_modules/d3-hierarchy/src/index.js","webpack:///./node_modules/d3-hierarchy/src/pack/enclose.js","webpack:///./node_modules/d3-hierarchy/src/pack/index.js","webpack:///./node_modules/d3-hierarchy/src/pack/siblings.js","webpack:///./node_modules/d3-hierarchy/src/partition.js","webpack:///./node_modules/d3-hierarchy/src/stratify.js","webpack:///./node_modules/d3-hierarchy/src/tree.js","webpack:///./node_modules/d3-hierarchy/src/treemap/binary.js","webpack:///./node_modules/d3-hierarchy/src/treemap/dice.js","webpack:///./node_modules/d3-hierarchy/src/treemap/index.js","webpack:///./node_modules/d3-hierarchy/src/treemap/resquarify.js","webpack:///./node_modules/d3-hierarchy/src/treemap/round.js","webpack:///./node_modules/d3-hierarchy/src/treemap/slice.js","webpack:///./node_modules/d3-hierarchy/src/treemap/sliceDice.js","webpack:///./node_modules/d3-hierarchy/src/treemap/squarify.js","webpack:///./node_modules/d3-interpolate/src/array.js","webpack:///./node_modules/d3-interpolate/src/basis.js","webpack:///./node_modules/d3-interpolate/src/basisClosed.js","webpack:///./node_modules/d3-interpolate/src/color.js","webpack:///./node_modules/d3-interpolate/src/constant.js","webpack:///./node_modules/d3-interpolate/src/cubehelix.js","webpack:///./node_modules/d3-interpolate/src/date.js","webpack:///./node_modules/d3-interpolate/src/discrete.js","webpack:///./node_modules/d3-interpolate/src/hcl.js","webpack:///./node_modules/d3-interpolate/src/hsl.js","webpack:///./node_modules/d3-interpolate/src/hue.js","webpack:///./node_modules/d3-interpolate/src/index.js","webpack:///./node_modules/d3-interpolate/src/lab.js","webpack:///./node_modules/d3-interpolate/src/number.js","webpack:///./node_modules/d3-interpolate/src/numberArray.js","webpack:///./node_modules/d3-interpolate/src/object.js","webpack:///./node_modules/d3-interpolate/src/piecewise.js","webpack:///./node_modules/d3-interpolate/src/quantize.js","webpack:///./node_modules/d3-interpolate/src/rgb.js","webpack:///./node_modules/d3-interpolate/src/round.js","webpack:///./node_modules/d3-interpolate/src/string.js","webpack:///./node_modules/d3-interpolate/src/transform/decompose.js","webpack:///./node_modules/d3-interpolate/src/transform/index.js","webpack:///./node_modules/d3-interpolate/src/transform/parse.js","webpack:///./node_modules/d3-interpolate/src/value.js","webpack:///./node_modules/d3-interpolate/src/zoom.js","webpack:///./node_modules/d3-path/src/index.js","webpack:///./node_modules/d3-path/src/path.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Accent.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Dark2.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Paired.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Set1.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Set2.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Set3.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js","webpack:///./node_modules/d3-scale-chromatic/src/categorical/category10.js","webpack:///./node_modules/d3-scale-chromatic/src/colors.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/BrBG.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/PRGn.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/PiYG.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/PuOr.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/RdBu.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/RdGy.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js","webpack:///./node_modules/d3-scale-chromatic/src/diverging/Spectral.js","webpack:///./node_modules/d3-scale-chromatic/src/index.js","webpack:///./node_modules/d3-scale-chromatic/src/ramp.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js","webpack:///./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js","webpack:///./node_modules/d3-scale/node_modules/d3-color/src/color.js","webpack:///./node_modules/d3-scale/node_modules/d3-color/src/cubehelix.js","webpack:///./node_modules/d3-scale/node_modules/d3-color/src/define.js","webpack:///./node_modules/d3-scale/node_modules/d3-color/src/index.js","webpack:///./node_modules/d3-scale/node_modules/d3-color/src/lab.js","webpack:///./node_modules/d3-scale/node_modules/d3-color/src/math.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/defaultLocale.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/exponent.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatDecimal.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatGroup.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatNumerals.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatPrefixAuto.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatRounded.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatSpecifier.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatTrim.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/formatTypes.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/identity.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/index.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/locale.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/precisionFixed.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/precisionPrefix.js","webpack:///./node_modules/d3-scale/node_modules/d3-format/src/precisionRound.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/array.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/basis.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/basisClosed.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/color.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/constant.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/cubehelix.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/date.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/discrete.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/hcl.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/hsl.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/hue.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/index.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/lab.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/number.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/numberArray.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/object.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/piecewise.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/quantize.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/rgb.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/round.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/string.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/decompose.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/index.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/transform/parse.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/value.js","webpack:///./node_modules/d3-scale/node_modules/d3-interpolate/src/zoom.js","webpack:///./node_modules/d3-scale/node_modules/d3-time-format/src/defaultLocale.js","webpack:///./node_modules/d3-scale/node_modules/d3-time-format/src/index.js","webpack:///./node_modules/d3-scale/node_modules/d3-time-format/src/isoFormat.js","webpack:///./node_modules/d3-scale/node_modules/d3-time-format/src/isoParse.js","webpack:///./node_modules/d3-scale/node_modules/d3-time-format/src/locale.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/day.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/duration.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/hour.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/index.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/interval.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/millisecond.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/minute.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/month.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/second.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/ticks.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/utcDay.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/utcHour.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/utcMinute.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/utcMonth.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/utcWeek.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/utcYear.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/week.js","webpack:///./node_modules/d3-scale/node_modules/d3-time/src/year.js","webpack:///./node_modules/d3-scale/src/band.js","webpack:///./node_modules/d3-scale/src/constant.js","webpack:///./node_modules/d3-scale/src/continuous.js","webpack:///./node_modules/d3-scale/src/diverging.js","webpack:///./node_modules/d3-scale/src/identity.js","webpack:///./node_modules/d3-scale/src/index.js","webpack:///./node_modules/d3-scale/src/init.js","webpack:///./node_modules/d3-scale/src/linear.js","webpack:///./node_modules/d3-scale/src/log.js","webpack:///./node_modules/d3-scale/src/nice.js","webpack:///./node_modules/d3-scale/src/number.js","webpack:///./node_modules/d3-scale/src/ordinal.js","webpack:///./node_modules/d3-scale/src/pow.js","webpack:///./node_modules/d3-scale/src/quantile.js","webpack:///./node_modules/d3-scale/src/quantize.js","webpack:///./node_modules/d3-scale/src/radial.js","webpack:///./node_modules/d3-scale/src/sequential.js","webpack:///./node_modules/d3-scale/src/sequentialQuantile.js","webpack:///./node_modules/d3-scale/src/symlog.js","webpack:///./node_modules/d3-scale/src/threshold.js","webpack:///./node_modules/d3-scale/src/tickFormat.js","webpack:///./node_modules/d3-scale/src/time.js","webpack:///./node_modules/d3-scale/src/utcTime.js","webpack:///./node_modules/d3-shape/src/arc.js","webpack:///./node_modules/d3-shape/src/area.js","webpack:///./node_modules/d3-shape/src/areaRadial.js","webpack:///./node_modules/d3-shape/src/array.js","webpack:///./node_modules/d3-shape/src/constant.js","webpack:///./node_modules/d3-shape/src/curve/basis.js","webpack:///./node_modules/d3-shape/src/curve/basisClosed.js","webpack:///./node_modules/d3-shape/src/curve/basisOpen.js","webpack:///./node_modules/d3-shape/src/curve/bundle.js","webpack:///./node_modules/d3-shape/src/curve/cardinal.js","webpack:///./node_modules/d3-shape/src/curve/cardinalClosed.js","webpack:///./node_modules/d3-shape/src/curve/cardinalOpen.js","webpack:///./node_modules/d3-shape/src/curve/catmullRom.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack:///./node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack:///./node_modules/d3-shape/src/curve/linear.js","webpack:///./node_modules/d3-shape/src/curve/linearClosed.js","webpack:///./node_modules/d3-shape/src/curve/monotone.js","webpack:///./node_modules/d3-shape/src/curve/natural.js","webpack:///./node_modules/d3-shape/src/curve/radial.js","webpack:///./node_modules/d3-shape/src/curve/step.js","webpack:///./node_modules/d3-shape/src/descending.js","webpack:///./node_modules/d3-shape/src/identity.js","webpack:///./node_modules/d3-shape/src/index.js","webpack:///./node_modules/d3-shape/src/line.js","webpack:///./node_modules/d3-shape/src/lineRadial.js","webpack:///./node_modules/d3-shape/src/link/index.js","webpack:///./node_modules/d3-shape/src/math.js","webpack:///./node_modules/d3-shape/src/noop.js","webpack:///./node_modules/d3-shape/src/offset/diverging.js","webpack:///./node_modules/d3-shape/src/offset/expand.js","webpack:///./node_modules/d3-shape/src/offset/none.js","webpack:///./node_modules/d3-shape/src/offset/silhouette.js","webpack:///./node_modules/d3-shape/src/offset/wiggle.js","webpack:///./node_modules/d3-shape/src/order/appearance.js","webpack:///./node_modules/d3-shape/src/order/ascending.js","webpack:///./node_modules/d3-shape/src/order/descending.js","webpack:///./node_modules/d3-shape/src/order/insideOut.js","webpack:///./node_modules/d3-shape/src/order/none.js","webpack:///./node_modules/d3-shape/src/order/reverse.js","webpack:///./node_modules/d3-shape/src/pie.js","webpack:///./node_modules/d3-shape/src/point.js","webpack:///./node_modules/d3-shape/src/pointRadial.js","webpack:///./node_modules/d3-shape/src/stack.js","webpack:///./node_modules/d3-shape/src/symbol.js","webpack:///./node_modules/d3-shape/src/symbol/circle.js","webpack:///./node_modules/d3-shape/src/symbol/cross.js","webpack:///./node_modules/d3-shape/src/symbol/diamond.js","webpack:///./node_modules/d3-shape/src/symbol/square.js","webpack:///./node_modules/d3-shape/src/symbol/star.js","webpack:///./node_modules/d3-shape/src/symbol/triangle.js","webpack:///./node_modules/d3-shape/src/symbol/wye.js","webpack:///./node_modules/d3-time-format/src/defaultLocale.js","webpack:///./node_modules/d3-time-format/src/index.js","webpack:///./node_modules/d3-time-format/src/isoFormat.js","webpack:///./node_modules/d3-time-format/src/isoParse.js","webpack:///./node_modules/d3-time-format/src/locale.js","webpack:///./node_modules/d3-time/src/day.js","webpack:///./node_modules/d3-time/src/duration.js","webpack:///./node_modules/d3-time/src/hour.js","webpack:///./node_modules/d3-time/src/index.js","webpack:///./node_modules/d3-time/src/interval.js","webpack:///./node_modules/d3-time/src/millisecond.js","webpack:///./node_modules/d3-time/src/minute.js","webpack:///./node_modules/d3-time/src/month.js","webpack:///./node_modules/d3-time/src/second.js","webpack:///./node_modules/d3-time/src/utcDay.js","webpack:///./node_modules/d3-time/src/utcHour.js","webpack:///./node_modules/d3-time/src/utcMinute.js","webpack:///./node_modules/d3-time/src/utcMonth.js","webpack:///./node_modules/d3-time/src/utcWeek.js","webpack:///./node_modules/d3-time/src/utcYear.js","webpack:///./node_modules/d3-time/src/week.js","webpack:///./node_modules/d3-time/src/year.js","webpack:///./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack:///./node_modules/date-fns/add_days/index.js","webpack:///./node_modules/date-fns/add_hours/index.js","webpack:///./node_modules/date-fns/add_iso_years/index.js","webpack:///./node_modules/date-fns/add_milliseconds/index.js","webpack:///./node_modules/date-fns/add_minutes/index.js","webpack:///./node_modules/date-fns/add_months/index.js","webpack:///./node_modules/date-fns/add_quarters/index.js","webpack:///./node_modules/date-fns/add_seconds/index.js","webpack:///./node_modules/date-fns/add_weeks/index.js","webpack:///./node_modules/date-fns/add_years/index.js","webpack:///./node_modules/date-fns/are_ranges_overlapping/index.js","webpack:///./node_modules/date-fns/closest_index_to/index.js","webpack:///./node_modules/date-fns/closest_to/index.js","webpack:///./node_modules/date-fns/compare_asc/index.js","webpack:///./node_modules/date-fns/compare_desc/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_days/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_iso_weeks/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_iso_years/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_months/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_quarters/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_weeks/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_years/index.js","webpack:///./node_modules/date-fns/difference_in_days/index.js","webpack:///./node_modules/date-fns/difference_in_hours/index.js","webpack:///./node_modules/date-fns/difference_in_iso_years/index.js","webpack:///./node_modules/date-fns/difference_in_milliseconds/index.js","webpack:///./node_modules/date-fns/difference_in_minutes/index.js","webpack:///./node_modules/date-fns/difference_in_months/index.js","webpack:///./node_modules/date-fns/difference_in_quarters/index.js","webpack:///./node_modules/date-fns/difference_in_seconds/index.js","webpack:///./node_modules/date-fns/difference_in_weeks/index.js","webpack:///./node_modules/date-fns/difference_in_years/index.js","webpack:///./node_modules/date-fns/distance_in_words/index.js","webpack:///./node_modules/date-fns/distance_in_words_strict/index.js","webpack:///./node_modules/date-fns/distance_in_words_to_now/index.js","webpack:///./node_modules/date-fns/each_day/index.js","webpack:///./node_modules/date-fns/end_of_day/index.js","webpack:///./node_modules/date-fns/end_of_hour/index.js","webpack:///./node_modules/date-fns/end_of_iso_week/index.js","webpack:///./node_modules/date-fns/end_of_iso_year/index.js","webpack:///./node_modules/date-fns/end_of_minute/index.js","webpack:///./node_modules/date-fns/end_of_month/index.js","webpack:///./node_modules/date-fns/end_of_quarter/index.js","webpack:///./node_modules/date-fns/end_of_second/index.js","webpack:///./node_modules/date-fns/end_of_today/index.js","webpack:///./node_modules/date-fns/end_of_tomorrow/index.js","webpack:///./node_modules/date-fns/end_of_week/index.js","webpack:///./node_modules/date-fns/end_of_year/index.js","webpack:///./node_modules/date-fns/end_of_yesterday/index.js","webpack:///./node_modules/date-fns/format/index.js","webpack:///./node_modules/date-fns/get_date/index.js","webpack:///./node_modules/date-fns/get_day/index.js","webpack:///./node_modules/date-fns/get_day_of_year/index.js","webpack:///./node_modules/date-fns/get_days_in_month/index.js","webpack:///./node_modules/date-fns/get_days_in_year/index.js","webpack:///./node_modules/date-fns/get_hours/index.js","webpack:///./node_modules/date-fns/get_iso_day/index.js","webpack:///./node_modules/date-fns/get_iso_week/index.js","webpack:///./node_modules/date-fns/get_iso_weeks_in_year/index.js","webpack:///./node_modules/date-fns/get_iso_year/index.js","webpack:///./node_modules/date-fns/get_milliseconds/index.js","webpack:///./node_modules/date-fns/get_minutes/index.js","webpack:///./node_modules/date-fns/get_month/index.js","webpack:///./node_modules/date-fns/get_overlapping_days_in_ranges/index.js","webpack:///./node_modules/date-fns/get_quarter/index.js","webpack:///./node_modules/date-fns/get_seconds/index.js","webpack:///./node_modules/date-fns/get_time/index.js","webpack:///./node_modules/date-fns/get_year/index.js","webpack:///./node_modules/date-fns/index.js","webpack:///./node_modules/date-fns/is_after/index.js","webpack:///./node_modules/date-fns/is_before/index.js","webpack:///./node_modules/date-fns/is_date/index.js","webpack:///./node_modules/date-fns/is_equal/index.js","webpack:///./node_modules/date-fns/is_first_day_of_month/index.js","webpack:///./node_modules/date-fns/is_friday/index.js","webpack:///./node_modules/date-fns/is_future/index.js","webpack:///./node_modules/date-fns/is_last_day_of_month/index.js","webpack:///./node_modules/date-fns/is_leap_year/index.js","webpack:///./node_modules/date-fns/is_monday/index.js","webpack:///./node_modules/date-fns/is_past/index.js","webpack:///./node_modules/date-fns/is_same_day/index.js","webpack:///./node_modules/date-fns/is_same_hour/index.js","webpack:///./node_modules/date-fns/is_same_iso_week/index.js","webpack:///./node_modules/date-fns/is_same_iso_year/index.js","webpack:///./node_modules/date-fns/is_same_minute/index.js","webpack:///./node_modules/date-fns/is_same_month/index.js","webpack:///./node_modules/date-fns/is_same_quarter/index.js","webpack:///./node_modules/date-fns/is_same_second/index.js","webpack:///./node_modules/date-fns/is_same_week/index.js","webpack:///./node_modules/date-fns/is_same_year/index.js","webpack:///./node_modules/date-fns/is_saturday/index.js","webpack:///./node_modules/date-fns/is_sunday/index.js","webpack:///./node_modules/date-fns/is_this_hour/index.js","webpack:///./node_modules/date-fns/is_this_iso_week/index.js","webpack:///./node_modules/date-fns/is_this_iso_year/index.js","webpack:///./node_modules/date-fns/is_this_minute/index.js","webpack:///./node_modules/date-fns/is_this_month/index.js","webpack:///./node_modules/date-fns/is_this_quarter/index.js","webpack:///./node_modules/date-fns/is_this_second/index.js","webpack:///./node_modules/date-fns/is_this_week/index.js","webpack:///./node_modules/date-fns/is_this_year/index.js","webpack:///./node_modules/date-fns/is_thursday/index.js","webpack:///./node_modules/date-fns/is_today/index.js","webpack:///./node_modules/date-fns/is_tomorrow/index.js","webpack:///./node_modules/date-fns/is_tuesday/index.js","webpack:///./node_modules/date-fns/is_valid/index.js","webpack:///./node_modules/date-fns/is_wednesday/index.js","webpack:///./node_modules/date-fns/is_weekend/index.js","webpack:///./node_modules/date-fns/is_within_range/index.js","webpack:///./node_modules/date-fns/is_yesterday/index.js","webpack:///./node_modules/date-fns/last_day_of_iso_week/index.js","webpack:///./node_modules/date-fns/last_day_of_iso_year/index.js","webpack:///./node_modules/date-fns/last_day_of_month/index.js","webpack:///./node_modules/date-fns/last_day_of_quarter/index.js","webpack:///./node_modules/date-fns/last_day_of_week/index.js","webpack:///./node_modules/date-fns/last_day_of_year/index.js","webpack:///./node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js","webpack:///./node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js","webpack:///./node_modules/date-fns/locale/en/build_format_locale/index.js","webpack:///./node_modules/date-fns/locale/en/index.js","webpack:///./node_modules/date-fns/max/index.js","webpack:///./node_modules/date-fns/min/index.js","webpack:///./node_modules/date-fns/parse/index.js","webpack:///./node_modules/date-fns/set_date/index.js","webpack:///./node_modules/date-fns/set_day/index.js","webpack:///./node_modules/date-fns/set_day_of_year/index.js","webpack:///./node_modules/date-fns/set_hours/index.js","webpack:///./node_modules/date-fns/set_iso_day/index.js","webpack:///./node_modules/date-fns/set_iso_week/index.js","webpack:///./node_modules/date-fns/set_iso_year/index.js","webpack:///./node_modules/date-fns/set_milliseconds/index.js","webpack:///./node_modules/date-fns/set_minutes/index.js","webpack:///./node_modules/date-fns/set_month/index.js","webpack:///./node_modules/date-fns/set_quarter/index.js","webpack:///./node_modules/date-fns/set_seconds/index.js","webpack:///./node_modules/date-fns/set_year/index.js","webpack:///./node_modules/date-fns/start_of_day/index.js","webpack:///./node_modules/date-fns/start_of_hour/index.js","webpack:///./node_modules/date-fns/start_of_iso_week/index.js","webpack:///./node_modules/date-fns/start_of_iso_year/index.js","webpack:///./node_modules/date-fns/start_of_minute/index.js","webpack:///./node_modules/date-fns/start_of_month/index.js","webpack:///./node_modules/date-fns/start_of_quarter/index.js","webpack:///./node_modules/date-fns/start_of_second/index.js","webpack:///./node_modules/date-fns/start_of_today/index.js","webpack:///./node_modules/date-fns/start_of_tomorrow/index.js","webpack:///./node_modules/date-fns/start_of_week/index.js","webpack:///./node_modules/date-fns/start_of_year/index.js","webpack:///./node_modules/date-fns/start_of_yesterday/index.js","webpack:///./node_modules/date-fns/sub_days/index.js","webpack:///./node_modules/date-fns/sub_hours/index.js","webpack:///./node_modules/date-fns/sub_iso_years/index.js","webpack:///./node_modules/date-fns/sub_milliseconds/index.js","webpack:///./node_modules/date-fns/sub_minutes/index.js","webpack:///./node_modules/date-fns/sub_months/index.js","webpack:///./node_modules/date-fns/sub_quarters/index.js","webpack:///./node_modules/date-fns/sub_seconds/index.js","webpack:///./node_modules/date-fns/sub_weeks/index.js","webpack:///./node_modules/date-fns/sub_years/index.js","webpack:///./node_modules/decode-named-character-reference/index.js","webpack:///./node_modules/denormalize-jsonapi/lib/index.js","webpack:///./node_modules/dom-helpers/class/addClass.js","webpack:///./node_modules/dom-helpers/class/hasClass.js","webpack:///./node_modules/dom-helpers/class/removeClass.js","webpack:///./node_modules/draft-js/lib/AtomicBlockUtils.js","webpack:///./node_modules/draft-js/lib/BlockMapBuilder.js","webpack:///./node_modules/draft-js/lib/BlockTree.js","webpack:///./node_modules/draft-js/lib/CharacterMetadata.js","webpack:///./node_modules/draft-js/lib/CompositeDraftDecorator.js","webpack:///./node_modules/draft-js/lib/ContentBlock.js","webpack:///./node_modules/draft-js/lib/ContentBlockNode.js","webpack:///./node_modules/draft-js/lib/ContentState.js","webpack:///./node_modules/draft-js/lib/ContentStateInlineStyle.js","webpack:///./node_modules/draft-js/lib/DOMObserver.js","webpack:///./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js","webpack:///./node_modules/draft-js/lib/DefaultDraftInlineStyle.js","webpack:///./node_modules/draft-js/lib/Draft.js","webpack:///./node_modules/draft-js/lib/DraftEditor.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorBlock.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorBlockNode.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorCompositionHandler.js","webpack:///./node_modules/draft-js/lib/DraftEditorContents-core.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorContents.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorDragHandler.js","webpack:///./node_modules/draft-js/lib/DraftEditorEditHandler.js","webpack:///./node_modules/draft-js/lib/DraftEditorFlushControlled.js","webpack:///./node_modules/draft-js/lib/DraftEditorLeaf.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorNode.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js","webpack:///./node_modules/draft-js/lib/DraftEditorTextNode.react.js","webpack:///./node_modules/draft-js/lib/DraftEffects.js","webpack:///./node_modules/draft-js/lib/DraftEntity.js","webpack:///./node_modules/draft-js/lib/DraftEntityInstance.js","webpack:///./node_modules/draft-js/lib/DraftEntitySegments.js","webpack:///./node_modules/draft-js/lib/DraftJsDebugLogging.js","webpack:///./node_modules/draft-js/lib/DraftModifier.js","webpack:///./node_modules/draft-js/lib/DraftOffsetKey.js","webpack:///./node_modules/draft-js/lib/DraftPasteProcessor.js","webpack:///./node_modules/draft-js/lib/DraftRemovableWord.js","webpack:///./node_modules/draft-js/lib/DraftStringKey.js","webpack:///./node_modules/draft-js/lib/DraftTreeAdapter.js","webpack:///./node_modules/draft-js/lib/DraftTreeInvariants.js","webpack:///./node_modules/draft-js/lib/EditorBidiService.js","webpack:///./node_modules/draft-js/lib/EditorState.js","webpack:///./node_modules/draft-js/lib/KeyBindingUtil.js","webpack:///./node_modules/draft-js/lib/RichTextEditorUtil.js","webpack:///./node_modules/draft-js/lib/SecondaryClipboard.js","webpack:///./node_modules/draft-js/lib/SelectionState.js","webpack:///./node_modules/draft-js/lib/adjustBlockDepthForContentState.js","webpack:///./node_modules/draft-js/lib/applyEntityToContentBlock.js","webpack:///./node_modules/draft-js/lib/applyEntityToContentState.js","webpack:///./node_modules/draft-js/lib/convertFromDraftStateToRaw.js","webpack:///./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js","webpack:///./node_modules/draft-js/lib/convertFromRawToDraftState.js","webpack:///./node_modules/draft-js/lib/createCharacterList.js","webpack:///./node_modules/draft-js/lib/decodeEntityRanges.js","webpack:///./node_modules/draft-js/lib/decodeInlineStyleRanges.js","webpack:///./node_modules/draft-js/lib/draftKeyUtils.js","webpack:///./node_modules/draft-js/lib/editOnBeforeInput.js","webpack:///./node_modules/draft-js/lib/editOnBlur.js","webpack:///./node_modules/draft-js/lib/editOnCompositionStart.js","webpack:///./node_modules/draft-js/lib/editOnCopy.js","webpack:///./node_modules/draft-js/lib/editOnCut.js","webpack:///./node_modules/draft-js/lib/editOnDragOver.js","webpack:///./node_modules/draft-js/lib/editOnDragStart.js","webpack:///./node_modules/draft-js/lib/editOnFocus.js","webpack:///./node_modules/draft-js/lib/editOnInput.js","webpack:///./node_modules/draft-js/lib/editOnKeyDown.js","webpack:///./node_modules/draft-js/lib/editOnPaste.js","webpack:///./node_modules/draft-js/lib/editOnSelect.js","webpack:///./node_modules/draft-js/lib/encodeEntityRanges.js","webpack:///./node_modules/draft-js/lib/encodeInlineStyleRanges.js","webpack:///./node_modules/draft-js/lib/expandRangeToStartOfLine.js","webpack:///./node_modules/draft-js/lib/findAncestorOffsetKey.js","webpack:///./node_modules/draft-js/lib/findRangesImmutable.js","webpack:///./node_modules/draft-js/lib/generateRandomKey.js","webpack:///./node_modules/draft-js/lib/getCharacterRemovalRange.js","webpack:///./node_modules/draft-js/lib/getContentEditableContainer.js","webpack:///./node_modules/draft-js/lib/getContentStateFragment.js","webpack:///./node_modules/draft-js/lib/getCorrectDocumentFromNode.js","webpack:///./node_modules/draft-js/lib/getDefaultKeyBinding.js","webpack:///./node_modules/draft-js/lib/getDraftEditorSelection.js","webpack:///./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js","webpack:///./node_modules/draft-js/lib/getEntityKeyForSelection.js","webpack:///./node_modules/draft-js/lib/getFragmentFromSelection.js","webpack:///./node_modules/draft-js/lib/getNextDelimiterBlockKey.js","webpack:///./node_modules/draft-js/lib/getOwnObjectValues.js","webpack:///./node_modules/draft-js/lib/getRangeBoundingClientRect.js","webpack:///./node_modules/draft-js/lib/getRangeClientRects.js","webpack:///./node_modules/draft-js/lib/getRangesForDraftEntity.js","webpack:///./node_modules/draft-js/lib/getSafeBodyFromHTML.js","webpack:///./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js","webpack:///./node_modules/draft-js/lib/getTextContentFromFiles.js","webpack:///./node_modules/draft-js/lib/getUpdatedSelectionState.js","webpack:///./node_modules/draft-js/lib/getVisibleSelectionRect.js","webpack:///./node_modules/draft-js/lib/getWindowForNode.js","webpack:///./node_modules/draft-js/lib/gkx.js","webpack:///./node_modules/draft-js/lib/insertFragmentIntoContentState.js","webpack:///./node_modules/draft-js/lib/insertIntoList.js","webpack:///./node_modules/draft-js/lib/insertTextIntoContentState.js","webpack:///./node_modules/draft-js/lib/isElement.js","webpack:///./node_modules/draft-js/lib/isEventHandled.js","webpack:///./node_modules/draft-js/lib/isHTMLAnchorElement.js","webpack:///./node_modules/draft-js/lib/isHTMLBRElement.js","webpack:///./node_modules/draft-js/lib/isHTMLElement.js","webpack:///./node_modules/draft-js/lib/isHTMLImageElement.js","webpack:///./node_modules/draft-js/lib/isInstanceOfNode.js","webpack:///./node_modules/draft-js/lib/isSelectionAtLeafStart.js","webpack:///./node_modules/draft-js/lib/isSoftNewlineEvent.js","webpack:///./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js","webpack:///./node_modules/draft-js/lib/keyCommandBackspaceWord.js","webpack:///./node_modules/draft-js/lib/keyCommandDeleteWord.js","webpack:///./node_modules/draft-js/lib/keyCommandInsertNewline.js","webpack:///./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js","webpack:///./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js","webpack:///./node_modules/draft-js/lib/keyCommandPlainBackspace.js","webpack:///./node_modules/draft-js/lib/keyCommandPlainDelete.js","webpack:///./node_modules/draft-js/lib/keyCommandTransposeCharacters.js","webpack:///./node_modules/draft-js/lib/keyCommandUndo.js","webpack:///./node_modules/draft-js/lib/modifyBlockForContentState.js","webpack:///./node_modules/draft-js/lib/moveBlockInContentState.js","webpack:///./node_modules/draft-js/lib/moveSelectionBackward.js","webpack:///./node_modules/draft-js/lib/moveSelectionForward.js","webpack:///./node_modules/draft-js/lib/randomizeBlockMapKeys.js","webpack:///./node_modules/draft-js/lib/removeEntitiesAtEdges.js","webpack:///./node_modules/draft-js/lib/removeRangeFromContentState.js","webpack:///./node_modules/draft-js/lib/removeTextWithStrategy.js","webpack:///./node_modules/draft-js/lib/sanitizeDraftText.js","webpack:///./node_modules/draft-js/lib/setDraftEditorSelection.js","webpack:///./node_modules/draft-js/lib/splitBlockInContentState.js","webpack:///./node_modules/draft-js/lib/splitTextIntoTextBlocks.js","webpack:///./node_modules/draft-js/lib/uuid.js","webpack:///./node_modules/draft-js/node_modules/immutable/dist/immutable.js","webpack:///./node_modules/extend/index.js","webpack:///./node_modules/fbjs/lib/DataTransfer.js","webpack:///./node_modules/fbjs/lib/Keys.js","webpack:///./node_modules/fbjs/lib/PhotosMimeType.js","webpack:///./node_modules/fbjs/lib/Scroll.js","webpack:///./node_modules/fbjs/lib/Style.js","webpack:///./node_modules/fbjs/lib/TokenizeUtil.js","webpack:///./node_modules/fbjs/lib/URI.js","webpack:///./node_modules/fbjs/lib/UnicodeBidi.js","webpack:///./node_modules/fbjs/lib/UnicodeBidiDirection.js","webpack:///./node_modules/fbjs/lib/UnicodeBidiService.js","webpack:///./node_modules/fbjs/lib/UnicodeUtils.js","webpack:///./node_modules/fbjs/lib/UserAgent.js","webpack:///./node_modules/fbjs/lib/UserAgentData.js","webpack:///./node_modules/fbjs/lib/VersionRange.js","webpack:///./node_modules/fbjs/lib/camelize.js","webpack:///./node_modules/fbjs/lib/containsNode.js","webpack:///./node_modules/fbjs/lib/createArrayFromMixed.js","webpack:///./node_modules/fbjs/lib/cx.js","webpack:///./node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/fbjs/lib/getActiveElement.js","webpack:///./node_modules/fbjs/lib/getDocumentScrollElement.js","webpack:///./node_modules/fbjs/lib/getElementPosition.js","webpack:///./node_modules/fbjs/lib/getElementRect.js","webpack:///./node_modules/fbjs/lib/getScrollPosition.js","webpack:///./node_modules/fbjs/lib/getStyleProperty.js","webpack:///./node_modules/fbjs/lib/getUnboundedScrollPosition.js","webpack:///./node_modules/fbjs/lib/getViewportDimensions.js","webpack:///./node_modules/fbjs/lib/hyphenate.js","webpack:///./node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/fbjs/lib/isNode.js","webpack:///./node_modules/fbjs/lib/isTextNode.js","webpack:///./node_modules/fbjs/lib/joinClasses.js","webpack:///./node_modules/fbjs/lib/mapObject.js","webpack:///./node_modules/fbjs/lib/memoizeStringOnly.js","webpack:///./node_modules/fbjs/lib/nullthrows.js","webpack:///./node_modules/fbjs/lib/setImmediate.js","webpack:///./node_modules/fbjs/lib/warning.js","webpack:///./node_modules/hast-util-whitespace/index.js","webpack:///./node_modules/history/esm/history.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./node_modules/html-parse-stringify/dist/html-parse-stringify.module.js","webpack:///./node_modules/httpplease/lib/error.js","webpack:///./node_modules/httpplease/lib/index.js","webpack:///./node_modules/httpplease/lib/request.js","webpack:///./node_modules/httpplease/lib/response.js","webpack:///./node_modules/httpplease/lib/utils/delay.js","webpack:///./node_modules/httpplease/lib/utils/extractResponseProps.js","webpack:///./node_modules/httpplease/lib/utils/once.js","webpack:///./node_modules/httpplease/lib/xhr-browser.js","webpack:///./node_modules/httpplease/plugins/cleanurl.js","webpack:///./node_modules/httpplease/plugins/oldiexdomain.js","webpack:///./node_modules/i18next/dist/esm/i18next.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/inherits.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/objectSpread.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/i18next/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./node_modules/immutability-helper/index.js","webpack:///./node_modules/immutable/dist/immutable.js","webpack:///./node_modules/inline-style-parser/index.js","webpack:///./node_modules/internmap/src/index.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/jsonapi-types/lib/index.js","webpack:///./node_modules/lodash.get/index.js","webpack:///./node_modules/lodash.isplainobject/index.js","webpack:///./node_modules/lodash/_DataView.js","webpack:///./node_modules/lodash/_Hash.js","webpack:///./node_modules/lodash/_LazyWrapper.js","webpack:///./node_modules/lodash/_ListCache.js","webpack:///./node_modules/lodash/_LodashWrapper.js","webpack:///./node_modules/lodash/_Map.js","webpack:///./node_modules/lodash/_MapCache.js","webpack:///./node_modules/lodash/_Promise.js","webpack:///./node_modules/lodash/_Set.js","webpack:///./node_modules/lodash/_SetCache.js","webpack:///./node_modules/lodash/_Stack.js","webpack:///./node_modules/lodash/_Symbol.js","webpack:///./node_modules/lodash/_Uint8Array.js","webpack:///./node_modules/lodash/_WeakMap.js","webpack:///./node_modules/lodash/_apply.js","webpack:///./node_modules/lodash/_arrayEach.js","webpack:///./node_modules/lodash/_arrayFilter.js","webpack:///./node_modules/lodash/_arrayIncludes.js","webpack:///./node_modules/lodash/_arrayIncludesWith.js","webpack:///./node_modules/lodash/_arrayLikeKeys.js","webpack:///./node_modules/lodash/_arrayMap.js","webpack:///./node_modules/lodash/_arrayPush.js","webpack:///./node_modules/lodash/_arraySome.js","webpack:///./node_modules/lodash/_assignMergeValue.js","webpack:///./node_modules/lodash/_assignValue.js","webpack:///./node_modules/lodash/_assocIndexOf.js","webpack:///./node_modules/lodash/_baseAssign.js","webpack:///./node_modules/lodash/_baseAssignIn.js","webpack:///./node_modules/lodash/_baseAssignValue.js","webpack:///./node_modules/lodash/_baseClone.js","webpack:///./node_modules/lodash/_baseCreate.js","webpack:///./node_modules/lodash/_baseDifference.js","webpack:///./node_modules/lodash/_baseFindIndex.js","webpack:///./node_modules/lodash/_baseFlatten.js","webpack:///./node_modules/lodash/_baseFor.js","webpack:///./node_modules/lodash/_baseGet.js","webpack:///./node_modules/lodash/_baseGetAllKeys.js","webpack:///./node_modules/lodash/_baseGetTag.js","webpack:///./node_modules/lodash/_baseHasIn.js","webpack:///./node_modules/lodash/_baseIndexOf.js","webpack:///./node_modules/lodash/_baseIntersection.js","webpack:///./node_modules/lodash/_baseIsArguments.js","webpack:///./node_modules/lodash/_baseIsEqual.js","webpack:///./node_modules/lodash/_baseIsEqualDeep.js","webpack:///./node_modules/lodash/_baseIsMap.js","webpack:///./node_modules/lodash/_baseIsNaN.js","webpack:///./node_modules/lodash/_baseIsNative.js","webpack:///./node_modules/lodash/_baseIsSet.js","webpack:///./node_modules/lodash/_baseIsTypedArray.js","webpack:///./node_modules/lodash/_baseKeys.js","webpack:///./node_modules/lodash/_baseKeysIn.js","webpack:///./node_modules/lodash/_baseLodash.js","webpack:///./node_modules/lodash/_baseMerge.js","webpack:///./node_modules/lodash/_baseMergeDeep.js","webpack:///./node_modules/lodash/_basePick.js","webpack:///./node_modules/lodash/_basePickBy.js","webpack:///./node_modules/lodash/_baseRest.js","webpack:///./node_modules/lodash/_baseSet.js","webpack:///./node_modules/lodash/_baseSetData.js","webpack:///./node_modules/lodash/_baseSetToString.js","webpack:///./node_modules/lodash/_baseSlice.js","webpack:///./node_modules/lodash/_baseTimes.js","webpack:///./node_modules/lodash/_baseToString.js","webpack:///./node_modules/lodash/_baseTrim.js","webpack:///./node_modules/lodash/_baseUnary.js","webpack:///./node_modules/lodash/_baseUnset.js","webpack:///./node_modules/lodash/_cacheHas.js","webpack:///./node_modules/lodash/_castArrayLikeObject.js","webpack:///./node_modules/lodash/_castPath.js","webpack:///./node_modules/lodash/_cloneArrayBuffer.js","webpack:///./node_modules/lodash/_cloneBuffer.js","webpack:///./node_modules/lodash/_cloneDataView.js","webpack:///./node_modules/lodash/_cloneRegExp.js","webpack:///./node_modules/lodash/_cloneSymbol.js","webpack:///./node_modules/lodash/_cloneTypedArray.js","webpack:///./node_modules/lodash/_composeArgs.js","webpack:///./node_modules/lodash/_composeArgsRight.js","webpack:///./node_modules/lodash/_copyArray.js","webpack:///./node_modules/lodash/_copyObject.js","webpack:///./node_modules/lodash/_copySymbols.js","webpack:///./node_modules/lodash/_copySymbolsIn.js","webpack:///./node_modules/lodash/_coreJsData.js","webpack:///./node_modules/lodash/_countHolders.js","webpack:///./node_modules/lodash/_createAssigner.js","webpack:///./node_modules/lodash/_createBaseFor.js","webpack:///./node_modules/lodash/_createBind.js","webpack:///./node_modules/lodash/_createCtor.js","webpack:///./node_modules/lodash/_createCurry.js","webpack:///./node_modules/lodash/_createHybrid.js","webpack:///./node_modules/lodash/_createPartial.js","webpack:///./node_modules/lodash/_createRecurry.js","webpack:///./node_modules/lodash/_createWrap.js","webpack:///./node_modules/lodash/_customOmitClone.js","webpack:///./node_modules/lodash/_defineProperty.js","webpack:///./node_modules/lodash/_equalArrays.js","webpack:///./node_modules/lodash/_equalByTag.js","webpack:///./node_modules/lodash/_equalObjects.js","webpack:///./node_modules/lodash/_flatRest.js","webpack:///./node_modules/lodash/_freeGlobal.js","webpack:///./node_modules/lodash/_getAllKeys.js","webpack:///./node_modules/lodash/_getAllKeysIn.js","webpack:///./node_modules/lodash/_getData.js","webpack:///./node_modules/lodash/_getFuncName.js","webpack:///./node_modules/lodash/_getHolder.js","webpack:///./node_modules/lodash/_getMapData.js","webpack:///./node_modules/lodash/_getNative.js","webpack:///./node_modules/lodash/_getPrototype.js","webpack:///./node_modules/lodash/_getRawTag.js","webpack:///./node_modules/lodash/_getSymbols.js","webpack:///./node_modules/lodash/_getSymbolsIn.js","webpack:///./node_modules/lodash/_getTag.js","webpack:///./node_modules/lodash/_getValue.js","webpack:///./node_modules/lodash/_getWrapDetails.js","webpack:///./node_modules/lodash/_hasPath.js","webpack:///./node_modules/lodash/_hashClear.js","webpack:///./node_modules/lodash/_hashDelete.js","webpack:///./node_modules/lodash/_hashGet.js","webpack:///./node_modules/lodash/_hashHas.js","webpack:///./node_modules/lodash/_hashSet.js","webpack:///./node_modules/lodash/_initCloneArray.js","webpack:///./node_modules/lodash/_initCloneByTag.js","webpack:///./node_modules/lodash/_initCloneObject.js","webpack:///./node_modules/lodash/_insertWrapDetails.js","webpack:///./node_modules/lodash/_isFlattenable.js","webpack:///./node_modules/lodash/_isIndex.js","webpack:///./node_modules/lodash/_isIterateeCall.js","webpack:///./node_modules/lodash/_isKey.js","webpack:///./node_modules/lodash/_isKeyable.js","webpack:///./node_modules/lodash/_isLaziable.js","webpack:///./node_modules/lodash/_isMasked.js","webpack:///./node_modules/lodash/_isPrototype.js","webpack:///./node_modules/lodash/_listCacheClear.js","webpack:///./node_modules/lodash/_listCacheDelete.js","webpack:///./node_modules/lodash/_listCacheGet.js","webpack:///./node_modules/lodash/_listCacheHas.js","webpack:///./node_modules/lodash/_listCacheSet.js","webpack:///./node_modules/lodash/_mapCacheClear.js","webpack:///./node_modules/lodash/_mapCacheDelete.js","webpack:///./node_modules/lodash/_mapCacheGet.js","webpack:///./node_modules/lodash/_mapCacheHas.js","webpack:///./node_modules/lodash/_mapCacheSet.js","webpack:///./node_modules/lodash/_mapToArray.js","webpack:///./node_modules/lodash/_memoizeCapped.js","webpack:///./node_modules/lodash/_mergeData.js","webpack:///./node_modules/lodash/_metaMap.js","webpack:///./node_modules/lodash/_nativeCreate.js","webpack:///./node_modules/lodash/_nativeKeys.js","webpack:///./node_modules/lodash/_nativeKeysIn.js","webpack:///./node_modules/lodash/_nodeUtil.js","webpack:///./node_modules/lodash/_objectToString.js","webpack:///./node_modules/lodash/_overArg.js","webpack:///./node_modules/lodash/_overRest.js","webpack:///./node_modules/lodash/_parent.js","webpack:///./node_modules/lodash/_realNames.js","webpack:///./node_modules/lodash/_reorder.js","webpack:///./node_modules/lodash/_replaceHolders.js","webpack:///./node_modules/lodash/_root.js","webpack:///./node_modules/lodash/_safeGet.js","webpack:///./node_modules/lodash/_setCacheAdd.js","webpack:///./node_modules/lodash/_setCacheHas.js","webpack:///./node_modules/lodash/_setData.js","webpack:///./node_modules/lodash/_setToArray.js","webpack:///./node_modules/lodash/_setToString.js","webpack:///./node_modules/lodash/_setWrapToString.js","webpack:///./node_modules/lodash/_shortOut.js","webpack:///./node_modules/lodash/_stackClear.js","webpack:///./node_modules/lodash/_stackDelete.js","webpack:///./node_modules/lodash/_stackGet.js","webpack:///./node_modules/lodash/_stackHas.js","webpack:///./node_modules/lodash/_stackSet.js","webpack:///./node_modules/lodash/_strictIndexOf.js","webpack:///./node_modules/lodash/_stringToPath.js","webpack:///./node_modules/lodash/_toKey.js","webpack:///./node_modules/lodash/_toSource.js","webpack:///./node_modules/lodash/_trimmedEndIndex.js","webpack:///./node_modules/lodash/_updateWrapDetails.js","webpack:///./node_modules/lodash/_wrapperClone.js","webpack:///./node_modules/lodash/assign.js","webpack:///./node_modules/lodash/constant.js","webpack:///./node_modules/lodash/eq.js","webpack:///./node_modules/lodash/flatten.js","webpack:///./node_modules/lodash/get.js","webpack:///./node_modules/lodash/hasIn.js","webpack:///./node_modules/lodash/identity.js","webpack:///./node_modules/lodash/intersection.js","webpack:///./node_modules/lodash/isArguments.js","webpack:///./node_modules/lodash/isArray.js","webpack:///./node_modules/lodash/isArrayLike.js","webpack:///./node_modules/lodash/isArrayLikeObject.js","webpack:///./node_modules/lodash/isBuffer.js","webpack:///./node_modules/lodash/isEqual.js","webpack:///./node_modules/lodash/isFunction.js","webpack:///./node_modules/lodash/isLength.js","webpack:///./node_modules/lodash/isMap.js","webpack:///./node_modules/lodash/isNumber.js","webpack:///./node_modules/lodash/isObject.js","webpack:///./node_modules/lodash/isObjectLike.js","webpack:///./node_modules/lodash/isPlainObject.js","webpack:///./node_modules/lodash/isSet.js","webpack:///./node_modules/lodash/isString.js","webpack:///./node_modules/lodash/isSymbol.js","webpack:///./node_modules/lodash/isTypedArray.js","webpack:///./node_modules/lodash/keys.js","webpack:///./node_modules/lodash/keysIn.js","webpack:///./node_modules/lodash/last.js","webpack:///./node_modules/lodash/memoize.js","webpack:///./node_modules/lodash/merge.js","webpack:///./node_modules/lodash/noop.js","webpack:///./node_modules/lodash/omit.js","webpack:///./node_modules/lodash/partialRight.js","webpack:///./node_modules/lodash/pick.js","webpack:///./node_modules/lodash/set.js","webpack:///./node_modules/lodash/stubArray.js","webpack:///./node_modules/lodash/stubFalse.js","webpack:///./node_modules/lodash/toFinite.js","webpack:///./node_modules/lodash/toInteger.js","webpack:///./node_modules/lodash/toNumber.js","webpack:///./node_modules/lodash/toPlainObject.js","webpack:///./node_modules/lodash/toString.js","webpack:///./node_modules/lodash/without.js","webpack:///./node_modules/lodash/wrapperLodash.js","webpack:///./node_modules/markdown-draft-js/esm/draft-to-markdown.js","webpack:///./node_modules/markdown-draft-js/esm/index.js","webpack:///./node_modules/markdown-draft-js/esm/markdown-to-draft.js","webpack:///./node_modules/markdown-table/index.js","webpack:///./node_modules/math-expression-evaluator/src/formula_evaluator.js","webpack:///./node_modules/math-expression-evaluator/src/lexer.js","webpack:///./node_modules/math-expression-evaluator/src/math_function.js","webpack:///./node_modules/math-expression-evaluator/src/postfix.js","webpack:///./node_modules/math-expression-evaluator/src/postfix_evaluator.js","webpack:///./node_modules/mdast-util-definitions/index.js","webpack:///./node_modules/mdast-util-definitions/lib/index.js","webpack:///./node_modules/mdast-util-find-and-replace/index.js","webpack:///./node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js","webpack:///./node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/color.browser.js","webpack:///./node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/index.js","webpack:///./node_modules/mdast-util-from-markdown/index.js","webpack:///./node_modules/mdast-util-from-markdown/lib/index.js","webpack:///./node_modules/mdast-util-gfm-autolink-literal/index.js","webpack:///./node_modules/mdast-util-gfm-footnote/index.js","webpack:///./node_modules/mdast-util-gfm-strikethrough/index.js","webpack:///./node_modules/mdast-util-gfm-table/index.js","webpack:///./node_modules/mdast-util-gfm-task-list-item/index.js","webpack:///./node_modules/mdast-util-gfm/index.js","webpack:///./node_modules/mdast-util-to-hast/index.js","webpack:///./node_modules/mdast-util-to-hast/lib/footer.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/blockquote.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/break.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/code.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/delete.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/emphasis.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/footnote.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/heading.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/html.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/image-reference.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/image.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/index.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/inline-code.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/link-reference.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/link.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/list-item.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/list.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/paragraph.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/root.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/strong.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/table-cell.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/table-row.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/table.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/text.js","webpack:///./node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js","webpack:///./node_modules/mdast-util-to-hast/lib/index.js","webpack:///./node_modules/mdast-util-to-hast/lib/revert.js","webpack:///./node_modules/mdast-util-to-hast/lib/state.js","webpack:///./node_modules/mdast-util-to-markdown/lib/handle/inline-code.js","webpack:///./node_modules/mdast-util-to-markdown/lib/handle/list-item.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/association.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/check-bullet.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/container-flow.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/indent-lines.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/safe.js","webpack:///./node_modules/mdast-util-to-markdown/lib/util/track.js","webpack:///./node_modules/mdast-util-to-string/index.js","webpack:///./node_modules/mdast-util-to-string/lib/index.js","webpack:///./node_modules/memoize-one/dist/memoize-one.esm.js","webpack:///./node_modules/micromark-core-commonmark/index.js","webpack:///./node_modules/micromark-core-commonmark/lib/attention.js","webpack:///./node_modules/micromark-core-commonmark/lib/autolink.js","webpack:///./node_modules/micromark-core-commonmark/lib/blank-line.js","webpack:///./node_modules/micromark-core-commonmark/lib/block-quote.js","webpack:///./node_modules/micromark-core-commonmark/lib/character-escape.js","webpack:///./node_modules/micromark-core-commonmark/lib/character-reference.js","webpack:///./node_modules/micromark-core-commonmark/lib/code-fenced.js","webpack:///./node_modules/micromark-core-commonmark/lib/code-indented.js","webpack:///./node_modules/micromark-core-commonmark/lib/code-text.js","webpack:///./node_modules/micromark-core-commonmark/lib/content.js","webpack:///./node_modules/micromark-core-commonmark/lib/definition.js","webpack:///./node_modules/micromark-core-commonmark/lib/hard-break-escape.js","webpack:///./node_modules/micromark-core-commonmark/lib/heading-atx.js","webpack:///./node_modules/micromark-core-commonmark/lib/html-flow.js","webpack:///./node_modules/micromark-core-commonmark/lib/html-text.js","webpack:///./node_modules/micromark-core-commonmark/lib/label-end.js","webpack:///./node_modules/micromark-core-commonmark/lib/label-start-image.js","webpack:///./node_modules/micromark-core-commonmark/lib/label-start-link.js","webpack:///./node_modules/micromark-core-commonmark/lib/line-ending.js","webpack:///./node_modules/micromark-core-commonmark/lib/list.js","webpack:///./node_modules/micromark-core-commonmark/lib/setext-underline.js","webpack:///./node_modules/micromark-core-commonmark/lib/thematic-break.js","webpack:///./node_modules/micromark-extension-gfm-autolink-literal/index.js","webpack:///./node_modules/micromark-extension-gfm-autolink-literal/lib/html.js","webpack:///./node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js","webpack:///./node_modules/micromark-extension-gfm-footnote/index.js","webpack:///./node_modules/micromark-extension-gfm-footnote/lib/html.js","webpack:///./node_modules/micromark-extension-gfm-footnote/lib/syntax.js","webpack:///./node_modules/micromark-extension-gfm-strikethrough/index.js","webpack:///./node_modules/micromark-extension-gfm-strikethrough/lib/html.js","webpack:///./node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js","webpack:///./node_modules/micromark-extension-gfm-table/index.js","webpack:///./node_modules/micromark-extension-gfm-table/lib/html.js","webpack:///./node_modules/micromark-extension-gfm-table/lib/syntax.js","webpack:///./node_modules/micromark-extension-gfm-tagfilter/index.js","webpack:///./node_modules/micromark-extension-gfm-task-list-item/index.js","webpack:///./node_modules/micromark-extension-gfm-task-list-item/lib/html.js","webpack:///./node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js","webpack:///./node_modules/micromark-extension-gfm/index.js","webpack:///./node_modules/micromark-factory-destination/index.js","webpack:///./node_modules/micromark-factory-label/index.js","webpack:///./node_modules/micromark-factory-space/index.js","webpack:///./node_modules/micromark-factory-title/index.js","webpack:///./node_modules/micromark-factory-whitespace/index.js","webpack:///./node_modules/micromark-util-character/index.js","webpack:///./node_modules/micromark-util-character/lib/unicode-punctuation-regex.js","webpack:///./node_modules/micromark-util-chunked/index.js","webpack:///./node_modules/micromark-util-classify-character/index.js","webpack:///./node_modules/micromark-util-combine-extensions/index.js","webpack:///./node_modules/micromark-util-decode-numeric-character-reference/index.js","webpack:///./node_modules/micromark-util-decode-string/index.js","webpack:///./node_modules/micromark-util-encode/index.js","webpack:///./node_modules/micromark-util-html-tag-name/index.js","webpack:///./node_modules/micromark-util-normalize-identifier/index.js","webpack:///./node_modules/micromark-util-resolve-all/index.js","webpack:///./node_modules/micromark-util-sanitize-uri/index.js","webpack:///./node_modules/micromark-util-subtokenize/index.js","webpack:///./node_modules/micromark/lib/constructs.js","webpack:///./node_modules/micromark/lib/create-tokenizer.js","webpack:///./node_modules/micromark/lib/initialize/content.js","webpack:///./node_modules/micromark/lib/initialize/document.js","webpack:///./node_modules/micromark/lib/initialize/flow.js","webpack:///./node_modules/micromark/lib/initialize/text.js","webpack:///./node_modules/micromark/lib/parse.js","webpack:///./node_modules/micromark/lib/postprocess.js","webpack:///./node_modules/micromark/lib/preprocess.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/index.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/attention.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/autolink.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/blank-line.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/block-quote.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/character-escape.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/character-reference.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/code-fenced.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/code-indented.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/code-text.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/content.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/definition.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/hard-break-escape.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/heading-atx.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/html-flow.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/html-text.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/label-end.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/label-start-image.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/label-start-link.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/line-ending.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/list.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/setext-underline.js","webpack:///./node_modules/micromark/node_modules/micromark-core-commonmark/lib/thematic-break.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/once/once.js","webpack:///./node_modules/performance-now/lib/performance-now.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/prop-types/lib/has.js","webpack:///./node_modules/property-information/index.js","webpack:///./node_modules/property-information/lib/aria.js","webpack:///./node_modules/property-information/lib/find.js","webpack:///./node_modules/property-information/lib/hast-to-react.js","webpack:///./node_modules/property-information/lib/html.js","webpack:///./node_modules/property-information/lib/normalize.js","webpack:///./node_modules/property-information/lib/svg.js","webpack:///./node_modules/property-information/lib/util/case-insensitive-transform.js","webpack:///./node_modules/property-information/lib/util/case-sensitive-transform.js","webpack:///./node_modules/property-information/lib/util/create.js","webpack:///./node_modules/property-information/lib/util/defined-info.js","webpack:///./node_modules/property-information/lib/util/info.js","webpack:///./node_modules/property-information/lib/util/merge.js","webpack:///./node_modules/property-information/lib/util/schema.js","webpack:///./node_modules/property-information/lib/util/types.js","webpack:///./node_modules/property-information/lib/xlink.js","webpack:///./node_modules/property-information/lib/xml.js","webpack:///./node_modules/property-information/lib/xmlns.js","webpack:///./node_modules/raf/index.js","webpack:///./node_modules/raf/node_modules/performance-now/lib/performance-now.js","webpack:///./node_modules/react-animate-height/lib/AnimateHeight.js","webpack:///./node_modules/react-checkbox-context/lib/index.js","webpack:///./node_modules/react-dom/cjs/react-dom.development.js","webpack:///./node_modules/react-dom/index.js","webpack:///./node_modules/react-dom/node_modules/scheduler/cjs/scheduler-tracing.development.js","webpack:///./node_modules/react-dom/node_modules/scheduler/cjs/scheduler.development.js","webpack:///./node_modules/react-dom/node_modules/scheduler/index.js","webpack:///./node_modules/react-dom/node_modules/scheduler/tracing.js","webpack:///./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css?0695","webpack:///./node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.js","webpack:///./node_modules/react-feather/dist/icons/activity.js","webpack:///./node_modules/react-feather/dist/icons/airplay.js","webpack:///./node_modules/react-feather/dist/icons/alert-circle.js","webpack:///./node_modules/react-feather/dist/icons/alert-octagon.js","webpack:///./node_modules/react-feather/dist/icons/alert-triangle.js","webpack:///./node_modules/react-feather/dist/icons/align-center.js","webpack:///./node_modules/react-feather/dist/icons/align-justify.js","webpack:///./node_modules/react-feather/dist/icons/align-left.js","webpack:///./node_modules/react-feather/dist/icons/align-right.js","webpack:///./node_modules/react-feather/dist/icons/anchor.js","webpack:///./node_modules/react-feather/dist/icons/aperture.js","webpack:///./node_modules/react-feather/dist/icons/archive.js","webpack:///./node_modules/react-feather/dist/icons/arrow-down-circle.js","webpack:///./node_modules/react-feather/dist/icons/arrow-down-left.js","webpack:///./node_modules/react-feather/dist/icons/arrow-down-right.js","webpack:///./node_modules/react-feather/dist/icons/arrow-down.js","webpack:///./node_modules/react-feather/dist/icons/arrow-left-circle.js","webpack:///./node_modules/react-feather/dist/icons/arrow-left.js","webpack:///./node_modules/react-feather/dist/icons/arrow-right-circle.js","webpack:///./node_modules/react-feather/dist/icons/arrow-right.js","webpack:///./node_modules/react-feather/dist/icons/arrow-up-circle.js","webpack:///./node_modules/react-feather/dist/icons/arrow-up-left.js","webpack:///./node_modules/react-feather/dist/icons/arrow-up-right.js","webpack:///./node_modules/react-feather/dist/icons/arrow-up.js","webpack:///./node_modules/react-feather/dist/icons/at-sign.js","webpack:///./node_modules/react-feather/dist/icons/award.js","webpack:///./node_modules/react-feather/dist/icons/bar-chart-2.js","webpack:///./node_modules/react-feather/dist/icons/bar-chart.js","webpack:///./node_modules/react-feather/dist/icons/battery-charging.js","webpack:///./node_modules/react-feather/dist/icons/battery.js","webpack:///./node_modules/react-feather/dist/icons/bell-off.js","webpack:///./node_modules/react-feather/dist/icons/bell.js","webpack:///./node_modules/react-feather/dist/icons/bluetooth.js","webpack:///./node_modules/react-feather/dist/icons/bold.js","webpack:///./node_modules/react-feather/dist/icons/book-open.js","webpack:///./node_modules/react-feather/dist/icons/book.js","webpack:///./node_modules/react-feather/dist/icons/bookmark.js","webpack:///./node_modules/react-feather/dist/icons/box.js","webpack:///./node_modules/react-feather/dist/icons/briefcase.js","webpack:///./node_modules/react-feather/dist/icons/calendar.js","webpack:///./node_modules/react-feather/dist/icons/camera-off.js","webpack:///./node_modules/react-feather/dist/icons/camera.js","webpack:///./node_modules/react-feather/dist/icons/cast.js","webpack:///./node_modules/react-feather/dist/icons/check-circle.js","webpack:///./node_modules/react-feather/dist/icons/check-square.js","webpack:///./node_modules/react-feather/dist/icons/check.js","webpack:///./node_modules/react-feather/dist/icons/chevron-down.js","webpack:///./node_modules/react-feather/dist/icons/chevron-left.js","webpack:///./node_modules/react-feather/dist/icons/chevron-right.js","webpack:///./node_modules/react-feather/dist/icons/chevron-up.js","webpack:///./node_modules/react-feather/dist/icons/chevrons-down.js","webpack:///./node_modules/react-feather/dist/icons/chevrons-left.js","webpack:///./node_modules/react-feather/dist/icons/chevrons-right.js","webpack:///./node_modules/react-feather/dist/icons/chevrons-up.js","webpack:///./node_modules/react-feather/dist/icons/chrome.js","webpack:///./node_modules/react-feather/dist/icons/circle.js","webpack:///./node_modules/react-feather/dist/icons/clipboard.js","webpack:///./node_modules/react-feather/dist/icons/clock.js","webpack:///./node_modules/react-feather/dist/icons/cloud-drizzle.js","webpack:///./node_modules/react-feather/dist/icons/cloud-lightning.js","webpack:///./node_modules/react-feather/dist/icons/cloud-off.js","webpack:///./node_modules/react-feather/dist/icons/cloud-rain.js","webpack:///./node_modules/react-feather/dist/icons/cloud-snow.js","webpack:///./node_modules/react-feather/dist/icons/cloud.js","webpack:///./node_modules/react-feather/dist/icons/code.js","webpack:///./node_modules/react-feather/dist/icons/codepen.js","webpack:///./node_modules/react-feather/dist/icons/coffee.js","webpack:///./node_modules/react-feather/dist/icons/command.js","webpack:///./node_modules/react-feather/dist/icons/compass.js","webpack:///./node_modules/react-feather/dist/icons/copy.js","webpack:///./node_modules/react-feather/dist/icons/corner-down-left.js","webpack:///./node_modules/react-feather/dist/icons/corner-down-right.js","webpack:///./node_modules/react-feather/dist/icons/corner-left-down.js","webpack:///./node_modules/react-feather/dist/icons/corner-left-up.js","webpack:///./node_modules/react-feather/dist/icons/corner-right-down.js","webpack:///./node_modules/react-feather/dist/icons/corner-right-up.js","webpack:///./node_modules/react-feather/dist/icons/corner-up-left.js","webpack:///./node_modules/react-feather/dist/icons/corner-up-right.js","webpack:///./node_modules/react-feather/dist/icons/cpu.js","webpack:///./node_modules/react-feather/dist/icons/credit-card.js","webpack:///./node_modules/react-feather/dist/icons/crop.js","webpack:///./node_modules/react-feather/dist/icons/crosshair.js","webpack:///./node_modules/react-feather/dist/icons/database.js","webpack:///./node_modules/react-feather/dist/icons/delete.js","webpack:///./node_modules/react-feather/dist/icons/disc.js","webpack:///./node_modules/react-feather/dist/icons/dollar-sign.js","webpack:///./node_modules/react-feather/dist/icons/download-cloud.js","webpack:///./node_modules/react-feather/dist/icons/download.js","webpack:///./node_modules/react-feather/dist/icons/droplet.js","webpack:///./node_modules/react-feather/dist/icons/edit-2.js","webpack:///./node_modules/react-feather/dist/icons/edit-3.js","webpack:///./node_modules/react-feather/dist/icons/edit.js","webpack:///./node_modules/react-feather/dist/icons/external-link.js","webpack:///./node_modules/react-feather/dist/icons/eye-off.js","webpack:///./node_modules/react-feather/dist/icons/eye.js","webpack:///./node_modules/react-feather/dist/icons/facebook.js","webpack:///./node_modules/react-feather/dist/icons/fast-forward.js","webpack:///./node_modules/react-feather/dist/icons/feather.js","webpack:///./node_modules/react-feather/dist/icons/file-minus.js","webpack:///./node_modules/react-feather/dist/icons/file-plus.js","webpack:///./node_modules/react-feather/dist/icons/file-text.js","webpack:///./node_modules/react-feather/dist/icons/file.js","webpack:///./node_modules/react-feather/dist/icons/film.js","webpack:///./node_modules/react-feather/dist/icons/filter.js","webpack:///./node_modules/react-feather/dist/icons/flag.js","webpack:///./node_modules/react-feather/dist/icons/folder-minus.js","webpack:///./node_modules/react-feather/dist/icons/folder-plus.js","webpack:///./node_modules/react-feather/dist/icons/folder.js","webpack:///./node_modules/react-feather/dist/icons/frown.js","webpack:///./node_modules/react-feather/dist/icons/gift.js","webpack:///./node_modules/react-feather/dist/icons/git-branch.js","webpack:///./node_modules/react-feather/dist/icons/git-commit.js","webpack:///./node_modules/react-feather/dist/icons/git-merge.js","webpack:///./node_modules/react-feather/dist/icons/git-pull-request.js","webpack:///./node_modules/react-feather/dist/icons/github.js","webpack:///./node_modules/react-feather/dist/icons/gitlab.js","webpack:///./node_modules/react-feather/dist/icons/globe.js","webpack:///./node_modules/react-feather/dist/icons/grid.js","webpack:///./node_modules/react-feather/dist/icons/hard-drive.js","webpack:///./node_modules/react-feather/dist/icons/hash.js","webpack:///./node_modules/react-feather/dist/icons/headphones.js","webpack:///./node_modules/react-feather/dist/icons/heart.js","webpack:///./node_modules/react-feather/dist/icons/help-circle.js","webpack:///./node_modules/react-feather/dist/icons/home.js","webpack:///./node_modules/react-feather/dist/icons/image.js","webpack:///./node_modules/react-feather/dist/icons/inbox.js","webpack:///./node_modules/react-feather/dist/icons/info.js","webpack:///./node_modules/react-feather/dist/icons/instagram.js","webpack:///./node_modules/react-feather/dist/icons/italic.js","webpack:///./node_modules/react-feather/dist/icons/key.js","webpack:///./node_modules/react-feather/dist/icons/layers.js","webpack:///./node_modules/react-feather/dist/icons/layout.js","webpack:///./node_modules/react-feather/dist/icons/life-buoy.js","webpack:///./node_modules/react-feather/dist/icons/link-2.js","webpack:///./node_modules/react-feather/dist/icons/link.js","webpack:///./node_modules/react-feather/dist/icons/linkedin.js","webpack:///./node_modules/react-feather/dist/icons/list.js","webpack:///./node_modules/react-feather/dist/icons/loader.js","webpack:///./node_modules/react-feather/dist/icons/lock.js","webpack:///./node_modules/react-feather/dist/icons/log-in.js","webpack:///./node_modules/react-feather/dist/icons/log-out.js","webpack:///./node_modules/react-feather/dist/icons/mail.js","webpack:///./node_modules/react-feather/dist/icons/map-pin.js","webpack:///./node_modules/react-feather/dist/icons/map.js","webpack:///./node_modules/react-feather/dist/icons/maximize-2.js","webpack:///./node_modules/react-feather/dist/icons/maximize.js","webpack:///./node_modules/react-feather/dist/icons/meh.js","webpack:///./node_modules/react-feather/dist/icons/menu.js","webpack:///./node_modules/react-feather/dist/icons/message-circle.js","webpack:///./node_modules/react-feather/dist/icons/message-square.js","webpack:///./node_modules/react-feather/dist/icons/mic-off.js","webpack:///./node_modules/react-feather/dist/icons/mic.js","webpack:///./node_modules/react-feather/dist/icons/minimize-2.js","webpack:///./node_modules/react-feather/dist/icons/minimize.js","webpack:///./node_modules/react-feather/dist/icons/minus-circle.js","webpack:///./node_modules/react-feather/dist/icons/minus-square.js","webpack:///./node_modules/react-feather/dist/icons/minus.js","webpack:///./node_modules/react-feather/dist/icons/monitor.js","webpack:///./node_modules/react-feather/dist/icons/moon.js","webpack:///./node_modules/react-feather/dist/icons/more-horizontal.js","webpack:///./node_modules/react-feather/dist/icons/more-vertical.js","webpack:///./node_modules/react-feather/dist/icons/move.js","webpack:///./node_modules/react-feather/dist/icons/music.js","webpack:///./node_modules/react-feather/dist/icons/navigation-2.js","webpack:///./node_modules/react-feather/dist/icons/navigation.js","webpack:///./node_modules/react-feather/dist/icons/octagon.js","webpack:///./node_modules/react-feather/dist/icons/package.js","webpack:///./node_modules/react-feather/dist/icons/paperclip.js","webpack:///./node_modules/react-feather/dist/icons/pause-circle.js","webpack:///./node_modules/react-feather/dist/icons/pause.js","webpack:///./node_modules/react-feather/dist/icons/percent.js","webpack:///./node_modules/react-feather/dist/icons/phone-call.js","webpack:///./node_modules/react-feather/dist/icons/phone-forwarded.js","webpack:///./node_modules/react-feather/dist/icons/phone-incoming.js","webpack:///./node_modules/react-feather/dist/icons/phone-missed.js","webpack:///./node_modules/react-feather/dist/icons/phone-off.js","webpack:///./node_modules/react-feather/dist/icons/phone-outgoing.js","webpack:///./node_modules/react-feather/dist/icons/phone.js","webpack:///./node_modules/react-feather/dist/icons/pie-chart.js","webpack:///./node_modules/react-feather/dist/icons/play-circle.js","webpack:///./node_modules/react-feather/dist/icons/play.js","webpack:///./node_modules/react-feather/dist/icons/plus-circle.js","webpack:///./node_modules/react-feather/dist/icons/plus-square.js","webpack:///./node_modules/react-feather/dist/icons/plus.js","webpack:///./node_modules/react-feather/dist/icons/pocket.js","webpack:///./node_modules/react-feather/dist/icons/power.js","webpack:///./node_modules/react-feather/dist/icons/printer.js","webpack:///./node_modules/react-feather/dist/icons/radio.js","webpack:///./node_modules/react-feather/dist/icons/refresh-ccw.js","webpack:///./node_modules/react-feather/dist/icons/refresh-cw.js","webpack:///./node_modules/react-feather/dist/icons/repeat.js","webpack:///./node_modules/react-feather/dist/icons/rewind.js","webpack:///./node_modules/react-feather/dist/icons/rotate-ccw.js","webpack:///./node_modules/react-feather/dist/icons/rotate-cw.js","webpack:///./node_modules/react-feather/dist/icons/rss.js","webpack:///./node_modules/react-feather/dist/icons/save.js","webpack:///./node_modules/react-feather/dist/icons/scissors.js","webpack:///./node_modules/react-feather/dist/icons/search.js","webpack:///./node_modules/react-feather/dist/icons/send.js","webpack:///./node_modules/react-feather/dist/icons/server.js","webpack:///./node_modules/react-feather/dist/icons/settings.js","webpack:///./node_modules/react-feather/dist/icons/share-2.js","webpack:///./node_modules/react-feather/dist/icons/share.js","webpack:///./node_modules/react-feather/dist/icons/shield-off.js","webpack:///./node_modules/react-feather/dist/icons/shield.js","webpack:///./node_modules/react-feather/dist/icons/shopping-bag.js","webpack:///./node_modules/react-feather/dist/icons/shopping-cart.js","webpack:///./node_modules/react-feather/dist/icons/shuffle.js","webpack:///./node_modules/react-feather/dist/icons/sidebar.js","webpack:///./node_modules/react-feather/dist/icons/skip-back.js","webpack:///./node_modules/react-feather/dist/icons/skip-forward.js","webpack:///./node_modules/react-feather/dist/icons/slack.js","webpack:///./node_modules/react-feather/dist/icons/slash.js","webpack:///./node_modules/react-feather/dist/icons/sliders.js","webpack:///./node_modules/react-feather/dist/icons/smartphone.js","webpack:///./node_modules/react-feather/dist/icons/smile.js","webpack:///./node_modules/react-feather/dist/icons/speaker.js","webpack:///./node_modules/react-feather/dist/icons/square.js","webpack:///./node_modules/react-feather/dist/icons/star.js","webpack:///./node_modules/react-feather/dist/icons/stop-circle.js","webpack:///./node_modules/react-feather/dist/icons/sun.js","webpack:///./node_modules/react-feather/dist/icons/sunrise.js","webpack:///./node_modules/react-feather/dist/icons/sunset.js","webpack:///./node_modules/react-feather/dist/icons/tablet.js","webpack:///./node_modules/react-feather/dist/icons/tag.js","webpack:///./node_modules/react-feather/dist/icons/target.js","webpack:///./node_modules/react-feather/dist/icons/terminal.js","webpack:///./node_modules/react-feather/dist/icons/thermometer.js","webpack:///./node_modules/react-feather/dist/icons/thumbs-down.js","webpack:///./node_modules/react-feather/dist/icons/thumbs-up.js","webpack:///./node_modules/react-feather/dist/icons/toggle-left.js","webpack:///./node_modules/react-feather/dist/icons/toggle-right.js","webpack:///./node_modules/react-feather/dist/icons/trash-2.js","webpack:///./node_modules/react-feather/dist/icons/trash.js","webpack:///./node_modules/react-feather/dist/icons/trello.js","webpack:///./node_modules/react-feather/dist/icons/trending-down.js","webpack:///./node_modules/react-feather/dist/icons/trending-up.js","webpack:///./node_modules/react-feather/dist/icons/triangle.js","webpack:///./node_modules/react-feather/dist/icons/truck.js","webpack:///./node_modules/react-feather/dist/icons/tv.js","webpack:///./node_modules/react-feather/dist/icons/twitter.js","webpack:///./node_modules/react-feather/dist/icons/type.js","webpack:///./node_modules/react-feather/dist/icons/umbrella.js","webpack:///./node_modules/react-feather/dist/icons/underline.js","webpack:///./node_modules/react-feather/dist/icons/unlock.js","webpack:///./node_modules/react-feather/dist/icons/upload-cloud.js","webpack:///./node_modules/react-feather/dist/icons/upload.js","webpack:///./node_modules/react-feather/dist/icons/user-check.js","webpack:///./node_modules/react-feather/dist/icons/user-minus.js","webpack:///./node_modules/react-feather/dist/icons/user-plus.js","webpack:///./node_modules/react-feather/dist/icons/user-x.js","webpack:///./node_modules/react-feather/dist/icons/user.js","webpack:///./node_modules/react-feather/dist/icons/users.js","webpack:///./node_modules/react-feather/dist/icons/video-off.js","webpack:///./node_modules/react-feather/dist/icons/video.js","webpack:///./node_modules/react-feather/dist/icons/voicemail.js","webpack:///./node_modules/react-feather/dist/icons/volume-1.js","webpack:///./node_modules/react-feather/dist/icons/volume-2.js","webpack:///./node_modules/react-feather/dist/icons/volume-x.js","webpack:///./node_modules/react-feather/dist/icons/volume.js","webpack:///./node_modules/react-feather/dist/icons/watch.js","webpack:///./node_modules/react-feather/dist/icons/wifi-off.js","webpack:///./node_modules/react-feather/dist/icons/wifi.js","webpack:///./node_modules/react-feather/dist/icons/wind.js","webpack:///./node_modules/react-feather/dist/icons/x-circle.js","webpack:///./node_modules/react-feather/dist/icons/x-square.js","webpack:///./node_modules/react-feather/dist/icons/x.js","webpack:///./node_modules/react-feather/dist/icons/youtube.js","webpack:///./node_modules/react-feather/dist/icons/zap-off.js","webpack:///./node_modules/react-feather/dist/icons/zap.js","webpack:///./node_modules/react-feather/dist/icons/zoom-in.js","webpack:///./node_modules/react-feather/dist/icons/zoom-out.js","webpack:///./node_modules/react-feather/dist/index.js","webpack:///./node_modules/react-i18next/dist/es/I18nextProvider.js","webpack:///./node_modules/react-i18next/dist/es/Trans.js","webpack:///./node_modules/react-i18next/dist/es/Translation.js","webpack:///./node_modules/react-i18next/dist/es/context.js","webpack:///./node_modules/react-i18next/dist/es/index.js","webpack:///./node_modules/react-i18next/dist/es/unescape.js","webpack:///./node_modules/react-i18next/dist/es/useSSR.js","webpack:///./node_modules/react-i18next/dist/es/useTranslation.js","webpack:///./node_modules/react-i18next/dist/es/utils.js","webpack:///./node_modules/react-i18next/dist/es/withSSR.js","webpack:///./node_modules/react-i18next/dist/es/withTranslation.js","webpack:///./node_modules/react-inlinesvg/es/index.js","webpack:///./node_modules/react-inlinesvg/es/utils.js","webpack:///./node_modules/react-input-autosize/lib/AutosizeInput.js","webpack:///./node_modules/react-is/cjs/react-is.development.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack:///./node_modules/react-markdown/index.js","webpack:///./node_modules/react-markdown/lib/ast-to-react.js","webpack:///./node_modules/react-markdown/lib/react-markdown.js","webpack:///./node_modules/react-markdown/lib/rehype-filter.js","webpack:///./node_modules/react-markdown/lib/uri-transformer.js","webpack:///./node_modules/react-markdown/node_modules/react-is/cjs/react-is.development.js","webpack:///./node_modules/react-markdown/node_modules/react-is/index.js","webpack:///./node_modules/react-measure/dist/index.esm.js","webpack:///./node_modules/react-measure/node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/react-measure/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./node_modules/react-measure/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/react-measure/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/react-measure/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack:///./node_modules/react-motion/lib/Motion.js","webpack:///./node_modules/react-motion/lib/StaggeredMotion.js","webpack:///./node_modules/react-motion/lib/TransitionMotion.js","webpack:///./node_modules/react-motion/lib/mapToZero.js","webpack:///./node_modules/react-motion/lib/mergeDiff.js","webpack:///./node_modules/react-motion/lib/presets.js","webpack:///./node_modules/react-motion/lib/react-motion.js","webpack:///./node_modules/react-motion/lib/reorderKeys.js","webpack:///./node_modules/react-motion/lib/shouldStopAnimation.js","webpack:///./node_modules/react-motion/lib/spring.js","webpack:///./node_modules/react-motion/lib/stepper.js","webpack:///./node_modules/react-motion/lib/stripStyle.js","webpack:///./node_modules/react-numeric-input/index.js","webpack:///./node_modules/react-onclickoutside/dist/react-onclickoutside.es.js","webpack:///./node_modules/react-radio-group/lib/index.js","webpack:///./node_modules/react-router-dom/esm/react-router-dom.js","webpack:///./node_modules/react-router/esm/react-router.js","webpack:///./node_modules/react-router/node_modules/isarray/index.js","webpack:///./node_modules/react-router/node_modules/path-to-regexp/index.js","webpack:///./node_modules/react-rte/dist/react-rte.js","webpack:///./node_modules/react-select/dist/Select-e1cf49ae.browser.esm.js","webpack:///./node_modules/react-select/dist/index-75b02bac.browser.esm.js","webpack:///./node_modules/react-select/dist/react-select.browser.esm.js","webpack:///./node_modules/react-select/dist/stateManager-2f2b6f5b.browser.esm.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/inherits.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/react-select/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/react-show-more/lib/ShowMore.js","webpack:///./node_modules/react-transition-group/CSSTransition.js","webpack:///./node_modules/react-transition-group/ReplaceTransition.js","webpack:///./node_modules/react-transition-group/Transition.js","webpack:///./node_modules/react-transition-group/TransitionGroup.js","webpack:///./node_modules/react-transition-group/index.js","webpack:///./node_modules/react-transition-group/utils/ChildMapping.js","webpack:///./node_modules/react-transition-group/utils/PropTypes.js","webpack:///./node_modules/react-truncate/lib/Truncate.js","webpack:///./node_modules/react/cjs/react-jsx-runtime.development.js","webpack:///./node_modules/react/cjs/react.development.js","webpack:///./node_modules/react/index.js","webpack:///./node_modules/react/jsx-runtime.js","webpack:///./node_modules/recompose/compose.js","webpack:///./node_modules/recompose/defaultProps.js","webpack:///./node_modules/recompose/getDisplayName.js","webpack:///./node_modules/recompose/mapProps.js","webpack:///./node_modules/recompose/node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/recompose/node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./node_modules/recompose/node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/recompose/node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/recompose/node_modules/fbjs/lib/shallowEqual.js","webpack:///./node_modules/recompose/pure.js","webpack:///./node_modules/recompose/setDisplayName.js","webpack:///./node_modules/recompose/setPropTypes.js","webpack:///./node_modules/recompose/setStatic.js","webpack:///./node_modules/recompose/shallowEqual.js","webpack:///./node_modules/recompose/shouldUpdate.js","webpack:///./node_modules/recompose/utils/pick.js","webpack:///./node_modules/recompose/withProps.js","webpack:///./node_modules/recompose/withPropsOnChange.js","webpack:///./node_modules/recompose/wrapDisplayName.js","webpack:///./node_modules/reduce-css-calc/index.js","webpack:///./node_modules/reduce-css-calc/node_modules/balanced-match/index.js","webpack:///./node_modules/reduce-function-call/index.js","webpack:///./node_modules/remark-gfm/index.js","webpack:///./node_modules/remark-parse/index.js","webpack:///./node_modules/remark-parse/lib/index.js","webpack:///./node_modules/remark-rehype/index.js","webpack:///./node_modules/remark-rehype/lib/index.js","webpack:///./node_modules/remarkable/dist/esm/index.browser.js","webpack:///./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack:///./node_modules/resolve-pathname/esm/resolve-pathname.js","webpack:///./node_modules/setimmediate/setImmediate.js","webpack:///./node_modules/space-separated-tokens/index.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///./node_modules/style-to-object/index.js","webpack:///./node_modules/style-to-object/index.mjs","webpack:///./node_modules/tiny-invariant/dist/tiny-invariant.esm.js","webpack:///./node_modules/tiny-warning/dist/tiny-warning.esm.js","webpack:///./node_modules/trim-lines/index.js","webpack:///./node_modules/trough/index.js","webpack:///./node_modules/ua-parser-js/src/ua-parser.js","webpack:///./node_modules/unified/index.js","webpack:///./node_modules/unified/lib/index.js","webpack:///./node_modules/unified/node_modules/is-buffer/index.js","webpack:///./node_modules/unified/node_modules/is-plain-obj/index.js","webpack:///./node_modules/unist-util-generated/index.js","webpack:///./node_modules/unist-util-generated/lib/index.js","webpack:///./node_modules/unist-util-is/index.js","webpack:///./node_modules/unist-util-is/lib/index.js","webpack:///./node_modules/unist-util-position/index.js","webpack:///./node_modules/unist-util-position/lib/index.js","webpack:///./node_modules/unist-util-stringify-position/index.js","webpack:///./node_modules/unist-util-stringify-position/lib/index.js","webpack:///./node_modules/unist-util-visit-parents/index.js","webpack:///./node_modules/unist-util-visit-parents/lib/color.browser.js","webpack:///./node_modules/unist-util-visit-parents/lib/index.js","webpack:///./node_modules/unist-util-visit/index.js","webpack:///./node_modules/unist-util-visit/lib/index.js","webpack:///./node_modules/unstated/lib/unstated.es.js","webpack:///./node_modules/urllite/lib/core.js","webpack:///./node_modules/value-equal/esm/value-equal.js","webpack:///./node_modules/vfile-message/index.js","webpack:///./node_modules/vfile-message/lib/index.js","webpack:///./node_modules/vfile/index.js","webpack:///./node_modules/vfile/lib/index.js","webpack:///./node_modules/vfile/lib/minpath.browser.js","webpack:///./node_modules/vfile/lib/minproc.browser.js","webpack:///./node_modules/vfile/lib/minurl.browser.js","webpack:///./node_modules/vfile/lib/minurl.shared.js","webpack:///./node_modules/vfile/node_modules/is-buffer/index.js","webpack:///./node_modules/void-elements/index.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///(webpack)er-react/index.js","webpack:///(webpack)er-react/ujs.js","webpack:///./node_modules/wrappy/wrappy.js","webpack:///./node_modules/xtend/index.js"],"sourcesContent":[" \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 = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/application.js\");\n","module.exports = __webpack_public_path__ + \"media/images/auth-logos/mpki.telia.1-01b19f67e504aa21bcc2b25cd2aae40d.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.aktia.1-958057850b171bd0383c381d2bdbb268.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.alandsbanken.1-19aa97f2adac3715d1a0fc37644e7fe8.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.danskebank.1-1b2b87be011860b2684a9ad7c02b761d.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.handelsbanken.1-498fa7e261617b8569f1b9646e01553e.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.nordea.1-511334fe60b02cd4ed16ed629af729c8.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.omasp.1-c400d3d51089271b72ae160e3990116e.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.pop.1-c187675286f4a391fc2b367c44468c4c.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.sp.1-938b1d099ee12d9003d4479ed91fee2e.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/oidc.spankki.1-273512ead78b9f4b572edddeca55e312.svg\";","module.exports = __webpack_public_path__ + \"media/images/auth-logos/saml.op.1-7dc3d4a6bb3abe03ed3df1bc53e0b89b.svg\";","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--6-1!../../../node_modules/postcss-loader/src/index.js??ref--6-2!../../../node_modules/sass-loader/dist/cjs.js??ref--6-3!./app.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","/* eslint no-console:0 */\nimport \"core-js/fn/array/flat-map\";\nimport WebpackerReact from \"webpacker-react\";\n\nimport \"./app.scss\";\n\nimport App from \"../src/containers/App.js\";\nimport Login from \"../src/containers/Login.js\";\nimport LoginTeliaProviders from \"../src/containers/LoginTeliaProviders.js\";\nimport LoginGrandId from \"../src/containers/LoginGrandId.js\";\nimport Maintenance from \"../src/containers/Maintenance.js\";\n\nWebpackerReact.setup({\n App,\n Login,\n LoginTeliaProviders,\n LoginGrandId,\n Maintenance,\n});\n","module.exports = __webpack_public_path__ + \"media/src/assets/blood-fbf830772389930ff150259140c29dba.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/calendar-0aa970cf2052f800fc7aecd31246f748.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/check-676d4294bb0f05796e6dacdd878ec592.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/chevron-down-c3e123cf78bc368a192f3e2dee97daba.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/chevron-up-0f9ac6feebc71692b1c5edb4cb434f54.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/clock-225534d2e13f518e8925f3b5f4a0e616.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/droplet-49d3b1343e88b01d4777efaff5589121.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/external-link-90577cce48ecfddde9064420d52d9f5f.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/fonts/AlbertSans-Roman[wdth,wght]-edd78d20a7161593c5bc0811701df01c.woff2\";","module.exports = __webpack_public_path__ + \"media/src/assets/help-circle-95845a37195aab2e0bacdbee22ca5b92.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/logo-symbol-cdbe48862a8b10d6e653c628b56d66dc.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/printer-64cd3316a4534126358711d946e9eeef.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/puhti-logo-white-c1ff7eebeaa96b2723fd6593b8d1ce19.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/puhti-logo-ae645043cdf7b17decbb36d30a4246e1.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/puhti-logotype-8df1a5d451f0e8696d91efac4db2b478.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/repurchase-graph-2c1a3cb1f08ce0d6af12a82c450a8e9f.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/repurchase-graphic-7a30584f74b814551fd696346f2b9e71.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/vital-logo-white-0a9c56c5b324c438ee87c4d2d862fa57.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/vital-logo-762240b7c33ace0b7b5418b32aefb6bd.svg\";","module.exports = __webpack_public_path__ + \"media/src/assets/vital-logotype-9dee4088efe91f5fb52b9167ffbc2f9d.svg\";","const cache = {};\nconst cacheMeta = {};\nexport const AppCache = {\n transformKey: (key) => {\n if (Array.isArray(key)) {\n return key.join(\"-\");\n }\n return key;\n },\n get: (key) => {\n return cache[AppCache.transformKey(key)];\n },\n set: (key, value) => {\n cache[AppCache.transformKey(key)] = value;\n cacheMeta[AppCache.transformKey(key)] = {\n timestamp: new Date(),\n };\n return value;\n },\n};\n","import React from \"react\";\n\nimport ErrorMessage from \"../components/ErrorMessage\";\n\nclass ErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, info) {\n console.error(error, info);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (\n
\n \n
\n );\n }\n\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n","import React from \"react\";\n\n// Assets\nimport { AlertCircle } from \"react-feather\";\nimport { useTranslation } from \"react-i18next\";\nconst ErrorMessage = ({ text, callback, callbackText }) => {\n const { t } = useTranslation();\n return (\n
\n \n
\n {text ? text : t(\"error_message.something_went_wrong\")}\n
\n {callback && (\n \n )}\n
\n );\n};\n\nexport default ErrorMessage;\n","import React, { useState, useEffect, useRef } from \"react\";\n\nimport Select, { components } from \"react-select\";\nimport { ChevronRight } from \"react-feather\";\nimport SVG from \"react-inlinesvg\";\nimport { useTranslation } from \"react-i18next\";\n\nimport styles from \"./FilteringHeader.module.scss\";\n\nimport logoSymbol from \"../../assets/logo-symbol.svg\";\n\nconst selectStyles = {\n control: (styles) => {\n return {\n ...styles,\n borderRadius: \"0.25rem\",\n boxShadow: \"none\",\n border: \"none\",\n background: \"#1D0841\",\n fontSize: \"16px\",\n padding: \"2px 4px\",\n };\n },\n indicatorSeparator: (styles) => ({\n ...styles,\n background: \"transparent\",\n }),\n dropdownIndicator: (styles) => ({\n ...styles,\n color: \"#6e9fd5\",\n }),\n clearIndicator: (styles) => ({\n ...styles,\n color: \"#CDC8D6\",\n }),\n menu: (styles) => ({\n ...styles,\n zIndex: \"10001\",\n background: \"#1D0841\",\n color: \"#FFFFFF\",\n }),\n valueContainer: (styles) => ({\n ...styles,\n background: \"#1D0841\",\n color: \"#FFFFFF\",\n padding: 0,\n }),\n multiValue: (styles) => ({\n ...styles,\n background: \"#241341\",\n border: \"1px solid #67318e\",\n }),\n multiValueLabel: (styles) => ({\n ...styles,\n color: \"#FFFFFF\",\n }),\n placeholder: (styles) => ({\n ...styles,\n opacity: \"1\",\n color: \"#CDC8D6\",\n paddingLeft: 10,\n fontWeight: \"bold\",\n fontStretch: \"94%\",\n }),\n groupHeading: (styles) => ({\n ...styles,\n color: \"#CDC8D6\",\n }),\n noOptionsMessage: (styles) => ({\n ...styles,\n color: \"#CDC8D6\",\n fontWeight: \"bold\",\n }),\n option: (styles, { data, isDisabled, isFocused, isSelected }) => ({\n ...styles,\n backgroundColor: isDisabled\n ? null\n : isSelected\n ? \"#67318e\"\n : isFocused\n ? \"#39235d\"\n : null,\n\n \":active\": {\n ...styles[\":active\"],\n backgroundColor: \"#67318e\",\n },\n }),\n input: (styles) => ({\n ...styles,\n color: \"#FFFFFF\",\n paddingLeft: 10,\n }),\n};\n\nconst FilteringHeader = ({\n allTests,\n filteredTests,\n activeSummaryFilters,\n setActiveSummaryFilters,\n setFilteredTests,\n activeTest,\n}) => {\n let resultsClone = JSON.parse(JSON.stringify(allTests));\n const { t } = useTranslation();\n const [pageScrolled, setPageScrolled] = useState(false);\n\n const summaries = {\n below_reference: activeTest.summary?.below_reference,\n above_reference: activeTest.summary?.above_reference,\n within_reference: activeTest.summary?.above_reference,\n no_reference: activeTest.summary?.no_reference,\n };\n\n const selectRef = useRef(null);\n\n let filterOptions = [];\n\n if (allTests.groups && allTests.groups.length) {\n filterOptions = allTests.groups.map((group) => {\n return {\n label: group.name,\n options:\n group.results &&\n group.results.length > 0 &&\n group.results.map((result) => {\n const name = `${result.description?.title} ${\n result.description?.name ? `(${result.description?.name})` : \"\"\n }`;\n return {\n value: result.code,\n label: name,\n group: group.id,\n };\n }),\n };\n });\n }\n\n const parseSummaryFilterCodes = (tests) => {\n return tests?.map((t) => Object.keys(t)[0]);\n };\n\n const summaryFilterOptions = {\n label: t(\"filtering_header.show_results\"),\n notFilterable: true, // meaning clicking other items in the filter can never hide this due to some logic\n options: [],\n };\n\n [\n {\n value: \"below_reference\",\n label: t(\"result_summary.below_reference\"),\n filters: parseSummaryFilterCodes(activeTest.summary?.below_reference),\n },\n {\n value: \"within_reference\",\n label: t(\"result_summary.within_references\"),\n filters: parseSummaryFilterCodes(activeTest.summary?.within_reference),\n },\n {\n value: \"above_reference\",\n label: t(\"result_summary.above_reference\"),\n filters: parseSummaryFilterCodes(activeTest.summary?.above_reference),\n },\n {\n value: \"no_reference\",\n label:\n t(\"result_summary.outside_references\").charAt(0).toUpperCase() +\n t(\"result_summary.outside_references\").slice(1),\n filters: parseSummaryFilterCodes(activeTest.summary?.no_reference),\n },\n ].forEach((summaryOption) => {\n if (activeTest.summary && activeTest.summary[summaryOption.value].length) {\n summaryFilterOptions.options.push(summaryOption);\n }\n });\n\n filterOptions =\n summaryFilterOptions.length > 0\n ? [summaryFilterOptions, ...filterOptions]\n : filterOptions;\n\n if (allTests.ordered_tests && allTests.ordered_tests.length) {\n let orderedTests = [];\n allTests.ordered_tests.forEach((order) => {\n const name = `${order.description?.title} ${\n order.description?.name ? `(${order.description?.name})` : \"\"\n }`;\n\n orderedTests.push({\n value: order.code,\n label: name,\n group: \"pending\",\n });\n });\n\n filterOptions.push({\n label: t(\"filtering_header.waiting_for_results\"),\n options: orderedTests,\n });\n }\n\n let currentValue = [];\n\n if (filteredTests && filteredTests.groups && filteredTests.groups.length) {\n filteredTests.groups.forEach((group) => {\n if (group.results && group.results.length > 0) {\n group.results.forEach((result) => {\n if (result.filtered) {\n const name = `${result.description?.title} ${\n result.description?.name ? `(${result.description?.name})` : \"\"\n }`;\n\n currentValue.push({\n value: result.code,\n label: name,\n group: group.id,\n });\n }\n });\n }\n });\n }\n\n if (\n filteredTests &&\n filteredTests.ordered_tests &&\n filteredTests.ordered_tests.length\n ) {\n filteredTests.ordered_tests.forEach((result) => {\n if (result.filtered) {\n const name = `${result.description?.title} ${\n result.description?.name ? `(${result.description?.name})` : \"\"\n }`;\n currentValue.push({\n value: result.code,\n label: name,\n group: \"pending\",\n });\n }\n });\n }\n\n if (activeSummaryFilters.length > 0) {\n const summaryFilterCodes = activeSummaryFilters\n .map((f) => f.filters)\n .flat();\n\n const filteredCurrentValue = currentValue.filter((v) =>\n summaryFilterCodes.some((code) => v.value === code),\n );\n\n let summaryFilteredGroups = filterOptions.filter(\n (filterOption) =>\n filterOption.options.some((option) =>\n summaryFilterCodes.includes(option.value),\n ) || filterOption.notFilterable,\n );\n\n //filter out results that are not in the summary codes\n summaryFilteredGroups = summaryFilteredGroups.map((group) => {\n if (group.notFilterable) {\n return group;\n }\n\n group.options = group.options.filter((o) =>\n summaryFilterCodes.some((code) => o.value === code),\n );\n return group;\n });\n\n currentValue = [...filteredCurrentValue, ...activeSummaryFilters];\n\n filterOptions = summaryFilteredGroups;\n }\n\n useEffect(() => {\n const scrollContent = window; //document.getElementById(\"root\");\n const testResults = document.getElementById(\"testResults\");\n\n const handleScroll = () => {\n const inView = testResults.getBoundingClientRect().top < 60;\n\n if (inView && !pageScrolled) {\n setPageScrolled(true);\n } else if (!inView && pageScrolled) {\n setPageScrolled(false);\n selectRef.current.select.blur();\n }\n };\n\n const handleFocus = () => {\n if (\n (document.activeElement.id === \"filter-select\" ||\n document.activeElement.id === \"filter-back-to-top\") &&\n !pageScrolled\n ) {\n setPageScrolled(true);\n }\n };\n\n if (scrollContent && testResults) {\n scrollContent.addEventListener(\"scroll\", handleScroll);\n }\n\n document.addEventListener(\"focus\", handleFocus, true);\n\n return () => {\n scrollContent.removeEventListener(\"scroll\", handleScroll);\n };\n }, [pageScrolled]);\n\n const Option = (props) => {\n const { t } = useTranslation();\n const isSummaryFilter = props.data.filters;\n\n let disableScroll = false;\n const currentValue = props.getValue();\n if (currentValue && currentValue.length) {\n if (currentValue.find((value) => value.value === props.value)) {\n disableScroll = false;\n } else {\n disableScroll = true;\n }\n }\n\n const isSelected = () => {\n if (isSummaryFilter) {\n return activeSummaryFilters.some(\n (filter) => filter.value === props.data.value,\n );\n }\n\n return props.isSelected;\n };\n\n return (\n
\n \n
\n \n
\n
\n {props.data.label}\n
\n \n {!isSummaryFilter && (\n {\n selectRef.current.select.blur();\n const result = document.getElementById(props.value);\n const scrollContent = window; //document.getElementById(\"root\");\n\n if (scrollContent && result) {\n scrollContent.scrollTo({\n top: result.getBoundingClientRect().top + window.scrollY - 80,\n left: 0,\n behavior: \"smooth\",\n });\n }\n }}\n >\n {t(\"filtering_header.redirect\")}\n \n \n )}\n
\n );\n };\n\n const handleSummaryFilterChange = (summaries) => {\n if (!summaries[0]?.filters || !summaries) {\n setActiveSummaryFilters([]);\n }\n\n setActiveSummaryFilters(summaries);\n };\n\n return (\n \n
\n {\n const scrollContent = window;\n //document.getElementById(\"root\");\n\n if (scrollContent) {\n scrollContent.scrollTo({\n top: 0,\n left: 0,\n behavior: \"smooth\",\n });\n e.target.blur();\n }\n }}\n >\n \n \n
\n (\n
{t(\"filtering_header.no_search_results\")}
\n )}\n onChange={(e) => {\n if (!e?.length && activeSummaryFilters.length) {\n setActiveSummaryFilters([]);\n return;\n }\n\n //summary filter handler\n if (e && e[0] && e[0][\"filters\"]) {\n handleSummaryFilterChange(e);\n return;\n }\n\n if (e && e.length) {\n e.forEach((value) => {\n let groupToMutate;\n if (value.group === \"pending\") {\n groupToMutate = resultsClone.ordered_tests;\n } else {\n groupToMutate =\n resultsClone.groups &&\n resultsClone.groups.length > 0 &&\n resultsClone.groups.find(\n (group) => group.id === value.group,\n );\n }\n\n if (groupToMutate) {\n if (\n !groupToMutate[\"filteredCodes\"] &&\n value.group !== \"pending\"\n ) {\n groupToMutate[\"filteredCodes\"] = [];\n }\n\n let resultToMutate;\n if (value.group === \"pending\") {\n resultToMutate =\n groupToMutate &&\n groupToMutate.length > 0 &&\n groupToMutate.find(\n (result) => result.code === value.value,\n );\n } else {\n resultToMutate =\n groupToMutate.results &&\n groupToMutate.results.length > 0 &&\n groupToMutate.results.find(\n (result) => result.code === value.value,\n );\n }\n if (resultToMutate) {\n resultToMutate[\"filtered\"] = true;\n if (value.group !== \"pending\") {\n groupToMutate[\"filteredCodes\"].push(\n resultToMutate.code,\n );\n }\n }\n }\n });\n setFilteredTests(resultsClone);\n } else {\n setFilteredTests(null);\n }\n\n const categories = document.getElementById(\"resultCategories\");\n const scrollContent = document.getElementById(\"root\");\n\n if (scrollContent && categories) {\n scrollContent.scrollTo({\n top:\n categories.getBoundingClientRect().top +\n scrollContent.scrollTop -\n 80,\n left: 0,\n });\n }\n }}\n theme={(theme) => ({\n ...theme,\n colors: {\n ...theme.colors,\n primary: \"#67318e\",\n },\n })}\n placeholder={t(\"filtering_header.filer_results_or_redirect\")}\n />\n
\n
\n \n );\n};\n\nexport default FilteringHeader;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-1!../../../../../node_modules/postcss-loader/src/index.js??ref--8-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-3!./FilteringHeader.module.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import React from \"react\";\nimport Logo from \"./Logo.js\";\n\nclass Footer extends React.Component {\n render() {\n return (\n
\n
\n \n
\n
\n );\n }\n}\n\nexport default Footer;\n","import React, { Component } from \"react\";\nimport { Group } from \"@vx/group\";\nimport { GlyphDot, Glyph as CustomGlyph } from \"@vx/glyph\";\nimport { LinePath, Bar, Line } from \"@vx/shape\";\nimport { withTooltip, Tooltip } from \"@vx/tooltip\";\nimport { AxisLeft, AxisBottom } from \"@vx/axis\";\nimport { scaleTime, scaleLinear } from \"@vx/scale\";\nimport { Grid } from \"@vx/grid\";\nimport { curveLinear } from \"@vx/curve\";\nimport { ParentSize } from \"@vx/responsive\";\nimport { localPoint } from \"@vx/event\";\nimport { Point } from \"@vx/point\";\nimport { LinearGradient } from \"@vx/gradient\";\nimport { extent, bisector } from \"d3-array\";\nimport { timeFormat } from \"d3-time-format\";\nimport chroma from \"chroma-js\";\nimport {\n valueHasSmallerThanSign,\n valueHasLargerThanSign,\n parseDisplayValue,\n} from \"../helpers\";\n\nconst chartTheme = {\n colors: {\n purple: \"#39235D\",\n purpleLight: \"#67318E\",\n gray: \"#626d7b\",\n white: \"#FFFFFF\",\n green: \"#43C45F\",\n yellow: \"#ffd44f\",\n },\n fontFamily:\n \"'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif\",\n};\n\nconst mapDateTicks = (data) => {\n return data.map((result) => result.date);\n};\n/*\nconst getReferenceValueTicks = (hideMinR, hideMaxR, minR, maxR, all) => {\n if (all) {\n let ticks = [0, 0];\n for (let index = all.length - 1; index >= 0; index--) {\n if (all[index].referenceHigh || all[index].referenceLow) {\n if (!all[index].referenceLow) {\n ticks = [all[index].referenceHigh];\n break;\n } else if (!all[index].referenceHigh) {\n ticks = [all[index].referenceLow];\n break;\n } else {\n ticks = [all[index].referenceLow, all[index].referenceHigh];\n break;\n }\n }\n }\n return ticks;\n } else if (hideMinR) {\n return [maxR];\n } else if (hideMaxR) {\n return [minR];\n } else {\n return [minR, maxR];\n }\n};\n*/\n// accessors\nconst x = (d) => d.date;\nconst y = (d) => d.value;\nconst bisectDate = bisector((d) => d.date).left;\nconst formatDate = timeFormat(\"%d.%m.%Y\");\n\nclass LineChart extends Component {\n handleTooltip = ({ event, data, x, xScale, yScale, margin }) => {\n const { showTooltip, unit } = this.props;\n const point = localPoint(event);\n const xPoint = point.x - margin.left;\n const x0 = xScale.invert(xPoint);\n const index = bisectDate(data, x0, 1);\n const d0 = data[index - 1];\n const d1 = data[index];\n let d = d0;\n if (d1 && d1.date) {\n d = x0 - x(d0) > x(d1) - x0 ? d1 : d0;\n }\n\n let obj = {\n tooltipData: d,\n tooltipLeft: xScale(d.date),\n tooltipTop: yScale(d.value),\n unit: unit,\n };\n\n showTooltip(obj);\n };\n\n tooltips = () => {\n const baseString = `${\n this.props.tooltipData.displayValue && this.props.tooltipData.displayValue\n } ${this.props.unit ? this.props.unit : \"\"}`;\n const { t } = this.props;\n const moreThanString = t(\"linechart.result_is_min_tooltip\") + \".\"; //` `;\n const lessThanString = t(\"linechart.result_is_max_tooltip\") + \".\"; //` Tulos on raja-arvollinen, ja enintään tässä pisteessä`;\n\n return (\n
\n \n {valueHasLargerThanSign(this.props.tooltipData.displayValue) ||\n valueHasSmallerThanSign(this.props.tooltipData.displayValue)\n ? valueHasLargerThanSign(this.props.tooltipData.displayValue)\n ? moreThanString\n : lessThanString\n : baseString}\n \n \n {/*formatDate(x(this.props.tooltipData))*/}\n {valueHasLargerThanSign(this.props.tooltipData.displayValue) ||\n valueHasSmallerThanSign(this.props.tooltipData.displayValue)\n ? formatDate(x(this.props.tooltipData)) +\n \" / \" +\n parseDisplayValue(this.props.tooltipData.displayValue, t) +\n \" \" +\n this.props.unit\n : formatDate(x(this.props.tooltipData))}\n \n
\n );\n };\n\n render() {\n const data = [...this.props.data].sort(function (a, b) {\n return a.date - b.date;\n });\n\n return (\n \n {(parent) => {\n const margin = { top: 10, bottom: 40, left: 50, right: 40 };\n const xMax = parent.width - margin.left - margin.right;\n const yMax = parent.height - margin.top - margin.bottom;\n // scales\n const xDomain = extent(data, x);\n const xScale = scaleTime({\n range: [0, xMax],\n domain: xDomain,\n });\n const yScale = scaleLinear({\n range: [yMax, 0],\n domain: [this.props.min, this.props.max],\n nice: true,\n });\n\n const getGreenAreaHeight = (props) => {\n const {\n hideMaxR,\n minR,\n maxR,\n recommendationLow,\n recommendationHigh,\n } = props;\n\n if (hideMaxR) {\n return yScale(minR) - yScale(maxR) + yScale(maxR);\n } else {\n if (recommendationLow && !recommendationHigh) {\n return yScale(recommendationLow) - yScale(maxR);\n }\n if (!recommendationLow && recommendationHigh) {\n return yScale(minR) - yScale(recommendationHigh);\n }\n if (recommendationLow && recommendationHigh) {\n return yScale(recommendationLow) - yScale(recommendationHigh);\n } else {\n return yScale(props.minR) - yScale(props.maxR);\n }\n }\n };\n\n const getGreenAreaY = (props) => {\n const { hideMaxR, maxR, recommendationLow, recommendationHigh } =\n props;\n\n if (hideMaxR) {\n return 0;\n } else {\n if (recommendationLow && !recommendationHigh) {\n return yScale(maxR);\n }\n if (!recommendationLow && recommendationHigh) {\n return yScale(recommendationHigh);\n }\n if (recommendationLow && recommendationHigh) {\n return yScale(recommendationHigh);\n } else {\n return yScale(maxR);\n }\n }\n };\n\n return (\n \n \n \n \n `${formatDate(value)}`}\n tickStroke={\"transparent\"}\n tickLabelProps={(value, index) => ({\n textAnchor: index === 0 ? \"start\" : \"end\",\n dx: index === 0 ? \"0px\" : \"0\",\n dy: \"20px\",\n fill: chartTheme.colors.purple,\n fontSize: \"12px\",\n fontWeight: 500,\n style: {\n fontSize: \"12px\",\n lineHeight: \"12px\",\n fontWeight: \"500\",\n },\n fontFamily: chartTheme.fontFamily,\n })}\n tickComponent={({ formattedValue, ...tickProps }) => (\n {formattedValue}\n )}\n />\n ({\n textAnchor: \"end\",\n dx: \"-0.25rem\",\n dy: \"0.25rem\",\n fill: chartTheme.colors.purple,\n fontFamily: chartTheme.fontFamily,\n fontSize: \"12px\",\n fontWeight: 500,\n style: {\n fontSize: \"12px\",\n lineHeight: \"12px\",\n fontWeight: \"500\",\n },\n })}\n />\n {(this.props.minR || this.props.maxR) && (\n <>\n {/*\n ({\n textAnchor: \"start\",\n dy: \"0.2rem\",\n fill: `${chroma(chartTheme.colors.green).darken(\n 0.5\n )}`,\n fontFamily: chartTheme.fontFamily,\n fontSize: \"14px\",\n fontWeight: 500,\n style: {\n fontSize: \"14px\",\n lineHeight: \"14px\",\n fontWeight: \"500\",\n },\n })}\n />*/}\n \n )}\n {!this.props.allReferenceValues ? (\n <>\n {!this.props.minR && !this.props.maxR ? null : (\n <>\n \n {!this.props.hideMaxR ? (\n \n ) : null}\n \n \n )}\n \n ) : (\n <>\n {this.props.allReferenceValues.map((cur, index) => {\n let lastIndex =\n this.props.allReferenceValues.length - 1;\n let prev =\n index !== 0 &&\n this.props.allReferenceValues[index - 1];\n let next =\n index !== lastIndex &&\n this.props.allReferenceValues[index + 1];\n\n if (!cur.referenceHigh && !cur.referenceLow)\n return null;\n\n return (\n \n \n {cur.referenceHigh ? (\n \n ) : null}\n \n \n );\n })}\n \n )}\n\n {!this.props.allReferenceValues ? (\n <>\n {this.props.recommendationLow && (\n \n )}\n \n ) : (\n <>\n {this.props.allReferenceValues.map((cur, index) => {\n const refLowCurrent = cur.referenceLow;\n\n let lastIndex =\n this.props.allReferenceValues.length - 1;\n let prev =\n index !== 0 &&\n this.props.allReferenceValues[index - 1];\n let next =\n index !== lastIndex &&\n this.props.allReferenceValues[index + 1];\n\n return (\n \n );\n })}\n \n )}\n\n {this.props.oneResult && (\n <>\n \n \n \n )}\n\n {\n const hasMinMax =\n valueHasSmallerThanSign(d.displayValue) ||\n valueHasLargerThanSign(d.displayValue);\n\n if (/*this.props.name !== \"fS-Transf\" && */ hasMinMax) {\n return (\n \n \n \n ❕\n \n \n );\n }\n\n return (\n \n \n\n \n \n );\n }}\n />\n (event) =>\n this.handleTooltip({\n event,\n data,\n x,\n xScale,\n yScale,\n margin,\n })\n }\n onTouchMove={(data) => (event) =>\n this.handleTooltip({\n event,\n data,\n x,\n xScale,\n yScale,\n margin,\n })\n }\n onMouseMove={(data) => (event) =>\n this.handleTooltip({\n event,\n data,\n x,\n xScale,\n yScale,\n margin,\n })\n }\n onMouseLeave={(data) => (event) => this.props.hideTooltip()}\n />\n {this.props.tooltipData &&\n !valueHasSmallerThanSign(\n this.props.tooltipData.displayValue,\n ) &&\n !valueHasLargerThanSign(\n this.props.tooltipData.displayValue,\n ) && (\n \n \n \n \n )}\n\n {/*this.props.recommendationHigh && (\n \n )*/}\n\n {!this.props.allReferenceValues ? (\n <>\n {this.props.recommendationHigh && (\n \n )}\n \n ) : (\n <>\n {this.props.allReferenceValues.map((cur, index) => {\n const refHighCurrent = cur.referenceHigh;\n\n let lastIndex =\n this.props.allReferenceValues.length - 1;\n let prev =\n index !== 0 &&\n this.props.allReferenceValues[index - 1];\n let next =\n index !== lastIndex &&\n this.props.allReferenceValues[index + 1];\n\n const getWidth = () => {\n if (index === 0) {\n return xScale(next.date) / 2;\n } else if (index === lastIndex) {\n return (\n xMax - (xScale(prev.date) + xScale(cur.date)) / 2\n );\n } else {\n return (\n (xScale(next.date) + xScale(cur.date)) / 2 -\n (xScale(prev.date) + xScale(cur.date)) / 2\n );\n }\n };\n\n const getX = () => {\n return index === 0\n ? 0\n : (xScale(prev.date) + xScale(cur.date)) / 2;\n };\n\n return (\n \n );\n })}\n \n )}\n \n \n {this.props.tooltipData && this.tooltips()}\n \n );\n }}\n \n );\n }\n}\n\nexport default withTooltip(LineChart);\n","import React, { Component } from \"react\";\nimport SVG from \"react-inlinesvg\";\n\n// Assets\nimport logoSymbol from \"../assets/logo-symbol.svg\";\nimport { useTranslation } from \"react-i18next\";\n\nconst LoadingSpinner = ({ small, noText, text }) => {\n const { t } = useTranslation();\n return (\n
\n \n {!noText && (\n
\n {text ? text : t(\"loading_spinner.loading\")}\n
\n )}\n
\n );\n};\n\nexport default LoadingSpinner;\n","import React, { Component } from \"react\";\n\nimport { withTranslation } from \"react-i18next\";\nimport { resolveUrl } from \"../links\";\n\nimport env from \"../env\";\nimport i18n from \"../localization/i18n\";\nimport { Flipper } from \"../flipper\";\nimport { Globe } from \"react-feather\";\n\nconst changeLanguage = (lng) => {\n i18n.changeLanguage(lng);\n localStorage.setItem(\"selectedLanguage\", lng);\n window.location.reload(false);\n};\n\nconst availableLanguages = () => {\n const languageString = env.LOCALIZATION_ALLOWED_LOCALES || \"\";\n const languages = languageString.split(\",\").map((lang) => lang.trim());\n return languages;\n};\n\nclass LoginFooter extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n if (this.props?.features) {\n Flipper.setFeatures(this.props?.features);\n }\n }\n\n renderIcon(icon) {\n return
{icon}
;\n }\n\n render() {\n const currentLanguage = i18n.language;\n const { t } = this.props;\n\n return (\n
\n
\n
\n \n {t(\"login.back_link\")}\n \n
\n
\n \n {t(\"login.faq_link\")}\n \n
\n {\n <>\n {this.renderIcon()}\n changeLanguage(e.target.value)}\n >\n {availableLanguages().map((lang) => (\n \n ))}\n \n \n }\n
\n
\n );\n }\n}\n\nexport default withTranslation()(LoginFooter);\n","import React from \"react\";\nimport SVG from \"react-inlinesvg\";\n\nimport env from \"../env\";\n\nimport puhtiLogoWhite from \"../assets/puhti-logo-white.svg\";\nimport vitalLogoWhite from \"../assets/vital-logo-white.svg\";\n\nimport puhtiLogoType from \"../assets/puhti-logotype.svg\";\nimport vitalLogoType from \"../assets/vital-logotype.svg\";\n\nimport vitalLogo from \"../assets/vital-logo.svg\";\nimport puhtiLogo from \"../assets/puhti-logo.svg\";\n\nimport logoSymbol from \"../assets/logo-symbol.svg\";\n\nconst Logo = ({ className, logoType }) => {\n const logo = {\n puhti: {\n noLogo: puhtiLogoType,\n white: puhtiLogoWhite,\n symbol: logoSymbol,\n default: puhtiLogo,\n },\n vital: {\n noLogo: vitalLogoType,\n white: vitalLogoWhite,\n symbol: logoSymbol,\n default: vitalLogo,\n },\n }[env.APP_ID][logoType || \"default\"];\n\n return ;\n};\n\nexport default Logo;\n","import React, { useState } from \"react\";\nimport { I18nextProvider, useTranslation } from \"react-i18next\";\nimport i18n from \"../../localization/i18n\";\nimport RichTextEditor from \"react-rte\";\nimport { EditorState, convertToRaw, convertFromRaw } from \"draft-js\";\nimport { MarkdownRender } from \"./MarkdownRender\";\nimport { markdownToDraft } from \"markdown-draft-js\";\nimport { Editor } from \"react-draft-wysiwyg\";\nimport \"react-draft-wysiwyg/dist/react-draft-wysiwyg.css\";\nimport styles from \"./Markdown.module.scss\";\n\nconst defaultConfig = {\n extraProps: { tabIndex: \"-1\" },\n INLINE_STYLE_BUTTONS: [\n { label: \"Bold\", style: \"BOLD\" },\n { label: \"Italic\", style: \"ITALIC\" },\n { label: \"Code\", style: \"CODE\" },\n ],\n BLOCK_TYPE_DROPDOWN: [\n { label: \"Normal\", style: \"unstyled\" },\n { label: \"Heading Large\", style: \"header-one\" },\n { label: \"Heading Medium\", style: \"header-two\" },\n { label: \"Heading Small\", style: \"header-three\" },\n ],\n BLOCK_TYPE_BUTTONS: [\n { label: \"UL\", style: \"unordered-list-item\" },\n { label: \"OL\", style: \"ordered-list-item\" },\n ],\n};\n\nconst draftJsToolbar = {\n options: [\"inline\"],\n inline: {\n inDropdown: false,\n className: undefined,\n component: undefined,\n dropdownClassName: undefined,\n options: [\"bold\", \"italic\"],\n },\n};\n\nexport const MarkdownEditor = ({\n inputId,\n textInputRef,\n toolbarConfig = defaultConfig,\n propsDefaultValue,\n valueFrom = \"markdown\",\n hidePreviewButton = false,\n editorLabel,\n children,\n draftJsMarkdown,\n onBlur,\n onChange,\n}) => {\n const { t } = useTranslation();\n\n const [preview, setPreview] = useState(false);\n const input = document.getElementById(inputId) || textInputRef;\n\n let defaultValue;\n if (!draftJsMarkdown) {\n if (propsDefaultValue) {\n defaultValue = RichTextEditor.createValueFromString(\n propsDefaultValue,\n valueFrom,\n );\n } else {\n defaultValue =\n (input?.value && input?.value.length > 0) ||\n (input?.current?.defaultValue &&\n input?.current?.defaultValue.length > 0)\n ? RichTextEditor.createValueFromString(\n input?.value || input.current?.defaultValue,\n valueFrom,\n )\n : RichTextEditor.createEmptyValue();\n }\n } else {\n const markdownString = draftJsMarkdown;\n const rawData = markdownToDraft(markdownString);\n const contentState = convertFromRaw(rawData);\n defaultValue = EditorState.createWithContent(contentState);\n }\n\n const [editorValue, setEditorValue] = useState(defaultValue);\n\n const onDraftJsEditorStateChange = (editorState) => {\n setEditorValue(editorState);\n };\n\n const getParsedValue = () => {\n const blocks = convertToRaw(editorValue.getCurrentContent()).blocks;\n const value = blocks\n .map((block) => (!block.text.trim() && \"\\n\") || block.text)\n .join(\"\\n\");\n return value;\n };\n\n if (input || draftJsMarkdown) {\n return (\n \n {!preview ? (\n
\n
\n {editorLabel && }\n {!draftJsMarkdown && (\n {\n if (onBlur) onBlur(editorValue.toString(\"markdown\"));\n }}\n onChange={(value) => {\n if (input.current) {\n input.current.value = editorValue.toString(\"markdown\");\n } else {\n input.value = editorValue.toString(\"markdown\");\n }\n\n setEditorValue(value);\n if (onChange) {\n onChange(editorValue.toString(\"markdown\"));\n }\n }}\n toolbarConfig={toolbarConfig}\n />\n )}\n {draftJsMarkdown && (\n {\n const parseValue = getParsedValue();\n if (onBlur) {\n onBlur(parseValue);\n }\n }}\n onChange={() => {\n const parseValue = getParsedValue();\n if (onChange) {\n onChange(parseValue);\n }\n }}\n toolbar={draftJsToolbar}\n editorState={editorValue}\n onEditorStateChange={onDraftJsEditorStateChange}\n />\n )}\n
\n
\n ) : (\n
\n b.text.replace(\"\\n\", \" \\n\"))\n .join(\" \\n\\r\")\n : editorValue.toString(\"markdown\")\n }\n />\n
\n )}\n\n
\n {children && children}\n {!hidePreviewButton && (\n {\n e.preventDefault();\n setPreview(!preview);\n }}\n className=\"button\"\n >\n {preview ? t(\"markdown.edit\") : t(\"markdown.preview\")}\n \n )}\n
\n
\n );\n } else {\n return null;\n }\n};\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-1!../../../../../node_modules/postcss-loader/src/index.js??ref--8-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-3!./Markdown.module.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import React from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\n\nimport styles from \"./Markdown.module.scss\";\n\nconst renderers = {\n listItem: (props) => {\n if (props.ordered) {\n return (\n <>\n
  • \n \n {props.index + 1}\n \n {props.children[0]}\n
  • \n {props.children[1] ? (\n
      {props.children[1]}
    \n ) : null}\n \n );\n } else {\n return (\n <>\n
  • {props.children[0]}
  • \n {props.children[1] ? (\n \n ) : null}\n \n );\n }\n },\n};\n\nexport const MarkdownRender = ({ markdown }) => {\n return (\n
    \n \n {markdown}\n \n
    \n );\n};\n","import React from \"react\";\n\nconst MicrobiomeSuggestionSection = () => {\n return (\n
    \n
    \n
    \n
    \n

    \n Ohjeet ovat yleisiä vinkkejä, joilla pystyt vaikuttamaan suoliston\n mikrobiomiin. Huomioi myös mahdollisia sairauksia (kuten IBS tai\n keliakia) koskevat erityisruokavaliot.\n

    \n
    \n
    \n

    \n Ruokavalion ja elintapojen ohjeet\n

    \n
    \n

    \n Suoliston bakteeristoon voi vaikuttaa itse, vaikka myös\n ympäristöllä on suuri rooli mikrobiston muodostumisessa.\n Erityisesti ruokavalion avulla pystymme itse vaikuttamaan\n suoliston mikrobistoon. Kuidut ja probiootit ovat\n avainasemassa.\n

    \n
      \n Lisää näitä:\n
    • \n runsaskuituiset kasvikset, kaikki vihannekset, hedelmät,\n juurekset ja marjat\n
    • \n
    • täysjyvätuotteet, esimerkiksi täysjyväkaura
    • \n
    • \n muista syödä kasviksia kaikissa väreissä (polyfenolit)\n
    • \n
    • fermentoidut (eli hapatetut) ruoat kuten hapankaali
    • \n
    • \n probioottiset maitotuotteet kuten piimä, kefiiri, juusto,\n viili ja probioottiset jogurtit\n
    • \n
    • \n kuitupitoiset ruoat ja tarvittaessa kuituvalmisteet kuten\n psyllium tai pellavansiemenet\n
    • \n
    \n
      \n Vältä näitä:\n
    • runsaasti punaista lihaa sisältävä ruokavalio
    • \n
    • runsas valkoinen sokeri, karkit, pullat, keksit yms
    • \n
    • runsasrasvaiset pikaruoat ja einekset
    • \n
    • transrasvoja sisältävät ruoat
    • \n
    • liikaa proteiinia sisältävä ruokavalio
    • \n
    • turhat antibioottikuurit
    • \n
    • liiallinen stressi ja vähäinen palautuminen
    • \n
    • runsas alkoholinkäyttö ja tupakointi
    • \n
    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Kuidut (prebiootit)\n

    \n
    \n

    \n Prebiooteilla tarkoitetaan sulamattomia kuituja, joita\n suolistomikrobit käyttävät ruokanaan. Prebiootteja saadaan\n esimerkiksi kuitupitoisista kasviksista, joilla on toki myös\n muita etuja terveyden kannalta. Myös muut kasvikunnan\n tuotteet kuten sienet, palkokasvit ja täysjyväviljat\n toimivat prebiootteina.\n

    \n

    \n Suomalaiset saavat ruokavaliostaan keskimäärin liian vähän\n kuitua. Tämä koskee sekä naisia että miehiä. Kuidun riittävä\n saanti voi tulla ongelmaksi muun muassa\n vähähiilihydraattisella, ketogeenisella tai gluteenittomalla\n ruokavaliolla. Riittävä kuidun saanti vaikuttaa terveyteen\n kokonaisvaltaisesti; kuidulla on vaikutusta myös esimerkiksi\n verisuonisairauksien, ylipainon ja aikuisiän diabeteksen\n riskissä ja hoidossa.\n

    \n

    \n Kuitua voidaan yleisesti ottaen sanoa olevan kahdenlaista:\n liukenematonta ja liukoista kuitua, mutta todellisuudessa\n jako ei ole näin karkea. On myös hyvä opetella tutkailemaan\n ruokien ravintokuidun osuutta elintarvikkeiden\n tuoteselosteista. Kuidunkin suhteen kasvikunnan tuotteiden\n mahdollisimman monipuolinen käyttö on suotavaa.\n

    \n
      \n Hyviä prebioottisia ruokia ovat esimerkiksi:\n
    • artisokka, maa-artisokka, parsa, purjo
    • \n
    • pavut, kikherneet ja linssit
    • \n
    • marjat ja hedelmät
    • \n
    • sipulit, valkosipuli
    • \n
    • täysjyväkaura ja muut täysjyvätuotteet
    • \n
    • \n keitetty ja jäähdytetty peruna, bataatti ja riisi,\n tuorepuurot, kuumentamattomat kaurahiutaleet, banaani\n (resistentti tärkkelys)\n
    • \n
    \n

    \n Kuidun määrää voi lisätä syömällä enemmän kaikkia\n kasvikunnan tuotteita kuten papuja ja linssejä sekä\n täysjyvää. Lisäksi voi ottaa käyttöön itselle sopivan\n kuituvalmisteen. Kuituvalmisteita on useita erilaisia.\n Kuituvalmisteen valinnassa tulee huomioida myös muut\n suoliston sairaudet kuten IBS (kaikki valmisteet eivät sovi\n kaikille).\n

    \n

    \n Kuitulisän käytön aloittaminen auttaa vatsaa myös toimimaan\n useammin. On normaalia, että vatsa toimii myös useammin kuin\n kerran päivässä. Saman voi havaita lisätessään ruokavalioon\n runsaasti kasviperäistä ruokaa. Kuitulisää käytettäessä\n tulee nauttia runsaasti nestettä, ja mielellään liottaa\n kuituvalmiste jo etukäteen nesteeseen.\n

    \n

    \n Kaikkien muidenkin kasvisten ja marjojen syönti runsain\n määrin on suotavaa. Nauti marjoja ja kasviksia kaikissa\n väreissä. Huolehdi, että päivän aikana saat ruokavaliostasi\n viittä-kuutta eri väriä erilaisista kasviksista ja\n marjoista. Värikästä ruokaa suosiessasi saat runsasti\n polyfenoleita. Karkeasti sanottuna polyfenolit tarkoittavat\n kasvien väriaineita. Esimerkiksi kotimaisissa marjoissa on\n runsaasti polyfenoleita. Polyfenoleja saadaan kasvisten ja\n marjojen lisäksi myös esimerkiksi kahvista, teestä ja\n kylmäpuristetuista öljyistä.\n

    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Probiootit\n

    \n
    \n

    \n Probiootti tarkoittaa elävää bakteerikantaa, jolla on\n todettuja vaikutuksia suolistoon. Probioottisia ruokia\n kannattaa nauttia säännöllisesti; näin vaikutamme suoliston\n hyvinvointiin arkisilla valinnoillamme. Probiootteja voi\n nauttia myös ravintolisinä eli “maitohappobakteereina”.\n

    \n

    \n Probiootteja voi nauttia erityisesti ulkomaan matkojen ja\n antibioottikuurin aikana, sekä mikäli suoliston bakteeristo\n ei ole tasapainossa. Tietyistä probiooteista voi olla apua\n myös oireiden ja sairauksien ehkäisyssä ja hoidossa; asiasta\n tehdään tällä hetkellä lisää tutkimusta.\n

    \n

    \n Probioottiset lisäravinteet sisältävät useimmiten\n Bifidobacterium-, Lactobacillus-, Lactococcus- ja\n Streptococcus-sukujen lajeja. Probioottien teho vaihtelee\n riippuen ihmisestä ja käytetystä valmisteesta.\n

    \n

    \n Probioottisia valmisteita on monenlaisia, eikä oikean\n valmisteen löytäminen ole aina helppoa. Kannattaa kiinnittää\n huomiota valmisteen sisältämiin eri bakteerikantoihin.\n Niillä on kaikilla erilaiset vaikutukset suoliston\n mikrobistoon ja terveyteen. Valmisteissa on myös eroja\n lajien monipuolisuudessa sekä bakteerien määrissä.\n Yhdistämällä eri bakteerikantoja saadaan usein parhaiten\n tasapainotettua suolistoflooraa.\n

    \n

    \n Probioottisten lisäravinteiden vaikutuksista terveyteen on\n vielä melko vähän tutkimusta. Niiden käytöstä voi olla\n joissain tapauksissa apua. Tärkeämpää on kuitenkin muuttaa\n ruokavaliota entistä monipuolisemmaksi ja\n kasvisvoittoiseksi, sekä lisätä kuitujen määrää runsaasti.\n

    \n

    \n Probioottiset ruoat ovat ruokia, joista saadaan\n probiootteja. Lisäravinteiden ohella kannattaa erityisesti\n nauttia päivittäin ruokia, joista saadaan luontaisesti\n probiootteja.\n

    \n
      \n Probioottisia (probiootteja sisältäviä) ruokia ovat\n esimerkiksi:\n
    • \n fermentoidut eli hapatetut ruoat kuten hapankaali ja\n hapankurkku\n
    • \n
    • \n tietyt maitotuotteet kuten piimä, kefiiri, juusto, viili\n ja probioottiset jogurtit.\n
    • \n
    \n

    \n Kuumuus pilaa bakteerit ja valmisteet. Se kannattaa\n huomioida, jos esimerkiksi haluaa nauttia hyviä bakteereita\n hapankaalin tai muiden ruokien kautta. Näitä ruokia ei siis\n kannata kuumentaa. Säilytä myös probioottiset lisäravinteet\n viileässä.\n

    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Erityisruokavaliot\n

    \n
    \n

    \n Ruokavalio on aina yksilöllinen. Suolistolle sopivat ruoat\n ovat yksilöllisiä, eikä oireita aiheuttavia ruokia ole\n tarkoituksenmukaista syödä, vaikka niillä olisi muille\n henkilöille suotuisia vaikutuksia. Huomioi ruokavalion\n suunnittelussa aina myös muut sairautesi ja kysy tarkempaa\n neuvoa lääkäriltä tai ravitsemusterapeutilta, mikäli sinulla\n on muita sairauksia.\n

    \n

    \n Mikäli kärsit suoliston sairauksista, esimerkiksi IBS:stä,\n voi olla, että nämä kaikki näissä ohjeissa mainitut ruoat\n eivät sovi sinulle. Tutustu FODMAP-ruokavalioon, mikäli\n sinulla on ärtyvän suolen oireyhtymän oireita.\n

    \n

    \n Vuotavan suolen yhteydessä on tärkeää hoitaa perussairaudet\n kuntoon ja vahvistaa suoliston mikrobistoa esimerkiksi\n probiooteilla. Vuotavan suolen oireyhtymän kohdalla tutkimus\n on vielä puutteellista, mutta voit toki jo kokeilla\n itsehoitokeinoja ja erilaisia ruokavalioita, jotta saat apua\n oireiisiisi. AIP-ruokavalio voi olla hyödyllinen vuotavan\n suolen oireyhtymän hoidossa.\n

    \n

    Vältä myös ruokia, joista saat allergiaoireita.

    \n

    \n Keliakian hoidossa ainoa hoitomuoto on gluteeniton\n ruokavalio, vaikka tutkimusnäyttöä olisikin yhteyksistä\n tiettyihin suolistomikrobeihin. Mikäli epäilet keliakiaa,\n käy keliakiatestissä ja ota yhteyttä lääkäriin. Puhdin\n kautta pääset myös keliakian tutkimukseen.\n

    \n

    \n Laktoosi-intoleranssin hoidossa tulee välttää laktoosia\n sisältäviä ruokia, eli laktoosia sisältäviä maitotuotteita.\n Useista maitotuotteista on olemassa laktoositon vaihtoehto.\n Mikäli epäilet laktoosi-intoleranssia, käy testissä ja ota\n yhteyttä lääkäriin. Puhdin kautta pääset myös\n laktoosi-intoleranssin tutkimukseen.\n

    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Probiootit\n

    \n
    \n

    \n Probiootti tarkoittaa elävää bakteerikantaa, jolla on\n todettuja vaikutuksia suolistoon. Probioottisia ruokia\n kannattaa nauttia säännöllisesti; näin vaikutamme suoliston\n hyvinvointiin arkisilla valinnoillamme. Probiootteja voi\n nauttia myös ravintolisinä eli “maitohappobakteereina”.\n

    \n

    \n Probiootteja voi nauttia erityisesti ulkomaan matkojen ja\n antibioottikuurin aikana, sekä mikäli suoliston bakteeristo\n ei ole tasapainossa. Tietyistä probiooteista voi olla apua\n myös oireiden ja sairauksien ehkäisyssä ja hoidossa; asiasta\n tehdään tällä hetkellä lisää tutkimusta.\n

    \n

    \n Probioottiset lisäravinteet sisältävät useimmiten\n Bifidobacterium-, Lactobacillus-, Lactococcus- ja\n Streptococcus-sukujen lajeja. Probioottien teho vaihtelee\n riippuen ihmisestä ja käytetystä valmisteesta.\n

    \n

    \n Probioottisia valmisteita on monenlaisia, eikä oikean\n valmisteen löytäminen ole aina helppoa. Kannattaa kiinnittää\n huomiota valmisteen sisältämiin eri bakteerikantoihin.\n Niillä on kaikilla erilaiset vaikutukset suoliston\n mikrobistoon ja terveyteen. Valmisteissa on myös eroja\n lajien monipuolisuudessa sekä bakteerien määrissä.\n Yhdistämällä eri bakteerikantoja saadaan usein parhaiten\n tasapainotettua suolistoflooraa.\n

    \n

    \n Probioottisten lisäravinteiden vaikutuksista terveyteen on\n vielä melko vähän tutkimusta. Niiden käytöstä voi olla\n joissain tapauksissa apua. Tärkeämpää on kuitenkin muuttaa\n ruokavaliota entistä monipuolisemmaksi ja\n kasvisvoittoiseksi, sekä lisätä kuitujen määrää runsaasti.\n

    \n

    \n Probioottiset ruoat ovat ruokia, joista saadaan\n probiootteja. Lisäravinteiden ohella kannattaa erityisesti\n nauttia päivittäin ruokia, joista saadaan luontaisesti\n probiootteja.\n

    \n
      \n Probioottisia (probiootteja sisältäviä) ruokia ovat\n esimerkiksi:\n
    • \n fermentoidut eli hapatetut ruoat kuten hapankaali ja\n hapankurkku\n
    • \n
    • \n tietyt maitotuotteet kuten piimä, kefiiri, juusto, viili\n ja probioottiset jogurtit.\n
    • \n
    \n

    \n Kuumuus pilaa bakteerit ja valmisteet. Se kannattaa\n huomioida, jos esimerkiksi haluaa nauttia hyviä bakteereita\n hapankaalin tai muiden ruokien kautta. Näitä ruokia ei siis\n kannata kuumentaa. Säilytä myös probioottiset lisäravinteet\n viileässä.\n

    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Muut elintavat ja ympäristö\n

    \n
    \n

    \n Probioottien ja ruokavalion lisäksi suoliston mikrobistoon\n voi vaikuttaa myös muilla tavoin kuten stressinhallinnalla,\n lisäämällä liikuntaa ja liikkumalla luonnossa. Ympäristöllä\n on suuri merkitys suolistomikrobiomin kannalta. Luonnossa\n oleilu ja hyville bakteereille luonnostaan altistuminen on\n suositeltavaa.\n

    \n

    \n Stressi voi vaikuttaa negatiivisesti suoliston mikrobistoon.\n Stressi myös pahentaa hyvin usein muun muassa ärtyvän suolen\n oireyhtymän oireita. Palautumista voi edistää nukkumalla\n riittävästi ja harjoittamalla stressinhallintaa.\n

    \n

    \n Runsas alkoholin käyttö vaikuttaa epäsuotuisasti suoliston\n hyvinvointiin. Jatkuva alkoholinkäyttö muuttaa\n mikrobiflooraa ja aiheuttaa sen epätasapainotilaa tuhoamalla\n erityisesti hyviä suoliston mikrobilajeja.\n

    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Antibiootit ja tietyt lääkkeet heikentävät suoliston\n normaaliflooraa\n

    \n
    \n

    \n Antibiootit ovat kiistatta tietyissä tapauksissa hyödyksi.\n Liiallinen antibioottien käyttö ja turhaan syödyt useat\n antibioottikuurit ovat kuitenkin voineet vaatia veronsa;\n suoliston mikrobisto kärsii antibioottien syömisestä.\n Antibiootit tuhoavat nimittäin samalla myös osan suoliston\n hyvää mikrobistoa.\n

    \n

    \n Syötyjen antibioottikuurien vaikutus suolistolle voi olla\n useita vuosia. Myös jo lapsuuden aikana syödyillä\n antibioottikuureilla on merkitystä. Lisäksi antibiooteilla\n kasvatettu ravinto vaikuttaa syödyn ruoan välityksellä\n ihmisen suolistomikrobistoon.\n

    \n

    \n Myös muilla lääkkeillä kuin antibiooteilla (esimerkiksi\n tulehduskipulääkkeet) on vaikutusta suoliston mikrobiomiin.\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nexport default MicrobiomeSuggestionSection;\n","import React, { Component, Fragment } from \"react\";\n\nimport env from \"../env\";\n// Components\nimport LineChart from \"./LineChart\";\n\nimport { calculateValues, parseValueToFloat, hasNumber } from \"../helpers\";\nimport { MarkdownRender } from \"./Markdown/MarkdownRender\";\nimport axios from \"axios\";\nimport { AppCache } from \"../cache\";\nimport LoadingSpinner from \"./LoadingSpinner\";\n\nclass MoreInfo extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n error: null,\n results: [],\n description: null,\n };\n }\n\n componentDidMount() {\n let { code } = this.props;\n\n this.setState({\n error: null,\n loading: true,\n });\n\n const cached = AppCache.get([\"results\", code]);\n if (cached) {\n this.setState({\n results: cached,\n loading: false,\n error: null,\n });\n } else {\n const path = `/api/results/${code}`;\n axios\n .get(path)\n .then((response) => {\n const results = response.data;\n AppCache.set([\"results\", code], results);\n this.setState({\n results,\n loading: false,\n error: null,\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n });\n }\n }\n\n renderSources() {\n const { description, t } = this.props;\n if (description.source_urls && description.source_urls.length > 0) {\n const urls = description.source_urls;\n return (\n
    \n {t(\"more_info.sources\")}:{\" \"}\n {urls.map((url, index) => {\n return (\n \n \n {t(\"more_info.source\")} {index + 1}\n {\" \"}\n \n );\n })}\n
    \n );\n }\n }\n renderReadMore() {\n const { description, t } = this.props;\n\n return (\n <>\n
    \n {/*description.article_url && (\n \n {t(\"render_read_more.additional_info_of_topic\")}\n \n )*/}\n {description?.article_links?.length > 0 &&\n description.article_links.map((a) => (\n \n {a.url && a.description && (\n \n {a.description}\n \n )}\n \n ))}\n
    \n \n );\n }\n\n renderForRoundResult(t) {\n return (\n
    \n
    \n

    \n {t(\"more_info.information\")}\n

    \n
    \n
    \n \n
    \n
    \n {this.props.description && this.renderSources()}\n {this.renderReadMore()}\n
    \n
    \n );\n }\n\n render() {\n let { pending, description, t, code } = this.props;\n\n if (this.props.displayRoundResults) {\n return this.renderForRoundResult(t);\n }\n\n const {\n recommended_value_min,\n recommended_value_max,\n recommended_value_enabled,\n } = description;\n\n if (pending) {\n return (\n
    \n
    \n {t(\"more_info.waiting_for_results\")}\n
    \n
    \n );\n }\n\n if (this.state.loading) {\n return (\n
    \n
    \n {t(\"loading_spinner.loading\")}\n
    \n
    \n );\n }\n\n const results = this.state.results;\n /*\n const results = [\n {\n last_changed: \"2022-03-09T13:42:21.6733333\",\n value: \"4.0\",\n reference_value_low: \"3.5\",\n reference_value_high: \"4.4\",\n },\n {\n last_changed: \"2022-04-01T13:42:21.6733333\",\n value: \"3.9\",\n reference_value_low: \"3.5\",\n reference_value_high: \"4.6\",\n },\n ];\n */\n\n const resultsWithNumericValues = results.filter((result) =>\n hasNumber(result.value)\n );\n\n if (resultsWithNumericValues.length === 0) {\n return null;\n }\n\n const maxValue = resultsWithNumericValues.reduce((acc, currentResult) => {\n const { value, displayValue } = parseValueToFloat(currentResult.value);\n if (value > parseValueToFloat(acc).value) {\n acc = displayValue;\n }\n return acc;\n }, 0);\n\n const minValue = resultsWithNumericValues.reduce((acc, currentResult) => {\n const { value, displayValue } = parseValueToFloat(currentResult.value);\n if (value < parseValueToFloat(acc).value) {\n acc = displayValue;\n }\n return acc;\n }, maxValue);\n\n let allReferenceValues;\n\n if (resultsWithNumericValues.length > 1) {\n allReferenceValues = resultsWithNumericValues.map((result) => {\n return {\n referenceLow: result.reference_value_low\n ? parseFloat(result.reference_value_low)\n : null,\n referenceHigh: result.reference_value_high\n ? parseFloat(result.reference_value_high)\n : null,\n\n date: new Date(result.last_changed),\n };\n });\n\n if (allReferenceValues.length !== results.length) {\n allReferenceValues = undefined;\n } else if (\n allReferenceValues.every(\n (val) =>\n val.referenceLow === allReferenceValues[0].referenceLow &&\n val.referenceHigh === allReferenceValues[0].referenceHigh\n )\n ) {\n allReferenceValues = undefined;\n } else if (allReferenceValues && allReferenceValues.length) {\n allReferenceValues.sort((a, b) => a.date - b.date);\n }\n }\n\n let calculateLow = resultsWithNumericValues[0].reference_value_low;\n let calculateHigh = resultsWithNumericValues[0].reference_value_high;\n\n if (allReferenceValues) {\n resultsWithNumericValues.forEach((result) => {\n if (calculateLow || parseFloat(result.reference_value_low)) {\n if (!calculateLow && result.reference_value_low) {\n calculateLow = result.reference_value_low;\n } else if (\n calculateLow &&\n result.reference_value_low &&\n parseFloat(result.reference_value_low) < parseFloat(calculateLow)\n ) {\n calculateLow = result.reference_value_low;\n }\n }\n if (calculateHigh || parseFloat(result.reference_value_high)) {\n if (!calculateHigh && result.reference_value_high) {\n calculateHigh = result.reference_value_high;\n } else if (\n calculateHigh &&\n result.reference_value_high &&\n parseFloat(result.reference_value_high) > parseFloat(calculateHigh)\n ) {\n calculateHigh = result.reference_value_high;\n }\n }\n });\n }\n\n const isPuhti = env.APP_ID === \"puhti\";\n if (isPuhti) {\n if (code === \"13133\") {\n calculateHigh = 10;\n }\n }\n\n const {\n referenceLow,\n referenceHigh,\n lowestValue,\n highestValue,\n hideLow,\n hideUpper,\n } = calculateValues(maxValue, calculateLow, calculateHigh, minValue);\n\n const data = resultsWithNumericValues.map((result) => ({\n date: new Date(result.last_changed),\n value: parseValueToFloat(result.value).value,\n displayValue: parseValueToFloat(result.value).displayValue,\n }));\n\n return (\n
    \n {data.length > 0 && !this.props.hideLineChart && (\n
    \n

    \n {t(\"more_info.change\")}\n

    \n
    \n
    \n 0\n ? recommended_value_min\n : null\n }\n recommendationHigh={\n recommended_value_enabled &&\n recommended_value_max &&\n recommended_value_max > 0\n ? recommended_value_max\n : null\n }\n oneResult={results.length === 1}\n />\n
    \n
    \n
    \n )}\n
    \n

    \n {t(\"more_info.information\")}\n

    \n
    \n
    \n \n
    \n
    \n {this.props.description && this.renderSources()}\n {this.renderReadMore()}\n
    \n
    \n );\n }\n}\n\nexport default MoreInfo;\n","import React from \"react\";\nimport styles from \"./NewSuggestionItem.module.scss\";\n\nimport SuggestionLink from \"../SuggestionLink/SuggestionLink\";\nimport { MarkdownRender } from \"../Markdown/MarkdownRender\";\n\nconst NewSuggestionItem = ({ title, image, content, link, linkText }) => {\n return (\n
    \n
    \n 0 && {\n style: { backgroundImage: `url(${image})` },\n })}\n >\n {image && image.length > 0 && (\n
    \n )}\n {title && title.length > 0 && (\n 0\n ? styles.itemTitleWhite\n : styles.itemTitle\n }\n >\n {title}\n \n )}\n
    \n
    \n \n
    \n {link && link.length > 0 && (\n \n )}\n
    \n
    \n );\n};\n\nexport default NewSuggestionItem;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-1!../../../../../node_modules/postcss-loader/src/index.js??ref--8-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-3!./NewSuggestionItem.module.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport Logo from \"./Logo.js\";\nimport { useTranslation } from \"react-i18next\";\n\nconst NotFound = () => {\n const { t } = useTranslation();\n return (\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n

    \n {t(\"not_found.page_not_found\")}\n

    \n

    {t(\"not_found.page_you_requested_not_found\")}.

    \n

    \n \n {t(\"not_found.back_to_main_page\")}\n \n

    \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\nexport default NotFound;\n","import React, { useEffect, useState } from \"react\";\nimport axios from \"axios\";\nimport { Info } from \"react-feather\";\n\nconst NoticeText = ({ text, selectedLanguage }) => {\n const [noticeText, setNoticeText] = useState(text);\n\n useEffect(() => {\n if (!text) {\n axios\n .get(`/api/notice_banner?language=${selectedLanguage}`)\n .then((response) => {\n const text = response.data;\n\n if (text.length > 0) {\n setNoticeText(text);\n }\n })\n .catch((error) => {\n console.error(error);\n });\n }\n }, [selectedLanguage]);\n\n return (\n <>\n {noticeText ? (\n
    \n
    \n \n
    \n \n
    \n ) : null}\n \n );\n};\n\nexport default NoticeText;\n","import React, { Component } from \"react\";\nimport classNames from \"classnames\";\nimport NumericInput from \"react-numeric-input\";\n\nclass NumberInput extends Component {\n constructor(props) {\n super(props);\n this.state = {\n isBeingEdited: true,\n value: this.props.value,\n };\n this.onChange = this.onChange.bind(this);\n this.onBlur = this.onBlur.bind(this);\n this.onFocus = this.onFocus.bind(this);\n this.cancelEdit = this.cancelEdit.bind(this);\n this.submitChange = this.submitChange.bind(this);\n }\n\n onFocus(event) {\n this.setState({\n isBeingEdited: true,\n });\n }\n\n onBlur(event) {\n const { value } = this.props;\n\n let updatedValue = value;\n\n if (isNaN(value) || value === null) {\n updatedValue = this.props.min;\n } else if (value < this.props.min) {\n updatedValue = this.props.min;\n } else if (value > this.props.max) {\n updatedValue = this.props.max;\n }\n\n if (updatedValue % 1 !== 0) {\n updatedValue = updatedValue.toFixed(0);\n }\n\n this.props.onChange(updatedValue, this.props.name);\n }\n\n onChange(value) {\n this.props.onChange(value, this.props.name);\n }\n\n cancelEdit() {\n this.setState({\n isBeingEdited: false,\n value: this.props.value,\n });\n }\n\n submitChange() {\n this.props.onChange(this.state.value, this.props.name);\n this.setState({\n isBeingEdited: false,\n });\n }\n\n renderLabel() {\n if (this.props.label && this.props.label.length > 0) {\n return (\n \n );\n }\n }\n\n render() {\n const { label, suffix, onChange, showStepper, ...inputProps } = this.props;\n\n const wrapperClasses = classNames(\"number-input\", {\n \"number-input--active\":\n this.state.isBeingEdited && this.props.showStepper,\n });\n\n return (\n
    \n {this.renderLabel()}\n value.replace(\".\", \",\") + `${this.props.suffix}`}\n parse={(formattedValue) =>\n formattedValue.replace(`${this.props.suffix}`, \"\").replace(\",\", \".\")\n }\n />\n
    \n );\n }\n}\n\nNumberInput.defaultProps = {\n autoComplete: \"false\",\n type: \"text\",\n label: \"\",\n hint: \"\",\n error: \"\",\n placeholder: \" \",\n disabled: false,\n className: \"\",\n name: \"\",\n min: 0,\n max: 500,\n value: \"\",\n showStepper: false,\n onBlur: () => {},\n onFocus: () => {},\n onChange: () => {},\n};\n\nexport default NumberInput;\n","import React from \"react\";\nimport { format } from \"date-fns\";\nimport blood from \"../assets/blood.svg\";\nimport clock from \"../assets/clock.svg\";\nimport env from \"../env\";\n\nimport Select, { components } from \"react-select\";\nimport SVG from \"react-inlinesvg\";\nimport { useTranslation } from \"react-i18next\";\nimport { renderActiveOrderActionButtons } from \"./ResultSummary/ResultSummaryCard\";\nconst OrderSelector = (props) => {\n const { t } = useTranslation();\n\n const {\n orders,\n selectStyles,\n setFilteredTests,\n setOrderChangeSpinner,\n history,\n children,\n } = props;\n\n const bloodtestOptions =\n orders?.state.list && orders.state.list.length > 0\n ? orders.state.list.map((order) => {\n let time = order.order_time;\n if (order.sampling_time) {\n time = order.sampling_time;\n }\n let label = order.sampling_time\n ? t(\"order_selector.test_results\")\n : t(\"order_selector.order\");\n let timestamp = format(time, \"D.M.YYYY\");\n const icon = order.sampling_time ? blood : clock;\n return {\n value: order.order_number,\n label: `${label} – ${timestamp}`,\n type: \"bloodtest\",\n typeLabel: t(\"order_selector.blood_sample\"),\n icon: icon,\n };\n })\n : [];\n\n const options = bloodtestOptions;\n\n const Option = (props) => {\n return (\n \n
    \n \n
    \n \n {props.data.typeLabel}\n \n {props.data.label}\n \n #{props.data.value}\n \n
    \n );\n };\n\n const SingleValue = (props) => {\n return (\n \n
    \n \n
    \n \n {props.selectProps.value.typeLabel}\n \n {props.selectProps.value.label}\n \n #{props.data.value}\n \n
    \n );\n };\n\n const getOrderSelectValue = () => {\n if (\n props.bloodTestEnabled &&\n props.match.path === \"/orders/:id\" &&\n orders.state.active\n ) {\n return options.find(\n (option) => option.value === orders.state.active.order_number\n );\n }\n return null;\n };\n\n const onOrderSelectChange = (event) => {\n const orderId = event.value;\n const order = orders.state.list.find(\n (candidate) => candidate.order_number === orderId\n );\n\n if (order && event.type === \"bloodtest\" && props.bloodTestEnabled) {\n history.push(`/orders/${order.order_number}`);\n }\n\n setFilteredTests(null);\n setOrderChangeSpinner(true);\n };\n\n return (\n <>\n

    \n {t(\"order_selector.choose_order\")}\n

    \n onOrderSelectChange(event)}\n />\n {env.APP_ID === \"vital\" &&\n renderActiveOrderActionButtons(orders.state.active?.order_number, t)}\n
    {children}
    \n \n );\n};\n\nexport default OrderSelector;\n","import React, { Component, useRef, useState } from \"react\";\nimport { Checkbox, CheckboxGroup } from \"react-checkbox-context\";\nimport { RadioGroup, Radio } from \"react-radio-group\";\nimport Select from \"../components/Select\";\nimport update from \"immutability-helper\";\nimport { MarkdownEditor } from \"./Markdown/Markdown\";\nclass Question extends Component {\n constructor(props) {\n super(props);\n this.state = {\n checkboxObject: this.props.value,\n };\n this.textInputRef = React.createRef();\n\n this.onChange = this.onChange.bind(this);\n }\n\n components = {\n radio: RadioGroup,\n checkbox: CheckboxGroup,\n select: Select,\n };\n\n convertValueObjectToArray(stateObject) {\n let valueArray = [];\n\n Object.keys(stateObject).forEach((key) => {\n if (stateObject[key]) {\n valueArray.push(key);\n }\n });\n\n return valueArray;\n }\n\n convertValueArrayToObject(valueArray) {\n const oldState = this.state.checkboxObject;\n\n let stateObject = {};\n\n Object.keys(oldState).map((key) => {\n if (valueArray.find((v) => v === key)) {\n stateObject[key] = true;\n } else {\n stateObject[key] = false;\n }\n });\n\n return update(oldState, { $merge: stateObject });\n }\n\n onChange(value, event, attribute) {\n if ((event && !event?.target) || value.target) {\n //this less than optimal solutions fixes a problem where\n //sometimes value and event arguments are reversed\n\n let isActuallyValue = event;\n event = value;\n value = isActuallyValue;\n }\n\n const { name } = this.props;\n\n if (!event) {\n //data from textarea\n this.props.onChange(value, attribute);\n return;\n }\n\n if (event && event.target.type === \"checkbox\") {\n let newValue = null;\n // Check from previous state if checkbox was checked and then update the values accordingly.\n\n if (value.includes(event.target.value)) {\n newValue = value; //.filter((v) => v !== event.target.value); <-- these messed up state change for checkbox for some reason\n } else {\n newValue = value; //.concat(event.target.value); <-- and this\n }\n\n this.props.onChange(this.convertValueArrayToObject(newValue), name);\n } else if (event && event.target.type === \"radio\") {\n this.props.onChange(value, name);\n } else {\n this.props.onChange(event.target.value, name);\n }\n }\n\n renderOptions() {\n const { name, options, type, id } = this.props;\n return options.map((option, index) => {\n if (type === \"radio\") {\n return (\n
    \n \n \n
    \n );\n } else if (type === \"checkbox\") {\n return (\n
    \n \n \n
    \n );\n } else if (type === \"select\") {\n return (\n \n );\n }\n });\n }\n\n render() {\n const { title, type, name, value, subQuestion } = this.props;\n\n const Component = this.components[type || \"radio\"];\n if (subQuestion) {\n return (\n
    \n

    \n {title}\n

    \n \n
    \n this.onChange()}\n >\n {this.renderOptions()}\n \n
    \n
    \n );\n } else {\n return (\n
    \n {title && (\n

    \n {title}\n

    \n )}\n
    \n \n {this.renderOptions()}\n \n \n
    \n
    \n );\n }\n }\n}\n\nconst QuestionMarkdown = ({ props, onChange }) => {\n const textRef = useRef();\n const { name, profileData, t } = props;\n\n const getTextAreaAttributes = () => {\n if (name === \"medicine_or_suppliments\" && profileData[name] === \"yes\") {\n return {\n textAreaLabel: t(\"profile.please_state_which\") + \":\",\n textAreaVisible: true,\n attribute: \"medicine_or_suppliments_text\",\n };\n }\n if (name === \"medicated_illness\" && profileData[name] === \"yes\") {\n return {\n textAreaLabel: t(\"profile.please_state\") + \":\",\n textAreaVisible: true,\n attribute: \"medicated_illness_text\",\n };\n }\n return {};\n };\n\n const { textAreaLabel, textAreaVisible, attribute } = getTextAreaAttributes();\n const [value, setValue] = useState(profileData[attribute]);\n\n return (\n <>\n \n {textAreaVisible && (\n {\n setValue();\n }}\n onBlur={(value) => {\n onChange(value, null, attribute);\n }}\n hidePreviewButton\n toolbarConfig={{\n display: [],\n }}\n />\n )}\n \n );\n};\n\nexport default Question;\n","import React, { Component } from \"react\";\nimport { CheckCircle, AlertCircle } from \"react-feather\";\n\nimport {\n calculateValues,\n valueHasSmallerThanSign,\n valueHasLargerThanSign,\n parseDisplayValue,\n} from \"../helpers\";\nimport { withTranslation } from \"react-i18next\";\n\n// function PositiveOrNegativeMessage({ positiveMessage, negativeMessage }) {\n// if (!positiveMessage || !negativeMessage) {\n// return null;\n// }\n// const className = positiveMessage\n// ? \"margin-1-5 margin-top inline-icon-text color-green\"\n// : \"margin-1-5 margin-top inline-icon-text color-red\";\n// return (\n//
    \n// {positiveMessage ? (\n// \n// ) : (\n// \n// )}\n//
    \n// {positiveMessage ? positiveMessage : negativeMessage}\n//
    \n//
    \n// );\n// }\nclass RangeChart extends Component {\n calculateBarDimensions(\n highestValue,\n lowestValue,\n value,\n referenceHigh,\n referenceLow,\n recommendationLow,\n recommendationHigh,\n ) {\n const totalRange = highestValue - lowestValue;\n\n const valuePosition = (100 * (value - lowestValue)) / totalRange;\n const maxRPercentage = (100 * (referenceHigh - lowestValue)) / totalRange;\n\n const redBarWidthFirst = (\n (100 * (referenceLow - lowestValue)) /\n totalRange\n ).toFixed(4);\n const greenBarWidth = (maxRPercentage - redBarWidthFirst).toFixed(4);\n const redBarWidthSecond = (100 - redBarWidthFirst - greenBarWidth).toFixed(\n 4,\n );\n let yellowBarWidthFirst = 0;\n let yellowBarWidthSecond = 0;\n if (recommendationLow) {\n yellowBarWidthFirst =\n ((recommendationLow - referenceLow) / (referenceHigh - referenceLow)) *\n 100;\n }\n\n if (recommendationHigh) {\n yellowBarWidthSecond =\n 100 -\n ((recommendationHigh - referenceLow) / (referenceHigh - referenceLow)) *\n 100;\n }\n\n return {\n valuePosition,\n redBarWidthFirst,\n greenBarWidth,\n redBarWidthSecond,\n yellowBarWidthFirst,\n yellowBarWidthSecond,\n };\n }\n\n renderReferenceMessage(\n displayValue,\n value,\n referenceLow,\n referenceHigh,\n recommendationLow,\n recommendationHigh,\n recommendedValueDescription,\n t,\n ) {\n const isMinMaxValue =\n valueHasLargerThanSign(displayValue) ||\n valueHasSmallerThanSign(displayValue);\n\n if (\n (recommendationLow && value <= recommendationLow) ||\n (recommendationHigh && value >= recommendationHigh)\n ) {\n return (\n
    \n {/*todo: should come from admin */}\n {recommendedValueDescription && recommendedValueDescription}\n {isMinMaxValue && t(\"range_chart.result_is_minmax\")}\n
    \n );\n } else if (value >= referenceLow && value <= referenceHigh) {\n return (\n <>\n
    \n \n
    \n {t(\"range_chart.result_inside_reference_values\")}\n
    \n
    \n {isMinMaxValue && (\n
    \n
    \n {isMinMaxValue && t(\"range_chart.result_is_minmax\")}\n
    \n
    \n )}\n \n );\n } else {\n return (\n <>\n
    \n \n
    \n {t(\"range_chart.result_outside_reference_values\")}\n
    \n
    \n {isMinMaxValue && (\n
    \n
    \n {isMinMaxValue && t(\"range_chart.result_is_minmax\")}\n
    \n
    \n )}\n \n );\n }\n }\n\n render() {\n const {\n value,\n displayValue,\n referenceLow,\n referenceHigh,\n lowestValue,\n highestValue,\n hideLow,\n hideUpper,\n } = calculateValues(\n this.props.value,\n this.props.referenceLow,\n this.props.referenceHigh,\n );\n\n const {\n recommendationLow,\n recommendationHigh,\n recommendedValueDescription,\n t,\n } = this.props;\n const {\n valuePosition,\n redBarWidthFirst,\n greenBarWidth,\n redBarWidthSecond,\n yellowBarWidthFirst,\n yellowBarWidthSecond,\n } = this.calculateBarDimensions(\n highestValue,\n lowestValue,\n value,\n referenceHigh,\n referenceLow,\n recommendationLow,\n recommendationHigh,\n );\n\n return (\n
    \n
    \n \n {this.props.microbiome\n ? Number.parseFloat(this.props.value).toFixed(5).replace(\".\", \",\")\n : parseDisplayValue(displayValue, this.props.t)}{\" \"}\n {this.props.unit}\n
    \n {!valueHasSmallerThanSign(displayValue) &&\n !valueHasLargerThanSign(displayValue) && (\n \n )}\n \n \n {recommendationLow && (\n \n )}\n\n
    \n {!hideLow &&\n (this.props.microbiome\n ? Number.parseFloat(referenceLow).toFixed(5).replace(\".\", \",\")\n : referenceLow)}\n
    \n
    \n {!hideUpper &&\n (this.props.microbiome\n ? Number.parseFloat(referenceHigh)\n .toFixed(5)\n .replace(\".\", \",\")\n : referenceHigh)}\n
    \n\n {recommendationHigh && (\n \n )}\n
    \n \n \n {!this.props.microbiome && (\n
    \n {!this.props.hideText &&\n this.renderReferenceMessage(\n displayValue,\n value,\n referenceLow,\n referenceHigh,\n recommendationLow,\n recommendationHigh,\n recommendedValueDescription,\n t,\n )}\n
    \n )}\n \n );\n }\n}\n\nexport default withTranslation()(RangeChart);\n","import React, { Component } from \"react\";\n\n// Components\nimport TestResult from \"./../components/TestResult\";\n\nclass ResultCategory extends Component {\n setResultColor(result) {\n const id = result.description?.id;\n if (this.props.isManuallyCompleted && result.pending) {\n return \"#D8DBE3\";\n }\n else {\n if (this.props.colorCodes && this.props.colorCodes.length > 0) {\n return this.props.colorCodes[id % this.props.colorCodes.length];\n }\n }\n };\n\n setCardColor(result) {\n if (this.props.isManuallyCompleted && result.pending) {\n return \"#F4F7FA\";\n }\n }\n\n render() {\n const { group, list, graphView } = this.props;\n return (\n
    \n
    \n
    \n
    \n

    \n {group.name}\n

    \n

    {group.description}

    \n
    \n
    \n
    \n
    \n {group.results?.length > 0 &&\n group.results.map((result, index) => {\n if (\n (this.props.filtered && !result.filtered) ||\n (this.props.summaryFilterCodes.length &&\n !this.props.summaryFilterCodes.includes(result.code))\n )\n return null;\n return (\n \n );\n })}\n
    \n
    \n );\n }\n}\n\nexport default ResultCategory;\n","import React, { useCallback, useEffect, useState } from \"react\";\nimport SVG from \"react-inlinesvg\";\nimport calendar from \"../../assets/calendar.svg\";\nimport chevronUp from \"../../assets/chevron-up.svg\";\nimport chevronDown from \"../../assets/chevron-down.svg\";\nimport externalLink from \"../../assets/external-link.svg\";\nimport printer from \"../../assets/printer.svg\";\nimport helpCircle from \"../../assets/help-circle.svg\";\nimport droplet from \"../../assets/droplet.svg\";\nimport { Pie } from \"@nivo/pie\";\nimport styles from \"./ResultSummaryCard.module.scss\";\nimport classNames from \"classnames\";\nimport { formatStringDate } from \"../../helpers.js\";\nimport { useHistory } from \"react-router-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport NoticeText from \"../NoticeText\";\nimport env from \"../../env\";\nconst useIsMobile = () => {\n const [isMobile, setIsMobile] = useState(false);\n\n //choose the screen size\n const handleResize = useCallback(() => {\n if (window.innerWidth < 720) {\n setIsMobile(true);\n } else {\n setIsMobile(false);\n }\n }, [setIsMobile]);\n\n useEffect(() => {\n setIsMobile(window.innerWidth < 720);\n }, []);\n\n // create an event listener\n useEffect(() => {\n window.addEventListener(\"resize\", handleResize);\n return () => {\n return window.removeEventListener(\"resize\", handleResize);\n };\n }, [handleResize]);\n\n return isMobile;\n};\n\nconst ResultSummaryCard = ({ order }) => {\n const { t } = useTranslation();\n const { summary } = order;\n\n let sections = [\n {\n label: t(\"result_summary.results_below_range\"),\n borderColor: \"#ef686f\",\n },\n {\n label: t(\"result_summary.results_within_range\"),\n borderColor: \"#43c45f\",\n },\n {\n label: t(\"result_summary.results_above_range\"),\n borderColor: \"#ef686f\",\n },\n ];\n\n let noReferenceSections = [\n {\n label: t(\"result_summary.outside_references\"),\n },\n ];\n\n sections[0].tests = summary.below_reference;\n sections[1].tests = summary.within_reference;\n sections[2].tests = summary.above_reference;\n noReferenceSections[0].tests = summary.no_reference;\n\n return (\n <>\n
    \n \n {renderInfo(order.order_number, order.sampling_time, t)}\n \n
    \n \n {summary.no_reference && summary.no_reference.length > 0 && (\n \n )}\n\n {renderActiveOrderActionButtons(order.order_number, t)}\n \n \n \n );\n};\n\nconst Section = ({\n label,\n num,\n borderColor,\n tests,\n index,\n setSectionsOpen,\n sectionsOpen,\n}) => {\n const [open, setOpen] = useState(false);\n const isMobile = useIsMobile();\n const history = useHistory();\n\n useEffect(() => {\n if (sectionsOpen) {\n setOpen(true);\n } else {\n setOpen(false);\n }\n }, [sectionsOpen]);\n\n const sectionHeaderStyles = classNames(styles.sectionHeader, {\n [styles.redBorder]: borderColor === \"#ef686f\",\n [styles.greenBorder]: borderColor === \"#43c45f\",\n [styles.whiteBorder]: !borderColor,\n });\n\n return (\n
    \n
    \n {\n setOpen(!open);\n !isMobile && setSectionsOpen(!sectionsOpen);\n }}\n >\n

    \n \n {tests.length}\n \n {label}\n

    \n\n \n \n
    \n {open && (\n
    \n {tests.map((test) => {\n return (\n {\n history.push({ state: { hash: Object.keys(test)[0] } });\n }}\n key={test}\n className={styles.resultBullet}\n >\n {test[Object.keys(test)[0]]}\n \n );\n })}\n
    \n )}\n
    \n );\n};\n\nconst DropDownSections = ({ sections }) => {\n const [sectionsOpen, setSectionsOpen] = useState(false);\n\n return (\n
    \n {sections.map((section, i) => {\n return (\n \n );\n })}\n
    \n );\n};\n\nconst renderInfo = (orderNumber, samplingDate, t) => {\n return (\n
    \n

    \n {t(\"result_summary.summary_of_results\")}\n

    \n
    \n \n
    \n \n \n
    \n );\n};\n\nexport const renderActiveOrderActionButtons = (orderId, t) => {\n const isPuhti = env.APP_ID === \"puhti\";\n\n const links = {\n helpLink: isPuhti\n ? \"https://www.puhti.fi/tietopaketit/laboratoriokokeiden-tulokset-ja-viitearvot/\"\n : \"https://vital.se/\",\n reorder: isPuhti\n ? \"https://www.puhti.fi/tuotteet\"\n : \"https://vital.se/halsokontroller/\",\n };\n\n return (\n
    \n {isPuhti && (\n {\n window.open(links.helpLink);\n }}\n button\n blue\n />\n )}\n {\n window.open(`/orders/${orderId}/pdf`);\n }}\n />\n {\n window.open(links.reorder);\n }}\n button\n blue\n />\n
    \n );\n};\n\nconst IconWithLabel = ({\n icon,\n label,\n button,\n inline,\n blue,\n gray = true,\n onClick,\n}) => {\n const Component = button ? \"button\" : \"div\";\n\n const labelStyles = classNames(styles.smallLabel, {\n [styles.blue]: blue,\n [styles.gray]: !blue && gray,\n });\n\n return (\n \n {icon && }\n {label}\n \n );\n};\n\nconst DataPie = ({ sections }) => {\n const withinRangesNum = sections[1].tests.length;\n const outsideRangesNum = [...sections[0].tests, ...sections[2].tests].length;\n\n const allRangesNum =\n sections[0].tests.length +\n sections[1].tests.length +\n sections[2].tests.length;\n\n const { t } = useTranslation();\n const data = [\n {\n id: \"1\",\n label: t(\"result_summary.within_range\"),\n value: withinRangesNum,\n color: \"#43c45f\",\n },\n {\n id: \"2\",\n label: t(\"result_summary.outside_range\"),\n value: allRangesNum - withinRangesNum,\n color: \"#ef686f\",\n },\n ];\n\n let percentageDisplay = Math.floor((withinRangesNum / allRangesNum) * 100);\n let outsideRangesPercentage = Math.floor(\n (outsideRangesNum / allRangesNum) * 100,\n );\n const isMobile = useIsMobile();\n\n return (\n
    \n
    \n

    \n {!isNaN(percentageDisplay) && percentageDisplay}\n %\n

    \n {\n return data.color;\n }}\n innerRadius={0.8}\n tooltip={(a, b, c) => {\n return (\n \n

    \n {a.id === \"1\"\n ? `${percentageDisplay}% ${t(\n \"result_summary.within_range\",\n )}`\n : `${outsideRangesPercentage}% ${t(\n \"result_summary.outside_range\",\n )}`}\n

    \n
    \n );\n }}\n padAngle={0}\n fit={false}\n borderWidth={0}\n enableRadialLabels={false}\n enableSlicesLabels={false}\n enableLegends={false}\n animate={false}\n isInteractive\n />\n
    \n
    \n

    \n {t(\"result_summary.within_range\").charAt(0).toUpperCase() +\n t(\"result_summary.within_range\").slice(1)}\n

    \n
    \n \n );\n};\n\nexport default ResultSummaryCard;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-1!../../../../../node_modules/postcss-loader/src/index.js??ref--8-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-3!./ResultSummaryCard.module.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import React, { Component } from \"react\";\n\nclass Select extends Component {\n render() {\n return (\n
    \n \n
    \n );\n }\n}\n\nexport default Select;\n","import React from \"react\";\nimport styles from \"./SuggestionLink.module.scss\";\nimport classNames from \"classnames\";\nimport { ExternalLink } from \"react-feather\";\n\nconst SuggestionLink = ({ link, linkText, filled, underline = true }) => {\n const itemLinkStyles = classNames(styles.itemLink, {\n [styles.filled]: filled,\n [styles.underline]: underline,\n });\n\n return (\n
    \n \n {linkText && linkText.length > 0 ? linkText : link}\n \n \n
    \n );\n};\n\nexport default SuggestionLink;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-1!../../../../../node_modules/postcss-loader/src/index.js??ref--8-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-3!./SuggestionLink.module.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import React, { useState, useEffect } from \"react\";\nimport axios from \"axios\";\n\nimport LoadingSpinner from \"../components/LoadingSpinner\";\nimport ErrorMessage from \"../components/ErrorMessage\";\nimport ErrorBoundary from \"../components/ErrorBoundary\";\nimport NewSuggestionItem from \"../components/NewSuggestionItem/NewSuggestionItem\";\nimport SuggestionLink from \"../components/SuggestionLink/SuggestionLink\";\nimport repurchaseGraph from \"../assets/repurchase-graph.svg\";\nimport repurchaseGraphic from \"../assets/repurchase-graphic.svg\";\nimport styles from \"../styles/components/_suggestion-section.scss\";\nimport SVG from \"react-inlinesvg\";\nimport { getUserSex } from \"../helpers\";\nimport { useTranslation, Trans } from \"react-i18next\";\nimport env from \"../env\";\nimport { useHistory } from \"react-router-dom\";\n\nconst SuggestionSection = ({\n identityNumber,\n activeOrder,\n colorCodes,\n activeResultCode,\n selectedLanguage,\n withBottomSectionStyling = true,\n hideTestSuggestions = false,\n requireActiveOrder = true,\n hideEditableSuggestions = false,\n orders,\n}) => {\n let repurchaseUrl =\n env.APP_ID === \"puhti\"\n ? \"https://www.puhti.fi/tuotteet/\"\n : \"https://vital.se/halsokontroller/\"; //`${env.WEBSHOP_URL}/tuotteet/`;\n\n if (\n activeOrder &&\n activeOrder.repurchase_product_ids &&\n activeOrder.repurchase_product_ids.length\n ) {\n /*\n legacy, might be used at some point again\n repurchaseUrl =\n env.APP_ID === \"puhti\"\n ? `${\n env.WEBSHOP_URL\n }/ostoskori/?add-to-cart=${activeOrder.repurchase_product_ids.toString()}`\n : `${\n env.WEBSHOP_URL\n }/varukorg/?add-to-cart=${activeOrder.repurchase_product_ids.toString()}`;\n */\n\n repurchaseUrl =\n env.APP_ID === \"puhti\"\n ? `${env.WEBSHOP_URL}/tuotteet`\n : `${env.WEBSHOP_URL}/halsokontroller`;\n }\n\n const groupTestCodes = (activeOrder?.groups || [])\n .flatMap((group) => group.results?.map((r) => r.code))\n .filter((value) => value);\n\n const orderedTestCodes = (activeOrder?.ordered_tests || []).map(\n (test) => test.code,\n );\n\n const renderTestSuggestions = !requireActiveOrder\n ? true\n : activeOrder &&\n activeOrder.groups &&\n activeOrder.groups.length > 0 &&\n activeOrder.ordered_tests &&\n activeOrder.ordered_tests.length === 0;\n\n const allTestCodes = [...groupTestCodes, ...orderedTestCodes];\n\n return (\n \n <>\n \n
    \n
    \n
    \n \n\n {renderTestSuggestions && (\n \n )}\n\n {!hideTestSuggestions && (\n
    \n
    \n \n
    \n
    \n )}\n
    \n
    \n
    \n \n {!hideTestSuggestions && env.APP_ID === \"puhti\" && }\n \n
    \n );\n};\n\nconst EditableSuggestions = ({\n orders,\n selectedLanguage,\n hideEditableSuggestions,\n}) => {\n const [suggestionItems, setSuggestionItems] = useState(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n const { t } = useTranslation();\n const formatData = (data) => {\n let groups = [];\n\n data.data.forEach((datum) => {\n if (datum.attributes) {\n if (hideEditableSuggestions && !datum.attributes.visible_on_report) {\n //skip add if suggestions should be hidden and add is not an excpetion set by admin\n return;\n }\n\n if (datum.attributes.requires_order && orders?.length === 0) {\n // Skip the advertisement if there's no activeOrder (e.g. on logout page).\n return;\n }\n\n const candidate = groups.find(\n (group) =>\n group && group.title === datum.attributes.advert_group_title,\n );\n if (candidate) {\n candidate.items.push(datum.attributes);\n } else {\n const matchedGroup =\n data.included &&\n data.included.find(\n (group) =>\n group.attributes &&\n group.attributes.title === datum.attributes.advert_group_title,\n );\n groups.push({\n title: datum.attributes.advert_group_title,\n description: matchedGroup\n ? matchedGroup.attributes.description\n : null,\n position: matchedGroup ? matchedGroup.attributes.position : null,\n items: [datum.attributes],\n });\n }\n }\n });\n\n groups.sort((a, b) => a.position - b.position);\n groups.forEach((group) => {\n group.items.sort((a, b) => a.position - b.position);\n });\n\n return groups;\n };\n\n useEffect(() => {\n axios\n .get(`/api/advertisements?language=${selectedLanguage}`)\n .then((response) => {\n setSuggestionItems(formatData(response.data));\n setLoading(false);\n })\n .catch((error) => {\n setError(error);\n setLoading(false);\n });\n }, [orders, selectedLanguage]);\n\n if (loading) {\n return (\n
    \n \n
    \n );\n }\n\n if (error) {\n return (\n
    \n \n
    \n );\n }\n\n return (\n <>\n {suggestionItems &&\n suggestionItems.length > 0 &&\n suggestionItems.map((group, index) => {\n return (\n \n

    \n {group.title}\n

    \n
    \n {group.description}\n
    \n
    \n {group.items.map((item, index) => {\n return (\n \n );\n })}\n
    \n \n );\n })}\n \n );\n};\n\nconst RepurchaseSection = ({\n activeOrder,\n activeResultCode,\n repurchaseUrl,\n}) => {\n const testCodesToShowOn = [\"1220\", \"1137\", \"1142\", \"2303\", \"1552\", \"1395\"];\n const { t } = useTranslation();\n if (\n activeOrder ||\n (activeResultCode && testCodesToShowOn.includes(activeResultCode))\n ) {\n return (\n
    \n

    \n {t(\"suggestion_section.follow_development\")}\n

    \n\n \n
    \n );\n } else {\n return \"\";\n }\n};\n\nconst PromotionsBanner = () => {\n const { t } = useTranslation();\n const history = useHistory();\n\n if (history == undefined) {\n // User is logged out, so we should not offer redirect to promotions page\n return null;\n }\n\n return (\n <>\n \n
    \n
    \n

    \n {t(\"promotions.puhti_promotions_and_services\")}\n

    \n

    \n {t(\"promotions.see_promotion_and_services_for_customers\")}.\n

    \n {\n history.push(\"/promotions\");\n }}\n >\n {t(\"promotions.go_to_promotions\")}\n \n
    \n
    \n \n \n \n );\n};\n\nconst TestSuggestions = ({\n identityNumber,\n activeOrder,\n colorCodes,\n allTestCodes,\n selectedLanguage,\n}) => {\n const [recommendedTests, setRecommendedTests] = useState(null);\n const userSex = getUserSex(identityNumber || \"\");\n const { t } = useTranslation();\n\n useEffect(() => {\n function fetchRecommendedTests() {\n axios\n .get(`/api/recommended_tests?language=${selectedLanguage}`)\n .then((response) => {\n setRecommendedTests(response.data);\n })\n .catch((error) => {\n console.error(error);\n });\n }\n fetchRecommendedTests();\n }, [selectedLanguage]);\n\n let suggestedTests = null;\n\n if (\n activeOrder &&\n activeOrder.groups &&\n activeOrder.groups.length > 0 &&\n allTestCodes\n ) {\n const results = activeOrder.groups.flatMap((group) => {\n return group.results;\n });\n\n const resultCodes = results.map((result) => result.code);\n\n suggestedTests = recommendedTests?.data?.filter(\n (suggestion) =>\n !resultCodes.some((r) => r === suggestion.attributes.code) &&\n !allTestCodes.some(\n (testCode) => testCode === suggestion.attributes.code,\n ) &&\n (userSex === suggestion.attributes.gender ||\n suggestion.attributes.gender === \"both\"),\n );\n }\n\n if (suggestedTests && suggestedTests.length > 0) {\n return (\n
    \n
    \n
    \n

    \n {t(\"suggestion_section.what_tests_next\")}\n

    \n

    \n {t(\"suggestion_section.popular_tests_purchase\")}\n

    \n
    \n
    \n
    \n {suggestedTests?.map((suggestion, index) => {\n const { id } = suggestion;\n const { title, button_text, url, description } =\n suggestion.attributes;\n\n return (\n
    \n \n
    \n

    \n {title}\n

    \n

    {description}

    \n
    \n \n
    \n
    \n );\n })}\n
    \n \n );\n } else {\n return \"\";\n }\n};\n\nexport const SuggestionItem = ({ children, buttonText, buttonUrl }) => {\n return (\n
    \n
    {children}
    \n {buttonText && buttonUrl && (\n \n )}\n
    \n );\n};\n\nexport const RepurchaseSuggestion = ({ repurchaseUrl }) => {\n const { t } = useTranslation();\n\n return (\n
    \n
    \n

    \n {t(\"repurchase_suggestion.title\")}\n

    \n\n
    \n \n
    \n\n
    \n \n {t(\"repurchase_suggestion.how_to_prepare\")}\n \n
    \n
    \n
    \n
    \n \n \n \n \n \n {t(\"repurchase_suggestion.how_to_prepare\")}\n \n
    \n
    \n \n
    \n
    \n
    \n );\n};\n\nexport default SuggestionSection;\n","import React, { Component, useState, useRef, useEffect, Fragment } from \"react\";\nimport cx from \"classnames\";\nimport { withTranslation } from \"react-i18next\";\nimport styles from \"../styles/components/_test-result.scss\";\n// ENV\nimport env from \"../env\";\n\nimport MoreInfo from \"./MoreInfo\";\n\n// UI\nimport { ChevronDown, CheckCircle, AlertCircle } from \"react-feather\";\nimport ShowMore from \"react-show-more\";\n\n// Components\nimport RangeChart from \"./RangeChart\";\nimport LineChart from \"./LineChart\";\n\n//Helpers\nimport {\n calculateValues,\n parseValueToFloat,\n hasNumber,\n checkResultForFastingStatements,\n getIronTest45292PositiveOrNegativeMessage,\n} from \"../helpers\";\nimport { MarkdownRender } from \"./Markdown/MarkdownRender\";\nimport { useHistory } from \"react-router-dom\";\n\nfunction TestResult(props) {\n const { t } = props;\n const [moreInfoOpen, setMoreInfoOpen] = useState(false);\n const testResultRef = useRef();\n const { code, group, value } = props;\n const history = useHistory();\n const getBorderStylesForCard = () => {\n const style = {\n borderLeftWidth: \"0.75rem\",\n borderLeftStyle: \"solid\",\n borderLeftColor: props.resultColor,\n };\n\n return style;\n };\n\n const getBackgroundColorForCard = () => {\n const style = {\n backgroundColor: props.cardColor,\n };\n\n return style;\n }\n\n const hash = history.location.state?.hash;\n useEffect(() => {\n if (hash && hash === code) {\n testResultRef.current.scrollIntoView({\n behavior: \"smooth\",\n });\n }\n }, [hash]);\n\n let referenceHigh = props.reference_value_high;\n let positiveMessage = null;\n let negativeMessage = null;\n let hideLineChart = false;\n\n // Finland hard-coded exceptions\n const isPuhti = env.APP_ID === \"puhti\";\n if (isPuhti) {\n if (code === \"13133\") {\n referenceHigh = 10;\n }\n if (code === \"4529\") {\n hideLineChart = true;\n }\n if (code === \"45292\") {\n hideLineChart = true;\n const { positive, negative } = getIronTest45292PositiveOrNegativeMessage({\n groupResults: group.results,\n secondIronTestValue: value,\n });\n positiveMessage = positive;\n negativeMessage = negative;\n }\n }\n\n const resultAvailable = !props.pending;\n\n return (\n \n \n
    \n
    \n

    \n {props.description?.title}{\" \"}\n {props.description?.name ? `(${props.description?.name})` : \"\"}\n

    \n\n
    \n \n
    \n
    \n\n {resultAvailable && !props.isBundleTest && (\n
    \n setMoreInfoOpen(!moreInfoOpen)}\n >\n {moreInfoOpen\n ? t(\"test_result.hide_additional_info\")\n : t(\"test_result.show_details\")}\n \n

    \n
    \n )}\n
    \n\n {env.APP_ID === \"puhti\" ? (\n <>\n {\" \"}\n {!props.isBundleTest && (\n \n )}\n \n ) : (\n <>\n {\" \"}\n {(resultAvailable || !props.isBundleTest) && (\n \n )}\n \n )}\n\n {resultAvailable && (\n
    \n setMoreInfoOpen(!moreInfoOpen)}\n >\n {moreInfoOpen\n ? t(\"test_result.hide_additional_info\")\n : t(\"test_result.show_details\")}\n \n

    \n
    \n )}\n \n\n {moreInfoOpen && (\n \n )}\n \n );\n}\n\nconst ResultCard = ({\n code,\n pending,\n value,\n unit,\n currentUser,\n last_changed,\n positiveMessage,\n negativeMessage,\n reference_value_low,\n reference_value_high,\n description,\n cardColor,\n isManuallyCompleted,\n ...otherProps\n}) => {\n const { t } = otherProps;\n\n const fastingExceptionStatements = checkResultForFastingStatements(code);\n\n const {\n recommended_value_max,\n recommended_value_min,\n recommended_value_enabled,\n recommended_value_description,\n } = description;\n\n if (pending) {\n const pendingText = isManuallyCompleted ? \"\" : t(\"result_card.waiting_for_results\")\n \n return (\n
    \n
    \n {pendingText}\n
    \n
    \n );\n } \n else if (\n (reference_value_low ||\n reference_value_high) /*&& !fastingExceptionStatements.length > 0)*/ &&\n hasNumber(value)\n ) {\n return (\n
    \n
    \n 0\n ? recommended_value_min\n : null\n }\n recommendationHigh={\n recommended_value_enabled &&\n recommended_value_max &&\n recommended_value_max > 0\n ? recommended_value_max\n : null\n }\n referenceLow={reference_value_low}\n referenceHigh={reference_value_high}\n recommendedValueDescription={\n recommended_value_enabled ? recommended_value_description : null\n }\n />\n
    \n \n
    \n );\n } else {\n return (\n
    \n
    {t(\"result_card.result\")}
    \n {positiveMessage || negativeMessage ? (\n \n ) : (\n \n {value} {unit}\n
    \n )}\n \n \n );\n }\n};\n\nfunction PositiveOrNegativeMessage({\n value,\n unit,\n positiveMessage,\n negativeMessage,\n}) {\n if (!positiveMessage && !negativeMessage) {\n return null;\n }\n const className = positiveMessage\n ? \"inline-icon-text inline-icon-text--start color-green\"\n : \"inline-icon-text inline-icon-text--start color-red\";\n\n return (\n
    \n {positiveMessage ? (\n \n ) : (\n \n )}\n
    \n {positiveMessage ? positiveMessage : negativeMessage} ({value} {unit})\n
    \n
    \n );\n}\n\nconst Statements = (props) => {\n const { t } = props;\n const statements = props.fastingExceptionStatements\n ? [...props.fastingExceptionStatements, ...props.statements]\n : props.statements;\n\n return (\n
    \n {statements?.length > 0 && (\n
    {t(\"statements.statement\")}
    \n )}\n \n {statements.map((statement, index) => {\n if (statement === \"Katso lausunto\" || typeof statement !== \"string\") {\n return null;\n }\n statement.replace(/(?:\\r\\n|\\r|\\n)/g, \"\\n\");\n return (\n

    \n {statement.split(\"\\n\").map((chunk, index) => {\n return (\n \n {chunk}\n
    \n
    \n );\n })}\n

    \n );\n })}\n \n
    \n );\n};\n\nexport default withTranslation()(TestResult);\n","import React, { useState, useEffect } from \"react\";\nimport axios from \"axios\";\nimport { formatStringDate } from \"../helpers\";\nimport { useTranslation } from \"react-i18next\";\nimport { MarkdownRender } from \"./Markdown/MarkdownRender\";\nimport styles from \"../styles/components/_user-doctor-review.scss\";\n\nconst UserDoctorReview = ({\n orderNumber,\n showFull = false,\n reviewData = null,\n}) => {\n const { t } = useTranslation();\n const [toggled, setToggled] = useState(showFull);\n const [error, setError] = useState();\n const [review, setReview] = useState(reviewData);\n\n useEffect(() => {\n if (reviewData) {\n setReview(reviewData);\n } else {\n let path = `/api/orders/${orderNumber}/doctor_review`;\n // if (lang) { path = `${path}?locale=${lang}`; }\n axios\n .get(path)\n .then((response) => {\n setReview(response.data);\n })\n .catch((error) => {\n setError(error.error);\n });\n }\n }, [reviewData, orderNumber, setError, setReview]);\n\n return (\n \n

    \n {t(\"doctor_review.doctor_review\")}\n

    \n {review && (\n <>\n

    {formatStringDate(review.published_at)}

    \n

    \n {t(\"doctor_review.reviewed_by\")}: {review.doctor.name},{\" \"}\n {review.doctor.professional_title}\n

    \n\n
    \n \n \n {\n event.preventDefault();\n setToggled(!toggled);\n }}\n >\n {!toggled\n ? t(\"doctor_review.show_more\") + \"...\"\n : t(\"doctor_review.show_less\")}\n \n
    \n \n \n )}\n {error && (\n <>\n

    {error}

    \n \n )}\n \n );\n};\n\nexport default UserDoctorReview;\n","import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport styles from \"../styles/components/_user-doctor-review.scss\";\nimport externalLink from \"../assets/external-link.svg\";\nimport SVG from \"react-inlinesvg\";\nimport env from \"../env\";\n\nconst UserDoctorReviewAd = ({ orderNumber }) => {\n const { t } = useTranslation();\n\n const endpoint = t(\"main_navigation.store_short_link\");\n const url = `${endpoint}/produkt/vital-lakarens-komment?order_number=${orderNumber}`;\n\n return (\n <>\n
    \n

    \n {t(\"doctor_review.doctor_review\")}\n

    \n {\n <>\n
    \n

    \n {t(\"doctor_review.order_doctor_review\")}\n

    \n
    \n \n }\n
    \n {}\n \n {t(\"doctor_review.order_button_text\")}\n \n
    \n
    \n \n );\n};\n\nexport default UserDoctorReviewAd;\n","import React from \"react\";\nimport onClickOutside from \"react-onclickoutside\";\nimport AnimateHeight from \"react-animate-height\";\nimport classNames from \"classnames\";\nimport NavLink from \"./NavLink\";\n\nimport chevronUp from \"../../assets/chevron-up.svg\";\nimport SVG from \"react-inlinesvg\";\n\nclass NavDropdownLink extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n submenuOpen: false,\n navHeight: \"auto\",\n handleOutsideClicks: false,\n };\n }\n\n componentDidMount() {\n const mql = window.matchMedia(\"(max-width: 979px)\");\n mql.addListener(this.handleMediaChange.bind(this));\n this.handleMediaChange(mql);\n }\n\n renderIcon() {\n if (this.props.icon) {\n return
    {this.props.icon}
    ;\n }\n }\n\n handleMediaChange(mediaQueryList) {\n if (mediaQueryList.matches && this.props.stackOnMobile) {\n this.setState({\n navHeight: \"auto\",\n handleOutsideClicks: false,\n });\n } else {\n this.setState({\n navHeight: 0,\n handleOutsideClicks: true,\n });\n }\n }\n\n handleClickOutside(evt) {\n if (this.state.handleOutsideClicks) {\n this.setState({\n submenuOpen: false,\n navHeight: 0,\n });\n }\n }\n\n onClickParent(e) {\n this.setState(\n (state) => ({\n submenuOpen: !state.submenuOpen,\n }),\n () => {\n if (this.state.submenuOpen) {\n this.setState({\n navHeight: \"auto\",\n });\n } else {\n this.setState({\n navHeight: 0,\n });\n }\n },\n );\n }\n\n onClickSubmenu(e) {\n if (e.target === this.submenuWrapper) {\n e.stopPropagation();\n }\n }\n\n render() {\n const dropdownClassNames = classNames(\n \"nav-link navigation-list__link navigation-list__link--dropdown\",\n {\n \"navigation-list__link--dropdown-stack\": this.props.stackOnMobile,\n },\n );\n\n const submenuClassNames = classNames(\"navigation-list__submenu\", {\n \"navigation-list__submenu--active\": this.state.submenuOpen,\n });\n\n return (\n \n {this.renderIcon()}\n
    {this.props.label}
    \n \n this.setState({ heightAnimationEnded: true })}\n style={this.state.heightAnimationEnded ? { overflow: \"visible\" } : {}}\n applyInlineTransitions={false}\n >\n {\n this.submenuWrapper = ref;\n }}\n >\n {this.props.children}\n \n \n \n );\n }\n}\n\nexport default onClickOutside(NavDropdownLink);\n","import React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { withTranslation } from \"react-i18next\";\n\nclass NavLink extends React.Component {\n renderIcon() {\n if (this.props.icon) {\n return
    {this.props.icon}
    ;\n }\n }\n\n handleOnClickExternal(e) {\n e.preventDefault();\n window.location = this.props.href;\n }\n\n render() {\n return (\n \n {this.renderIcon()}\n
    {this.props.label}
    \n \n );\n }\n}\nexport default withTranslation()(NavLink);\n","import React, { Component } from \"react\";\nimport AnimateHeight from \"react-animate-height\";\nimport Logo from \"../Logo\";\n\nclass Navigation extends Component {\n constructor(props) {\n super(props);\n this.state = {\n navOpen: false,\n navHeight: 0,\n };\n }\n\n componentDidMount() {\n window.addEventListener(\"scroll\", this.handleScroll.bind(this));\n const mql = window.matchMedia(\"(min-width: 980px)\");\n mql.addEventListener(\"change\", this.handleMediaChange.bind(this));\n this.handleMediaChange(mql);\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.handleScroll.bind(this));\n const mql = window.matchMedia(\"(min-width: 980px)\");\n mql.removeEventListener(\"change\", this.handleMediaChange.bind(this));\n }\n\n handleMediaChange(mediaQueryList) {\n if (mediaQueryList.matches) {\n this.setState({\n navHeight: \"auto\",\n });\n } else {\n this.setState({\n navHeight: 0,\n });\n }\n }\n\n handleScroll(e) {\n if (\n e.currentTarget.pageYOffset >\n 3.75 * parseFloat(getComputedStyle(document.documentElement).fontSize)\n ) {\n this.setState({ headerFixed: true });\n } else {\n this.setState({ headerFixed: false });\n }\n }\n\n onClickToggle() {\n clearTimeout(this.navToggleTimeout);\n\n this.setState(\n (state) => ({\n navOpen: !state.navOpen,\n }),\n () => {\n if (!this.state.navOpen) {\n this.setState({\n navToggleRotate: false,\n navHeight: 0,\n });\n this.navToggleTimeout = setTimeout(() => {\n this.setState({\n navToggleCollapse: false,\n });\n }, 200 / 1.618);\n } else {\n this.setState({\n navToggleCollapse: true,\n navHeight: \"auto\",\n });\n this.navToggleTimeout = setTimeout(() => {\n this.setState({\n navToggleRotate: true,\n });\n }, 200 / 1.618);\n }\n },\n );\n }\n\n renderLogo() {\n if (this.props.company) {\n return (\n
    \n
    \n \n
    \n
    \n );\n } else {\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n );\n }\n }\n\n render() {\n return (\n \n
    \n
    \n {this.renderLogo()}\n \n \n
    \n
    \n
    \n
    \n
    \n \n this.setState({ heightAnimationEnded: true })\n }\n style={\n this.state.heightAnimationEnded ? { overflow: \"visible\" } : {}\n }\n applyInlineTransitions={false}\n >\n
    {this.props.leftLinks}
    \n
    {this.props.rightLinks}
    \n \n
    \n \n \n );\n }\n}\n\nexport default Navigation;\n","import React from \"react\";\nimport { Archive, AlertCircle } from \"react-feather\";\n\nconst ActivationError = () => {\n return (\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n

    \n Jokin meni pieleen\n

    \n
    \n
    \n this.location.reload()}\n >\n \n Kokeile uudestaan\n \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nexport default ActivationError;\n","import React from \"react\";\nimport { Archive, CheckCircle } from \"react-feather\";\n\nconst ActivationSuccess = () => {\n return (\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n

    \n Aktivointi onnistui!\n

    \n
    \n
    \n this.location.reload()}\n >\n \n Aktivoi uusi testi\n \n
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nexport default ActivationSuccess;\n","import React, { Component } from \"react\";\nimport { Switch, Route, BrowserRouter, Redirect } from \"react-router-dom\";\nimport { Provider as StateProvider, Subscribe } from \"unstated\";\n\nimport Home from \"./Home\";\n\nimport Promotions from \"./Promotions\";\n\nimport Single from \"./Single\";\nimport Profile from \"./Profile\";\nimport ActivationSuccess from \"./ActivationSuccess\";\nimport ActivationError from \"./ActivationError\";\nimport NotFound from \"../components/NotFound\";\nimport Onboarding from \"./Onboarding\";\nimport MainLayout from \"../layouts/MainLayout\";\nimport OnboardingLayout from \"../layouts/OnboardingLayout\";\nimport EmptyLayout from \"../layouts/EmptyLayout\";\nimport OrdersContainer from \"./OrdersContainer\";\nimport { Flipper } from \"../flipper\";\nimport ErrorBoundary from \"../components/ErrorBoundary\";\nimport env from \"../env\";\nimport i18n from \"../localization/i18n\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\n\nconst SecurityContext = React.createContext({});\n\nconst RouteWithLayout = ({\n component: Component,\n layout: Layout,\n bloodTestEnabled,\n ...rest\n}) => (\n \n {(value) => (\n (\n \n \n \n )}\n />\n )}\n \n);\n\nconst queryClient = new QueryClient();\n\nconst selectedLanguage = i18n.language;\nconst orders = new OrdersContainer();\n\nconst changeLanguage = (user) => {\n const selectedLanguage = localStorage.getItem(\"selectedLanguage\");\n const userLanguage = user.locale_preference;\n\n if (selectedLanguage == undefined && userLanguage != undefined) {\n localStorage.setItem(\"selectedLanguage\", userLanguage);\n i18n.changeLanguage(userLanguage);\n window.location.reload(false);\n }\n};\n\nclass App extends Component {\n constructor(props) {\n super(props);\n this.state = {\n bloodTestEnabled: false,\n };\n }\n\n componentDidMount() {\n const currentUser = this.props.current_user;\n Flipper.setFeatures(this.props.features);\n changeLanguage(currentUser);\n\n if (currentUser) {\n orders.loadList(selectedLanguage);\n if (!this.state.bloodTestEnabled)\n this.setState({ bloodTestEnabled: true });\n }\n }\n\n render() {\n const { bloodTestEnabled } = this.state;\n\n const profileDisabled = env.PROFILE_DISABLED === \"true\";\n\n const rootComponent = () => {\n return (\n \n {(orders) => {\n if (\n bloodTestEnabled &&\n orders.state.list &&\n orders.state.list.length > 0 &&\n !orders.state.active\n ) {\n return (\n \n );\n }\n return null;\n }}\n \n );\n };\n\n return (\n \n \n \n \n \n {bloodTestEnabled && (\n {\n const isActive =\n orders.state.active &&\n orders.state.active.order_number ===\n props.match.params.id;\n if (!isActive) {\n orders.loadOrder({\n id: props.match.params.id,\n lang: selectedLanguage,\n });\n }\n return null;\n }}\n />\n )}\n \n \n \n \n \n\n \n \n {!profileDisabled && (\n \n )}\n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n\nexport default App;\n","import React, { useEffect, useState } from \"react\";\nimport { isBefore, subMonths, parse } from \"date-fns\";\nimport axios from \"axios\";\nimport { Link } from \"react-router-dom\";\nimport { Subscribe } from \"unstated\";\n\nimport { Info, ShoppingCart, Archive } from \"react-feather\";\nimport { getColorCodes } from \"./../theme/colorCoding\";\nimport env from \"../env\";\nimport { Flipper } from \"../flipper\";\n\n// Components\nimport ResultCategory from \"./../components/ResultCategory\";\nimport TestResult from \"./../components/TestResult\";\nimport LoadingSpinner from \"./../components/LoadingSpinner\";\nimport ErrorMessage from \"./../components/ErrorMessage\";\nimport SuggestionSection from \"./../components/SuggestionSection\";\nimport ResultSummaryCard from \"./../components/ResultSummary/ResultSummaryCard\";\nimport NoticeText from \"./../components/NoticeText\";\n\nimport FilteringHeader from \"./../components/FilteringHeader/FilteringHeader\";\nimport OrderSelector from \"./../components/OrderSelector\";\nimport OrdersContainer from \"../containers/OrdersContainer\";\n\nimport ErrorBoundary from \"./../components/ErrorBoundary\";\nimport { withTranslation, Trans } from \"react-i18next\";\nimport UserDoctorReview from \"../components/UserDoctorReview\";\nimport UserDoctorReviewAd from \"../components/UserDoctorReviewAd\";\n\nconst selectStyles = {\n control: (styles) => {\n return {\n ...styles,\n borderRadius: \"0.25rem\",\n boxShadow: \"none\",\n border: \"2px solid #e2ecf6\",\n background: \"white\",\n fontSize: \"16px\",\n padding: \"4px 2px\",\n };\n },\n indicatorSeparator: (styles) => ({\n ...styles,\n background: \"transparent\",\n }),\n dropdownIndicator: (styles) => ({\n ...styles,\n color: \"#6e9fd5\",\n }),\n valueContainer: (styles) => ({\n ...styles,\n }),\n};\n\nconst Home = (props) => {\n const [orderChangeSpinner, setOrderChangeSpinner] = useState(false);\n const [colorCodes, setColorCodes] = useState();\n const [profile, setProfile] = useState({});\n const [loadingProfile, setLoadingProfile] = useState(false);\n const [currentUser, setCurrentUser] = useState(props.currentUser);\n const [filteredTests, setFilteredTests] = useState(null);\n const [activeSummaryFilters, setActiveSummaryFilters] = useState([]);\n const { t } = props;\n const selectedLanguage = props.i18n?.language;\n\n const locationState = props.location.state;\n\n useEffect(() => {\n fetchData();\n\n if (locationState && locationState.scrollY) {\n window.scrollTo(0, locationState.scrollY);\n }\n\n const codes = getColorCodes();\n setColorCodes(codes);\n }, [locationState]);\n\n useEffect(() => {\n if (orderChangeSpinner) {\n window.setTimeout(() => {\n setOrderChangeSpinner(false);\n }, 1000);\n }\n }, [orderChangeSpinner]);\n\n function fetchData() {\n axios\n .get(\"/api/profile\")\n .then((response) => {\n setLoadingProfile(false);\n setProfile(response.data);\n })\n .catch((error) => {\n setLoadingProfile(false);\n });\n\n axios\n .get(\"/api/user\")\n .then((response) => {\n setCurrentUser(response.data);\n })\n .catch((error) => {});\n }\n\n return (\n //hom2\n \n \n {(orders) => {\n return (\n \n {renderProfileSummary(props, profile, orders.state.list)}\n
    \n
    \n
    \n
    \n {renderContent({\n props,\n orders,\n filteredTests,\n colorCodes,\n currentUser,\n orderChangeSpinner,\n setFilteredTests,\n activeSummaryFilters,\n setActiveSummaryFilters,\n setOrderChangeSpinner,\n selectedLanguage,\n t,\n })}\n
    \n
    \n
    \n
    \n\n {props.bloodTestEnabled &&\n props.match.path === \"/orders/:id\" &&\n orders.state.active &&\n orders.state.list &&\n orders.state.list.length > 0 && (\n \n )}\n
    \n );\n }}\n
    \n
    \n );\n};\n\nfunction calculateBMI(weight, height) {\n let BMI = Math.round((weight / Math.pow(height / 100, 2)) * 10) / 10;\n BMI = BMI.toString();\n BMI = BMI.replace(\".\", \",\");\n return BMI;\n}\n\nfunction renderProfileUpdateNotice(t) {\n return (\n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n );\n}\n\nfunction renderOrder({\n props,\n colorCodes,\n orders,\n filteredTests,\n activeSummaryFilters,\n graphView,\n currentUser,\n selectedLanguage,\n t,\n}) {\n if (\n props.bloodTestEnabled &&\n props.match.path === \"/orders/:id\" &&\n orders.state.list &&\n orders.state.list.length > 0\n ) {\n return renderCategories(\n orders.state.active,\n orders.state.list,\n filteredTests,\n activeSummaryFilters,\n graphView,\n colorCodes,\n currentUser,\n selectedLanguage,\n t,\n );\n }\n\n return renderEmptyPage(props);\n}\n\nfunction renderContent({\n props,\n orders,\n filteredTests,\n graphView,\n colorCodes,\n currentUser,\n orderChangeSpinner,\n setFilteredTests,\n activeSummaryFilters,\n setActiveSummaryFilters,\n setOrderChangeSpinner,\n selectedLanguage,\n t,\n}) {\n if (orders.state.loading) {\n return (\n
    \n \n
    \n );\n } else if (props.match.path === \"/orders/:id\" && orders.state.error) {\n return (\n
    \n \n
    \n );\n } else if (orders.state.list && orders.state.list.length > 0) {\n return (\n
    \n {props.bloodTestEnabled &&\n props.match.path === \"/orders/:id\" &&\n orders.state.active &&\n orders.state.active.groups.length > 0 &&\n orders.state.list &&\n orders.state.list.length > 0 && (\n \n setActiveSummaryFilters(filters)\n }\n setFilteredTests={(tests) => setFilteredTests(tests)}\n />\n )}\n\n {env.APP_ID === \"puhti\" && (\n
    \n

    \n {t(\"render_content.disclaimer_title\")}\n

    \n
    \n {t(\"render_content.disclaimer_subtitle\")}\n
    \n
    \n )}\n\n

    \n {t(\"render_content.results\")}\n

    \n
    \n
    \n \n
    \n {orders.state.active &&\n orders.state.active.doctor_review_available && (\n \n )}\n\n {env.APP_ID === \"vital\" &&\n orders.state.active &&\n orders.state.active.doctor_review_purchasable && (\n \n )}\n\n {Flipper.enabled(\"orderSummary\") &&\n orders.state.active &&\n orders.state.active?.summary && (\n \n )}\n
    \n \n
    \n {env.APP_ID === \"vital\" &&\n orders.state.active &&\n orders.state.active.laboratory_name && (\n
    \n

    \n {t(\"result_summary.laboratory\")}\n

    \n
    \n {orders.state.active.laboratory_name}\n
    \n
    \n )}\n\n {renderOrder({\n props,\n colorCodes,\n orders,\n filteredTests,\n activeSummaryFilters,\n graphView,\n currentUser,\n selectedLanguage,\n t,\n })}\n
    \n );\n } else {\n return renderEmptyPage(props);\n }\n}\n\nfunction renderEmptyPage(props) {\n const { t } = props;\n return (\n
    \n
    \n

    \n {t(\"render_empty_page.i_have_not_bought_test\")}\n

    \n \n \n {t(\"render_empty_page.go_to_online_store\")}\n \n
    \n
    \n
    \n

    {t(\"render_empty_page.puhti_report_disclaimer\")}

    \n
    \n
    \n
    \n
    \n
    \n );\n}\n\nfunction showProfileUpdatePrompt(orders, currentUser, profile) {\n const { defer_profile_prompt_until } = currentUser;\n const today = new Date();\n\n const deferProfilePromptUntil = parse(defer_profile_prompt_until);\n\n if (\n isBefore(deferProfilePromptUntil, today) &&\n profile.hasOwnProperty(\"id\") &&\n orders &&\n orders.length\n ) {\n const updatedAt = parse(profile.updated_at);\n const monthAgo = subMonths(today, 1);\n\n // Show the prompt if the last update was over a month ago\n if (isBefore(updatedAt, monthAgo)) {\n return true;\n }\n\n if (orders.length) {\n const lastOrder = orders[0];\n const orderTime = parse(lastOrder.order_time);\n\n // Show the prompt if the update was before the latest order\n if (isBefore(updatedAt, orderTime)) {\n return true;\n }\n }\n }\n\n // Default to no prompt\n return false;\n}\n\nfunction renderProfileSummary(props, profile, orders) {\n const { currentUser, t } = props;\n const { weight, height } = profile;\n const profileCountryFi = env.PROFILE_COUNTRY === \"fi\";\n const profileDisabled = env.PROFILE_DISABLED === \"true\";\n return (\n
    \n
    \n
    \n
    \n {!profileDisabled &&\n showProfileUpdatePrompt(orders, currentUser, profile) &&\n renderProfileUpdateNotice(t)}\n

    \n {t(\"render_profile_summary.welcome\")} {currentUser.first_name}\n

    \n {profileCountryFi && !profileDisabled && (\n
    \n
    \n
    \n {t(\"render_profile_summary.bmi\")}\n
    \n
    \n {weight && height ? calculateBMI(weight, height) : \"—\"}\n
    \n
    \n
    \n
    \n {t(\"render_profile_summary.exercise_amount_per_week\")}\n
    \n
    \n {profile.weekly_exercise\n ? `${profile.weekly_exercise} ${\n profile.weekly_exercise === 1\n ? t(\"render_profile_summary.hour\")\n : t(\"render_profile_summary.hours\")\n }`\n : t(\"render_profile_summary.none\")}\n
    \n
    \n
    \n
    \n {t(\"render_profile_summary.sleep_amount_per_day\")}\n
    \n
    \n {profile.sleep\n ? `${profile.sleep} ${\n profile.sleep === 1\n ? t(\"render_profile_summary.hour\")\n : t(\"render_profile_summary.hours\")\n }`\n : \"—\"}\n
    \n
    \n
    \n )}\n\n {profileCountryFi && !profileDisabled && (\n
    \n \n {t(\"render_profile_summary.update_profile\")}\n \n
    \n )}\n
    \n
    \n
    \n
    \n );\n}\n\nfunction renderCategories(\n activeOrder,\n list,\n filteredTests,\n activeSummaryFilters,\n graphView,\n colorCodes,\n currentUser,\n selectedLanguage,\n t,\n) {\n if (!activeOrder) {\n return null;\n }\n \n const summaryFilterCodes =\n activeSummaryFilters && activeSummaryFilters?.length > 0\n ? activeSummaryFilters.map((f) => f.filters).flat()\n : [];\n\n const categoryWithinSummaryFilters = (group) => {\n return group.results.some((r) => summaryFilterCodes.includes(r.code));\n };\n\n // if (activeOrder.groups.length > 0) {\n const groups = filteredTests ? filteredTests.groups : activeOrder.groups;\n const isManuallyCompleted = filteredTests ? filteredTests.manually_completed : activeOrder.manually_completed;\n\n return (\n
    \n {groups.map((group) => {\n if (\n (filteredTests &&\n (!group.filteredCodes || group.filteredCodes.length === 0)) ||\n (activeSummaryFilters.length > 0 &&\n !categoryWithinSummaryFilters(group))\n )\n return null;\n return (\n \n );\n })}\n {/* NOTE: WILL AFFECT PUHTI SIDE, NEED TO TEST\n {renderOrderedTests(\n activeOrder,\n filteredTests,\n colorCodes,\n currentUser,\n t\n )} */}\n \n
    \n );\n /* } else {\n return renderOrderedTests(\n activeOrder,\n filteredTests,\n colorCodes,\n currentUser,\n t\n );\n }*/\n}\n\nfunction renderOrderedTests(\n activeOrder,\n filteredTests,\n colorCodes,\n currentUser,\n t,\n) {\n if (activeOrder.ordered_tests && activeOrder.ordered_tests.length > 0) {\n let tests = activeOrder.ordered_tests;\n\n if (\n filteredTests &&\n filteredTests.ordered_tests &&\n filteredTests.ordered_tests.length\n ) {\n tests = filteredTests.ordered_tests;\n let numberOfFilteredTests = 0;\n filteredTests.ordered_tests.forEach((test) => {\n if (test.filtered) numberOfFilteredTests += 1;\n });\n\n if (numberOfFilteredTests === 0) return null;\n }\n return (\n
    \n
    \n
    \n
    \n

    \n {t(\"render_ordered_tests.waiting_for_results\")}\n

    \n
    \n
    \n
    \n\n
    \n {tests.map((test) => {\n if (filteredTests && !test.filtered) return null;\n return (\n \n );\n })}\n
    \n
    \n );\n }\n}\n\nexport default withTranslation()(Home);\n","import React, { Component } from \"react\";\n\nimport LoginFooter from \"../components/LoginFooter\";\n\nimport { Lock, Info } from \"react-feather\";\nimport Logo from \"../components/Logo\";\n\nimport EmptyLayout from \"../layouts/EmptyLayout\";\nimport SuggestionSection from \"./../components/SuggestionSection\";\nimport ErrorBoundary from \"./../components/ErrorBoundary\";\n\nimport { withTranslation } from \"react-i18next\";\n\nclass Login extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loggedOut: false,\n };\n }\n\n componentDidMount() {\n if (window.location.search && window.location.search === \"?logout\") {\n this.setState({ loggedOut: true });\n }\n }\n\n renderLoginForm(t) {\n return (\n
    \n \n
    \n
    \n \n
    \n
    \n
    \n

    \n {t(\"login.secure_login_title\")}\n

    \n

    {t(\"login.secure_login_description\")}

    \n
    \n
    \n \n {t(\"login.secure_login_link\")}\n \n
    \n\n {this.props.testLoginAvailable && (\n
    \n \n {t(\"login.test_login_description\")}\n \n
    \n )}\n
    \n
    \n );\n }\n\n renderNotice(t) {\n return (\n
    \n
    \n
    \n \n
    \n
    \n {this.state.loggedOut ? (\n

    \n {t(\"login.you_are_logged_out\")}{\" \"}\n {\n event.preventDefault();\n this.setState({ loggedOut: false });\n }}\n >\n {t(\"login.from_here\")}\n \n

    \n ) : (\n <>\n \n {t(\"login.welcome_to_puhti\")}{\" \"}\n \n \n {t(\"login.when_results_are_ready\")}\n \n \n )}\n
    \n
    \n
    \n );\n }\n\n render() {\n const { t } = this.props;\n return (\n \n \n
    \n {this.state.loggedOut ? (\n
    \n
    \n \n
    \n {this.renderNotice(t)}\n
    \n ) : (\n <>\n {this.renderNotice(t)}\n
    \n
    \n \n
    \n
    \n {this.renderLoginForm(t)}\n
    \n
    \n \n \n )}\n
    \n {this.state.loggedOut && (\n <>\n
    \n \n
    \n \n )}\n
    \n
    \n );\n }\n}\nexport default withTranslation()(Login);\n","import React, { Component } from \"react\";\n\nimport LoginFooter from \"../components/LoginFooter\";\nimport Logo from \"../components/Logo\";\n\nimport { Lock, Info } from \"react-feather\";\nimport EmptyLayout from \"../layouts/EmptyLayout\";\nimport SuggestionSection from \"../components/SuggestionSection\";\nimport ErrorBoundary from \"../components/ErrorBoundary\";\n\nimport { withTranslation } from \"react-i18next\";\n\nclass LoginSweden extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loggedOut: false,\n };\n }\n\n componentDidMount() {\n if (window.location.search && window.location.search === \"?logout\") {\n this.setState({ loggedOut: true });\n }\n }\n\n renderLoginForm(t) {\n return (\n
    \n \n
    \n
    \n \n
    \n
    \n
    \n

    \n {t(\"login.secure_login_title\")}\n

    \n

    {t(\"login.secure_login_description\")}

    \n
    \n\n
    \n \n {t(\"login.secure_login_link\")}\n \n
    \n\n {this.props.testLoginAvailable && (\n
    \n \n {t(\"login.test_login_description\")}\n \n
    \n )}\n\n
    \n

    {t(\"login.secure_login_note\")}

    \n
    \n
    \n
    \n );\n }\n\n renderNotice(t) {\n return (\n
    \n
    \n
    \n \n
    \n
    \n {this.state.loggedOut ? (\n

    \n {t(\"login.you_are_logged_out\")}{\" \"}\n {\n event.preventDefault();\n this.setState({ loggedOut: false });\n }}\n >\n {t(\"login.from_here\")}\n \n

    \n ) : (\n <>\n \n {t(\"login.welcome_to_puhti\")}{\" \"}\n \n \n {t(\"login.when_results_are_ready\")}\n \n \n )}\n
    \n
    \n
    \n );\n }\n\n render() {\n const { t } = this.props;\n\n return (\n \n \n
    \n {this.state.loggedOut ? (\n
    \n
    \n \n
    \n {this.renderNotice(t)}\n
    \n ) : (\n <>\n {this.renderNotice(t)}\n
    \n
    \n \n
    \n
    \n {this.renderLoginForm(t)}\n
    \n
    \n \n \n )}\n
    \n {this.state.loggedOut && (\n <>\n
    \n \n
    \n \n )}\n
    \n
    \n );\n }\n}\nexport default withTranslation()(LoginSweden);\n","import React, { Component } from \"react\";\n\nimport EmptyLayout from \"../layouts/EmptyLayout\";\nimport LoginFooter from \"../components/LoginFooter\";\nimport ErrorBoundary from \"../components/ErrorBoundary\";\nimport Logo from \"../components/Logo\";\nimport { withTranslation } from \"react-i18next\";\n\n// Assets\nimport SVG from \"react-inlinesvg\";\n\nimport logoMobiilivarmenne from \"../../images/auth-logos/mpki.telia.1.svg\";\nimport logoAktia from \"../../images/auth-logos/oidc.aktia.1.svg\";\nimport logoAlandsbanken from \"../../images/auth-logos/oidc.alandsbanken.1.svg\";\nimport logoDanskebank from \"../../images/auth-logos/oidc.danskebank.1.svg\";\nimport logoHandlesbanken from \"../../images/auth-logos/oidc.handelsbanken.1.svg\";\nimport logoNordea from \"../../images/auth-logos/oidc.nordea.1.svg\";\nimport logoOmasp from \"../../images/auth-logos/oidc.omasp.1.svg\";\nimport logoPop from \"../../images/auth-logos/oidc.pop.1.svg\";\nimport logoSp from \"../../images/auth-logos/oidc.sp.1.svg\";\nimport logoSpankki from \"../../images/auth-logos/oidc.spankki.1.svg\";\nimport logoOP from \"../../images/auth-logos/saml.op.1.svg\";\nimport { ArrowLeft } from \"react-feather\";\n\nclass LoginAuth extends Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n\n render() {\n const { t } = this.props;\n return (\n \n \n
    \n
    \n
    \n \n
    \n
    \n

    \n {t(\"login.select_authentication_provider\")}\n

    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n );\n }\n}\n\nconst AuthMethod = ({ logo, name, title }) => {\n return (\n
    \n \n \n

    {title}

    \n \n
    \n );\n};\n\nexport default withTranslation()(LoginAuth);\n","import React, { useEffect } from \"react\";\nimport SVG from \"react-inlinesvg\";\n\nimport LoginFooter from \"../components/LoginFooter\";\n\nimport { Box } from \"react-feather\";\nimport logoSymbol from \"../assets/logo-symbol.svg\";\nimport EmptyLayout from \"../layouts/EmptyLayout\";\n\nimport { withTranslation } from \"react-i18next\";\n\nfunction Maintenance() {\n const { t } = this.props;\n\n useEffect(() => {\n const interval = setInterval(() => {\n window.location = `${window.location.href}/..`;\n }, 10000);\n return () => {\n clearInterval(interval);\n };\n }, []);\n\n return (\n \n
    \n <>\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n

    \n {t(\"maintenance.header\")}\n

    \n

    {t(\"maintenance.description\")}

    \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n \n );\n}\n\nexport default withTranslation()(Maintenance);\n","import { Container } from \"unstated\";\nimport axios from \"axios\";\nimport denormalize from \"denormalize-jsonapi\";\n\nexport default class MicrobiomeOrdersContainer extends Container {\n state = {\n list: [],\n active: null,\n loading: false,\n error: null,\n };\n\n setActive = (active) => {\n this.setState({\n active,\n });\n };\n\n load = () => {\n this.setState({\n error: null,\n loading: true,\n });\n axios\n .get(\"/api/microbiome_orders\")\n .then((response) => {\n const orders = denormalize(response.data).data;\n const active = orders.length ? orders[0] : null;\n this.setState({\n list: orders,\n loading: false,\n error: null,\n active,\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n });\n };\n}\n","import React, { Component } from \"react\";\nimport { Redirect } from \"react-router\";\nimport SVG from \"react-inlinesvg\";\nimport classNames from \"classnames\";\nimport { TransitionGroup, CSSTransition } from \"react-transition-group\";\nimport axios from \"axios\";\nimport NumberInput from \"../components/NumberInput\";\nimport Question from \"../components/Question\";\nimport update from \"immutability-helper\";\nimport { withTranslation } from \"react-i18next\";\nimport logoSymbol from \"../assets/logo-symbol.svg\";\n\nimport { QUESTIONS_FI, QUESTIONS_SE, QUESTIONS_SE_EN } from \"../data.js\";\nimport { APP_ID } from \"../env\";\nimport i18n from \"../localization/i18n.js\";\n\nclass Onboarding extends Component {\n constructor(props) {\n super(props);\n this.state = {\n step: 1,\n loading: false,\n profileData: {},\n onboardingComplete: false,\n };\n this.handleOnChange = this.handleOnChange.bind(this);\n this.handleStepComplete = this.handleStepComplete.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleComplete = this.handleComplete.bind(this);\n }\n\n componentDidMount() {\n this.fetchData();\n }\n\n fetchData() {\n axios\n .get(\"/api/profile\")\n .then((response) => {\n this.setState({\n loading: false,\n profileData: { ...response.data },\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n }\n\n handleOnChange(value, name) {\n const oldState = this.state.profileData;\n\n const newState = update(oldState, { [name]: { $set: value } });\n\n this.setState({ profileData: newState });\n }\n\n handleStepComplete(event, saveProfile) {\n this.setState({ step: this.state.step + 1 });\n\n if (saveProfile) {\n this.handleSubmit();\n }\n }\n\n handleSubmit(onboardingComplete) {\n this.setState({ loading: true }, () => {\n axios\n .put(\"/api/profile\", this.state.profileData)\n .then((response) => {\n this.setState({ loading: false, onboardingComplete });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n });\n }\n\n handleComplete() {\n this.setState({ onboardingComplete: true });\n }\n\n renderNumberInputs(t) {\n return (\n
    \n
    \n \n \n
    \n
    \n );\n }\n\n renderQuestions() {\n const lang = i18n.language;\n const isPuhti = APP_ID === \"puhti\";\n const questions = isPuhti ? QUESTIONS_FI : lang === \"en\" ? QUESTIONS_SE_EN : QUESTIONS_SE;\n\n return questions.map((question) => {\n return (\n \n );\n });\n }\n\n renderStepOne(t) {\n return (\n
    \n
    \n
    \n \n
    \n

    \n {t(\"onboarding.welcome_to_puhti\")}\n

    \n

    \n {t(\"onboarding.before_results_questions_disclaimer\")}\n

    \n
    \n
    \n\n
    \n
    \n \n {t(\"onboarding.start\")}\n \n
    \n
    \n this.handleSubmit(true)}\n className=\"link link--blue-light\"\n >\n {t(\"onboarding.skip_questionare\")}\n \n
    \n
    \n
    \n
    \n );\n }\n\n renderStepTwo(t) {\n return (\n
    \n
    \n

    \n {t(\"onboarding.input_weight_and_height\")}\n

    \n

    {t(\"onboarding.for_bmi\")}

    \n
    \n
    \n {this.renderNumberInputs(t)}\n
    \n \n {t(\"onboarding.continue\")}\n \n
    \n
    \n
    \n );\n }\n\n renderStepThree(t) {\n return (\n
    \n
    \n
    \n
    \n
    \n

    \n {t(\"onboarding.lifestyle_related_questions\")}\n

    \n

    \n {t(\"onboarding.13_questions_related_to_your_health\")}\n

    \n
    \n
    \n
    \n
    \n\n
    \n
    {this.renderQuestions()}
    \n
    \n this.handleStepComplete(event, true)}\n className=\"button button--large\"\n >\n {t(\"onboarding.continue\")}\n \n
    \n
    \n
    \n );\n }\n\n renderStepFour(t) {\n return (\n
    \n
    \n
    \n
    \n

    \n {t(\"onboarding.thanks_for_replies\")}\n

    \n

    \n {t(\"onboarding.you_can_go_to_results\")}.\n

    \n
    \n
    \n
    \n
    \n \n {t(\"onboarding.show_results\")}\n \n
    \n
    \n
    \n
    \n );\n }\n\n render() {\n const { t } = this.props;\n const bgClasses = classNames(\"\", {\n \"bg-purple\": this.state.step === 1 || this.state.step === 4,\n \"bg-blue-lightest\": this.state.step === 2 || this.state.step === 3,\n });\n\n if (this.state.onboardingComplete) {\n return ;\n }\n\n return (\n
    \n \n \n
    \n
    \n
    \n
    \n {this.state.step === 1 && this.renderStepOne(t)}\n {this.state.step === 2 && this.renderStepTwo(t)}\n {this.state.step === 3 && this.renderStepThree(t)}\n {this.state.step === 4 && this.renderStepFour(t)}\n
    \n
    \n
    \n
    \n \n
    \n
    \n );\n }\n}\nexport default withTranslation()(Onboarding);\n","import { Container } from \"unstated\";\nimport axios from \"axios\";\nexport default class OrdersContainer extends Container {\n state = {\n list: [],\n active: null,\n loading: false,\n error: null,\n };\n\n loadOrder = ({ id, lang }) => {\n let path = `/api/orders/${id}`;\n if (lang) {\n path = `${path}?locale=${lang}`;\n }\n this.setState({\n error: null,\n loading: true,\n });\n axios\n .get(path)\n .then((response) => {\n const order = response.data;\n this.setState({\n active: order,\n loading: false,\n error: null,\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n });\n };\n\n loadList = (lang) => {\n let path = \"/api/orders\";\n if (lang) {\n path = `${path}?locale=${lang}`;\n }\n this.setState({\n error: null,\n loading: true,\n });\n axios\n .get(path)\n .then((response) => {\n const orders = response.data.orders;\n this.setState({ list: orders });\n if (orders.length === 0) {\n this.setState({ loading: false });\n }\n return orders;\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error\n });\n });\n };\n}\n","import React, { Component } from \"react\";\nimport { Info, CheckCircle } from \"react-feather\";\nimport { CSSTransition } from \"react-transition-group\";\nimport axios from \"axios\";\nimport update from \"immutability-helper\";\nimport { getUserSex } from \"../helpers\";\n\nimport NumberInput from \"../components/NumberInput\";\nimport LoadingSpinner from \"./../components/LoadingSpinner\";\nimport ErrorMessage from \"./../components/ErrorMessage\";\nimport ErrorBoundary from \"./../components/ErrorBoundary\";\nimport Question from \"../components/Question\";\nimport {\n QUESTIONS_FI,\n QUESTIONS_SE,\n QUESTIONS_SE_EN,\n MICROBIOME_QUESTIONS,\n} from \"../data.js\";\nimport { withTranslation } from \"react-i18next\";\nimport env, { DEFAULT_LOCALE } from \"../env\";\nimport i18n from \"../localization/i18n.js\";\n\nclass Profile extends Component {\n constructor(props) {\n super(props);\n this.state = {\n loading: true,\n loadingUser: true,\n profileLoaded: false,\n edited: false,\n profileEdited: false,\n userEdited: false,\n error: null,\n };\n this.handleOnChange = this.handleOnChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n componentDidMount() {\n this.fetchData();\n this.deferProfileUpdatePrompt();\n }\n\n fetchData() {\n axios\n .get(\"/api/profile\")\n .then((response) => {\n this.setState({\n profileLoaded: true,\n profileData: { ...response.data },\n updatedAt: response.data.updated_at,\n });\n this.getUser();\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n }\n\n getUser() {\n axios\n .get(\"/api/user\")\n .then((response) => {\n this.setState({\n currentUser: response.data,\n loading: false,\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n }\n\n deferProfileUpdatePrompt() {\n axios\n .post(\"/api/profile/defer\")\n .then((response) => {\n console.info(\"Defer successful\", response);\n })\n .catch((error) => {\n console.error(error);\n });\n }\n\n handleOnChange(value, name) {\n const oldState = this.state.profileData;\n const newState = update(oldState, { [name]: { $set: value } });\n this.setState({\n profileData: newState,\n edited: true,\n profileEdited: true,\n success: false,\n });\n }\n\n handleConsentChange(value, name) {\n const oldState = this.state.currentUser;\n\n const newState = update(oldState, { [name]: { $set: value } });\n\n this.setState({\n currentUser: newState,\n edited: true,\n userEdited: true,\n success: false,\n });\n }\n\n handleSubmit() {\n if (this.state.profileEdited) {\n this.setState({ error: null, loading: true }, () => {\n axios\n .put(\"/api/profile\", this.state.profileData)\n .then((response) => {\n if (!this.state.userEdited) {\n this.setState({\n loading: false,\n success: true,\n edited: false,\n profileEdited: false,\n updatedAt: response.data.updated_at,\n });\n } else {\n this.setState({ profileEdited: false });\n this.handleUserUpdate();\n }\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n });\n } else if (!this.state.profileEdited && this.state.userEdited) {\n this.handleUserUpdate();\n }\n }\n\n handleUserUpdate() {\n this.setState({ error: null, loading: true }, () => {\n axios\n .put(\"/api/user\", {\n allow_anonymous_data_usage:\n this.state.currentUser[\"allow_anonymous_data_usage\"],\n })\n .then((response) => {\n this.setState({\n loading: false,\n success: true,\n edited: false,\n userEdited: false,\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n });\n }\n\n renderNumberInputs() {\n const { t } = this.props;\n const isPuhti = env.APP_ID === \"puhti\";\n\n return (\n \n {isPuhti && (\n

    \n {t(\"profile.basic_info\")}\n

    \n )}\n
    \n
    \n \n\n \n
    \n
    \n
    \n );\n }\n\n renderQuestions(questions, user, t) {\n const userSex = getUserSex(user?.identity_number || \"\");\n return questions\n .filter((question) => {\n if (question.hasOwnProperty(\"sex\")) {\n return userSex === question.sex;\n } else return true;\n })\n .map((question) => {\n if (question.type === \"matrix\") {\n return (\n
    \n

    \n {question.title}\n

    \n
    \n {question.questions.map((innerQuestion) => {\n return (\n \n );\n })}\n
    \n
    \n );\n } else {\n return (\n \n );\n }\n });\n }\n\n renderSubmitContent() {\n const { t } = this.props;\n if (this.state.success) {\n return (\n
    \n {t(\"profile.saved\")}\n
    \n );\n } else {\n return (\n
    \n
    \n \n

    \n {this.state.error\n ? t(\"profile.saving_failed\")\n : t(\"profile.changes_in_profile\")}\n

    \n
    \n \n {this.state.loading\n ? t(\"profile.saving\")\n : t(\"profile.save_changes\")}\n \n
    \n );\n }\n }\n\n renderUpdatedAtString() {\n const { t } = this.props;\n\n if (this.state.updatedAt) {\n const dateString =\n t(\"profile.last_updated\") +\n \" \" +\n new Date(this.state.updatedAt).toLocaleString(DEFAULT_LOCALE, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n });\n return (\n

    \n {dateString}\n

    \n );\n } else return;\n }\n\n renderSubmit() {\n return (\n \n \n
    \n
    \n
    \n
    \n
    \n {this.renderSubmitContent()}\n
    \n
    \n
    \n
    \n
    \n
    \n \n );\n }\n\n render() {\n if (\n !this.state.loading &&\n this.state.profileLoaded &&\n this.state.currentUser\n ) {\n const { location, t } = this.props;\n const isPuhti = env.APP_ID === \"puhti\";\n const lang = i18n.language;\n return (\n \n
    \n
    \n
    \n
    \n {location &&\n location.state &&\n location.state.activationSuccess && (\n
    \n \n
    \n \n {t(\"profile.activation_successful\")}\n {\" \"}\n {t(\"profile.please_answer_theses_questions\")}.\n
    \n
    \n )}\n
    \n

    \n {t(\"profile.profile\")}\n

    \n {this.renderUpdatedAtString()}\n \n {t(\"profile.subtitle\")}.\n \n {this.renderNumberInputs()}\n
    \n
    \n {isPuhti && (\n

    \n {t(\"profile.lifestyles\")}\n

    \n )}\n
    \n {this.renderQuestions(\n isPuhti\n ? QUESTIONS_FI\n : lang == \"en\"\n ? QUESTIONS_SE_EN\n : QUESTIONS_SE,\n this.state.currentUser,\n t\n )}\n
    \n
    \n
    \n
    \n
    \n {this.renderSubmit()}\n
    \n
    \n );\n } else if (this.state.loading) {\n return (\n
    \n \n
    \n );\n } else if (this.state.error) {\n return (\n
    \n \n
    \n );\n } else {\n return null;\n }\n }\n}\nexport default withTranslation()(Profile);\n","import React, { useEffect, useState } from \"react\";\nimport axios from \"axios\";\nimport { Subscribe } from \"unstated\";\nimport { getColorCodes } from \"./../theme/colorCoding\";\n\nimport LoadingSpinner from \"./../components/LoadingSpinner\";\nimport SuggestionSection from \"./../components/SuggestionSection\";\nimport MicrobiomeSuggestionSection from \"./../components/MicrobiomeSuggestionSection\";\nimport OrdersContainer from \"../containers/OrdersContainer\";\nimport MicrobiomeOrdersContainer from \"../containers/MicrobiomeOrdersContainer\";\n\nimport ErrorBoundary from \"./../components/ErrorBoundary\";\nimport { withTranslation, useTranslation } from \"react-i18next\";\n\nconst Promotions = (props) => {\n const [spinner, setSpinner] = useState(false);\n const [colorCodes, setColorCodes] = useState();\n const [currentUser, setCurrentUser] = useState();\n const { t } = useTranslation();\n const selectedLanguage = props.i18n?.language;\n\n useEffect(() => {\n function restoreScroll() {\n if (props.location.state && props.location.state.scrollY) {\n window.scrollTo(0, props.location.state.scrollY);\n }\n }\n\n fetchData();\n restoreScroll();\n const codes = getColorCodes();\n setColorCodes(codes);\n }, [props.location.state]);\n\n useEffect(() => {\n if (spinner) {\n window.setTimeout(() => {\n setSpinner(false);\n }, 1000);\n }\n }, [spinner]);\n\n function fetchData() {\n axios\n .get(\"/api/user\")\n .then((response) => {\n setCurrentUser(response.data);\n })\n .catch((error) => {\n console.error(error);\n });\n }\n\n return (\n \n \n {(orders, microbiomeOrders) => {\n return (\n \n
    \n
    \n

    \n {t(\"promotions.promotions_and_services\")}\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n {!spinner ? (\n <>\n \n\n {props.microbiomeTestEnabled &&\n props.match.path === \"/microbiome_orders/:id\" &&\n microbiomeOrders.state.active &&\n microbiomeOrders.state.list &&\n microbiomeOrders.state.list.length > 0 && (\n \n )}\n \n ) : (\n \n )}\n
    \n
    \n
    \n
    \n
    \n );\n }}\n
    \n
    \n );\n};\n\nexport default withTranslation()(Promotions);\n","import React, { Component } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport axios from \"axios\";\nimport { format } from \"date-fns\";\n\nimport {\n calculateValues,\n parseValueToFloat,\n shouldShowFerritDisclaimer,\n} from \"../helpers\";\n\n// Components\nimport RangeChart from \"../components/RangeChart\";\nimport LineChart from \"../components/LineChart\";\nimport LoadingSpinner from \"./../components/LoadingSpinner\";\nimport ErrorMessage from \"./../components/ErrorMessage\";\nimport ErrorBoundary from \"./../components/ErrorBoundary\";\nimport SuggestionSection from \"./../components/SuggestionSection\";\nimport { MarkdownRender } from \"../components/Markdown/MarkdownRender\";\n\nfunction BackToResultsLink(props) {\n return (\n \n Takaisin tuloksiin\n \n );\n}\n\nclass Single extends Component {\n componentDidMount() {\n this.fetchData();\n }\n\n state = {\n loading: true,\n };\n\n fetchData() {\n this.setState({ error: null, loading: true }, () => {\n axios\n .get(`/api/results/${this.props.match.params.id}`)\n .then((response) => {\n const results = response.data.results.sort(function (a, b) {\n return new Date(b.sampling_time) - new Date(a.sampling_time);\n });\n\n this.setState({\n loading: false,\n results: response.data.results,\n activeResult: results[0],\n description: response.data.description,\n });\n })\n .catch((error) => {\n this.setState({\n loading: false,\n error: error,\n });\n console.error(error);\n });\n });\n }\n\n renderStatements() {\n const { activeResult } = this.state;\n if (activeResult.statements && activeResult.statements.length > 0) {\n return (\n
    \n
    Lausunto
    \n
    \n {activeResult.statements.map((statement, index) => {\n statement.replace(/(?:\\r\\n|\\r|\\n)/g, \"\\n\");\n if (statement === \"Katso lausunto\") return null;\n return (\n

    \n {statement.split(\"\\n\").map((chunk, index) => {\n return (\n \n {chunk}\n
    \n
    \n );\n })}\n

    \n );\n })}\n
    \n
    \n );\n }\n }\n\n renderValue() {\n const { activeResult } = this.state;\n const { currentUser } = this.props;\n if (activeResult.reference_value_low || activeResult.reference_value_high) {\n return (\n
    \n
    \n \n
    \n {this.renderStatements()}\n
    \n );\n } else {\n return (\n
    \n
    Tulos
    \n \n {activeResult.value} {activeResult.unit}\n
    \n {this.renderStatements()}\n
    \n );\n }\n }\n\n renderLineChart() {\n const { results, activeResult } = this.state;\n const { currentUser } = this.props;\n\n let maxValue = results[0].value;\n\n if (results.length > 1) {\n maxValue = results\n .map((result) => result.value)\n .reduce((prev, current) => {\n return parseFloat(current) > parseFloat(prev) ? current : prev;\n });\n }\n\n const {\n referenceLow,\n referenceHigh,\n lowestValue,\n highestValue,\n hideLow,\n hideUpper,\n } = calculateValues(\n maxValue,\n results[0].reference_value_low,\n results[0].reference_value_high,\n );\n\n if (results[0].reference_value_low || results[0].reference_value_high) {\n return (\n
    \n
    \n

    \n Muutos\n {results.length === 1 && (\n
    \n Seuraavat tulokset päivittyvät tähän kuvaajaan. Voit helposti\n seurata tulosten kehittymistä.\n
    \n )}\n

    \n
    \n
    \n
    \n ({\n date: new Date(result.sampling_time),\n value: parseValueToFloat(result.value).value,\n displayValue: parseValueToFloat(result.value).displayValue,\n }))}\n unit={results[0].unit}\n min={lowestValue}\n max={highestValue}\n minR={referenceLow}\n maxR={referenceHigh}\n hideMinR={hideLow}\n hideMaxR={hideUpper}\n oneResult={results.length === 1}\n recommendationLow={\n shouldShowFerritDisclaimer(\n activeResult.code,\n currentUser.identity_number,\n ) && 30\n }\n />\n
    \n
    \n
    \n );\n }\n }\n\n renderSources() {\n const { description } = this.state;\n if (description.source_urls && description.source_urls.length > 0) {\n const urls = description.source_urls;\n return (\n
    \n Lähteet:{\" \"}\n {urls.map((url, index) => {\n return (\n \n \n Lähde {index + 1}\n {\" \"}\n \n );\n })}\n
    \n );\n }\n }\n\n renderReadMore() {\n const { description } = this.state;\n if (description.article_url) {\n return (\n
    \n \n Lisätietoa aiheesta\n \n
    \n );\n }\n }\n\n renderReferenceDisclaimer() {\n const { activeResult } = this.state;\n\n const { value, referenceLow, referenceHigh } = calculateValues(\n activeResult.value,\n activeResult.reference_value_low,\n activeResult.reference_value_high,\n );\n\n if (!(referenceHigh || referenceLow)) {\n return \"\";\n } else if (\n isNaN(value) ||\n (value >= referenceLow && value <= referenceHigh)\n ) {\n return \"\";\n } else {\n return (\n
    \n
    \n

    \n Tuloksesi on viitearvojen ulkopuolella. Jos epäilet sairautta, ota\n yhteyttä lääkäriin asian selvittämiseksi. Voit tulostaa raportin\n ja käydä sen läpi yhdessä lääkärin kanssa.\n

    \n
    \n
    \n );\n }\n }\n renderDescription() {\n const { description } = this.state;\n return (\n
    \n
    \n
    \n
    \n
    \n
    \n

    \n Uusin tulos\n

    \n {this.renderValue()}\n
    \n {this.renderReferenceDisclaimer()}\n {this.renderLineChart()}\n
    \n
    \n
    \n
    \n

    \n Tietoa\n

    \n
    \n \n
    \n {this.renderSources()}\n {this.renderReadMore()}\n
    \n
    \n
    \n
    \n
    \n );\n }\n\n render() {\n const { description, loading, error } = this.state;\n\n if (loading) {\n return (\n \n
    \n
    \n
    \n
    \n
    \n \n Takaisin tuloksiin\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n );\n } else if (error) {\n return (\n \n \n
    \n
    \n
    \n
    \n
    \n \n Takaisin tuloksiin\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n );\n } else {\n return (\n \n \n
    \n
    \n
    \n
    \n
    \n \n Takaisin tuloksiin\n \n
    \n

    \n {description.title} ({description.name})\n

    \n
    \n
    \n
    Ryhmä
    \n
    \n {description.group}\n
    \n
    \n
    \n
    Uusin tulos
    \n
    \n {this.state.activeResult &&\n format(\n this.state.activeResult.last_changed,\n \"D.MM.YYYY\",\n )}\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n {this.renderDescription()}\n \n
    \n
    \n );\n }\n }\n}\nexport default Single;\n","export const QUESTIONS_FI = [\n {\n id: 1,\n title: \"Mikä seuraavista kuvaa ruokavaliotasi?\",\n type: \"radio\",\n name: \"diet\",\n options: [\n {\n label: \"Sekaruokavalio (syön sekä lihaa että kasviksia)\",\n value: \"mixed\",\n },\n {\n label: \"Kasvisruokavalio (syön pääosin kasvisruokaa)\",\n value: \"vegetarian\",\n },\n { label: \"Erityisruokavalio\", value: \"other\" },\n ],\n },\n {\n id: 2,\n title: \"Syötkö mielestäsi terveellisesti?\",\n type: \"radio\",\n name: \"healthy_diet\",\n options: [\n { label: \"Kyllä\", value: \"yes\" },\n { label: \"En\", value: \"no\" },\n { label: \"En osaa sanoa\", value: \"unknown\" },\n ],\n },\n {\n id: 3,\n title:\n \"Mikä seuraavista kuvaa liikuntatottumuksiasi tavallisena viikkona? Voit valita useamman vaihtoehdon.\",\n type: \"checkbox\",\n name: \"exercise_habits\",\n options: [\n { label: \"En harrasta liikuntaa juuri lainkaan\", value: \"no_exercise\" },\n {\n label:\n \"Harrastan reipasta ulkoilua (esim. pyöräily, reipas kävely, työmatkaliikunta jne.)\",\n value: \"outdoor\",\n },\n {\n label:\n \"Harrastan rasittavampaa kestävyysliikuntaa (esim. juoksu, pyöräily, hiihto, uinti, porraskävely, mailapelit)\",\n value: \"endurance\",\n },\n {\n label:\n \"Harrastan lihaskuntoa ja liikkuvuutta ylläpitävää ja kehittävää liikuntaa (esim. kuntosali, kuntopiiri, jumpat, tanssi)\",\n value: \"strength\",\n },\n ],\n },\n {\n id: 4,\n title: \"Montako tuntia tavallisesti harrastat liikuntaa viikossa yhteensä?\",\n type: \"select\",\n name: \"weekly_exercise\",\n options: [\n { label: \"En lainkaan\", value: 0 },\n { label: \"1 tunnin\", value: 1 },\n { label: \"2 tuntia\", value: 2 },\n { label: \"3 tuntia\", value: 3 },\n { label: \"4 tuntia\", value: 4 },\n { label: \"5 tuntia\", value: 5 },\n { label: \"6 tuntia\", value: 6 },\n { label: \"7 tuntia\", value: 7 },\n { label: \"8 tuntia\", value: 8 },\n { label: \"9 tuntia\", value: 9 },\n { label: \"10 tuntia\", value: 10 },\n { label: \"11 tuntia\", value: 11 },\n { label: \"12 tuntia\", value: 12 },\n { label: \"13 tuntia\", value: 13 },\n { label: \"14 tuntia\", value: 14 },\n { label: \"15 tuntia\", value: 15 },\n { label: \"16 tuntia\", value: 16 },\n { label: \"17 tuntia\", value: 17 },\n { label: \"18 tuntia\", value: 18 },\n { label: \"19 tuntia\", value: 19 },\n { label: \"20 tuntia\", value: 20 },\n { label: \"21 tuntia\", value: 21 },\n { label: \"22 tuntia\", value: 22 },\n { label: \"23 tuntia\", value: 23 },\n { label: \"24 tuntia\", value: 24 },\n { label: \"25 tuntia\", value: 25 },\n { label: \"26 tuntia\", value: 26 },\n { label: \"27 tuntia\", value: 27 },\n { label: \"28 tuntia\", value: 28 },\n { label: \"29 tuntia\", value: 29 },\n { label: \"30 tuntia\", value: 30 },\n ],\n },\n {\n id: 5,\n title: \"Montako tuntia nukut tavallisesti vuorokaudessa?\",\n type: \"select\",\n name: \"sleep\",\n options: [\n { label: \"1 tunnin\", value: 1 },\n { label: \"2 tuntia\", value: 2 },\n { label: \"3 tuntia\", value: 3 },\n { label: \"4 tuntia\", value: 4 },\n { label: \"5 tuntia\", value: 5 },\n { label: \"6 tuntia\", value: 6 },\n { label: \"7 tuntia\", value: 7 },\n { label: \"8 tuntia\", value: 8 },\n { label: \"9 tuntia\", value: 9 },\n { label: \"10 tuntia\", value: 10 },\n { label: \"11 tuntia\", value: 11 },\n { label: \"12 tuntia\", value: 12 },\n { label: \"13 tuntia\", value: 13 },\n { label: \"14 tuntia\", value: 14 },\n ],\n },\n {\n id: 6,\n title: \"Millainen on terveydentilasi omasta mielestäsi?\",\n type: \"radio\",\n name: \"state_of_health\",\n options: [\n { label: \"Hyvä\", value: \"good\" },\n { label: \"Melko hyvä\", value: \"above_average\" },\n { label: \"Keskitasoinen\", value: \"average\" },\n { label: \"Melko huono\", value: \"below_average\" },\n { label: \"Huono\", value: \"bad\" },\n ],\n },\n {\n id: 7,\n title: \"Koetko olevasi stressaantunut tai uupunut?\",\n type: \"radio\",\n name: \"stress\",\n options: [\n { label: \"Kyllä\", value: \"yes\" },\n { label: \"En\", value: \"no\" },\n { label: \"Välillä\", value: \"occasionally\" },\n ],\n },\n {\n id: 8,\n title: \"Oletko tyytyväinen ihmissuhteisiisi? (perhe, ystävät yms.)\",\n type: \"radio\",\n name: \"state_of_relationships\",\n options: [\n { label: \"Kyllä\", value: \"yes\" },\n { label: \"En\", value: \"no\" },\n { label: \"En osaa sanoa\", value: \"unknown\" },\n ],\n },\n {\n id: 9,\n title: \"Oletko tyytyväinen työhösi?\",\n type: \"radio\",\n name: \"job_satisfaction\",\n options: [\n { label: \"Kyllä\", value: \"yes\" },\n { label: \"En\", value: \"no\" },\n { label: \"En osaa sanoa\", value: \"unknown\" },\n ],\n },\n {\n id: 10,\n title: \"Tupakoitko?\",\n type: \"radio\",\n name: \"smoking\",\n options: [\n { label: \"Kyllä\", value: \"yes\" },\n { label: \"En\", value: \"no\" },\n { label: \"Satunnaisesti\", value: \"occasionally\" },\n ],\n },\n {\n id: 11,\n title:\n \"Montako annosta alkoholia käytät keskimäärin viikossa (yksi annos on 33cl III-olutta tai 12cl viiniä)?\",\n type: \"radio\",\n name: \"alcohol_usage\",\n options: [\n { label: \"0\", value: \"units_0\" },\n { label: \"1-7\", value: \"units_1\" },\n { label: \"8-14\", value: \"units_8\" },\n { label: \"15-24\", value: \"units_15\" },\n { label: \"yli 24\", value: \"units_24\" },\n ],\n },\n {\n id: 12,\n title: \"Missä päin Suomea asut?\",\n type: \"radio\",\n name: \"finland_region\",\n options: [\n { label: \"Etelä-Suomen lääni\", value: \"southern\" },\n { label: \"Länsi-Suomen lääni\", value: \"western\" },\n { label: \"Itä-Suomen lääni\", value: \"eastern\" },\n { label: \"Oulun lääni\", value: \"oulu\" },\n { label: \"Lapin lääni\", value: \"lapland\" },\n ],\n },\n {\n id: 13,\n title: \"Millaisella alueella asut?\",\n type: \"radio\",\n name: \"area_type\",\n options: [\n { label: \"Pääkaupunkiseudulla\", value: \"capital_region\" },\n {\n label: \"Muussa suuressa kaupungissa, yli 100 000 asukasta\",\n value: \"other_city\",\n },\n { label: \"Kaupungissa jossa 20 000 - 100 000 asukasta\", value: \"town\" },\n { label: \"Pienempi taajama tai kunta\", value: \"village\" },\n { label: \"Maaseutu, haja-asutusalue\", value: \"rural\" },\n ],\n },\n];\n\nexport const MICROBIOME_QUESTIONS = [\n {\n id: \"17\",\n title: \"Onko sinulla eläimiä kotona?\",\n type: \"checkbox\",\n name: \"home_animals\",\n options: [\n { label: \"Ei\", value: \"no_animal\" },\n { label: \"Koira\", value: \"dog\" },\n { label: \"Kissa\", value: \"cat\" },\n { label: \"Hamsteri, marsu tai muu pieni eläin\", value: \"small_animal\" },\n {\n label: \"Kotieläimiä (hevonen, lammas, lehmä...)\",\n value: \"farm_animal\",\n },\n { label: \"Kyllä, jokin muu\", value: \"other\" },\n ],\n },\n {\n id: \"18\",\n title: \"Kuinka usein käytät seuraavia?\",\n type: \"matrix\",\n questions: [\n {\n id: \"18_1\",\n title: \"Kasvikset\",\n type: \"radio\",\n name: \"vegetables_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_2\",\n title: \"Hedelmät\",\n type: \"radio\",\n name: \"fruits_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_3\",\n title: \"Viljat\",\n type: \"radio\",\n name: \"cereals_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_4\",\n title: \"Palkokasvit (esim. herneet, pavut, linssit...)\",\n type: \"radio\",\n name: \"legumes_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_5\",\n title: \"Pähkinät ja siemenet\",\n type: \"radio\",\n name: \"nuts_and_seeds_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_6\",\n title: \"Kahvi\",\n type: \"radio\",\n name: \"coffee_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_7\",\n title: \"Karkit ja makeat herkut\",\n type: \"radio\",\n name: \"sweets_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_8\",\n title: \"Alkoholi\",\n type: \"radio\",\n name: \"alcohol_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_9\",\n title: \"Punainen liha\",\n type: \"radio\",\n name: \"red_meat_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_10\",\n title: \"Vaalea liha\",\n type: \"radio\",\n name: \"white_meat_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"18_11\",\n title: \"Maitotuotteet\",\n type: \"radio\",\n name: \"dairy_products_usage_frequency\",\n options: [\n { label: \"Useasti päivässä\", value: \"multiple_times_a_day\" },\n { label: \"Päivittäin\", value: \"every_day\" },\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n ],\n },\n {\n id: \"19\",\n title: \"Kuinka usein käytät seuraavia?\",\n type: \"matrix\",\n questions: [\n {\n id: \"19_1\",\n title: \"Erilliset kuituvalmisteet\",\n type: \"radio\",\n name: \"fiber_usage_frequency\",\n options: [\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n {\n id: \"19_2\",\n title: \"Maitohappobakteerit/probiootit\",\n type: \"radio\",\n name: \"probiotics_usage_frequency\",\n options: [\n { label: \"Kerran päivässä\", value: \"once_a_day\" },\n { label: \"Muutamalla aterialla viikossa\", value: \"few_a_week\" },\n { label: \"Kerran viikossa\", value: \"once_a_week\" },\n { label: \"Harvemmin\", value: \"not_often\" },\n { label: \"En koskaan\", value: \"never\" },\n ],\n },\n ],\n },\n {\n id: \"20\",\n title: \"Onko sinulla todettu jokin seuraavista sairauksista?\",\n type: \"checkbox\",\n name: \"disease_diagnoses\",\n options: [\n {\n label: \"Ei, minulla ei ole todettu mitään näistä sairauksista\",\n value: \"no\",\n },\n { label: \"Ylipaino\", value: \"overweight\" },\n { label: \"Astma\", value: \"asthma\" },\n { label: \"Diabetes\", value: \"diabetes\" },\n { label: \"Raudanpuutos\", value: \"iron_deficiency\" },\n { label: \"Allergia eläimelle\", value: \"animal_allergy\" },\n { label: \"Allergia kasville\", value: \"plant_allergy\" },\n { label: \"Allergia ruoalle\", value: \"food_allergy\" },\n { label: \"Osteoporoosi\", value: \"osteoporosis\" },\n { label: \"Masennus\", value: \"depression\" },\n { label: \"Kilpirauhasen vajaatoiminta\", value: \"hypothyroidism\" },\n { label: \"Kilpirauhasen liikatoiminta\", value: \"hyperthyroidism\" },\n { label: \"Sydän- tai verisuonitauti\", value: \"cardiovascular_disease\" },\n { label: \"Maksa- tai munuaissairaus\", value: \"liver_kidney_disease\" },\n { label: \"Syöpä\", value: \"cancer\" },\n {\n label: \"Keliakia tai yliherkkyys gluteenille\",\n value: \"celiac_disease\",\n },\n {\n label: \"Laktoosi-intoleranssi tai maito-allergia\",\n value: \"lactose_intolerance\",\n },\n { label: \"Autoimmuunisairaus\", value: \"autoimmune_disease\" },\n { label: \"Kyllä, jokin muu\", value: \"other\" },\n ],\n },\n {\n id: \"21\",\n title: \"Onko sinulla todettu jotain seuraavista suolistosairauksista?\",\n type: \"checkbox\",\n name: \"bowel_disease_diagnoses\",\n options: [\n { label: \"Ei diagnosoituja suolistosairauksia\", value: \"no\" },\n { label: \"Ärtyneen suolen oireyhtymä ripulilla (IBS-D)\", value: \"ibs_d\" },\n {\n label: \"Ärtyneen suolen oireyhtymä ummetuksella (IBS-C)\",\n value: \"ibs_c\",\n },\n {\n label: \"Ärtyneen suolen oireyhtymä sekalaisilla vatsavaivoilla (IBS-M)\",\n value: \"ibs_m\",\n },\n { label: \"Haavainen paksusuolentulehdus (IBD UC)\", value: \"ibd_uc\" },\n { label: \"Crohnin tauti (IBD CD)\", value: \"ibd_cd\" },\n { label: \"Suolistosyöpä\", value: \"intestinal_cancer\" },\n ],\n },\n {\n id: \"22\",\n title: \"Epäiletkö itse jotain seuraavista suolistosairauksista?\",\n type: \"checkbox\",\n name: \"bowel_disease_suspects\",\n options: [\n { label: \"Ärtyneen suolen oireyhtymä ripulilla (IBS-D)\", value: \"ibs_d\" },\n {\n label: \"Ärtyneen suolen oireyhtymä ummetuksella (IBS-C)\",\n value: \"ibs_c\",\n },\n {\n label: \"Ärtyneen suolen oireyhtymä sekalaisilla vatsavaivoilla (IBS-M)\",\n value: \"ibs_m\",\n },\n { label: \"Epäilen jotain suolisto-ongelmaa\", value: \"something\" },\n { label: \"En epäile mitään suolisto-ongelmaa\", value: \"no\" },\n ],\n },\n {\n id: \"23\",\n title: \"Oletko ollut seuraavissa leikkauksissa?\",\n type: \"checkbox\",\n name: \"subsequent_surgeries\",\n options: [\n { label: \"Umpisuoli\", value: \"caecum\" },\n { label: \"Sappirakko\", value: \"gall_bladder\" },\n { label: \"Lihavuusleikkaus\", value: \"obesity_surgery\" },\n { label: \"Suolistoleikkaus\", value: \"intestinal_surgery\" },\n ],\n },\n {\n id: \"24\",\n title: \"Milloin viimeksi olet syönyt antibioottikuurin?\",\n type: \"radio\",\n name: \"last_antibiotics_course_time\",\n options: [\n { label: \"Olen parhaillaan antibioottikuurilla\", value: \"now\" },\n {\n label: \"Edellinen antibioottikuuri päättyi kahden viikon sisällä\",\n value: \"two_weeks\",\n },\n {\n label: \"Edellinen antibioottikuuri päättyi kuukauden sisällä\",\n value: \"month\",\n },\n {\n label: \"Edellinen antibioottikuuri päättyi kahden kuukauden sisällä\",\n value: \"two_months\",\n },\n {\n label: \"Edellinen antibioottikuuri päättyi vuoden sisällä\",\n value: \"year\",\n },\n {\n label: \"Edellinen antibioottikuuri päättyi yli vuosi sitten\",\n value: \"more_than_a_year\",\n },\n { label: \"En ole koskaan syönyt antibiootteja\", value: \"never\" },\n ],\n },\n {\n id: \"25\",\n title: \"Kuinka monta antibioottikuuria arvioit syöneesi elämäsi aikana?\",\n type: \"radio\",\n name: \"lifetime_antibiotics_course_estimate\",\n options: [\n { label: \"Alle 5\", value: \"units_0\" },\n { label: \"5-10\", value: \"units_5\" },\n { label: \"10-20\", value: \"units_10\" },\n { label: \"yli 20\", value: \"units_20\" },\n ],\n },\n {\n id: \"26\",\n title:\n \"Oliko sinulla useita antibioottikuureja ensimmäisen kolmen elinvuoden aikana?\",\n type: \"radio\",\n name: \"childhood_multiple_antibiotics_courses\",\n options: [\n { label: \"Kyllä, kolme tai yli\", value: \"more_than_3\" },\n { label: \"Ei, alle kolme\", value: \"less_than_3\" },\n { label: \"Ei ollenkaan\", value: \"never\" },\n { label: \"En tiedä / En halua vastata\", value: \"unknown\" },\n ],\n },\n {\n id: \"27\",\n title: \"Oletko syntynyt sektiolla vai alateitse?\",\n type: \"radio\",\n name: \"birth_position\",\n options: [\n { label: \"Aletiesynnytys\", value: \"down\" },\n { label: \"Sektio (keisarileikkaus)\", value: \"section\" },\n { label: \"En tiedä / En halua vastata\", value: \"unknown\" },\n ],\n },\n {\n id: \"28\",\n title: \"Onko sinua rintaruokittu lapsena?\",\n type: \"radio\",\n name: \"breastfed_child\",\n options: [\n { label: \"Kyllä, yli 3 kk\", value: \"over_three_months\" },\n { label: \"Kyllä, alle 3 kk\", value: \"under_three_months\" },\n { label: \"Ei\", value: \"no\" },\n { label: \"En tiedä / En halua vastata\", value: \"unknown\" },\n ],\n },\n {\n id: \"29\",\n title:\n \"Kuinka usein sinulla on seuraavia oireita? (Naisilla oireet, jotka eivät liity kuukautisiin.)\",\n type: \"matrix\",\n questions: [\n {\n id: \"29_1\",\n title: \"Ummetus\",\n type: \"radio\",\n name: \"constipation_frequency\",\n options: [\n { label: \"Ei koskaan\", value: \"never\" },\n { label: \"Alle 10 kertaa vuodessa\", value: \"less_than_10_a_year\" },\n { label: \"Kerran kuussa\", value: \"once_a_month\" },\n { label: \"Ainakin kerran viikossa\", value: \"once_a_week\" },\n { label: \"Joka päivä\", value: \"every_day\" },\n ],\n },\n {\n id: \"29_2\",\n title: \"Ripuli\",\n type: \"radio\",\n name: \"diarrhea_frequency\",\n options: [\n { label: \"Ei koskaan\", value: \"never\" },\n { label: \"Alle 10 kertaa vuodessa\", value: \"less_than_10_a_year\" },\n { label: \"Kerran kuussa\", value: \"once_a_month\" },\n { label: \"Ainakin kerran viikossa\", value: \"once_a_week\" },\n { label: \"Joka päivä\", value: \"every_day\" },\n ],\n },\n {\n id: \"29_3\",\n title: \"Turvotus\",\n type: \"radio\",\n name: \"swelling_frequency\",\n options: [\n { label: \"Ei koskaan\", value: \"never\" },\n { label: \"Alle 10 kertaa vuodessa\", value: \"less_than_10_a_year\" },\n { label: \"Kerran kuussa\", value: \"once_a_month\" },\n { label: \"Ainakin kerran viikossa\", value: \"once_a_week\" },\n { label: \"Joka päivä\", value: \"every_day\" },\n ],\n },\n {\n id: \"29_4\",\n title: \"Vatsakipu\",\n type: \"radio\",\n name: \"stomachache_frequency\",\n options: [\n { label: \"Ei koskaan\", value: \"never\" },\n { label: \"Alle 10 kertaa vuodessa\", value: \"less_than_10_a_year\" },\n { label: \"Kerran kuussa\", value: \"once_a_month\" },\n { label: \"Ainakin kerran viikossa\", value: \"once_a_week\" },\n { label: \"Joka päivä\", value: \"every_day\" },\n ],\n },\n {\n id: \"29_5\",\n title: \"Tavallista runsaammat ilmavaivat\",\n type: \"radio\",\n name: \"abnormal_flatulence_frequency\",\n options: [\n { label: \"Ei koskaan\", value: \"never\" },\n { label: \"Alle 10 kertaa vuodessa\", value: \"less_than_10_a_year\" },\n { label: \"Kerran kuussa\", value: \"once_a_month\" },\n { label: \"Ainakin kerran viikossa\", value: \"once_a_week\" },\n { label: \"Joka päivä\", value: \"every_day\" },\n ],\n },\n {\n id: \"29_6\",\n title: \"Vatsakrampit\",\n type: \"radio\",\n name: \"stomach_cramps_frequency\",\n options: [\n { label: \"Ei koskaan\", value: \"never\" },\n { label: \"Alle 10 kertaa vuodessa\", value: \"less_than_10_a_year\" },\n { label: \"Kerran kuussa\", value: \"once_a_month\" },\n { label: \"Ainakin kerran viikossa\", value: \"once_a_week\" },\n { label: \"Joka päivä\", value: \"every_day\" },\n ],\n },\n ],\n },\n {\n id: \"30\",\n title:\n \"Mikä alla olevista kuvastaa sinulle tyypillistä ulostetta parhaiten?\",\n type: \"checkbox\",\n name: \"composition_of_stool\",\n options: [\n {\n label: \"Tyyppi 1: erillisiä, kovia, vaikeasti ulostuvia kokkareita\",\n value: \"type_1_hard\",\n },\n {\n label: \"Tyyppi 2: yhtenäinen, kiinteä, selvästi kuhmurainen\",\n value: \"type_2_solid_bumpy\",\n },\n {\n label: \"Tyyppi 3: yhtenäinen, kiinteä, rakoja pinnassa\",\n value: \"type_3_solid_surface_cracks\",\n },\n {\n label: \"Tyyppi 4: yhtenäinen, pehmeä ja sileä\",\n value: \"type_4_solid_smooth\",\n },\n {\n label: \"Tyyppi 5: pehmeitä, erillisiä klönttejä\",\n value: \"type_5_soft_discrete\",\n },\n { label: \"Tyyppi 6: kuohkeaa, puuromaista\", value: \"type_6_fluffy\" },\n { label: \"Tyyppi 7: täysin nestemäistä\", value: \"type_7_liquid\" },\n ],\n },\n];\n\nexport const QUESTIONS_SE = [\n {\n id: 1,\n title: \"Är du gravid?\",\n type: \"radio\",\n sex: \"female\",\n name: \"pregnant\",\n options: [\n { label: \"Ja\", value: \"yes\" },\n { label: \"Nej\", value: \"no\" },\n ],\n },\n {\n id: 2,\n title: \"Ammar du för tillfället?\",\n type: \"radio\",\n sex: \"female\",\n name: \"breastfeeding\",\n options: [\n { label: \"Ja\", value: \"yes\" },\n { label: \"Nej\", value: \"no\" },\n ],\n },\n {\n id: 3,\n title: \"Vad beskriver bäst dina kostvanor?\",\n type: \"radio\",\n name: \"diet_sweden\",\n options: [\n { label: \"Icke-vegetarisk kost\", value: \"mixed\" },\n { label: \"Vegetarisk kost\", value: \"vegetarian\" },\n { label: \"Vegansk kost\", value: \"vegan\" },\n { label: \"Annat\", value: \"other\" },\n ],\n },\n {\n id: 4,\n title:\n \"Har du någon sjukdom eller besvär som du medicinerar eller vårdas för kontinuerligt?\",\n type: \"radio\",\n name: \"medicated_illness\",\n options: [\n { label: \"Ja\", value: \"yes\" },\n { label: \"Nej\", value: \"no\" },\n ],\n },\n /*\n {\n id: 5,\n title: \"Vänligen uppge:\",\n type: \"string\",\n name: \"medicated_illness_text\"\n },\n */\n {\n id: 6,\n title: \"Tar du något läkemedel eller kosttillskott regelbundet?\",\n type: \"radio\",\n name: \"medicine_or_suppliments\",\n options: [\n { label: \"Ja\", value: \"yes\" },\n { label: \"Nej\", value: \"no\" },\n ],\n },\n /*\n {\n id: 7,\n title: \"Vänligen uppge vilket eller vilka:\",\n type: \"string\",\n name: \"medicine_or_suppliments_text\",\n },\n */\n {\n id: 8,\n title: \"Varför tog du blodprovet?\",\n type: \"radio\",\n name: \"reason_for_test\",\n options: [\n {\n label: \"Hälsokontroll - mår bra, vill kontrollera mina värden\",\n value: \"health_followup\",\n },\n { label: \"Misstänker sjukdom - mår inte bra\", value: \"disease_suspect\" },\n {\n label:\n \"Följer upp tidigare blodprov för att följa utveckling av värden\",\n value: \"blood_test_folllowup\",\n },\n { label: \"Följer en kronisk sjukdom\", value: \"chronic_disease_followup\" },\n { label: \"Vill ej svara\", value: \"no_answer\" },\n ],\n },\n];\n\nexport const QUESTIONS_SE_EN = [\n {\n id: 1,\n title: \"Are you pregnant?\",\n type: \"radio\",\n sex: \"female\",\n name: \"pregnant\",\n options: [\n { label: \"Yes\", value: \"yes\" },\n { label: \"No\", value: \"no\" },\n ],\n },\n {\n id: 2,\n title: \"Are you currently breastfeeding?\",\n type: \"radio\",\n sex: \"female\",\n name: \"breastfeeding\",\n options: [\n { label: \"Yes\", value: \"yes\" },\n { label: \"No\", value: \"no\" },\n ],\n },\n {\n id: 3,\n title: \"What best describes your diet?\",\n type: \"radio\",\n name: \"diet_sweden\",\n options: [\n { label: \"Non-vegetarian diet\", value: \"mixed\" },\n { label: \"Vegetarian diet\", value: \"vegetarian\" },\n { label: \"Vegan diet\", value: \"vegan\" },\n { label: \"Other\", value: \"other\" },\n ],\n },\n {\n id: 4,\n title:\n \"Do you have any illness or discomfort that you are medicating or caring for continuously?\",\n type: \"radio\",\n name: \"medicated_illness\",\n options: [\n { label: \"Yes\", value: \"yes\" },\n { label: \"No\", value: \"no\" },\n ],\n },\n /*\n {\n id: 5,\n title: \"Please specify:\",\n type: \"string\",\n name: \"medicated_illness_text\"\n },\n */\n {\n id: 6,\n title: \"Do you take any medication or supplements regularly?\",\n type: \"radio\",\n name: \"medicine_or_suppliments\",\n options: [\n { label: \"Yes\", value: \"yes\" },\n { label: \"No\", value: \"no\" },\n ],\n },\n /*\n {\n id: 7,\n title: \"Please specify which:\",\n type: \"string\",\n name: \"medicine_or_suppliments_text\",\n },\n */\n {\n id: 8,\n title: \"Why did you take the blood test?\",\n type: \"radio\",\n name: \"reason_for_test\",\n options: [\n {\n label: \"Health check - feel good, want to check my values\",\n value: \"health_followup\",\n },\n { label: \"Suspect disease - feel unwell\", value: \"disease_suspect\" },\n {\n label:\n \"Following up previous blood test to follow development of values\",\n value: \"blood_test_folllowup\",\n },\n {\n label: \"Following a chronic disease\",\n value: \"chronic_disease_followup\",\n },\n { label: \"Do not want to answer\", value: \"no_answer\" },\n ],\n },\n];\n","/* eslint-disable no-undef */\n\nmodule.exports = {\n APP_ID: __APP_ID,\n APP_NAME: __APP_NAME,\n ENVIRONMENT: __ENVIRONMENT,\n SENTRY_DSN: __SENTRY_DSN,\n SENTRY_ENVIRONMENT: __SENTRY_ENVIRONMENT,\n SENTRY_RELEASE: __SENTRY_RELEASE,\n DEFAULT_LOCALE: __DEFAULT_LOCALE,\n PROFILE_COUNTRY: __PROFILE_COUNTRY,\n USER_CHANGE_DISABLED: __USER_CHANGE_DISABLED,\n WEBSHOP_URL: __WEBSHOP_URL,\n PROMOTIONS_ENABLED: __PROMOTIONS_ENABLED,\n PROFILE_DISABLED: __PROFILE_DISABLED,\n LOCALIZATION_ALLOWED_LOCALES: __LOCALIZATION_ALLOWED_LOCALES,\n WOOCOMMERCE_ENDPOINT: __WOOCOMMERCE_ENDPOINT,\n};\n","export const features = {};\nexport const Flipper = {\n enabled: (feature) => features[feature] === true,\n setFeatures: (newFeatures) => {\n Object.keys(features).forEach((key) => {\n Reflect.deleteProperty(features, key);\n });\n Object.keys(newFeatures).forEach((key) => {\n features[key] = newFeatures[key];\n });\n },\n};\n","import { format } from \"date-fns\";\n\nimport env from \"./env\";\n\nexport const stageEnv = {\n development: env.ENVIRONMENT === \"development\",\n staging: env.ENVIRONMENT === \"staging\",\n production: env.ENVIRONMENT === \"production\",\n};\n\nexport const formatStringDate = (date) => {\n return format(new Date(date), \"D.M.YYYY\");\n};\n\nexport const resultIsWithinRange = (\n value,\n reference_value_low,\n reference_value_high,\n) => {\n value = value.replace(\",\", \".\");\n value = value.replace(\">\", \"\");\n value = value.replace(\"<\", \"\");\n\n if (!reference_value_low) {\n return parseFloat(value) <= parseFloat(reference_value_high);\n }\n if (!reference_value_high) {\n return parseFloat(value) >= parseFloat(reference_value_low);\n } else\n return (\n parseFloat(value) >= parseFloat(reference_value_low) &&\n parseFloat(value) <= parseFloat(reference_value_high)\n );\n};\n\nexport const parseDisplayValue = (displayValue, t) => {\n if (displayValue[0] === \"<\" || displayValue[0] === \">\") {\n return displayValue[0] === \"<\"\n ? t(\"linechart.less_than\") + \" \" + displayValue.replace(\"<\", \"\")\n : t(\"linechart.more_than\") + \" \" + displayValue.replace(\">\", \"\");\n }\n return displayValue;\n};\n\nexport const calculateValues = (\n passedValue,\n passedReferenceLow,\n passedReferenceHigh,\n passedMinValue,\n) => {\n const { displayValue, value } = parseValueToFloat(passedValue);\n\n let referenceLow;\n let referenceHigh;\n\n let lowestValue;\n let highestValue;\n let maxWidth;\n\n let hideLow = false;\n let hideUpper = false;\n\n if (passedReferenceLow && passedReferenceHigh) {\n // If there is both lower and upper referencevalues we set them as is and\n // then set lowestValue and highestValue 25% percent to each direction so\n // it we have some red bars also. If the actual value is more than 25%\n // off from reference values then calculate the low and high using value.\n\n //miika: ^that 25% percentage was actually 30%? anyways was causing issues so changed to 0.1 on lines 61 and 62\n referenceLow = parseFloat(passedReferenceLow);\n referenceHigh = parseFloat(passedReferenceHigh);\n\n maxWidth = (referenceHigh - referenceLow) / 0.4;\n lowestValue = referenceLow - maxWidth * 0.1; //0.3;\n highestValue = referenceHigh + maxWidth * 0.1; //0.3;\n if (lowestValue < 0) {\n lowestValue = 0;\n highestValue = referenceHigh + referenceLow;\n }\n if (highestValue === referenceHigh) {\n highestValue = referenceHigh + maxWidth * 0.4;\n }\n if (lowestValue > value) {\n lowestValue = value * 0.75;\n }\n if (highestValue < value) {\n highestValue = value * 1.25;\n }\n } else if (passedReferenceLow) {\n referenceLow = parseFloat(passedReferenceLow);\n maxWidth = referenceLow / 0.5;\n lowestValue = referenceLow - maxWidth * 0.5;\n highestValue = referenceLow + maxWidth * 0.5;\n referenceHigh = referenceLow + maxWidth * 0.5;\n hideUpper = true;\n if (value <= referenceLow) {\n if (referenceLow === 0) {\n highestValue = 1;\n }\n }\n if (highestValue * 0.95 < value) {\n highestValue = value * 1.25;\n referenceHigh = value * 1.25;\n }\n } else if (passedReferenceHigh) {\n referenceHigh = parseFloat(passedReferenceHigh);\n maxWidth = referenceHigh / 0.5;\n lowestValue = referenceHigh - maxWidth * 0.5;\n highestValue = referenceHigh + maxWidth * 0.5;\n referenceLow = referenceHigh - maxWidth * 0.5;\n hideLow = true;\n if (highestValue * 0.95 < value) {\n highestValue = value * 1.25;\n }\n } else if (!passedReferenceHigh && !passedReferenceLow) {\n referenceHigh = null;\n referenceLow = null;\n lowestValue = passedMinValue ? parseFloat(passedMinValue) * 0.75 : 0;\n highestValue = value * 1.25;\n hideLow = true;\n hideUpper = true;\n }\n\n return {\n value,\n displayValue,\n referenceLow,\n referenceHigh,\n lowestValue,\n highestValue,\n hideLow,\n hideUpper,\n };\n};\n\nexport const parseValueToFloat = (passedValue) => {\n if (!passedValue) {\n return {\n displayValue: 0,\n value: 0,\n };\n }\n\n const displayValue = passedValue.replace(\".\", \",\");\n\n let value = parseFloat(\n displayValue.replace(\",\", \".\").replace(/[^\\d.-]/g, \"\"),\n );\n\n // if (/^/.test(passedValue)) {\n // value = value * 1.1;\n // }\n\n return { displayValue, value };\n};\n\nexport const valueHasSmallerThanSign = (value) => {\n return /^ {\n return /^>/.test(value);\n};\n\nexport const getUserAgeInYears = (identityNumber) => {\n const day = identityNumber.slice(0, 2);\n const month = identityNumber.slice(2, 4);\n let year = identityNumber.slice(4, 6);\n const century = identityNumber.slice(6, 7);\n if (century === \"A\") {\n year = 2000 + year;\n } else {\n year = 1900 + year;\n }\n const birthday = new Date(year, month, day);\n const difference = Date.now() - birthday.getTime();\n const ageDate = new Date(difference);\n return Math.abs(ageDate.getUTCFullYear() - 1970);\n};\n\nexport const getUserSex = (identityNumber) => {\n // Sex determining digit offset based on identity number format\n const sexDeterminingDigitOffset = 2;\n const sexDeterminingDigit = parseInt(\n identityNumber.charAt(identityNumber.length - sexDeterminingDigitOffset),\n 10,\n );\n\n if (sexDeterminingDigit % 2 === 0) {\n return \"female\";\n } else {\n return \"male\";\n }\n};\n\nexport const shouldShowFerritDisclaimer = (\n code,\n identityNumber,\n lastChanged,\n) => {\n const mehilainenDateThreshold = new Date(\"2021-03-25\");\n\n if (mehilainenDateThreshold > new Date(lastChanged)) {\n if (code === \"1395\") {\n return true;\n }\n } else if (\n code === \"1395\" &&\n getUserAgeInYears(identityNumber) >= 16 &&\n getUserSex(identityNumber) === \"female\"\n ) {\n return true;\n }\n};\n\n// Check if we should hide the rangechart for a test since\n// the reference values vary by user information we don't have\nexport const shouldChartBeHidden = (code, identityNumber) => {\n const hideChartForTheseTests = [\"2502\", \"1366\", \"1422\"];\n if (\n hideChartForTheseTests.includes(code) &&\n getUserSex(identityNumber) === \"male\"\n ) {\n return true;\n } else {\n return false;\n }\n};\n\nexport const generateMicrobiomeChartData = (group, bacteria) => {\n let totalValue = 0;\n let othersPercentage = 0;\n let data = [];\n\n group.bacteria.forEach((bacterium) => {\n const bacteriumValues = bacteria.find(\n (candidate) =>\n candidate &&\n candidate.microbiome_bacterium &&\n candidate.microbiome_bacterium.id &&\n bacterium.id &&\n candidate.microbiome_bacterium.id === bacterium.id,\n );\n if (bacteriumValues) {\n totalValue += parseFloat(bacteriumValues.result_value);\n }\n });\n\n group.bacteria.forEach((bacterium) => {\n const bacteriumValues = bacteria.find(\n (candidate) =>\n candidate &&\n candidate.microbiome_bacterium &&\n candidate.microbiome_bacterium.id &&\n bacterium.id &&\n candidate.microbiome_bacterium.id === bacterium.id,\n );\n if (bacteriumValues) {\n const percentage =\n (parseFloat(bacteriumValues.result_value) / totalValue) * 100;\n\n if (percentage >= 1) {\n data.push({\n id: bacterium.id,\n label: bacterium.heading,\n value: Number(percentage.toFixed(0)),\n });\n } else {\n othersPercentage += percentage;\n }\n }\n });\n\n let sortedData = data.sort((a, b) => b.value - a.value);\n\n if (othersPercentage > 0) {\n sortedData.push({\n id: \"muut\",\n label: \"Muut\",\n value: Number(othersPercentage.toFixed(0)),\n });\n }\n\n return sortedData;\n};\n\nexport function hasNumber(myString) {\n return /\\d/.test(myString);\n}\n\nexport const checkResultForFastingStatements = (testResultCode) => {\n const fastingExceptionStatements = [];\n\n switch (testResultCode) {\n case \"2770\":\n fastingExceptionStatements.push(\n \"Jos olet paastonnut ennen näytteenottoa, viitearvo on alle 1,7 mmol/l. Jos et ole paastonnut, viitearvo on alle 2 mmol/l.\",\n );\n break;\n case \"2099\":\n fastingExceptionStatements.push(\n \"Jos olet paastonnut ennen näytteenottoa, viitearvo on alle 3 mmol/l. Jos et ole paastonnut, viitearvo on alle 2,8 mmol/l.\",\n );\n break;\n case \"2095\":\n fastingExceptionStatements.push(\n \"Jos olet paastonnut ennen näytteenottoa, viitearvo on alle 5 mmol/l. Jos et ole paastonnut, viitearvo on alle 4,8 mmol/l.\",\n );\n break;\n default:\n }\n\n return fastingExceptionStatements;\n};\n\nexport const getIronTest45292PositiveOrNegativeMessage = ({\n groupResults,\n secondIronTestValue,\n}) => {\n const firstIronTestValue = groupResults?.find(\n (result) => result.code === \"4529\",\n )?.value; // Iron levels on the first test before supplement. Rauta ennen rautalisän ottamista\n const ferritinValue = groupResults?.find(\n (result) => result.code === \"1395\",\n )?.value;\n const difference = secondIronTestValue - firstIronTestValue;\n\n if (!ferritinValue || !firstIronTestValue) {\n return { positive: null, negative: null };\n }\n\n if (ferritinValue < 20 && difference > 18) {\n return { positive: \"Rautalisä imeytyy\" };\n }\n if (ferritinValue >= 20 && ferritinValue <= 60 && difference > 10) {\n return { positive: \"Rautalisä imeytyy\" };\n }\n if (ferritinValue > 60 && difference > 3) {\n return { positive: \"Rautalisä imeytyy\" };\n }\n\n return { negative: \"Rautalisä ei imeydy riittävästi\" };\n // Ferrit lähtötaso <20 ja Fe muutos 2h jälkeen verrattuna ensimmäiseen mittaukseen >18. = Imeytyy\n // Ferrit lähtötaso 20-60 ja Fe muutos 2h jälkeen verrattuna ensimmäiseen mittaukseen >10. = Imeytyy\n // Ferrit lähtötaso >60 ja Fe muutos 2h jälkeen verrattuna ensimmäiseen mittaukseen >3. = Imeytyy\n};\n","import React, { Component } from \"react\";\n\nclass EmptyLayout extends Component {\n render() {\n return (\n
    \n
    {this.props.children}
    \n
    \n );\n }\n}\n\nexport default EmptyLayout;\n","import React from \"react\";\nimport env from \"../env\";\n\nimport Navigation from \"../components/navigation/Navigation\";\nimport NavLink from \"../components/navigation/NavLink\";\nimport NavDropdownLink from \"../components/navigation/NavDropdownLink\";\nimport {\n Activity,\n Globe,\n User,\n LogOut,\n Archive,\n Users,\n Tag,\n} from \"react-feather\";\nimport axios from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport i18n from \"../localization/i18n\";\nimport { Flipper } from \"../flipper\";\n\nimport Footer from \"../components/Footer\";\nimport checkIcon from \"../assets/check.svg\";\nimport SVG from \"react-inlinesvg\";\n\nconst changeLanguage = (lng) => {\n i18n.changeLanguage(lng);\n localStorage.setItem(\"selectedLanguage\", lng);\n window.location.reload(false);\n};\n\nconst availableLanguages = () => {\n const languageString = env.LOCALIZATION_ALLOWED_LOCALES || \"\";\n const languages = languageString.split(\",\").map((lang) => lang.trim());\n return languages;\n};\n\nconst current_language = i18n.language;\n\nconst handleLogOut = (event, csrfParam, csrfToken, url, redirectUrl) => {\n event.preventDefault();\n\n let params = {};\n params[csrfParam] = csrfToken;\n\n axios\n .delete(url, {\n params: params,\n maxRedirects: 0,\n })\n .then((response) => {\n window.location = redirectUrl + \"?logout\";\n })\n .catch((error) => {\n window.location = redirectUrl + \"?logout\";\n console.error(error);\n });\n};\n\nconst LeftLinks = (props) => {\n const { company, microbiomeTestEnabled } = props;\n const promotionsEnabled = env.PROMOTIONS_ENABLED === \"true\";\n const profileDisabled = env.PROFILE_DISABLED === \"true\";\n const { t } = useTranslation();\n\n if (company) {\n return (\n <>\n }\n />\n \n );\n } else {\n return (\n <>\n }\n />\n {!profileDisabled && (\n } />\n )}\n {microbiomeTestEnabled && (\n }\n />\n )}\n {promotionsEnabled && (\n }\n label={t(\"promotions.promotions_and_services\")}\n />\n )}\n \n );\n }\n};\n\nconst check_icon = ;\nconst filler_icon = ;\n\nconst RightLinks = (props) => {\n const { company, csrfParam, csrfToken } = props;\n const { t } = useTranslation();\n\n if (company) {\n return (\n
    \n }\n onClick={(event) =>\n handleLogOut(\n event,\n csrfParam,\n csrfToken,\n \"/company_users/sign_out\",\n \"/corporate\",\n )\n }\n />\n
    \n );\n } else {\n return (\n
    \n {availableLanguages().length > 1 && (\n }\n children={availableLanguages().map((lang) => (\n changeLanguage(lang)}\n to={\"/\"}\n key={lang}\n label={t(\"languages.\" + lang)}\n icon={lang === current_language ? check_icon : filler_icon}\n menuitem={true}\n />\n ))}\n />\n )}\n }\n onClick={(event) =>\n handleLogOut(event, csrfParam, csrfToken, \"/users/sign_out\", \"/\")\n }\n />\n \n
    \n );\n }\n};\n\nexport const MainLayout = (props) => {\n return (\n
    \n
    \n \n }\n rightLinks={\n \n }\n />\n {props.children}\n
    \n
    \n
    \n
    \n
    \n );\n};\nexport default MainLayout;\n","import React, { Component } from \"react\";\n\nclass OnboardingLayout extends Component {\n render() {\n return {this.props.children};\n }\n}\n\nexport default OnboardingLayout;\n","const env = require(\"./env\");\n\nconst linksMap = {\n puhti: {\n loginFaqUrl: () =>\n `${env.WEBSHOP_URL}/faq-vastaus/ongelmia-kirjautumisessa-oma-puhtiin`,\n orderPageUrl: () => `${env.WEBSHOP_URL}/tuotteet/`,\n repurchaseUrl: ({ ids }) => `${env.WEBSHOP_URL}/tuotteet`,\n /*\n legacy\n repurchaseUrl: ({ ids }) =>\n `${env.WEBSHOP_URL}/ostoskori/?add-to-cart=${ids}`,\n */\n microbiomeTestsInfoUrl: () =>\n `${env.WEBSHOP_URL}/tuote/suoliston-mikrobiomitesti`,\n customOrderPageUrl: () => `${env.WEBSHOP_URL}/tuotteet/mittatilaus`,\n },\n vital: {\n loginFaqUrl: () => `${env.WEBSHOP_URL}/vanliga-fragor`,\n orderPageUrl: () => `${env.WEBSHOP_URL}/halsokontroller`,\n repurchaseUrl: ({ ids }) => `${env.WEBSHOP_URL}/halsokontroller`,\n /*\n \n legacy\n repurchaseUrl: ({ ids }) =>\n `${env.WEBSHOP_URL}/varukorg/?add-to-cart=${ids}`,\n */\n microbiomeTestsInfoUrl: () => `${env.WEBSHOP_URL}`,\n customOrderPageUrl: () => `${env.WEBSHOP_URL}`,\n },\n};\n\nmodule.exports = {\n resolveUrl: (name, params = {}) => linksMap[env.APP_ID][name](params),\n};\n","var map = {\n\t\"./puhti/en.json\": \"./app/javascript/src/localization/puhti/en.json\",\n\t\"./puhti/fi.json\": \"./app/javascript/src/localization/puhti/fi.json\",\n\t\"./puhti/sv.json\": \"./app/javascript/src/localization/puhti/sv.json\",\n\t\"./vital/en.json\": \"./app/javascript/src/localization/vital/en.json\",\n\t\"./vital/fi.json\": \"./app/javascript/src/localization/vital/fi.json\",\n\t\"./vital/sv.json\": \"./app/javascript/src/localization/vital/sv.json\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./app/javascript/src/localization sync recursive ^\\\\.\\\\/.*\\\\/.*\\\\.json$\";","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport env from \"../env\";\n\nconst app_name = env.APP_ID;\nconst defaultLanguage = \"fi\";\nconst selectedLanguage = localStorage.getItem(\"selectedLanguage\");\nconst language = selectedLanguage || env.DEFAULT_LOCALE || defaultLanguage;\n\nconst resources = { fi: {}, sv: {}, en: {} };\nObject.keys(resources).forEach(\n (locale) =>\n (resources[locale] = {\n translation: require(`./${app_name}/${locale}.json`),\n }),\n);\n\ni18n.use(initReactI18next).init({\n resources,\n lng: language,\n fallbackLng: \"en\",\n interpolation: {\n escapeValue: false,\n },\n});\nexport default i18n;\n","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-1!../../../../../node_modules/postcss-loader/src/index.js??ref--6-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--6-3!./_suggestion-section.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-1!../../../../../node_modules/postcss-loader/src/index.js??ref--6-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--6-3!./_test-result.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-1!../../../../../node_modules/postcss-loader/src/index.js??ref--6-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--6-3!./_user-doctor-review.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import chroma from \"chroma-js\";\n\nconst primaryColors = [\n \"#00ADA0\",\n \"#30AC73\",\n \"#74AB9C\",\n \"#8389AC\",\n \"#A283AC\",\n \"#794A95\",\n \"#4F61A8\",\n \"#297AAC\",\n // remove reds because they indicate bad results\n // \"#e04444\",\n // \"#C4372A\",\n // \"#C43E6A\",\n \"#C05D8F\",\n \"#13AFBF\",\n \"#A3AB2C\",\n \"#889799\",\n \"#AFA25D\",\n \"#BB782B\",\n \"#637c7c\",\n \"#B68C74\",\n \"#696FAD\",\n];\n\nexport function getColorCodes() {\n return generateFullPalette(primaryColors);\n}\n\nfunction generateFullPalette(primaryColors) {\n let result = [];\n\n primaryColors.forEach((color) => {\n result.push(chroma(color).hex());\n });\n primaryColors.forEach((color) => {\n result.push(\n chroma(color)\n .set(\"hsl.h\", chroma(color).get(\"hsl.h\") + 20)\n .set(\"hsl.l\", chroma(color).get(\"hsl.l\") + 0.3)\n .hex(),\n );\n });\n primaryColors.forEach((color) => {\n result.push(\n chroma(color)\n .set(\"hsl.h\", chroma(color).get(\"hsl.h\") + 10)\n .set(\"hsl.l\", chroma(color).get(\"hsl.l\") - 0.2)\n .hex(),\n );\n });\n primaryColors.forEach((color) => {\n result.push(\n chroma(color)\n .set(\"hsl.h\", chroma(color).get(\"hsl.h\") + 10)\n .set(\"hsl.l\", chroma(color).get(\"hsl.l\") + 0.15)\n .hex(),\n );\n });\n primaryColors.forEach((color) => {\n result.push(\n chroma(color)\n .set(\"hsl.h\", chroma(color).get(\"hsl.h\") + 10)\n .set(\"hsl.l\", chroma(color).get(\"hsl.l\") - 0.1)\n .hex(),\n );\n });\n\n return result;\n}\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _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, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\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 return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\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 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 return target;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n 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}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\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 return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport { createElement, Component, Fragment } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-04d85134.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, w as withEmotionCache } from './emotion-element-04d85134.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } 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 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 var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\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 = /* #__PURE__ */withEmotionCache(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 /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n var serialized = serializeStyles([styles(theme)]);\n return /*#__PURE__*/createElement(InnerGlobal, {\n serialized: serialized,\n cache: cache\n });\n });\n }\n\n var serialized = serializeStyles([styles]);\n return /*#__PURE__*/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 = /*#__PURE__*/function (_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 Noop = function Noop() {\n return null;\n};\n\nvar ClassNames = withEmotionCache(function (props, context) {\n return /*#__PURE__*/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 var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n });\n});\n\nexport { ClassNames, Global, jsx as createElement, jsx, keyframes };\n","import '@babel/runtime/helpers/inheritsLoose';\nimport { createContext, forwardRef, createElement, Fragment } from 'react';\nimport createCache from '@emotion/cache';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /*#__PURE__*/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 = /*#__PURE__*/createContext({});\nvar CacheProvider = EmotionCacheContext.Provider;\n\nvar withEmotionCache = function withEmotionCache(func) {\n var render = function render(props, ref) {\n return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {\n return func(props, cache, ref);\n });\n }; // $FlowFixMe\n\n\n return /*#__PURE__*/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 createEmotionProps = function createEmotionProps(type, props) {\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 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; // TODO: check if this still works with all of those different JSX functions\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\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([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 return newProps;\n};\n\nvar Noop = function Noop() {\n return null;\n};\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 = /*#__PURE__*/createElement(type, newProps);\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n}; // eslint-disable-next-line no-undef\n\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n if (typeof props.css === 'function') {\n return /*#__PURE__*/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}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, withEmotionCache as w };\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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","/* 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","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","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\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 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","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","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 { schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeBrBG, schemePRGn, schemePiYG, schemePuOr, schemeRdBu, schemeRdGy, schemeRdYlBu, schemeRdYlGn, schemeSpectral, schemeBlues, schemeGreens, schemeGreys, schemeOranges, schemePurples, schemeReds, schemeBuGn, schemeBuPu, schemeGnBu, schemeOrRd, schemePuBuGn, schemePuBu, schemePuRd, schemeRdPu, schemeYlGnBu, schemeYlGn, schemeYlOrBr, schemeYlOrRd, interpolateBrBG, interpolatePRGn, interpolatePiYG, interpolatePuOr, interpolateRdBu, interpolateRdGy, interpolateRdYlBu, interpolateRdYlGn, interpolateSpectral, interpolateBlues, interpolateGreens, interpolateGreys, interpolateOranges, interpolatePurples, interpolateReds, interpolateViridis, interpolateInferno, interpolateMagma, interpolatePlasma, interpolateWarm, interpolateCool, interpolateCubehelixDefault, interpolateBuGn, interpolateBuPu, interpolateGnBu, interpolateOrRd, interpolatePuBuGn, interpolatePuBu, interpolatePuRd, interpolateRdPu, interpolateYlGnBu, interpolateYlGn, interpolateYlOrBr, interpolateYlOrRd, interpolateRainbow, interpolateSinebow } from 'd3-scale-chromatic';\nimport { useMemo } from 'react';\nimport get from 'lodash.get';\nimport isPlainObject from 'lodash.isplainobject';\nimport { scaleOrdinal } from 'd3-scale';\nimport { rgb } from 'd3-color';\nimport PropTypes from 'prop-types';\nimport { spring } from 'react-motion';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar categoricalColorSchemes = {\n nivo: ['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5'],\n category10: schemeCategory10,\n accent: schemeAccent,\n dark2: schemeDark2,\n paired: schemePaired,\n pastel1: schemePastel1,\n pastel2: schemePastel2,\n set1: schemeSet1,\n set2: schemeSet2,\n set3: schemeSet3\n};\nvar categoricalColorSchemeIds = Object.keys(categoricalColorSchemes);\nvar isCategoricalColorScheme = function isCategoricalColorScheme(scheme) {\n return categoricalColorSchemeIds.includes(scheme);\n};\nvar divergingColorSchemes = {\n brown_blueGreen: schemeBrBG,\n purpleRed_green: schemePRGn,\n pink_yellowGreen: schemePiYG,\n purple_orange: schemePuOr,\n red_blue: schemeRdBu,\n red_grey: schemeRdGy,\n red_yellow_blue: schemeRdYlBu,\n red_yellow_green: schemeRdYlGn,\n spectral: schemeSpectral\n};\nvar divergingColorSchemeIds = Object.keys(divergingColorSchemes);\nvar isDivergingColorScheme = function isDivergingColorScheme(scheme) {\n return divergingColorSchemeIds.includes(scheme);\n};\nvar sequentialColorSchemes = {\n blues: schemeBlues,\n greens: schemeGreens,\n greys: schemeGreys,\n oranges: schemeOranges,\n purples: schemePurples,\n reds: schemeReds,\n blue_green: schemeBuGn,\n blue_purple: schemeBuPu,\n green_blue: schemeGnBu,\n orange_red: schemeOrRd,\n purple_blue_green: schemePuBuGn,\n purple_blue: schemePuBu,\n purple_red: schemePuRd,\n red_purple: schemeRdPu,\n yellow_green_blue: schemeYlGnBu,\n yellow_green: schemeYlGn,\n yellow_orange_brown: schemeYlOrBr,\n yellow_orange_red: schemeYlOrRd\n};\nvar sequentialColorSchemeIds = Object.keys(sequentialColorSchemes);\nvar isSequentialColorScheme = function isSequentialColorScheme(scheme) {\n return sequentialColorSchemeIds.includes(scheme);\n};\nvar colorSchemes = _objectSpread({}, categoricalColorSchemes, divergingColorSchemes, sequentialColorSchemes);\nvar colorSchemeIds = Object.keys(colorSchemes);\nvar colorInterpolators = {\n brown_blueGreen: interpolateBrBG,\n purpleRed_green: interpolatePRGn,\n pink_yellowGreen: interpolatePiYG,\n purple_orange: interpolatePuOr,\n red_blue: interpolateRdBu,\n red_grey: interpolateRdGy,\n red_yellow_blue: interpolateRdYlBu,\n red_yellow_green: interpolateRdYlGn,\n spectral: interpolateSpectral,\n blues: interpolateBlues,\n greens: interpolateGreens,\n greys: interpolateGreys,\n oranges: interpolateOranges,\n purples: interpolatePurples,\n reds: interpolateReds,\n viridis: interpolateViridis,\n inferno: interpolateInferno,\n magma: interpolateMagma,\n plasma: interpolatePlasma,\n warm: interpolateWarm,\n cool: interpolateCool,\n cubehelixDefault: interpolateCubehelixDefault,\n blue_green: interpolateBuGn,\n blue_purple: interpolateBuPu,\n green_blue: interpolateGnBu,\n orange_red: interpolateOrRd,\n purple_blue_green: interpolatePuBuGn,\n purple_blue: interpolatePuBu,\n purple_red: interpolatePuRd,\n red_purple: interpolateRdPu,\n yellow_green_blue: interpolateYlGnBu,\n yellow_green: interpolateYlGn,\n yellow_orange_brown: interpolateYlOrBr,\n yellow_orange_red: interpolateYlOrRd,\n rainbow: interpolateRainbow,\n sinebow: interpolateSinebow\n};\nvar colorInterpolatorIds = Object.keys(colorInterpolators);\n\nvar getOrdinalColorScale = function getOrdinalColorScale(instruction, identity) {\n if (typeof instruction === 'function') return instruction;\n var getIdentity = typeof identity === 'function' ? identity : function (d) {\n return get(d, identity);\n };\n if (Array.isArray(instruction)) {\n var scale = scaleOrdinal(instruction);\n var generator = function generator(d) {\n return scale(getIdentity(d));\n };\n generator.scale = scale;\n return generator;\n }\n if (isPlainObject(instruction)) {\n if (instruction.datum !== undefined) {\n return function (datum) {\n return get(datum, instruction.datum);\n };\n }\n if (instruction.scheme !== undefined) {\n if (isCategoricalColorScheme(instruction.scheme)) {\n var _scale = scaleOrdinal(colorSchemes[instruction.scheme]);\n var _generator = function _generator(d) {\n return _scale(getIdentity(d));\n };\n _generator.scale = _scale;\n return _generator;\n }\n if (isDivergingColorScheme(instruction.scheme)) {\n if (instruction.size !== undefined && (instruction.size < 3 || instruction.size > 11)) {\n throw new Error(\"Invalid size '\".concat(instruction.size, \"' for diverging color scheme '\").concat(instruction.scheme, \"', must be between 3~11\"));\n }\n var _scale2 = scaleOrdinal(colorSchemes[instruction.scheme][instruction.size || 11]);\n var _generator2 = function _generator2(d) {\n return _scale2(getIdentity(d));\n };\n _generator2.scale = _scale2;\n return _generator2;\n }\n if (isSequentialColorScheme(instruction.scheme)) {\n if (instruction.size !== undefined && (instruction.size < 3 || instruction.size > 9)) {\n throw new Error(\"Invalid size '\".concat(instruction.size, \"' for sequential color scheme '\").concat(instruction.scheme, \"', must be between 3~9\"));\n }\n var _scale3 = scaleOrdinal(colorSchemes[instruction.scheme][instruction.size || 9]);\n var _generator3 = function _generator3(d) {\n return _scale3(getIdentity(d));\n };\n _generator3.scale = _scale3;\n return _generator3;\n }\n }\n throw new Error(\"Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property\");\n }\n return function () {\n return instruction;\n };\n};\nvar useOrdinalColorScale = function useOrdinalColorScale(instruction, identity) {\n return useMemo(function () {\n return getOrdinalColorScale(instruction, identity);\n }, [instruction, identity]);\n};\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar getInheritedColorGenerator = function getInheritedColorGenerator(inheritedColor, theme) {\n if (typeof inheritedColor === 'function') return function (node) {\n return inheritedColor(node);\n };\n if (isPlainObject(inheritedColor)) {\n if (inheritedColor.theme !== undefined) {\n if (theme === undefined) {\n throw new Error(\"Unable to use color from theme as no theme was provided\");\n }\n var themeColor = get(theme, inheritedColor.theme);\n if (themeColor === undefined) {\n throw new Error(\"Color from theme is undefined at path: '\".concat(inheritedColor.theme, \"'\"));\n }\n return function () {\n return themeColor;\n };\n }\n if (inheritedColor.from !== undefined) {\n var getColor = function getColor(datum) {\n return get(datum, inheritedColor.from);\n };\n if (Array.isArray(inheritedColor.modifiers)) {\n var modifiers = [];\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n try {\n var _loop = function _loop() {\n var modifier = _step.value;\n var _modifier = _slicedToArray(modifier, 2),\n modifierType = _modifier[0],\n amount = _modifier[1];\n if (modifierType === 'brighter') {\n modifiers.push(function (color) {\n return color.brighter(amount);\n });\n } else if (modifierType === 'darker') {\n modifiers.push(function (color) {\n return color.darker(amount);\n });\n } else if (modifierType === 'opacity') {\n modifiers.push(function (color) {\n color.opacity = amount;\n return color;\n });\n } else {\n throw new Error(\"Invalid color modifier: '\".concat(modifierType, \"', must be one of: 'brighter', 'darker', 'opacity'\"));\n }\n };\n for (var _iterator = inheritedColor.modifiers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (modifiers.length === 0) return getColor;\n return function (datum) {\n return modifiers.reduce(function (color, modify) {\n return modify(color);\n }, rgb(getColor(datum))).toString();\n };\n }\n return getColor;\n }\n throw new Error(\"Invalid color spec, you should either specify 'theme' or 'from' when using a config object\");\n }\n return function () {\n return inheritedColor;\n };\n};\nvar useInheritedColor = function useInheritedColor(parentColor, theme) {\n return useMemo(function () {\n return getInheritedColorGenerator(parentColor, theme);\n }, [parentColor, theme]);\n};\n\nvar ordinalColorsPropType = PropTypes.oneOfType([PropTypes.func, PropTypes.arrayOf(PropTypes.string), PropTypes.shape({\n scheme: PropTypes.oneOf(colorSchemeIds).isRequired,\n size: PropTypes.number\n}), PropTypes.shape({\n datum: PropTypes.string.isRequired\n}), PropTypes.string]);\nvar colorPropertyAccessorPropType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);\nvar inheritedColorPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({\n theme: PropTypes.string.isRequired\n}), PropTypes.shape({\n from: PropTypes.string.isRequired,\n modifiers: PropTypes.arrayOf(PropTypes.array)\n})]);\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }\nfunction _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar interpolateColor = function interpolateColor(color, springConfig) {\n var colorComponents = rgb(color);\n if (!springConfig) {\n return {\n colorR: colorComponents.r,\n colorG: colorComponents.g,\n colorB: colorComponents.b\n };\n }\n var configWithPrecision = _objectSpread$1({}, springConfig, {\n precision: 1\n });\n return {\n colorR: spring(colorComponents.r, configWithPrecision),\n colorG: spring(colorComponents.g, configWithPrecision),\n colorB: spring(colorComponents.b, configWithPrecision)\n };\n};\nvar getInterpolatedColor = function getInterpolatedColor(_ref) {\n var colorR = _ref.colorR,\n colorG = _ref.colorG,\n colorB = _ref.colorB;\n return \"rgb(\".concat(Math.round(Math.max(colorR, 0)), \",\").concat(Math.round(Math.max(colorG, 0)), \",\").concat(Math.round(Math.max(colorB, 0)), \")\");\n};\n\nexport { categoricalColorSchemeIds, categoricalColorSchemes, colorInterpolatorIds, colorInterpolators, colorPropertyAccessorPropType, colorSchemeIds, colorSchemes, divergingColorSchemeIds, divergingColorSchemes, getInheritedColorGenerator, getInterpolatedColor, getOrdinalColorScale, inheritedColorPropType, interpolateColor, isCategoricalColorScheme, isDivergingColorScheme, isSequentialColorScheme, ordinalColorsPropType, sequentialColorSchemeIds, sequentialColorSchemes, useInheritedColor, useOrdinalColorScale };\n","import React, { useMemo, createContext, useContext, PureComponent, useRef, useState, useCallback, Component, memo } from 'react';\nimport PropTypes from 'prop-types';\nimport { tooltipContext, useTooltipHandlers, TooltipWrapper } from '@nivo/tooltip';\nimport merge from 'lodash/merge';\nimport get from 'lodash/get';\nimport set from 'lodash/set';\nimport last from 'lodash/last';\nimport isArray from 'lodash/isArray';\nimport isString from 'lodash/isString';\nimport { scaleQuantize, scaleOrdinal, scaleSequential } from 'd3-scale';\nimport { schemeBrBG, schemePRGn, schemePiYG, schemePuOr, schemeRdBu, schemeRdGy, schemeRdYlBu, schemeRdYlGn, schemeSpectral, schemeBlues, schemeGreens, schemeGreys, schemeOranges, schemePurples, schemeReds, schemeBuGn, schemeBuPu, schemeGnBu, schemeOrRd, schemePuBuGn, schemePuBu, schemePuRd, schemeRdPu, schemeYlGnBu, schemeYlGn, schemeYlOrBr, schemeYlOrRd, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, interpolateBrBG, interpolatePRGn, interpolatePiYG, interpolatePuOr, interpolateRdBu, interpolateRdGy, interpolateRdYlBu, interpolateRdYlGn, interpolateSpectral, interpolateBlues, interpolateGreens, interpolateGreys, interpolateOranges, interpolatePurples, interpolateReds, interpolateViridis, interpolateInferno, interpolateMagma, interpolatePlasma, interpolateWarm, interpolateCool, interpolateCubehelixDefault, interpolateBuGn, interpolateBuPu, interpolateGnBu, interpolateOrRd, interpolatePuBuGn, interpolatePuBu, interpolatePuRd, interpolateRdPu, interpolateYlGnBu, interpolateYlGn, interpolateYlOrBr, interpolateYlOrRd, interpolateRainbow, interpolateSinebow } from 'd3-scale-chromatic';\nimport isFunction from 'lodash/isFunction';\nimport without from 'lodash/without';\nimport { curveBasis, curveBasisClosed, curveBasisOpen, curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveLinear, curveLinearClosed, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle } from 'd3-shape';\nimport { treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, hierarchy } from 'd3-hierarchy';\nimport { format } from 'd3-format';\nimport { timeFormat } from 'd3-time-format';\nimport { spring, Motion } from 'react-motion';\nimport { interpolate } from 'd3-interpolate';\nimport Measure from 'react-measure';\nimport withProps from 'recompose/withProps';\nimport isEqual from 'lodash/isEqual';\nimport compose from 'recompose/compose';\nimport setPropTypes from 'recompose/setPropTypes';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport partialRight from 'lodash/partialRight';\nimport isPlainObject from 'lodash/isPlainObject';\nimport pick from 'lodash/pick';\n\nvar noop = (function () {});\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar textProps = {\n fill: PropTypes.string,\n fontSize: PropTypes.number,\n fontFamily: PropTypes.string\n};\nvar axisThemePropType = PropTypes.shape({\n domain: PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n }).isRequired,\n ticks: PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired,\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n }).isRequired,\n legend: PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n }).isRequired\n});\nvar gridThemePropType = PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n});\nvar legendsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar labelsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar dotsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar markersThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar crosshairPropType = PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n});\nvar annotationsPropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps, {\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n })).isRequired,\n link: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired,\n outline: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired,\n symbol: PropTypes.shape({\n fill: PropTypes.string.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired\n});\nvar themePropType = PropTypes.shape({\n background: PropTypes.string.isRequired,\n fontFamily: PropTypes.string.isRequired,\n fontSize: PropTypes.number.isRequired,\n textColor: PropTypes.string.isRequired,\n axis: axisThemePropType.isRequired,\n grid: gridThemePropType.isRequired,\n legends: legendsThemePropType.isRequired,\n labels: labelsThemePropType.isRequired,\n dots: dotsThemePropType.isRequired,\n markers: markersThemePropType,\n crosshair: crosshairPropType.isRequired,\n annotations: annotationsPropType.isRequired\n});\n\nvar defaultTheme = {\n background: 'transparent',\n fontFamily: 'sans-serif',\n fontSize: 11,\n textColor: '#333333',\n axis: {\n domain: {\n line: {\n stroke: 'transparent',\n strokeWidth: 1\n }\n },\n ticks: {\n line: {\n stroke: '#777777',\n strokeWidth: 1\n },\n text: {}\n },\n legend: {\n text: {\n fontSize: 12\n }\n }\n },\n grid: {\n line: {\n stroke: '#dddddd',\n strokeWidth: 1\n }\n },\n legends: {\n text: {\n fill: '#333333'\n }\n },\n labels: {\n text: {}\n },\n markers: {\n lineColor: '#000000',\n lineStrokeWidth: 1,\n text: {}\n },\n dots: {\n text: {}\n },\n tooltip: {\n container: {\n background: 'white',\n color: 'inherit',\n fontSize: 'inherit',\n borderRadius: '2px',\n boxShadow: '0 1px 2px rgba(0, 0, 0, 0.25)',\n padding: '5px 9px'\n },\n basic: {\n whiteSpace: 'pre',\n display: 'flex',\n alignItems: 'center'\n },\n chip: {\n marginRight: 7\n },\n table: {},\n tableCell: {\n padding: '3px 5px'\n }\n },\n crosshair: {\n line: {\n stroke: '#000000',\n strokeWidth: 1,\n strokeOpacity: 0.75,\n strokeDasharray: '6 6'\n }\n },\n annotations: {\n text: {\n fontSize: 13,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n link: {\n stroke: '#000000',\n strokeWidth: 1,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n outline: {\n fill: 'none',\n stroke: '#000000',\n strokeWidth: 2,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n symbol: {\n fill: '#000000',\n outlineWidth: 2,\n outlineColor: '#ffffff'\n }\n }\n};\n\nvar fontProps = ['axis.ticks.text', 'axis.legend.text', 'legends.text', 'labels.text', 'dots.text', 'markers.text', 'annotations.text'];\nvar extendDefaultTheme = function extendDefaultTheme(defaultTheme, customTheme) {\n var theme = merge({}, defaultTheme, customTheme);\n fontProps.forEach(function (prop) {\n if (get(theme, \"\".concat(prop, \".fontFamily\")) === undefined) {\n set(theme, \"\".concat(prop, \".fontFamily\"), theme.fontFamily);\n }\n if (get(theme, \"\".concat(prop, \".fontSize\")) === undefined) {\n set(theme, \"\".concat(prop, \".fontSize\"), theme.fontSize);\n }\n if (get(theme, \"\".concat(prop, \".fill\")) === undefined) {\n set(theme, \"\".concat(prop, \".fill\"), theme.textColor);\n }\n });\n return theme;\n};\n\nvar quantizeColorScales = {\n nivo: ['#d76445', '#f47560', '#e8c1a0', '#97e3d5', '#61cdbb', '#00b0a7'],\n BrBG: last(schemeBrBG),\n PRGn: last(schemePRGn),\n PiYG: last(schemePiYG),\n PuOr: last(schemePuOr),\n RdBu: last(schemeRdBu),\n RdGy: last(schemeRdGy),\n RdYlBu: last(schemeRdYlBu),\n RdYlGn: last(schemeRdYlGn),\n spectral: last(schemeSpectral),\n blues: last(schemeBlues),\n greens: last(schemeGreens),\n greys: last(schemeGreys),\n oranges: last(schemeOranges),\n purples: last(schemePurples),\n reds: last(schemeReds),\n BuGn: last(schemeBuGn),\n BuPu: last(schemeBuPu),\n GnBu: last(schemeGnBu),\n OrRd: last(schemeOrRd),\n PuBuGn: last(schemePuBuGn),\n PuBu: last(schemePuBu),\n PuRd: last(schemePuRd),\n RdPu: last(schemeRdPu),\n YlGnBu: last(schemeYlGnBu),\n YlGn: last(schemeYlGn),\n YlOrBr: last(schemeYlOrBr),\n YlOrRd: last(schemeYlOrRd)\n};\nvar quantizeColorScalesKeys = Object.keys(quantizeColorScales);\nvar guessQuantizeColorScale = function guessQuantizeColorScale(colors) {\n if (isFunction(colors)) {\n if (!isFunction(colors.domain)) {\n throw new Error(\"Provided colors should be a valid quantize scale providing a 'domain()' function\");\n }\n return colors;\n }\n if (quantizeColorScales[colors]) {\n return scaleQuantize().range(quantizeColorScales[colors]);\n }\n if (isArray(colors)) return scaleQuantize().range(colors);\n throw new Error(\"Unable to guess quantize color scale from '\".concat(colors, \"',\\nmust be a function or one of:\\n'\").concat(quantizeColorScalesKeys.join(\"', '\"), \"'\"));\n};\n\nvar colorSchemes = {\n nivo: ['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5'],\n category10: schemeCategory10,\n accent: schemeAccent,\n dark2: schemeDark2,\n paired: schemePaired,\n pastel1: schemePastel1,\n pastel2: schemePastel2,\n set1: schemeSet1,\n set2: schemeSet2,\n set3: schemeSet3,\n brown_blueGreen: last(schemeBrBG),\n purpleRed_green: last(schemePRGn),\n pink_yellowGreen: last(schemePiYG),\n purple_orange: last(schemePuOr),\n red_blue: last(schemeRdBu),\n red_grey: last(schemeRdGy),\n red_yellow_blue: last(schemeRdYlBu),\n red_yellow_green: last(schemeRdYlGn),\n spectral: last(schemeSpectral),\n blues: last(schemeBlues),\n greens: last(schemeGreens),\n greys: last(schemeGreys),\n oranges: last(schemeOranges),\n purples: last(schemePurples),\n reds: last(schemeReds),\n blue_green: last(schemeBuGn),\n blue_purple: last(schemeBuPu),\n green_blue: last(schemeGnBu),\n orange_red: last(schemeOrRd),\n purple_blue_green: last(schemePuBuGn),\n purple_blue: last(schemePuBu),\n purple_red: last(schemePuRd),\n red_purple: last(schemeRdPu),\n yellow_green_blue: last(schemeYlGnBu),\n yellow_green: last(schemeYlGn),\n yellow_orange_brown: last(schemeYlOrBr),\n yellow_orange_red: last(schemeYlOrRd)\n};\nvar colorSchemeIds = ['nivo',\n'category10', 'accent', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3',\n'brown_blueGreen', 'purpleRed_green', 'pink_yellowGreen', 'purple_orange', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral',\n'blues', 'greens', 'greys', 'oranges', 'purples', 'reds',\n'blue_green', 'blue_purple', 'green_blue', 'orange_red', 'purple_blue_green', 'purple_blue', 'purple_red', 'red_purple', 'yellow_green_blue', 'yellow_green', 'yellow_orange_brown', 'yellow_orange_red'];\nvar colorInterpolators = {\n brown_blueGreen: interpolateBrBG,\n purpleRed_green: interpolatePRGn,\n pink_yellowGreen: interpolatePiYG,\n purple_orange: interpolatePuOr,\n red_blue: interpolateRdBu,\n red_grey: interpolateRdGy,\n red_yellow_blue: interpolateRdYlBu,\n red_yellow_green: interpolateRdYlGn,\n spectral: interpolateSpectral,\n blues: interpolateBlues,\n greens: interpolateGreens,\n greys: interpolateGreys,\n oranges: interpolateOranges,\n purples: interpolatePurples,\n reds: interpolateReds,\n viridis: interpolateViridis,\n inferno: interpolateInferno,\n magma: interpolateMagma,\n plasma: interpolatePlasma,\n warm: interpolateWarm,\n cool: interpolateCool,\n cubehelixDefault: interpolateCubehelixDefault,\n blue_green: interpolateBuGn,\n blue_purple: interpolateBuPu,\n green_blue: interpolateGnBu,\n orange_red: interpolateOrRd,\n purple_blue_green: interpolatePuBuGn,\n purple_blue: interpolatePuBu,\n purple_red: interpolatePuRd,\n red_purple: interpolateRdPu,\n yellow_green_blue: interpolateYlGnBu,\n yellow_green: interpolateYlGn,\n yellow_orange_brown: interpolateYlOrBr,\n yellow_orange_red: interpolateYlOrRd,\n rainbow: interpolateRainbow,\n sinebow: interpolateSinebow\n};\nvar colorInterpolatorIds = [\n'brown_blueGreen', 'purpleRed_green', 'pink_yellowGreen', 'purple_orange', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral',\n'blues', 'greens', 'greys', 'oranges', 'purples', 'reds',\n'viridis', 'inferno', 'magma', 'plasma', 'warm', 'cool', 'cubehelixDefault', 'blue_green', 'blue_purple', 'green_blue', 'orange_red', 'purple_blue_green', 'purple_blue', 'purple_red', 'red_purple', 'yellow_green_blue', 'yellow_green', 'yellow_orange_brown', 'yellow_orange_red',\n'rainbow', 'sinebow'];\nvar nivoCategoricalColors = function nivoCategoricalColors() {\n return scaleOrdinal(['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5']);\n};\nvar getColorScale = function getColorScale(colors, dataScale) {\n if (isString(colors)) {\n var scheme = colorSchemes[colors];\n if (scheme !== undefined) {\n var scale = scaleOrdinal(scheme);\n scale.type = 'ordinal';\n return scale;\n }\n if (dataScale !== undefined && colors.indexOf('seq:') === 0) {\n var interpolator = colorInterpolators[colors.slice(4)];\n if (interpolator !== undefined) {\n var _scale = scaleSequential(interpolator).domain(dataScale.domain());\n _scale.type = 'sequential';\n return _scale;\n }\n }\n }\n if (isArray(colors)) {\n var _scale2 = scaleOrdinal(colors);\n _scale2.type = 'ordinal';\n return _scale2;\n }\n return function () {\n return colors;\n };\n};\n\nvar quantizeColorScalePropType = PropTypes.oneOfType([PropTypes.oneOf(quantizeColorScalesKeys), PropTypes.func, PropTypes.arrayOf(PropTypes.string)]);\n\nvar curvePropMapping = {\n basis: curveBasis,\n basisClosed: curveBasisClosed,\n basisOpen: curveBasisOpen,\n bundle: curveBundle,\n cardinal: curveCardinal,\n cardinalClosed: curveCardinalClosed,\n cardinalOpen: curveCardinalOpen,\n catmullRom: curveCatmullRom,\n catmullRomClosed: curveCatmullRomClosed,\n catmullRomOpen: curveCatmullRomOpen,\n linear: curveLinear,\n linearClosed: curveLinearClosed,\n monotoneX: curveMonotoneX,\n monotoneY: curveMonotoneY,\n natural: curveNatural,\n step: curveStep,\n stepAfter: curveStepAfter,\n stepBefore: curveStepBefore\n};\nvar curvePropKeys = Object.keys(curvePropMapping);\nvar curvePropType = PropTypes.oneOf(curvePropKeys);\nvar closedCurvePropKeys = curvePropKeys.filter(function (c) {\n return c.endsWith('Closed');\n});\nvar closedCurvePropType = PropTypes.oneOf(closedCurvePropKeys);\nvar areaCurvePropKeys = without(curvePropKeys, 'bundle', 'basisClosed', 'basisOpen', 'cardinalClosed', 'cardinalOpen', 'catmullRomClosed', 'catmullRomOpen', 'linearClosed');\nvar areaCurvePropType = PropTypes.oneOf(areaCurvePropKeys);\nvar lineCurvePropKeys = without(curvePropKeys, 'bundle', 'basisClosed', 'basisOpen', 'cardinalClosed', 'cardinalOpen', 'catmullRomClosed', 'catmullRomOpen', 'linearClosed');\nvar lineCurvePropType = PropTypes.oneOf(lineCurvePropKeys);\nvar curveFromProp = function curveFromProp(id) {\n var curveInterpolator = curvePropMapping[id];\n if (!curveInterpolator) {\n throw new TypeError(\"'\".concat(id, \"', is not a valid curve interpolator identifier.\"));\n }\n return curvePropMapping[id];\n};\n\nvar defsPropTypes = {\n defs: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired\n })).isRequired,\n fill: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired,\n match: PropTypes.oneOfType([PropTypes.oneOf(['*']), PropTypes.object, PropTypes.func]).isRequired\n })).isRequired\n};\n\nvar stackOrderPropMapping = {\n ascending: stackOrderAscending,\n descending: stackOrderDescending,\n insideOut: stackOrderInsideOut,\n none: stackOrderNone,\n reverse: stackOrderReverse\n};\nvar stackOrderPropKeys = Object.keys(stackOrderPropMapping);\nvar stackOrderPropType = PropTypes.oneOf(stackOrderPropKeys);\nvar stackOrderFromProp = function stackOrderFromProp(prop) {\n return stackOrderPropMapping[prop];\n};\nvar stackOffsetPropMapping = {\n expand: stackOffsetExpand,\n diverging: stackOffsetDiverging,\n none: stackOffsetNone,\n silhouette: stackOffsetSilhouette,\n wiggle: stackOffsetWiggle\n};\nvar stackOffsetPropKeys = Object.keys(stackOffsetPropMapping);\nvar stackOffsetPropType = PropTypes.oneOf(stackOffsetPropKeys);\nvar stackOffsetFromProp = function stackOffsetFromProp(prop) {\n return stackOffsetPropMapping[prop];\n};\n\nvar treeMapTilePropMapping = {\n binary: treemapBinary,\n dice: treemapDice,\n slice: treemapSlice,\n sliceDice: treemapSliceDice,\n squarify: treemapSquarify,\n resquarify: treemapResquarify\n};\nvar treeMapTilePropKeys = Object.keys(treeMapTilePropMapping);\nvar treeMapTilePropType = PropTypes.oneOf(treeMapTilePropKeys);\nvar treeMapTileFromProp = function treeMapTileFromProp(prop) {\n return treeMapTilePropMapping[prop];\n};\n\nvar marginPropType = PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n}).isRequired;\nvar motionPropTypes = {\n animate: PropTypes.bool.isRequired,\n motionStiffness: PropTypes.number.isRequired,\n motionDamping: PropTypes.number.isRequired\n};\nvar blendModes = ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\nvar blendModePropType = PropTypes.oneOf(blendModes);\n\nvar useCurveInterpolation = function useCurveInterpolation(interpolation) {\n return useMemo(function () {\n return curveFromProp(interpolation);\n }, [interpolation]);\n};\n\nvar defaultAnimate = true;\nvar defaultMotionStiffness = 90;\nvar defaultMotionDamping = 15;\nvar defaultCategoricalColors = nivoCategoricalColors;\nvar defaultColorRange = scaleOrdinal(schemeSet3);\nvar defaultMargin = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }\nfunction _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar useDimensions = function useDimensions(width, height) {\n var partialMargin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return useMemo(function () {\n var margin = _objectSpread$1({}, defaultMargin, partialMargin);\n return {\n margin: margin,\n innerWidth: width - margin.left - margin.right,\n innerHeight: height - margin.top - margin.bottom,\n outerWidth: width,\n outerHeight: height\n };\n }, [width, height, partialMargin.top, partialMargin.right, partialMargin.bottom, partialMargin.left]);\n};\n\nvar usePartialTheme = function usePartialTheme(partialTheme) {\n return useMemo(function () {\n return extendDefaultTheme(defaultTheme, partialTheme);\n }, [partialTheme]);\n};\n\nvar getValueFormatter = function getValueFormatter(format$1) {\n if (typeof format$1 === 'function') return format$1;\n if (typeof format$1 === 'string') {\n if (format$1.indexOf('time:') === 0) {\n return timeFormat(format$1.slice('5'));\n }\n return format(format$1);\n }\n return function (v) {\n return v;\n };\n};\nvar useValueFormatter = function useValueFormatter(format) {\n return useMemo(function () {\n return getValueFormatter(format);\n }, [format]);\n};\n\nvar themeContext = createContext();\nvar defaultPartialTheme = {};\nvar ThemeProvider = function ThemeProvider(_ref) {\n var _ref$theme = _ref.theme,\n partialTheme = _ref$theme === void 0 ? defaultPartialTheme : _ref$theme,\n children = _ref.children;\n var theme = usePartialTheme(partialTheme);\n return React.createElement(themeContext.Provider, {\n value: theme\n }, children);\n};\nThemeProvider.propTypes = {\n children: PropTypes.node.isRequired,\n theme: PropTypes.object\n};\nvar useTheme = function useTheme() {\n return useContext(themeContext);\n};\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _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); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar enhancedSpring = function enhancedSpring(value, config) {\n if (typeof value !== 'number') {\n return {\n value: value,\n config: config,\n interpolator: config && config.interpolator ? config.interpolator : interpolate\n };\n }\n return spring(value, config);\n};\nvar SmartMotion =\nfunction (_PureComponent) {\n _inherits(SmartMotion, _PureComponent);\n function SmartMotion() {\n var _getPrototypeOf2;\n var _this;\n _classCallCheck(this, SmartMotion);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SmartMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _defineProperty$2(_assertThisInitialized(_this), \"oldValues\", {});\n _defineProperty$2(_assertThisInitialized(_this), \"newInters\", {});\n _defineProperty$2(_assertThisInitialized(_this), \"currentStepValues\", {});\n _defineProperty$2(_assertThisInitialized(_this), \"stepValues\", {});\n _defineProperty$2(_assertThisInitialized(_this), \"stepInterpolators\", {});\n return _this;\n }\n _createClass(SmartMotion, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n var _this$props = this.props,\n style = _this$props.style,\n children = _this$props.children,\n rest = _objectWithoutProperties(_this$props, [\"style\", \"children\"]);\n var resolvedStyle = style(enhancedSpring);\n for (var key in resolvedStyle) {\n if (\n resolvedStyle[key] && resolvedStyle[key].interpolator) {\n this.currentStepValues[key] = this.currentStepValues[key] || 0;\n if (\n typeof this.newInters[key] === 'undefined' || resolvedStyle[key].value !== this.newInters[key].value) {\n this.newInters[key] = resolvedStyle[key];\n this.stepValues[key] = this.currentStepValues[key] + 1;\n this.stepInterpolators[key] = this.newInters[key].interpolator(this.oldValues[key], this.newInters[key].value);\n }\n resolvedStyle[key] = spring(this.stepValues[key], this.newInters[key].config);\n }\n }\n return React.createElement(Motion, _extends({}, rest, {\n style: resolvedStyle\n }), function (values) {\n var newValues = {};\n for (var _key2 in values) {\n if (_this2.stepValues[_key2]) {\n _this2.currentStepValues[_key2] = values[_key2];\n var percentage = _this2.currentStepValues[_key2] - _this2.stepValues[_key2] + 1;\n _this2.oldValues[_key2] = newValues[_key2] = _this2.stepInterpolators[_key2](percentage);\n }\n }\n return children(_objectSpread$2({}, values, newValues));\n });\n }\n }]);\n return SmartMotion;\n}(PureComponent);\n_defineProperty$2(SmartMotion, \"propTypes\", {\n children: PropTypes.func.isRequired,\n style: PropTypes.func.isRequired\n});\n\nvar motionConfigContext = createContext();\nvar MotionConfigProvider = function MotionConfigProvider(_ref) {\n var children = _ref.children,\n animate = _ref.animate,\n stiffness = _ref.stiffness,\n damping = _ref.damping;\n var value = useMemo(function () {\n return {\n animate: animate,\n springConfig: {\n stiffness: stiffness,\n damping: damping\n }\n };\n }, [animate, stiffness, damping]);\n return React.createElement(motionConfigContext.Provider, {\n value: value\n }, children);\n};\nMotionConfigProvider.propTypes = {\n children: PropTypes.node.isRequired,\n animate: PropTypes.bool.isRequired,\n stiffness: PropTypes.number.isRequired,\n damping: PropTypes.number.isRequired\n};\nMotionConfigProvider.defaultProps = {\n animate: true,\n stiffness: 90,\n damping: 15\n};\n\nvar useMotionConfig = function useMotionConfig() {\n return useContext(motionConfigContext);\n};\n\nfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }\nfunction _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar containerStyle = {\n position: 'relative'\n};\nvar tooltipStyle = {\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 10\n};\nvar Container = function Container(_ref) {\n var children = _ref.children,\n theme = _ref.theme,\n _ref$isInteractive = _ref.isInteractive,\n isInteractive = _ref$isInteractive === void 0 ? true : _ref$isInteractive,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var containerEl = useRef(null);\n var _useState = useState({\n isTooltipVisible: false,\n tooltipContent: null,\n position: {}\n }),\n _useState2 = _slicedToArray(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n var showTooltip = useCallback(function (content, event) {\n if (!containerEl) return;\n var bounds = containerEl.current.getBoundingClientRect();\n var clientX = event.clientX,\n clientY = event.clientY;\n var x = clientX - bounds.left;\n var y = clientY - bounds.top;\n var position = {};\n if (x < bounds.width / 2) position.left = x + 20;else position.right = bounds.width - x + 20;\n if (y < bounds.height / 2) position.top = y - 12;else position.bottom = bounds.height - y - 12;\n setState({\n isTooltipVisible: true,\n tooltipContent: content,\n position: position\n });\n }, [containerEl]);\n var hideTooltip = useCallback(function () {\n setState({\n isTooltipVisible: false,\n tooltipContent: null\n });\n });\n var isTooltipVisible = state.isTooltipVisible,\n tooltipContent = state.tooltipContent,\n position = state.position;\n var content;\n if (isInteractive === true) {\n content = React.createElement(\"div\", {\n style: containerStyle,\n ref: containerEl\n }, children({\n showTooltip: isInteractive ? showTooltip : noop,\n hideTooltip: isInteractive ? hideTooltip : noop\n }), isTooltipVisible && React.createElement(\"div\", {\n style: _objectSpread$3({}, tooltipStyle, position, theme.tooltip)\n }, tooltipContent));\n } else {\n content = children({\n showTooltip: isInteractive ? showTooltip : noop,\n hideTooltip: isInteractive ? hideTooltip : noop\n });\n }\n return React.createElement(themeContext.Provider, {\n value: theme\n }, React.createElement(MotionConfigProvider, {\n animate: animate,\n stiffness: motionStiffness,\n damping: motionDamping\n }, React.createElement(tooltipContext.Provider, {\n value: [showTooltip, hideTooltip]\n }, content)));\n};\nContainer.propTypes = {\n children: PropTypes.func.isRequired,\n isInteractive: PropTypes.bool,\n theme: PropTypes.object.isRequired,\n animate: PropTypes.bool.isRequired,\n motionStiffness: PropTypes.number,\n motionDamping: PropTypes.number\n};\n\nfunction _typeof$1(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$1(self); }\nfunction _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }\nfunction _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _inherits$1(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }\nfunction _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }\nfunction _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar ResponsiveWrapper =\nfunction (_Component) {\n _inherits$1(ResponsiveWrapper, _Component);\n function ResponsiveWrapper() {\n var _getPrototypeOf2;\n var _this;\n _classCallCheck$1(this, ResponsiveWrapper);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf$1(ResponsiveWrapper)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _defineProperty$4(_assertThisInitialized$1(_this), \"state\", {\n dimensions: {\n width: -1,\n height: -1\n }\n });\n return _this;\n }\n _createClass$1(ResponsiveWrapper, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n var _this$state$dimension = this.state.dimensions,\n width = _this$state$dimension.width,\n height = _this$state$dimension.height;\n var shouldRender = width > 0 && height > 0;\n return React.createElement(Measure, {\n bounds: true,\n onResize: function onResize(contentRect) {\n _this2.setState({\n dimensions: contentRect.bounds\n });\n }\n }, function (_ref) {\n var measureRef = _ref.measureRef;\n return React.createElement(\"div\", {\n ref: measureRef,\n style: {\n width: '100%',\n height: '100%'\n }\n }, shouldRender && _this2.props.children({\n width: width,\n height: height\n }));\n });\n }\n }]);\n return ResponsiveWrapper;\n}(Component);\n_defineProperty$4(ResponsiveWrapper, \"propTypes\", {\n children: PropTypes.func.isRequired\n});\n\nfunction _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$5(target, key, source[key]); }); } return target; }\nfunction _defineProperty$5(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar LinearGradient = function LinearGradient(_ref) {\n var id = _ref.id,\n colors = _ref.colors;\n return React.createElement(\"linearGradient\", {\n id: id,\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 1\n }, colors.map(function (_ref2) {\n var offset = _ref2.offset,\n color = _ref2.color,\n opacity = _ref2.opacity;\n return React.createElement(\"stop\", {\n key: offset,\n offset: \"\".concat(offset, \"%\"),\n stopColor: color,\n stopOpacity: opacity !== undefined ? opacity : 1\n });\n }));\n};\nLinearGradient.propTypes = {\n id: PropTypes.string.isRequired,\n colors: PropTypes.arrayOf(PropTypes.shape({\n offset: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired\n })).isRequired\n};\nvar linearGradientDef = function linearGradientDef(id, colors) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return _objectSpread$4({\n id: id,\n type: 'linearGradient',\n colors: colors\n }, options);\n};\n\nvar gradientTypes = {\n linearGradient: LinearGradient\n};\n\nfunction _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$6(target, key, source[key]); }); } return target; }\nfunction _defineProperty$6(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PatternDots = memo(function (_ref) {\n var id = _ref.id,\n background = _ref.background,\n color = _ref.color,\n size = _ref.size,\n padding = _ref.padding,\n stagger = _ref.stagger;\n var fullSize = size + padding;\n var radius = size / 2;\n var halfPadding = padding / 2;\n if (stagger === true) {\n fullSize = size * 2 + padding * 2;\n }\n return React.createElement(\"pattern\", {\n id: id,\n width: fullSize,\n height: fullSize,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: fullSize,\n height: fullSize,\n fill: background\n }), React.createElement(\"circle\", {\n cx: halfPadding + radius,\n cy: halfPadding + radius,\n r: radius,\n fill: color\n }), stagger && React.createElement(\"circle\", {\n cx: padding * 1.5 + size + radius,\n cy: padding * 1.5 + size + radius,\n r: radius,\n fill: color\n }));\n});\nPatternDots.displayName = 'PatternDots';\nPatternDots.propTypes = {\n id: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired,\n background: PropTypes.string.isRequired,\n size: PropTypes.number.isRequired,\n padding: PropTypes.number.isRequired,\n stagger: PropTypes.bool.isRequired\n};\nPatternDots.defaultProps = {\n color: '#000000',\n background: '#ffffff',\n size: 4,\n padding: 4,\n stagger: false\n};\nvar patternDotsDef = function patternDotsDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread$5({\n id: id,\n type: 'patternDots'\n }, options);\n};\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\nfunction _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1(); }\nfunction _nonIterableRest$1() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit$1(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }\nvar TWO_PI = Math.PI * 2;\nvar degreesToRadians = function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n};\nvar radiansToDegrees = function radiansToDegrees(radians) {\n return 180 * radians / Math.PI;\n};\nvar midAngle = function midAngle(arc) {\n return arc.startAngle + (arc.endAngle - arc.startAngle) / 2;\n};\nvar positionFromAngle = function positionFromAngle(angle, distance) {\n return {\n x: Math.cos(angle) * distance,\n y: Math.sin(angle) * distance\n };\n};\nvar absoluteAngleDegrees = function absoluteAngleDegrees(angle) {\n var absAngle = angle % 360;\n if (absAngle < 0) {\n absAngle += 360;\n }\n return absAngle;\n};\nvar absoluteAngleRadians = function absoluteAngleRadians(angle) {\n return angle - TWO_PI * Math.floor((angle + Math.PI) / TWO_PI);\n};\nvar computeArcBoundingBox = function computeArcBoundingBox(ox, oy, radius, startAngle, endAngle) {\n var includeCenter = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var points = [];\n var p0 = positionFromAngle(degreesToRadians(startAngle), radius);\n points.push([p0.x, p0.y]);\n var p1 = positionFromAngle(degreesToRadians(endAngle), radius);\n points.push([p1.x, p1.y]);\n for (var angle = Math.round(Math.min(startAngle, endAngle)); angle <= Math.round(Math.max(startAngle, endAngle)); angle++) {\n if (angle % 90 === 0) {\n var p = positionFromAngle(degreesToRadians(angle), radius);\n points.push([p.x, p.y]);\n }\n }\n points = points.map(function (_ref) {\n var _ref2 = _slicedToArray$1(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n return [ox + x, oy + y];\n });\n if (includeCenter === true) points.push([ox, oy]);\n var xs = points.map(function (_ref3) {\n var _ref4 = _slicedToArray$1(_ref3, 1),\n x = _ref4[0];\n return x;\n });\n var ys = points.map(function (_ref5) {\n var _ref6 = _slicedToArray$1(_ref5, 2),\n y = _ref6[1];\n return y;\n });\n var x0 = Math.min.apply(Math, _toConsumableArray(xs));\n var x1 = Math.max.apply(Math, _toConsumableArray(xs));\n var y0 = Math.min.apply(Math, _toConsumableArray(ys));\n var y1 = Math.max.apply(Math, _toConsumableArray(ys));\n return {\n points: points,\n x: x0,\n y: y0,\n width: x1 - x0,\n height: y1 - y0\n };\n};\n\nvar textPropsByEngine = {\n svg: {\n align: {\n left: 'start',\n center: 'middle',\n right: 'end'\n },\n baseline: {\n top: 'text-before-edge',\n center: 'central',\n bottom: 'alphabetic'\n }\n },\n canvas: {\n align: {\n left: 'left',\n center: 'center',\n right: 'right'\n },\n baseline: {\n top: 'top',\n center: 'middle',\n bottom: 'bottom'\n }\n }\n};\n\nvar getPolarLabelProps = function getPolarLabelProps(radius, angle, rotation) {\n var engine = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'svg';\n var textProps = textPropsByEngine[engine];\n var _positionFromAngle = positionFromAngle(angle - Math.PI / 2, radius),\n x = _positionFromAngle.x,\n y = _positionFromAngle.y;\n var rotate = radiansToDegrees(angle);\n var align = textProps.align.center;\n var baseline = textProps.baseline.bottom;\n if (rotation > 0) {\n align = textProps.align.right;\n baseline = textProps.baseline.center;\n } else if (rotation < 0) {\n align = textProps.align.left;\n baseline = textProps.baseline.center;\n }\n if (rotation !== 0 && rotate > 180) {\n rotate -= 180;\n align = align === textProps.align.right ? textProps.align.left : textProps.align.right;\n }\n rotate += rotation;\n return {\n x: x,\n y: y,\n rotate: rotate,\n align: align,\n baseline: baseline\n };\n};\n\nfunction _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$7(target, key, source[key]); }); } return target; }\nfunction _defineProperty$7(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PatternLines = memo(function (_ref) {\n var id = _ref.id,\n _spacing = _ref.spacing,\n _rotation = _ref.rotation,\n background = _ref.background,\n color = _ref.color,\n lineWidth = _ref.lineWidth;\n var rotation = Math.round(_rotation) % 360;\n var spacing = Math.abs(_spacing);\n if (rotation > 180) rotation = rotation - 360;else if (rotation > 90) rotation = rotation - 180;else if (rotation < -180) rotation = rotation + 360;else if (rotation < -90) rotation = rotation + 180;\n var width = spacing;\n var height = spacing;\n var path;\n if (rotation === 0) {\n path = \"\\n M 0 0 L \".concat(width, \" 0\\n M 0 \").concat(height, \" L \").concat(width, \" \").concat(height, \"\\n \");\n } else if (rotation === 90) {\n path = \"\\n M 0 0 L 0 \".concat(height, \"\\n M \").concat(width, \" 0 L \").concat(width, \" \").concat(height, \"\\n \");\n } else {\n width = Math.abs(spacing / Math.sin(degreesToRadians(rotation)));\n height = spacing / Math.sin(degreesToRadians(90 - rotation));\n if (rotation > 0) {\n path = \"\\n M 0 \".concat(-height, \" L \").concat(width * 2, \" \").concat(height, \"\\n M \").concat(-width, \" \").concat(-height, \" L \").concat(width, \" \").concat(height, \"\\n M \").concat(-width, \" 0 L \").concat(width, \" \").concat(height * 2, \"\\n \");\n } else {\n path = \"\\n M \".concat(-width, \" \").concat(height, \" L \").concat(width, \" \").concat(-height, \"\\n M \").concat(-width, \" \").concat(height * 2, \" L \").concat(width * 2, \" \").concat(-height, \"\\n M 0 \").concat(height * 2, \" L \").concat(width * 2, \" 0\\n \");\n }\n }\n return React.createElement(\"pattern\", {\n id: id,\n width: width,\n height: height,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: background,\n stroke: \"rgba(255, 0, 0, 0.1)\",\n strokeWidth: 0\n }), React.createElement(\"path\", {\n d: path,\n strokeWidth: lineWidth,\n stroke: color,\n strokeLinecap: \"square\"\n }));\n});\nPatternLines.displayName = 'PatternLines';\nPatternLines.propTypes = {\n id: PropTypes.string.isRequired,\n spacing: PropTypes.number.isRequired,\n rotation: PropTypes.number.isRequired,\n background: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired,\n lineWidth: PropTypes.number.isRequired\n};\nPatternLines.defaultProps = {\n spacing: 5,\n rotation: 0,\n color: '#000000',\n background: '#ffffff',\n lineWidth: 2\n};\nvar patternLinesDef = function patternLinesDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread$6({\n id: id,\n type: 'patternLines'\n }, options);\n};\n\nfunction _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$8(target, key, source[key]); }); } return target; }\nfunction _defineProperty$8(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PatternSquares = memo(function (_ref) {\n var id = _ref.id,\n background = _ref.background,\n color = _ref.color,\n size = _ref.size,\n padding = _ref.padding,\n stagger = _ref.stagger;\n var fullSize = size + padding;\n var halfPadding = padding / 2;\n if (stagger === true) {\n fullSize = size * 2 + padding * 2;\n }\n return React.createElement(\"pattern\", {\n id: id,\n width: fullSize,\n height: fullSize,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: fullSize,\n height: fullSize,\n fill: background\n }), React.createElement(\"rect\", {\n x: halfPadding,\n y: halfPadding,\n width: size,\n height: size,\n fill: color\n }), stagger && React.createElement(\"rect\", {\n x: padding * 1.5 + size,\n y: padding * 1.5 + size,\n width: size,\n height: size,\n fill: color\n }));\n});\nPatternSquares.displayName = 'PatternSquares';\nPatternSquares.propTypes = {\n id: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired,\n background: PropTypes.string.isRequired,\n size: PropTypes.number.isRequired,\n padding: PropTypes.number.isRequired,\n stagger: PropTypes.bool.isRequired\n};\nPatternSquares.defaultProps = {\n color: '#000000',\n background: '#ffffff',\n size: 4,\n padding: 4,\n stagger: false\n};\nvar patternSquaresDef = function patternSquaresDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread$7({\n id: id,\n type: 'patternSquares'\n }, options);\n};\n\nvar patternTypes = {\n patternDots: PatternDots,\n patternLines: PatternLines,\n patternSquares: PatternSquares\n};\n\nfunction _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$9(target, key, source[key]); }); } return target; }\nfunction _defineProperty$9(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar defsMapping = _objectSpread$8({}, gradientTypes, patternTypes);\nvar Defs = function Defs(_ref) {\n var definitions = _ref.defs;\n if (!definitions || definitions.length < 1) return null;\n return React.createElement(\"defs\", null, definitions.map(function (_ref2) {\n var type = _ref2.type,\n def = _objectWithoutProperties$1(_ref2, [\"type\"]);\n if (defsMapping[type]) return React.createElement(defsMapping[type], _objectSpread$8({\n key: def.id\n }, def));\n return null;\n }));\n};\nDefs.propTypes = {\n defs: PropTypes.arrayOf(PropTypes.shape({\n type: PropTypes.oneOf(Object.keys(defsMapping)).isRequired,\n id: PropTypes.string.isRequired\n }))\n};\nvar Defs$1 = memo(Defs);\n\nvar SvgWrapper = function SvgWrapper(_ref) {\n var width = _ref.width,\n height = _ref.height,\n margin = _ref.margin,\n defs = _ref.defs,\n children = _ref.children;\n var theme = useTheme();\n return React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"img\",\n width: width,\n height: height\n }, React.createElement(Defs$1, {\n defs: defs\n }), React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: theme.background\n }), React.createElement(\"g\", {\n transform: \"translate(\".concat(margin.left, \",\").concat(margin.top, \")\")\n }, children));\n};\nSvgWrapper.propTypes = {\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n margin: PropTypes.shape({\n top: PropTypes.number.isRequired,\n left: PropTypes.number.isRequired\n }).isRequired,\n defs: PropTypes.array,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired\n};\n\nvar DotsItemSymbol = function DotsItemSymbol(_ref) {\n var size = _ref.size,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor;\n return React.createElement(\"circle\", {\n r: size / 2,\n fill: color,\n stroke: borderColor,\n strokeWidth: borderWidth,\n style: {\n pointerEvents: 'none'\n }\n });\n};\nDotsItemSymbol.propTypes = {\n size: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: PropTypes.string.isRequired\n};\nvar DotsItemSymbol$1 = memo(DotsItemSymbol);\n\nvar DotsItem = function DotsItem(_ref) {\n var x = _ref.x,\n y = _ref.y,\n symbol = _ref.symbol,\n size = _ref.size,\n datum = _ref.datum,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n label = _ref.label,\n labelTextAnchor = _ref.labelTextAnchor,\n labelYOffset = _ref.labelYOffset,\n theme = _ref.theme;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\"),\n style: {\n pointerEvents: 'none'\n }\n }, React.createElement(symbol, {\n size: size,\n color: color,\n datum: datum,\n borderWidth: borderWidth,\n borderColor: borderColor\n }), label && React.createElement(\"text\", {\n textAnchor: labelTextAnchor,\n y: labelYOffset,\n style: theme.dots.text\n }, label));\n};\nDotsItem.propTypes = {\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n datum: PropTypes.object.isRequired,\n size: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: PropTypes.string.isRequired,\n symbol: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n labelTextAnchor: PropTypes.oneOf(['start', 'middle', 'end']),\n labelYOffset: PropTypes.number.isRequired,\n theme: PropTypes.shape({\n dots: dotsThemePropType.isRequired\n }).isRequired\n};\nvar DotsItemDefaultProps = {\n symbol: DotsItemSymbol$1,\n labelTextAnchor: 'middle',\n labelYOffset: -12\n};\nDotsItem.defaultProps = DotsItemDefaultProps;\nvar DotsItem$1 = memo(DotsItem);\n\nvar computeLabel = function computeLabel(_ref) {\n var axis = _ref.axis,\n width = _ref.width,\n height = _ref.height,\n position = _ref.position,\n offsetX = _ref.offsetX,\n offsetY = _ref.offsetY,\n orientation = _ref.orientation;\n var x = 0;\n var y = 0;\n var rotation = orientation === 'vertical' ? -90 : 0;\n var textAnchor = 'start';\n if (axis === 'x') {\n switch (position) {\n case 'top-left':\n x = -offsetX;\n y = offsetY;\n textAnchor = 'end';\n break;\n case 'top':\n y = -offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'top-right':\n x = offsetX;\n y = offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'right':\n x = offsetX;\n y = height / 2;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'middle';\n }\n break;\n case 'bottom-right':\n x = offsetX;\n y = height - offsetY;\n textAnchor = 'start';\n break;\n case 'bottom':\n y = height + offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'bottom-left':\n y = height - offsetY;\n x = -offsetX;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'left':\n x = -offsetX;\n y = height / 2;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'middle';\n }\n break;\n }\n } else {\n switch (position) {\n case 'top-left':\n x = offsetX;\n y = -offsetY;\n textAnchor = 'start';\n break;\n case 'top':\n x = width / 2;\n y = -offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'top-right':\n x = width - offsetX;\n y = -offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'start';\n }\n break;\n case 'right':\n x = width + offsetX;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'middle';\n }\n break;\n case 'bottom-right':\n x = width - offsetX;\n y = offsetY;\n textAnchor = 'end';\n break;\n case 'bottom':\n x = width / 2;\n y = offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'bottom-left':\n x = offsetX;\n y = offsetY;\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'end';\n }\n break;\n case 'left':\n x = -offsetX;\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'middle';\n }\n break;\n }\n }\n return {\n x: x,\n y: y,\n rotation: rotation,\n textAnchor: textAnchor\n };\n};\nvar CartesianMarkersItem = function CartesianMarkersItem(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n axis = _ref2.axis,\n scale = _ref2.scale,\n value = _ref2.value,\n lineStyle = _ref2.lineStyle,\n textStyle = _ref2.textStyle,\n legend = _ref2.legend,\n legendPosition = _ref2.legendPosition,\n legendOffsetX = _ref2.legendOffsetX,\n legendOffsetY = _ref2.legendOffsetY,\n legendOrientation = _ref2.legendOrientation;\n var theme = useTheme();\n var x = 0;\n var x2 = 0;\n var y = 0;\n var y2 = 0;\n if (axis === 'y') {\n y = scale(value);\n x2 = width;\n } else {\n x = scale(value);\n y2 = height;\n }\n var legendNode = null;\n if (legend) {\n var legendProps = computeLabel({\n axis: axis,\n width: width,\n height: height,\n position: legendPosition,\n offsetX: legendOffsetX,\n offsetY: legendOffsetY,\n orientation: legendOrientation\n });\n legendNode = React.createElement(\"text\", {\n transform: \"translate(\".concat(legendProps.x, \", \").concat(legendProps.y, \") rotate(\").concat(legendProps.rotation, \")\"),\n textAnchor: legendProps.textAnchor,\n dominantBaseline: \"central\",\n style: textStyle\n }, legend);\n }\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\")\n }, React.createElement(\"line\", {\n x1: 0,\n x2: x2,\n y1: 0,\n y2: y2,\n stroke: theme.markers.lineColor,\n strokeWidth: theme.markers.lineStrokeWidth,\n style: lineStyle\n }), legendNode);\n};\nCartesianMarkersItem.propTypes = {\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n axis: PropTypes.oneOf(['x', 'y']).isRequired,\n scale: PropTypes.func.isRequired,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n lineStyle: PropTypes.object,\n textStyle: PropTypes.object,\n legend: PropTypes.string,\n legendPosition: PropTypes.oneOf(['top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left']),\n legendOffsetX: PropTypes.number.isRequired,\n legendOffsetY: PropTypes.number.isRequired,\n legendOrientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n};\nCartesianMarkersItem.defaultProps = {\n legendPosition: 'top-right',\n legendOffsetX: 14,\n legendOffsetY: 14,\n legendOrientation: 'horizontal'\n};\nvar CartesianMarkersItem$1 = memo(CartesianMarkersItem);\n\nfunction _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }\nvar CartesianMarkers = function CartesianMarkers(_ref) {\n var markers = _ref.markers,\n width = _ref.width,\n height = _ref.height,\n xScale = _ref.xScale,\n yScale = _ref.yScale;\n if (!markers || markers.length === 0) return null;\n return markers.map(function (marker, i) {\n return React.createElement(CartesianMarkersItem$1, _extends$1({\n key: i\n }, marker, {\n width: width,\n height: height,\n scale: marker.axis === 'y' ? yScale : xScale\n }));\n });\n};\nCartesianMarkers.propTypes = {\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n markers: PropTypes.arrayOf(PropTypes.shape({\n axis: PropTypes.oneOf(['x', 'y']).isRequired,\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,\n lineStyle: PropTypes.object,\n textStyle: PropTypes.object\n }))\n};\nvar CartesianMarkers$1 = memo(CartesianMarkers);\n\nfunction _defineProperty$a(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar withCurve = (function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'curve' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'curveInterpolator' : _ref$destKey;\n return withProps(function (props) {\n return _defineProperty$a({}, destKey, curveFromProp(props[srcKey]));\n });\n});\n\nvar withDimensions = (function () {\n return compose(defaultProps({\n margin: defaultMargin\n }), setPropTypes({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n margin: marginPropType\n }), withPropsOnChange(function (props, nextProps) {\n return props.width !== nextProps.width || props.height !== nextProps.height || !isEqual(props.margin, nextProps.margin);\n }, function (props) {\n var margin = Object.assign({}, defaultMargin, props.margin);\n return {\n margin: margin,\n width: props.width - margin.left - margin.right,\n height: props.height - margin.top - margin.bottom,\n outerWidth: props.width,\n outerHeight: props.height\n };\n }));\n});\n\nvar getLabelGenerator = function getLabelGenerator(_label, labelFormat) {\n var getRawLabel = isFunction(_label) ? _label : function (d) {\n return get(d, _label);\n };\n var formatter;\n if (labelFormat) {\n formatter = isFunction(labelFormat) ? labelFormat : format(labelFormat);\n }\n if (formatter) return function (d) {\n return formatter(getRawLabel(d));\n };\n return getRawLabel;\n};\nvar getAccessorFor = function getAccessorFor(directive) {\n return isFunction(directive) ? directive : function (d) {\n return d[directive];\n };\n};\nvar getAccessorOrValue = function getAccessorOrValue(value) {\n return isFunction(value) ? value : function () {\n return value;\n };\n};\n\nfunction _defineProperty$b(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar withHierarchy = (function () {\n var _setPropTypes;\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'root' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'root' : _ref$destKey,\n _ref$valueKey = _ref.valueKey,\n valueKey = _ref$valueKey === void 0 ? 'value' : _ref$valueKey,\n _ref$valueDefault = _ref.valueDefault,\n valueDefault = _ref$valueDefault === void 0 ? 'value' : _ref$valueDefault;\n return compose(defaultProps(_defineProperty$b({}, valueKey, valueDefault)), setPropTypes((_setPropTypes = {}, _defineProperty$b(_setPropTypes, srcKey, PropTypes.object.isRequired), _defineProperty$b(_setPropTypes, valueKey, PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired), _setPropTypes)), withPropsOnChange([srcKey, valueKey], function (props) {\n return _defineProperty$b({}, destKey, hierarchy(props[srcKey]).sum(getAccessorFor(props[valueKey])));\n }));\n});\n\nvar withMotion = (function () {\n return compose(setPropTypes(motionPropTypes), defaultProps({\n animate: defaultAnimate,\n motionDamping: defaultMotionDamping,\n motionStiffness: defaultMotionStiffness\n }), withPropsOnChange(['motionDamping', 'motionStiffness'], function (_ref) {\n var motionDamping = _ref.motionDamping,\n motionStiffness = _ref.motionStiffness;\n return {\n boundSpring: partialRight(spring, {\n damping: motionDamping,\n stiffness: motionStiffness\n })\n };\n }));\n});\n\nfunction _defineProperty$c(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar withTheme = (function () {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'theme' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'theme' : _ref$destKey;\n return compose(setPropTypes(_defineProperty$c({}, srcKey, PropTypes.object)), withPropsOnChange([srcKey], function (props) {\n return _defineProperty$c({}, destKey, extendDefaultTheme(defaultTheme, props[srcKey]));\n }));\n});\n\nfunction _typeof$2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\nfunction _objectWithoutProperties$2(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$2(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$2(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); } }\nfunction _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$2(self, call) { if (call && (_typeof$2(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$2(self); }\nfunction _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$2(o) { _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$2(o); }\nfunction _inherits$2(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }\nfunction _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }\nvar containerStyle$1 = {\n position: 'relative'\n};\nvar Container$1 = function Container(_ref) {\n var theme = _ref.theme,\n _ref$renderWrapper = _ref.renderWrapper,\n renderWrapper = _ref$renderWrapper === void 0 ? true : _ref$renderWrapper,\n children = _ref.children,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var container = useRef(null);\n var _useTooltipHandlers = useTooltipHandlers(container),\n showTooltipAt = _useTooltipHandlers.showTooltipAt,\n showTooltipFromEvent = _useTooltipHandlers.showTooltipFromEvent,\n hideTooltip = _useTooltipHandlers.hideTooltip,\n isTooltipVisible = _useTooltipHandlers.isTooltipVisible,\n tooltipContent = _useTooltipHandlers.tooltipContent,\n tooltipPosition = _useTooltipHandlers.tooltipPosition,\n tooltipAnchor = _useTooltipHandlers.tooltipAnchor;\n return React.createElement(ThemeProvider, {\n theme: theme\n }, React.createElement(MotionConfigProvider, {\n animate: animate,\n stiffness: motionStiffness,\n damping: motionDamping\n }, React.createElement(tooltipContext.Provider, {\n value: {\n showTooltipAt: showTooltipAt,\n showTooltipFromEvent: showTooltipFromEvent,\n hideTooltip: hideTooltip\n }\n }, renderWrapper === true && React.createElement(\"div\", {\n style: containerStyle$1,\n ref: container\n }, children, isTooltipVisible && React.createElement(TooltipWrapper, {\n position: tooltipPosition,\n anchor: tooltipAnchor\n }, tooltipContent)), renderWrapper !== true && children)));\n};\nContainer$1.propTypes = {\n children: PropTypes.node.isRequired,\n theme: PropTypes.object,\n animate: PropTypes.bool,\n motionStiffness: PropTypes.number,\n motionDamping: PropTypes.number,\n renderWrapper: PropTypes.bool\n};\nvar withContainer = function withContainer(WrappedComponent) {\n return (\n function (_Component) {\n _inherits$2(_class, _Component);\n function _class() {\n _classCallCheck$2(this, _class);\n return _possibleConstructorReturn$2(this, _getPrototypeOf$2(_class).apply(this, arguments));\n }\n _createClass$2(_class, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n theme = _this$props.theme,\n renderWrapper = _this$props.renderWrapper,\n childProps = _objectWithoutProperties$2(_this$props, [\"theme\", \"renderWrapper\"]);\n return React.createElement(Container$1, {\n theme: theme,\n renderWrapper: renderWrapper,\n animate: childProps.animate,\n motionStiffness: childProps.motionStiffness,\n motionDamping: childProps.motionDamping\n }, React.createElement(WrappedComponent, childProps));\n }\n }]);\n return _class;\n }(Component)\n );\n};\n\nvar boxAlignments = ['center', 'top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left'];\nvar alignBox = function alignBox(box, container, alignment) {\n var deltaX = container.width - box.width;\n var deltaY = container.height - box.height;\n var x = 0;\n var y = 0;\n if (alignment === 'center') {\n x = deltaX / 2;\n y = deltaY / 2;\n }\n if (alignment === 'top') {\n x = deltaX / 2;\n }\n if (alignment === 'top-right') {\n x = deltaX;\n }\n if (alignment === 'right') {\n x = deltaX;\n y = deltaY / 2;\n }\n if (alignment === 'bottom-right') {\n x = deltaX;\n y = deltaY;\n }\n if (alignment === 'bottom') {\n x = deltaX / 2;\n y = deltaY;\n }\n if (alignment === 'bottom-left') {\n y = deltaY;\n }\n if (alignment === 'left') {\n y = deltaY / 2;\n }\n return [x, y];\n};\n\nvar getDistance = function getDistance(x1, y1, x2, y2) {\n var deltaX = x2 - x1;\n var deltaY = y2 - y1;\n deltaX *= deltaX;\n deltaY *= deltaY;\n return Math.sqrt(deltaX + deltaY);\n};\nvar getAngle = function getAngle(x1, y1, x2, y2) {\n var angle = Math.atan2(y2 - y1, x2 - x1) - Math.PI / 2;\n return angle > 0 ? angle : Math.PI * 2 + angle;\n};\nvar isCursorInRect = function isCursorInRect(x, y, width, height, cursorX, cursorY) {\n return x <= cursorX && cursorX <= x + width && y <= cursorY && cursorY <= y + height;\n};\nvar isCursorInRing = function isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY) {\n var distance = getDistance(cursorX, cursorY, centerX, centerY);\n return distance < radius && distance > innerRadius;\n};\nvar getHoveredArc = function getHoveredArc(centerX, centerY, radius, innerRadius, arcs, cursorX, cursorY) {\n if (!isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY)) return null;\n var cursorAngle = getAngle(cursorX, cursorY, centerX, centerY);\n return arcs.find(function (_ref) {\n var startAngle = _ref.startAngle,\n endAngle = _ref.endAngle;\n return cursorAngle >= startAngle && cursorAngle < endAngle;\n });\n};\n\nvar getRelativeCursor = function getRelativeCursor(el, event) {\n var clientX = event.clientX,\n clientY = event.clientY;\n var bounds = el.getBoundingClientRect();\n return [clientX - bounds.left, clientY - bounds.top];\n};\n\nfunction _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$d(target, key, source[key]); }); } return target; }\nfunction _defineProperty$d(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toConsumableArray$1(arr) { return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _nonIterableSpread$1(); }\nfunction _nonIterableSpread$1() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\nfunction _iterableToArray$1(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\nfunction _arrayWithoutHoles$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\nvar gradientKeys = Object.keys(gradientTypes);\nvar patternKeys = Object.keys(patternTypes);\nvar isMatchingDef = function isMatchingDef(predicate, node, dataKey) {\n if (predicate === '*') {\n return true;\n } else if (isFunction(predicate)) {\n return predicate(node);\n } else if (isPlainObject(predicate)) {\n var data = dataKey ? get(node, dataKey) : node;\n return isEqual(pick(data, Object.keys(predicate)), predicate);\n }\n return false;\n};\nvar bindDefs = function bindDefs(defs, nodes, rules) {\n var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n dataKey = _ref.dataKey,\n _ref$colorKey = _ref.colorKey,\n colorKey = _ref$colorKey === void 0 ? 'color' : _ref$colorKey,\n _ref$targetKey = _ref.targetKey,\n targetKey = _ref$targetKey === void 0 ? 'fill' : _ref$targetKey;\n var boundDefs = [];\n var generatedIds = {};\n if (defs.length && nodes.length) {\n boundDefs = _toConsumableArray$1(defs);\n nodes.forEach(function (node) {\n var _loop = function _loop(i) {\n var _rules$i = rules[i],\n id = _rules$i.id,\n match = _rules$i.match;\n if (isMatchingDef(match, node, dataKey)) {\n var def = defs.find(function (_ref2) {\n var defId = _ref2.id;\n return defId === id;\n });\n if (def) {\n if (patternKeys.includes(def.type)) {\n if (def.background === 'inherit' || def.color === 'inherit') {\n var nodeColor = get(node, colorKey);\n var background = def.background;\n var color = def.color;\n var inheritedId = id;\n if (def.background === 'inherit') {\n inheritedId = \"\".concat(inheritedId, \".bg.\").concat(nodeColor);\n background = nodeColor;\n }\n if (def.color === 'inherit') {\n inheritedId = \"\".concat(inheritedId, \".fg.\").concat(nodeColor);\n color = nodeColor;\n }\n set(node, targetKey, \"url(#\".concat(inheritedId, \")\"));\n if (!generatedIds[inheritedId]) {\n boundDefs.push(_objectSpread$9({}, def, {\n id: inheritedId,\n background: background,\n color: color\n }));\n generatedIds[inheritedId] = 1;\n }\n } else {\n set(node, targetKey, \"url(#\".concat(id, \")\"));\n }\n } else if (gradientKeys.includes(def.type)) {\n var allColors = def.colors.map(function (_ref3) {\n var color = _ref3.color;\n return color;\n });\n if (allColors.includes('inherit')) {\n var _nodeColor = get(node, colorKey);\n var _inheritedId = id;\n var inheritedDef = _objectSpread$9({}, def, {\n colors: def.colors.map(function (colorStop, i) {\n if (colorStop.color !== 'inherit') return colorStop;\n _inheritedId = \"\".concat(_inheritedId, \".\").concat(i, \".\").concat(_nodeColor);\n return _objectSpread$9({}, colorStop, {\n color: colorStop.color === 'inherit' ? _nodeColor : colorStop.color\n });\n })\n });\n inheritedDef.id = _inheritedId;\n set(node, targetKey, \"url(#\".concat(_inheritedId, \")\"));\n if (!generatedIds[_inheritedId]) {\n boundDefs.push(inheritedDef);\n generatedIds[_inheritedId] = 1;\n }\n } else {\n set(node, targetKey, \"url(#\".concat(id, \")\"));\n }\n }\n }\n return \"break\";\n }\n };\n for (var i = 0; i < rules.length; i++) {\n var _ret = _loop(i);\n if (_ret === \"break\") break;\n }\n });\n }\n return boundDefs;\n};\n\nexport { CartesianMarkers$1 as CartesianMarkers, CartesianMarkersItem$1 as CartesianMarkersItem, Container, Defs$1 as Defs, DotsItem$1 as DotsItem, DotsItemDefaultProps, LinearGradient, MotionConfigProvider, PatternDots, PatternLines, PatternSquares, ResponsiveWrapper, SmartMotion, SvgWrapper, TWO_PI, ThemeProvider, absoluteAngleDegrees, absoluteAngleRadians, alignBox, annotationsPropType, areaCurvePropKeys, areaCurvePropType, axisThemePropType, bindDefs, blendModePropType, blendModes, boxAlignments, closedCurvePropKeys, closedCurvePropType, colorInterpolatorIds, colorInterpolators, colorSchemeIds, computeArcBoundingBox, crosshairPropType, curveFromProp, curvePropKeys, curvePropMapping, curvePropType, defaultAnimate, defaultCategoricalColors, defaultColorRange, defaultMargin, defaultMotionDamping, defaultMotionStiffness, defaultTheme, defsPropTypes, degreesToRadians, dotsThemePropType, extendDefaultTheme, getAccessorFor, getAccessorOrValue, getAngle, getColorScale, getDistance, getHoveredArc, getLabelGenerator, getPolarLabelProps, getRelativeCursor, getValueFormatter, gradientTypes, gridThemePropType, guessQuantizeColorScale, isCursorInRect, isCursorInRing, isMatchingDef, labelsThemePropType, legendsThemePropType, lineCurvePropKeys, lineCurvePropType, linearGradientDef, marginPropType, markersThemePropType, midAngle, motionConfigContext, motionPropTypes, nivoCategoricalColors, noop, patternDotsDef, patternLinesDef, patternSquaresDef, patternTypes, positionFromAngle, quantizeColorScalePropType, quantizeColorScales, quantizeColorScalesKeys, radiansToDegrees, stackOffsetFromProp, stackOffsetPropKeys, stackOffsetPropMapping, stackOffsetPropType, stackOrderFromProp, stackOrderPropKeys, stackOrderPropMapping, stackOrderPropType, textPropsByEngine, themeContext, themePropType, treeMapTileFromProp, treeMapTilePropKeys, treeMapTilePropMapping, treeMapTilePropType, useCurveInterpolation, useDimensions, useMotionConfig, usePartialTheme, useTheme, useValueFormatter, withContainer, withCurve, withDimensions, withHierarchy, withMotion, withTheme };\n","import React, { PureComponent, useState, useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport isFunction from 'lodash/isFunction';\nimport { useTheme } from '@nivo/core';\nimport isNumber from 'lodash/isNumber';\nimport isPlainObject from 'lodash/isPlainObject';\n\nvar DIRECTION_ROW = 'row';\nvar DIRECTION_COLUMN = 'column';\nvar ANCHOR_TOP = 'top';\nvar ANCHOR_TOP_RIGHT = 'top-right';\nvar ANCHOR_RIGHT = 'right';\nvar ANCHOR_BOTTOM_RIGHT = 'bottom-right';\nvar ANCHOR_BOTTOM = 'bottom';\nvar ANCHOR_BOTTOM_LEFT = 'bottom-left';\nvar ANCHOR_LEFT = 'left';\nvar ANCHOR_TOP_LEFT = 'top-left';\nvar ANCHOR_CENTER = 'center';\nvar DIRECTION_LEFT_TO_RIGHT = 'left-to-right';\nvar DIRECTION_RIGHT_TO_LEFT = 'right-to-left';\nvar DIRECTION_TOP_TO_BOTTOM = 'top-to-bottom';\nvar DIRECTION_BOTTOM_TO_TOP = 'bottom-to-top';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar legendEffectPropType = PropTypes.shape({\n on: PropTypes.oneOfType([PropTypes.oneOf(['hover'])]).isRequired,\n style: PropTypes.shape({\n itemTextColor: PropTypes.string,\n itemBackground: PropTypes.string,\n itemOpacity: PropTypes.number,\n symbolSize: PropTypes.number,\n symbolBorderWidth: PropTypes.number,\n symbolBorderColor: PropTypes.string\n }).isRequired\n});\nvar symbolPropTypes = {\n symbolShape: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n symbolSize: PropTypes.number,\n symbolSpacing: PropTypes.number,\n symbolBorderWidth: PropTypes.number,\n symbolBorderColor: PropTypes.string\n};\nvar interactivityPropTypes = {\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func\n};\nvar datumPropType = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n color: PropTypes.string.isRequired,\n fill: PropTypes.string\n});\nvar LegendPropShape = _objectSpread({\n data: PropTypes.arrayOf(datumPropType),\n anchor: PropTypes.oneOf([ANCHOR_TOP, ANCHOR_TOP_RIGHT, ANCHOR_RIGHT, ANCHOR_BOTTOM_RIGHT, ANCHOR_BOTTOM, ANCHOR_BOTTOM_LEFT, ANCHOR_LEFT, ANCHOR_TOP_LEFT, ANCHOR_CENTER]).isRequired,\n translateX: PropTypes.number,\n translateY: PropTypes.number,\n direction: PropTypes.oneOf([DIRECTION_ROW, DIRECTION_COLUMN]).isRequired,\n itemsSpacing: PropTypes.number,\n itemWidth: PropTypes.number.isRequired,\n itemHeight: PropTypes.number.isRequired,\n itemDirection: PropTypes.oneOf([DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_TOP_TO_BOTTOM, DIRECTION_BOTTOM_TO_TOP]),\n itemTextColor: PropTypes.string,\n itemBackground: PropTypes.string,\n itemOpacity: PropTypes.number\n}, symbolPropTypes, interactivityPropTypes, {\n effects: PropTypes.arrayOf(legendEffectPropType)\n});\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }\nfunction _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar zeroPadding = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\nvar computeDimensions = function computeDimensions(_ref) {\n var direction = _ref.direction,\n itemsSpacing = _ref.itemsSpacing,\n _padding = _ref.padding,\n itemCount = _ref.itemCount,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight;\n var padding;\n if (isNumber(_padding)) {\n padding = {\n top: _padding,\n right: _padding,\n bottom: _padding,\n left: _padding\n };\n } else if (isPlainObject(_padding)) {\n padding = _objectSpread$1({}, zeroPadding, _padding);\n } else {\n throw new TypeError(\"Invalid property padding, must be one of: number, object\");\n }\n var horizontalPadding = padding.left + padding.right;\n var verticalPadding = padding.top + padding.bottom;\n var width = itemWidth + horizontalPadding;\n var height = itemHeight + verticalPadding;\n var spacing = (itemCount - 1) * itemsSpacing;\n if (direction === DIRECTION_ROW) {\n width = itemWidth * itemCount + spacing + horizontalPadding;\n } else if (direction === DIRECTION_COLUMN) {\n height = itemHeight * itemCount + spacing + verticalPadding;\n }\n return {\n width: width,\n height: height,\n padding: padding\n };\n};\nvar computePositionFromAnchor = function computePositionFromAnchor(_ref2) {\n var anchor = _ref2.anchor,\n translateX = _ref2.translateX,\n translateY = _ref2.translateY,\n containerWidth = _ref2.containerWidth,\n containerHeight = _ref2.containerHeight,\n width = _ref2.width,\n height = _ref2.height;\n var x = translateX;\n var y = translateY;\n switch (anchor) {\n case ANCHOR_TOP:\n x += (containerWidth - width) / 2;\n break;\n case ANCHOR_TOP_RIGHT:\n x += containerWidth - width;\n break;\n case ANCHOR_RIGHT:\n x += containerWidth - width;\n y += (containerHeight - height) / 2;\n break;\n case ANCHOR_BOTTOM_RIGHT:\n x += containerWidth - width;\n y += containerHeight - height;\n break;\n case ANCHOR_BOTTOM:\n x += (containerWidth - width) / 2;\n y += containerHeight - height;\n break;\n case ANCHOR_BOTTOM_LEFT:\n y += containerHeight - height;\n break;\n case ANCHOR_LEFT:\n y += (containerHeight - height) / 2;\n break;\n case ANCHOR_CENTER:\n x += (containerWidth - width) / 2;\n y += (containerHeight - height) / 2;\n break;\n }\n return {\n x: x,\n y: y\n };\n};\nvar computeItemLayout = function computeItemLayout(_ref3) {\n var direction = _ref3.direction,\n justify = _ref3.justify,\n symbolSize = _ref3.symbolSize,\n symbolSpacing = _ref3.symbolSpacing,\n width = _ref3.width,\n height = _ref3.height;\n var symbolX;\n var symbolY;\n var labelX;\n var labelY;\n var labelAnchor;\n var labelAlignment;\n switch (direction) {\n case DIRECTION_LEFT_TO_RIGHT:\n symbolX = 0;\n symbolY = (height - symbolSize) / 2;\n labelY = height / 2;\n labelAlignment = 'central';\n if (justify === true) {\n labelX = width;\n labelAnchor = 'end';\n } else {\n labelX = symbolSize + symbolSpacing;\n labelAnchor = 'start';\n }\n break;\n case DIRECTION_RIGHT_TO_LEFT:\n symbolX = width - symbolSize;\n symbolY = (height - symbolSize) / 2;\n labelY = height / 2;\n labelAlignment = 'central';\n if (justify === true) {\n labelX = 0;\n labelAnchor = 'start';\n } else {\n labelX = width - symbolSize - symbolSpacing;\n labelAnchor = 'end';\n }\n break;\n case DIRECTION_TOP_TO_BOTTOM:\n symbolX = (width - symbolSize) / 2;\n symbolY = 0;\n labelX = width / 2;\n labelAnchor = 'middle';\n if (justify === true) {\n labelY = height;\n labelAlignment = 'alphabetic';\n } else {\n labelY = symbolSize + symbolSpacing;\n labelAlignment = 'text-before-edge';\n }\n break;\n case DIRECTION_BOTTOM_TO_TOP:\n symbolX = (width - symbolSize) / 2;\n symbolY = height - symbolSize;\n labelX = width / 2;\n labelAnchor = 'middle';\n if (justify === true) {\n labelY = 0;\n labelAlignment = 'text-before-edge';\n } else {\n labelY = height - symbolSize - symbolSpacing;\n labelAlignment = 'alphabetic';\n }\n break;\n }\n return {\n symbolX: symbolX,\n symbolY: symbolY,\n labelX: labelX,\n labelY: labelY,\n labelAnchor: labelAnchor,\n labelAlignment: labelAlignment\n };\n};\n\nvar symbolPropTypes$1 = {\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n size: PropTypes.number.isRequired,\n fill: PropTypes.string.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: PropTypes.string.isRequired\n};\nvar symbolDefaultProps = {\n borderWidth: 0,\n borderColor: 'transparent'\n};\n\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _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); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar SymbolCircle =\nfunction (_PureComponent) {\n _inherits(SymbolCircle, _PureComponent);\n function SymbolCircle() {\n _classCallCheck(this, SymbolCircle);\n return _possibleConstructorReturn(this, _getPrototypeOf(SymbolCircle).apply(this, arguments));\n }\n _createClass(SymbolCircle, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"circle\", {\n r: size / 2,\n cx: x + size / 2,\n cy: y + size / 2,\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n style: {\n pointerEvents: 'none'\n }\n });\n }\n }]);\n return SymbolCircle;\n}(PureComponent);\n_defineProperty$2(SymbolCircle, \"propTypes\", _objectSpread$2({}, symbolPropTypes$1));\n_defineProperty$2(SymbolCircle, \"defaultProps\", _objectSpread$2({}, symbolDefaultProps));\n\nfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }\nfunction _typeof$1(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$1(self); }\nfunction _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }\nfunction _inherits$1(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }\nfunction _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }\nfunction _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar SymbolDiamond =\nfunction (_PureComponent) {\n _inherits$1(SymbolDiamond, _PureComponent);\n function SymbolDiamond() {\n _classCallCheck$1(this, SymbolDiamond);\n return _possibleConstructorReturn$1(this, _getPrototypeOf$1(SymbolDiamond).apply(this, arguments));\n }\n _createClass$1(SymbolDiamond, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, React.createElement(\"path\", {\n d: \"\\n M\".concat(size / 2, \" 0\\n L\").concat(size * 0.8, \" \").concat(size / 2, \"\\n L\").concat(size / 2, \" \").concat(size, \"\\n L\").concat(size * 0.2, \" \").concat(size / 2, \"\\n L\").concat(size / 2, \" 0\\n \"),\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n style: {\n pointerEvents: 'none'\n }\n }));\n }\n }]);\n return SymbolDiamond;\n}(PureComponent);\n_defineProperty$3(SymbolDiamond, \"propTypes\", _objectSpread$3({}, symbolPropTypes$1));\n_defineProperty$3(SymbolDiamond, \"defaultProps\", _objectSpread$3({}, symbolDefaultProps));\n\nfunction _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } return target; }\nfunction _typeof$2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\nfunction _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$2(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); } }\nfunction _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$2(self, call) { if (call && (_typeof$2(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$2(self); }\nfunction _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$2(o) { _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$2(o); }\nfunction _inherits$2(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }\nfunction _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }\nfunction _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar SymbolSquare =\nfunction (_PureComponent) {\n _inherits$2(SymbolSquare, _PureComponent);\n function SymbolSquare() {\n _classCallCheck$2(this, SymbolSquare);\n return _possibleConstructorReturn$2(this, _getPrototypeOf$2(SymbolSquare).apply(this, arguments));\n }\n _createClass$2(SymbolSquare, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"rect\", {\n x: x,\n y: y,\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n width: size,\n height: size,\n style: {\n pointerEvents: 'none'\n }\n });\n }\n }]);\n return SymbolSquare;\n}(PureComponent);\n_defineProperty$4(SymbolSquare, \"propTypes\", _objectSpread$4({}, symbolPropTypes$1));\n_defineProperty$4(SymbolSquare, \"defaultProps\", _objectSpread$4({}, symbolDefaultProps));\n\nfunction _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$5(target, key, source[key]); }); } return target; }\nfunction _typeof$3(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\nfunction _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$3(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); } }\nfunction _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$3(self, call) { if (call && (_typeof$3(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$3(self); }\nfunction _assertThisInitialized$3(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$3(o) { _getPrototypeOf$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$3(o); }\nfunction _inherits$3(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$3(subClass, superClass); }\nfunction _setPrototypeOf$3(o, p) { _setPrototypeOf$3 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$3(o, p); }\nfunction _defineProperty$5(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar SymbolTriangle =\nfunction (_PureComponent) {\n _inherits$3(SymbolTriangle, _PureComponent);\n function SymbolTriangle() {\n _classCallCheck$3(this, SymbolTriangle);\n return _possibleConstructorReturn$3(this, _getPrototypeOf$3(SymbolTriangle).apply(this, arguments));\n }\n _createClass$3(SymbolTriangle, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n x = _this$props.x,\n y = _this$props.y,\n size = _this$props.size,\n fill = _this$props.fill,\n borderWidth = _this$props.borderWidth,\n borderColor = _this$props.borderColor;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, React.createElement(\"path\", {\n d: \"\\n M\".concat(size / 2, \" 0\\n L\").concat(size, \" \").concat(size, \"\\n L0 \").concat(size, \"\\n L\").concat(size / 2, \" 0\\n \"),\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n style: {\n pointerEvents: 'none'\n }\n }));\n }\n }]);\n return SymbolTriangle;\n}(PureComponent);\n_defineProperty$5(SymbolTriangle, \"propTypes\", _objectSpread$5({}, symbolPropTypes$1));\n_defineProperty$5(SymbolTriangle, \"defaultProps\", _objectSpread$5({}, symbolDefaultProps));\n\nfunction _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$6(target, key, source[key]); }); } return target; }\nfunction _defineProperty$6(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar symbolByShape = {\n circle: SymbolCircle,\n diamond: SymbolDiamond,\n square: SymbolSquare,\n triangle: SymbolTriangle\n};\nvar LegendSvgItem = function LegendSvgItem(_ref) {\n var x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height,\n data = _ref.data,\n direction = _ref.direction,\n justify = _ref.justify,\n textColor = _ref.textColor,\n background = _ref.background,\n opacity = _ref.opacity,\n symbolShape = _ref.symbolShape,\n symbolSize = _ref.symbolSize,\n symbolSpacing = _ref.symbolSpacing,\n symbolBorderWidth = _ref.symbolBorderWidth,\n symbolBorderColor = _ref.symbolBorderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n effects = _ref.effects;\n var _useState = useState({}),\n _useState2 = _slicedToArray(_useState, 2),\n style = _useState2[0],\n setStyle = _useState2[1];\n var theme = useTheme();\n var handleClick = useCallback(function (event) {\n return onClick && onClick(data, event);\n }, [onClick, data]);\n var handleMouseEnter = useCallback(function (event) {\n if (effects.length > 0) {\n var applyEffects = effects.filter(function (_ref2) {\n var on = _ref2.on;\n return on === 'hover';\n });\n var _style = applyEffects.reduce(function (acc, effect) {\n return _objectSpread$6({}, acc, effect.style);\n }, {});\n setStyle(_style);\n }\n if (onMouseEnter === undefined) return;\n onMouseEnter(data, event);\n }, [onMouseEnter, data, effects]);\n var handleMouseLeave = useCallback(function () {\n if (effects.length > 0) {\n var applyEffects = effects.filter(function (_ref3) {\n var on = _ref3.on;\n return on !== 'hover';\n });\n var _style2 = applyEffects.reduce(function (acc, effect) {\n return _objectSpread$6({}, acc, effect.style);\n }, {});\n setStyle(_style2);\n }\n if (onMouseLeave === undefined) return;\n onMouseLeave(data, event);\n }, [onMouseLeave, data, effects]);\n var _computeItemLayout = computeItemLayout({\n direction: direction,\n justify: justify,\n symbolSize: style.symbolSize || symbolSize,\n symbolSpacing: symbolSpacing,\n width: width,\n height: height\n }),\n symbolX = _computeItemLayout.symbolX,\n symbolY = _computeItemLayout.symbolY,\n labelX = _computeItemLayout.labelX,\n labelY = _computeItemLayout.labelY,\n labelAnchor = _computeItemLayout.labelAnchor,\n labelAlignment = _computeItemLayout.labelAlignment;\n var isInteractive = [onClick, onMouseEnter, onMouseLeave].some(function (handler) {\n return handler !== undefined;\n });\n var _Symbol;\n if (isFunction(symbolShape)) {\n _Symbol = symbolShape;\n } else {\n _Symbol = symbolByShape[symbolShape];\n }\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\"),\n style: {\n opacity: style.itemOpacity !== undefined ? style.itemOpacity : opacity\n }\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: style.itemBackground || background,\n style: {\n cursor: isInteractive ? 'pointer' : 'auto'\n },\n onClick: handleClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave\n }), React.createElement(_Symbol, {\n id: data.id,\n x: symbolX,\n y: symbolY,\n size: style.symbolSize || symbolSize,\n fill: data.fill || data.color,\n borderWidth: style.symbolBorderWidth !== undefined ? style.symbolBorderWidth : symbolBorderWidth,\n borderColor: style.symbolBorderColor || symbolBorderColor\n }), React.createElement(\"text\", {\n textAnchor: labelAnchor,\n style: _objectSpread$6({}, theme.legends.text, {\n fill: style.itemTextColor || textColor,\n dominantBaseline: labelAlignment,\n pointerEvents: 'none',\n userSelect: 'none'\n }),\n x: labelX,\n y: labelY\n }, data.label));\n};\nLegendSvgItem.displayName = 'LegendSvgItem';\nLegendSvgItem.propTypes = _objectSpread$6({\n data: datumPropType.isRequired,\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n textColor: PropTypes.string,\n background: PropTypes.string,\n opacity: PropTypes.number,\n direction: PropTypes.oneOf(['left-to-right', 'right-to-left', 'top-to-bottom', 'bottom-to-top']).isRequired,\n justify: PropTypes.bool.isRequired\n}, symbolPropTypes, interactivityPropTypes);\nLegendSvgItem.defaultProps = {\n direction: 'left-to-right',\n justify: false,\n textColor: 'black',\n background: 'transparent',\n opacity: 1,\n symbolShape: 'square',\n symbolSize: 16,\n symbolSpacing: 8,\n symbolBorderWidth: 0,\n symbolBorderColor: 'transparent',\n effects: []\n};\n\nfunction _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$7(target, key, source[key]); }); } return target; }\nfunction _defineProperty$7(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar LegendSvg = function LegendSvg(_ref) {\n var data = _ref.data,\n x = _ref.x,\n y = _ref.y,\n direction = _ref.direction,\n _padding = _ref.padding,\n justify = _ref.justify,\n effects = _ref.effects,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight,\n itemDirection = _ref.itemDirection,\n itemsSpacing = _ref.itemsSpacing,\n itemTextColor = _ref.itemTextColor,\n itemBackground = _ref.itemBackground,\n itemOpacity = _ref.itemOpacity,\n symbolShape = _ref.symbolShape,\n symbolSize = _ref.symbolSize,\n symbolSpacing = _ref.symbolSpacing,\n symbolBorderWidth = _ref.symbolBorderWidth,\n symbolBorderColor = _ref.symbolBorderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave;\n var _computeDimensions = computeDimensions({\n itemCount: data.length,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n itemsSpacing: itemsSpacing,\n direction: direction,\n padding: _padding\n }),\n padding = _computeDimensions.padding;\n var xStep = 0;\n var yStep = 0;\n if (direction === 'row') {\n xStep = itemWidth + itemsSpacing;\n } else if (direction === 'column') {\n yStep = itemHeight + itemsSpacing;\n }\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, data.map(function (data, i) {\n return React.createElement(LegendSvgItem, {\n key: i,\n data: data,\n x: i * xStep + padding.left,\n y: i * yStep + padding.top,\n width: itemWidth,\n height: itemHeight,\n direction: itemDirection,\n justify: justify,\n effects: effects,\n textColor: itemTextColor,\n background: itemBackground,\n opacity: itemOpacity,\n symbolShape: symbolShape,\n symbolSize: symbolSize,\n symbolSpacing: symbolSpacing,\n symbolBorderWidth: symbolBorderWidth,\n symbolBorderColor: symbolBorderColor,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n });\n }));\n};\nLegendSvg.propTypes = _objectSpread$7({\n data: PropTypes.arrayOf(datumPropType).isRequired,\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n direction: PropTypes.oneOf(['row', 'column']).isRequired,\n padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n })]).isRequired,\n justify: PropTypes.bool.isRequired,\n itemsSpacing: PropTypes.number.isRequired,\n itemWidth: PropTypes.number.isRequired,\n itemHeight: PropTypes.number.isRequired,\n itemDirection: PropTypes.oneOf([DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_TOP_TO_BOTTOM, DIRECTION_BOTTOM_TO_TOP]).isRequired,\n itemTextColor: PropTypes.string.isRequired,\n itemBackground: PropTypes.string.isRequired,\n itemOpacity: PropTypes.number.isRequired\n}, symbolPropTypes, interactivityPropTypes);\nLegendSvg.defaultProps = {\n padding: 0,\n justify: false,\n itemsSpacing: 0,\n itemDirection: 'left-to-right',\n itemTextColor: 'black',\n itemBackground: 'transparent',\n itemOpacity: 1\n};\n\nfunction _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$8(target, key, source[key]); }); } return target; }\nfunction _defineProperty$8(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar BoxLegendSvg = function BoxLegendSvg(_ref) {\n var data = _ref.data,\n containerWidth = _ref.containerWidth,\n containerHeight = _ref.containerHeight,\n translateX = _ref.translateX,\n translateY = _ref.translateY,\n anchor = _ref.anchor,\n direction = _ref.direction,\n padding = _ref.padding,\n justify = _ref.justify,\n itemsSpacing = _ref.itemsSpacing,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight,\n itemDirection = _ref.itemDirection,\n itemTextColor = _ref.itemTextColor,\n itemBackground = _ref.itemBackground,\n itemOpacity = _ref.itemOpacity,\n symbolShape = _ref.symbolShape,\n symbolSize = _ref.symbolSize,\n symbolSpacing = _ref.symbolSpacing,\n symbolBorderWidth = _ref.symbolBorderWidth,\n symbolBorderColor = _ref.symbolBorderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n effects = _ref.effects;\n var _computeDimensions = computeDimensions({\n itemCount: data.length,\n itemsSpacing: itemsSpacing,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n direction: direction,\n padding: padding\n }),\n width = _computeDimensions.width,\n height = _computeDimensions.height;\n var _computePositionFromA = computePositionFromAnchor({\n anchor: anchor,\n translateX: translateX,\n translateY: translateY,\n containerWidth: containerWidth,\n containerHeight: containerHeight,\n width: width,\n height: height\n }),\n x = _computePositionFromA.x,\n y = _computePositionFromA.y;\n return React.createElement(LegendSvg, {\n data: data,\n x: x,\n y: y,\n direction: direction,\n padding: padding,\n justify: justify,\n effects: effects,\n itemsSpacing: itemsSpacing,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n itemDirection: itemDirection,\n itemTextColor: itemTextColor,\n itemBackground: itemBackground,\n itemOpacity: itemOpacity,\n symbolShape: symbolShape,\n symbolSize: symbolSize,\n symbolSpacing: symbolSpacing,\n symbolBorderWidth: symbolBorderWidth,\n symbolBorderColor: symbolBorderColor,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n });\n};\nBoxLegendSvg.propTypes = _objectSpread$8({\n data: PropTypes.arrayOf(datumPropType).isRequired,\n containerWidth: PropTypes.number.isRequired,\n containerHeight: PropTypes.number.isRequired,\n translateX: PropTypes.number.isRequired,\n translateY: PropTypes.number.isRequired,\n anchor: PropTypes.oneOf([ANCHOR_TOP, ANCHOR_TOP_RIGHT, ANCHOR_RIGHT, ANCHOR_BOTTOM_RIGHT, ANCHOR_BOTTOM, ANCHOR_BOTTOM_LEFT, ANCHOR_LEFT, ANCHOR_TOP_LEFT, ANCHOR_CENTER]).isRequired,\n direction: PropTypes.oneOf([DIRECTION_ROW, DIRECTION_COLUMN]).isRequired,\n padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n })]).isRequired,\n justify: PropTypes.bool,\n itemWidth: PropTypes.number.isRequired,\n itemHeight: PropTypes.number.isRequired,\n itemDirection: PropTypes.oneOf([DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_TOP_TO_BOTTOM, DIRECTION_BOTTOM_TO_TOP]),\n itemsSpacing: PropTypes.number.isRequired,\n itemTextColor: PropTypes.string,\n itemBackground: PropTypes.string,\n itemOpacity: PropTypes.number\n}, symbolPropTypes, interactivityPropTypes);\nBoxLegendSvg.defaultProps = {\n translateX: 0,\n translateY: 0,\n itemsSpacing: LegendSvg.defaultProps.itemsSpacing,\n padding: LegendSvg.defaultProps.padding\n};\n\nvar textPropsMapping = {\n align: {\n start: 'left',\n middle: 'center',\n end: 'right'\n },\n baseline: {\n hanging: 'top',\n middle: 'middle',\n central: 'middle',\n baseline: 'bottom'\n }\n};\nvar renderLegendToCanvas = function renderLegendToCanvas(ctx, _ref) {\n var data = _ref.data,\n containerWidth = _ref.containerWidth,\n containerHeight = _ref.containerHeight,\n _ref$translateX = _ref.translateX,\n translateX = _ref$translateX === void 0 ? BoxLegendSvg.defaultProps.translateX : _ref$translateX,\n _ref$translateY = _ref.translateY,\n translateY = _ref$translateY === void 0 ? BoxLegendSvg.defaultProps.translateY : _ref$translateY,\n anchor = _ref.anchor,\n direction = _ref.direction,\n _ref$padding = _ref.padding,\n _padding = _ref$padding === void 0 ? LegendSvg.defaultProps.padding : _ref$padding,\n _ref$justify = _ref.justify,\n justify = _ref$justify === void 0 ? LegendSvgItem.defaultProps.justify : _ref$justify,\n _ref$itemsSpacing = _ref.itemsSpacing,\n itemsSpacing = _ref$itemsSpacing === void 0 ? LegendSvg.defaultProps.itemsSpacing : _ref$itemsSpacing,\n itemWidth = _ref.itemWidth,\n itemHeight = _ref.itemHeight,\n _ref$itemDirection = _ref.itemDirection,\n itemDirection = _ref$itemDirection === void 0 ? LegendSvgItem.defaultProps.direction : _ref$itemDirection,\n _ref$itemTextColor = _ref.itemTextColor,\n itemTextColor = _ref$itemTextColor === void 0 ? LegendSvg.defaultProps.textColor : _ref$itemTextColor,\n _ref$symbolSize = _ref.symbolSize,\n symbolSize = _ref$symbolSize === void 0 ? LegendSvgItem.defaultProps.symbolSize : _ref$symbolSize,\n _ref$symbolSpacing = _ref.symbolSpacing,\n symbolSpacing = _ref$symbolSpacing === void 0 ? LegendSvgItem.defaultProps.symbolSpacing : _ref$symbolSpacing,\n theme = _ref.theme;\n var _computeDimensions = computeDimensions({\n itemCount: data.length,\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n itemsSpacing: itemsSpacing,\n direction: direction,\n padding: _padding\n }),\n width = _computeDimensions.width,\n height = _computeDimensions.height,\n padding = _computeDimensions.padding;\n var _computePositionFromA = computePositionFromAnchor({\n anchor: anchor,\n translateX: translateX,\n translateY: translateY,\n containerWidth: containerWidth,\n containerHeight: containerHeight,\n width: width,\n height: height\n }),\n x = _computePositionFromA.x,\n y = _computePositionFromA.y;\n var xStep = 0;\n var yStep = 0;\n if (direction === DIRECTION_ROW) {\n xStep = itemWidth + itemsSpacing;\n } else if (direction === DIRECTION_COLUMN) {\n yStep = itemHeight + itemsSpacing;\n }\n ctx.save();\n ctx.translate(x, y);\n ctx.font = \"\".concat(theme.legends.text.fontSize, \"px \").concat(theme.legends.text.fontFamily || 'sans-serif');\n data.forEach(function (d, i) {\n var itemX = i * xStep + padding.left;\n var itemY = i * yStep + padding.top;\n var _computeItemLayout = computeItemLayout({\n direction: itemDirection,\n justify: justify,\n symbolSize: symbolSize,\n symbolSpacing: symbolSpacing,\n width: itemWidth,\n height: itemHeight\n }),\n symbolX = _computeItemLayout.symbolX,\n symbolY = _computeItemLayout.symbolY,\n labelX = _computeItemLayout.labelX,\n labelY = _computeItemLayout.labelY,\n labelAnchor = _computeItemLayout.labelAnchor,\n labelAlignment = _computeItemLayout.labelAlignment;\n ctx.fillStyle = d.color;\n ctx.fillRect(itemX + symbolX, itemY + symbolY, symbolSize, symbolSize);\n ctx.textAlign = textPropsMapping.align[labelAnchor];\n ctx.textBaseline = textPropsMapping.baseline[labelAlignment];\n ctx.fillStyle = itemTextColor || theme.legends.text.fill;\n ctx.fillText(d.label, itemX + labelX, itemY + labelY);\n });\n ctx.restore();\n};\n\nfunction _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1(); }\nfunction _nonIterableRest$1() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit$1(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }\nvar useQuantizeColorScaleLegendData = function useQuantizeColorScaleLegendData(_ref) {\n var scale = _ref.scale,\n overriddenDomain = _ref.domain,\n _ref$reverse = _ref.reverse,\n reverse = _ref$reverse === void 0 ? false : _ref$reverse,\n _ref$valueFormat = _ref.valueFormat,\n valueFormat = _ref$valueFormat === void 0 ? function (v) {\n return v;\n } : _ref$valueFormat,\n _ref$separator = _ref.separator,\n separator = _ref$separator === void 0 ? ' - ' : _ref$separator;\n return useMemo(function () {\n var domain = overriddenDomain || scale.range();\n var items = domain.map(function (domainValue, index) {\n var _scale$invertExtent = scale.invertExtent(domainValue),\n _scale$invertExtent2 = _slicedToArray$1(_scale$invertExtent, 2),\n start = _scale$invertExtent2[0],\n end = _scale$invertExtent2[1];\n return {\n id: domainValue,\n index: index,\n extent: [start, end],\n label: \"\".concat(valueFormat(start)).concat(separator).concat(valueFormat(end)),\n value: scale(start),\n color: domainValue\n };\n });\n if (reverse === true) items.reverse();\n return items;\n }, [overriddenDomain, scale, reverse]);\n};\n\nexport { ANCHOR_BOTTOM, ANCHOR_BOTTOM_LEFT, ANCHOR_BOTTOM_RIGHT, ANCHOR_CENTER, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, ANCHOR_TOP_LEFT, ANCHOR_TOP_RIGHT, BoxLegendSvg, DIRECTION_BOTTOM_TO_TOP, DIRECTION_COLUMN, DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_ROW, DIRECTION_TOP_TO_BOTTOM, LegendPropShape, LegendSvg, LegendSvgItem, datumPropType, interactivityPropTypes, legendEffectPropType, renderLegendToCanvas, symbolPropTypes, useQuantizeColorScaleLegendData };\n","import React, { Component, Fragment, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { arc, pie, line } from 'd3-shape';\nimport setDisplayName from 'recompose/setDisplayName';\nimport compose from 'recompose/compose';\nimport pure from 'recompose/pure';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport { computeArcBoundingBox, degreesToRadians, radiansToDegrees, noop, absoluteAngleRadians, midAngle, positionFromAngle, absoluteAngleDegrees, axisThemePropType, labelsThemePropType, textPropsByEngine, themePropType, withTheme, withDimensions, getLabelGenerator, bindDefs, Container, SvgWrapper, ResponsiveWrapper, getRelativeCursor, getHoveredArc } from '@nivo/core';\nimport { getOrdinalColorScale, inheritedColorPropType, ordinalColorsPropType, getInheritedColorGenerator } from '@nivo/colors';\nimport { LegendPropShape, BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport { BasicTooltip } from '@nivo/tooltip';\nimport get from 'lodash/get';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _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); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PieLayout =\nfunction (_Component) {\n _inherits(PieLayout, _Component);\n function PieLayout() {\n _classCallCheck(this, PieLayout);\n return _possibleConstructorReturn(this, _getPrototypeOf(PieLayout).apply(this, arguments));\n }\n _createClass(PieLayout, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n arcs = _this$props.arcs,\n arcGenerator = _this$props.arcGenerator,\n startAngle = _this$props.startAngle,\n endAngle = _this$props.endAngle,\n width = _this$props.width,\n height = _this$props.height,\n centerX = _this$props.centerX,\n centerY = _this$props.centerY,\n radius = _this$props.radius,\n innerRadius = _this$props.innerRadius,\n debug = _this$props.debug,\n render = _this$props.children;\n return render({\n arcs: arcs,\n arcGenerator: arcGenerator,\n startAngle: startAngle,\n endAngle: endAngle,\n width: width,\n height: height,\n centerX: centerX,\n centerY: centerY,\n radius: radius,\n innerRadius: innerRadius,\n debug: debug\n });\n }\n }]);\n return PieLayout;\n}(Component);\n_defineProperty(PieLayout, \"propTypes\", {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired\n })).isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n fit: PropTypes.bool.isRequired,\n sortByValue: PropTypes.bool.isRequired,\n startAngle: PropTypes.number.isRequired,\n endAngle: PropTypes.number.isRequired,\n padAngle: PropTypes.number.isRequired,\n arcs: PropTypes.array.isRequired,\n arcGenerator: PropTypes.func.isRequired,\n centerX: PropTypes.number.isRequired,\n centerY: PropTypes.number.isRequired,\n radius: PropTypes.number.isRequired,\n innerRadius: PropTypes.number.isRequired,\n cornerRadius: PropTypes.number.isRequired,\n debug: PropTypes.shape({\n points: PropTypes.array.isRequired,\n box: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired\n }).isRequired,\n ratio: PropTypes.number.isRequired\n }),\n children: PropTypes.func.isRequired\n});\nvar PieLayoutDefaultProps = {\n fit: true,\n sortByValue: false,\n innerRadius: 0,\n startAngle: 0,\n endAngle: 360,\n padAngle: 0,\n cornerRadius: 0\n};\nvar enhance = function enhance(Component) {\n return compose(defaultProps(PieLayoutDefaultProps), withPropsOnChange(['colors'], function (_ref) {\n var colors = _ref.colors;\n return {\n getColor: getOrdinalColorScale(colors, 'id')\n };\n }), withPropsOnChange(['width', 'height', 'innerRadius', 'startAngle', 'endAngle', 'fit', 'cornerRadius'], function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n _innerRadius = _ref2.innerRadius,\n startAngle = _ref2.startAngle,\n endAngle = _ref2.endAngle,\n fit = _ref2.fit,\n cornerRadius = _ref2.cornerRadius;\n var radius = Math.min(width, height) / 2;\n var innerRadius = radius * Math.min(_innerRadius, 1);\n var centerX = width / 2;\n var centerY = height / 2;\n var boundingBox;\n if (fit === true) {\n var _computeArcBoundingBo = computeArcBoundingBox(centerX, centerY, radius, startAngle - 90, endAngle - 90),\n points = _computeArcBoundingBo.points,\n box = _objectWithoutProperties(_computeArcBoundingBo, [\"points\"]);\n var ratio = Math.min(width / box.width, height / box.height);\n var adjustedBox = {\n width: box.width * ratio,\n height: box.height * ratio\n };\n adjustedBox.x = (width - adjustedBox.width) / 2;\n adjustedBox.y = (height - adjustedBox.height) / 2;\n centerX = (centerX - box.x) / box.width * box.width * ratio + adjustedBox.x;\n centerY = (centerY - box.y) / box.height * box.height * ratio + adjustedBox.y;\n boundingBox = {\n box: box,\n ratio: ratio,\n points: points\n };\n radius = radius * ratio;\n innerRadius = innerRadius * ratio;\n }\n var arcGenerator = arc().outerRadius(radius).innerRadius(innerRadius).cornerRadius(cornerRadius);\n return {\n centerX: centerX,\n centerY: centerY,\n radius: radius,\n innerRadius: innerRadius,\n arcGenerator: arcGenerator,\n debug: boundingBox\n };\n }), withPropsOnChange(['sortByValue', 'padAngle', 'startAngle', 'endAngle'], function (_ref3) {\n var sortByValue = _ref3.sortByValue,\n padAngle = _ref3.padAngle,\n startAngle = _ref3.startAngle,\n endAngle = _ref3.endAngle;\n var pie$1 = pie().value(function (d) {\n return d.value;\n }).padAngle(degreesToRadians(padAngle)).startAngle(degreesToRadians(startAngle)).endAngle(degreesToRadians(endAngle));\n if (sortByValue !== true) pie$1.sortValues(null);\n return {\n pie: pie$1\n };\n }), withPropsOnChange(['pie', 'data'], function (_ref4) {\n var pie = _ref4.pie,\n data = _ref4.data;\n return {\n arcs: pie(data).map(function (arc) {\n var angle = Math.abs(arc.endAngle - arc.startAngle);\n return _objectSpread({}, arc, {\n angle: angle,\n angleDeg: radiansToDegrees(angle)\n });\n })\n };\n }), withPropsOnChange(['arcs', 'getColor'], function (_ref5) {\n var arcs = _ref5.arcs,\n getColor = _ref5.getColor;\n return {\n arcs: arcs.map(function (arc) {\n return _objectSpread({}, arc, {\n color: getColor(arc.data)\n });\n })\n };\n }), pure)(Component);\n};\nvar PieLayout$1 = setDisplayName('PieLayout')(enhance(PieLayout));\n\nvar arcPropType = PropTypes.shape({\n startAngle: PropTypes.number.isRequired,\n endAngle: PropTypes.number.isRequired,\n angle: PropTypes.number.isRequired,\n angleDeg: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired,\n data: PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n value: PropTypes.number.isRequired\n }).isRequired\n});\nvar PiePropTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n value: PropTypes.number.isRequired\n })).isRequired,\n startAngle: PropTypes.number.isRequired,\n endAngle: PropTypes.number.isRequired,\n fit: PropTypes.bool.isRequired,\n padAngle: PropTypes.number.isRequired,\n sortByValue: PropTypes.bool.isRequired,\n innerRadius: PropTypes.number.isRequired,\n cornerRadius: PropTypes.number.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: inheritedColorPropType.isRequired,\n enableRadialLabels: PropTypes.bool.isRequired,\n radialLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n radialLabelsSkipAngle: PropTypes.number,\n radialLabelsTextXOffset: PropTypes.number,\n radialLabelsTextColor: inheritedColorPropType.isRequired,\n radialLabelsLinkOffset: PropTypes.number,\n radialLabelsLinkDiagonalLength: PropTypes.number,\n radialLabelsLinkHorizontalLength: PropTypes.number,\n radialLabelsLinkStrokeWidth: PropTypes.number,\n radialLabelsLinkColor: inheritedColorPropType.isRequired,\n enableSlicesLabels: PropTypes.bool.isRequired,\n sliceLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n slicesLabelsSkipAngle: PropTypes.number,\n slicesLabelsTextColor: inheritedColorPropType.isRequired,\n colors: ordinalColorsPropType.isRequired,\n defs: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired\n })).isRequired,\n fill: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string,\n match: PropTypes.oneOfType([PropTypes.oneOf(['*']), PropTypes.object, PropTypes.func]).isRequired\n })).isRequired,\n isInteractive: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func.isRequired,\n onMouseLeave: PropTypes.func.isRequired,\n lockTooltip: PropTypes.bool.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func,\n legends: PropTypes.arrayOf(PropTypes.shape(LegendPropShape)).isRequired\n};\nvar PieDefaultProps = {\n sortByValue: false,\n innerRadius: 0,\n padAngle: 0,\n cornerRadius: 0,\n startAngle: 0,\n endAngle: radiansToDegrees(Math.PI * 2),\n fit: true,\n borderWidth: 0,\n borderColor: {\n from: 'color',\n modifiers: [['darker', 1]]\n },\n enableRadialLabels: true,\n radialLabel: 'id',\n radialLabelsTextColor: {\n theme: 'labels.text.fill'\n },\n radialLabelsLinkColor: {\n theme: 'axis.ticks.line.stroke'\n },\n enableSlicesLabels: true,\n sliceLabel: 'value',\n slicesLabelsTextColor: {\n theme: 'labels.text.fill'\n },\n colors: {\n scheme: 'nivo'\n },\n defs: [],\n fill: [],\n isInteractive: true,\n onClick: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n lockTooltip: true,\n legends: []\n};\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }\nfunction _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PieSlice = function PieSlice(_ref) {\n var data = _ref.data,\n path = _ref.path,\n color = _ref.color,\n fill = _ref.fill,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip,\n theme = _ref.theme;\n var handleTooltip = function handleTooltip(e) {\n return showTooltip(React.createElement(BasicTooltip, {\n id: data.label,\n value: data.value,\n enableChip: true,\n color: color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread$1({\n color: color\n }, data)) : null\n }), e);\n };\n var handleMouseEnter = function handleMouseEnter(e) {\n onMouseEnter(data, e);\n handleTooltip(e);\n };\n var handleMouseLeave = function handleMouseLeave(e) {\n onMouseLeave(data, e);\n hideTooltip(e);\n };\n return React.createElement(\"path\", {\n key: data.id,\n d: path,\n fill: fill,\n strokeWidth: borderWidth,\n stroke: borderColor,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleTooltip,\n onMouseLeave: handleMouseLeave,\n onClick: onClick\n });\n};\nPieSlice.propTypes = {\n data: PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired\n }).isRequired,\n path: PropTypes.string.isRequired,\n color: PropTypes.string.isRequired,\n fill: PropTypes.string.isRequired,\n borderWidth: PropTypes.number.isRequired,\n borderColor: PropTypes.string.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func,\n showTooltip: PropTypes.func.isRequired,\n hideTooltip: PropTypes.func.isRequired,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n theme: PropTypes.shape({\n tooltip: PropTypes.shape({}).isRequired\n }).isRequired\n};\nvar enhance$1 = compose(withPropsOnChange(['data', 'onClick'], function (_ref2) {\n var data = _ref2.data,\n _onClick = _ref2.onClick;\n return {\n onClick: function onClick(event) {\n return _onClick(data, event);\n }\n };\n}), pure);\nvar PieSlice$1 = enhance$1(PieSlice);\n\nvar computeRadialLabels = function computeRadialLabels(arcs, _ref) {\n var getLabel = _ref.getLabel,\n radius = _ref.radius,\n skipAngle = _ref.skipAngle,\n linkOffset = _ref.linkOffset,\n linkDiagonalLength = _ref.linkDiagonalLength,\n linkHorizontalLength = _ref.linkHorizontalLength,\n textXOffset = _ref.textXOffset;\n return arcs.filter(function (arc) {\n return skipAngle === 0 || arc.angleDeg > skipAngle;\n }).map(function (arc) {\n var angle = absoluteAngleRadians(midAngle(arc) - Math.PI / 2);\n var positionA = positionFromAngle(angle, radius + linkOffset);\n var positionB = positionFromAngle(angle, radius + linkOffset + linkDiagonalLength);\n var positionC;\n var labelPosition;\n var textAlign;\n if (absoluteAngleDegrees(radiansToDegrees(angle)) < 90 || absoluteAngleDegrees(radiansToDegrees(angle)) >= 270) {\n positionC = {\n x: positionB.x + linkHorizontalLength,\n y: positionB.y\n };\n labelPosition = {\n x: positionB.x + linkHorizontalLength + textXOffset,\n y: positionB.y\n };\n textAlign = 'left';\n } else {\n positionC = {\n x: positionB.x - linkHorizontalLength,\n y: positionB.y\n };\n labelPosition = {\n x: positionB.x - linkHorizontalLength - textXOffset,\n y: positionB.y\n };\n textAlign = 'right';\n }\n return {\n arc: arc,\n text: getLabel(arc.data),\n position: labelPosition,\n align: textAlign,\n line: [positionA, positionB, positionC]\n };\n });\n};\n\nfunction _typeof$1(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$1(obj); }\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }\nfunction _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$1(self); }\nfunction _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }\nfunction _inherits$1(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }\nfunction _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }\nfunction _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar lineGenerator = line().x(function (d) {\n return d.x;\n}).y(function (d) {\n return d.y;\n});\nvar PieRadialLabels =\nfunction (_Component) {\n _inherits$1(PieRadialLabels, _Component);\n function PieRadialLabels() {\n _classCallCheck$1(this, PieRadialLabels);\n return _possibleConstructorReturn$1(this, _getPrototypeOf$1(PieRadialLabels).apply(this, arguments));\n }\n _createClass$1(PieRadialLabels, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n arcs = _this$props.arcs,\n label = _this$props.label,\n radius = _this$props.radius,\n skipAngle = _this$props.skipAngle,\n linkOffset = _this$props.linkOffset,\n linkDiagonalLength = _this$props.linkDiagonalLength,\n linkHorizontalLength = _this$props.linkHorizontalLength,\n linkStrokeWidth = _this$props.linkStrokeWidth,\n textXOffset = _this$props.textXOffset,\n textColor = _this$props.textColor,\n linkColor = _this$props.linkColor,\n theme = _this$props.theme;\n var labels = computeRadialLabels(arcs, {\n getLabel: label,\n radius: radius,\n skipAngle: skipAngle,\n linkOffset: linkOffset,\n linkDiagonalLength: linkDiagonalLength,\n linkHorizontalLength: linkHorizontalLength,\n textXOffset: textXOffset\n });\n return labels.map(function (label) {\n return React.createElement(Fragment, {\n key: label.arc.data.id\n }, React.createElement(\"path\", {\n d: lineGenerator(label.line),\n fill: \"none\",\n style: {\n fill: 'none',\n stroke: linkColor(label.arc, theme)\n },\n strokeWidth: linkStrokeWidth\n }), React.createElement(\"g\", {\n transform: \"translate(\".concat(label.position.x, \", \").concat(label.position.y, \")\")\n }, React.createElement(\"text\", {\n textAnchor: textPropsByEngine.svg.align[label.align],\n dominantBaseline: \"central\",\n style: _objectSpread$2({}, theme.labels.text, {\n fill: textColor(label.arc.data, theme)\n })\n }, label.text)));\n });\n }\n }]);\n return PieRadialLabels;\n}(Component);\n_defineProperty$2(PieRadialLabels, \"propTypes\", {\n arcs: PropTypes.arrayOf(arcPropType).isRequired,\n label: PropTypes.func.isRequired,\n skipAngle: PropTypes.number.isRequired,\n radius: PropTypes.number.isRequired,\n linkOffset: PropTypes.number.isRequired,\n linkDiagonalLength: PropTypes.number.isRequired,\n linkHorizontalLength: PropTypes.number.isRequired,\n linkStrokeWidth: PropTypes.number.isRequired,\n textXOffset: PropTypes.number.isRequired,\n textColor: PropTypes.func.isRequired,\n linkColor: PropTypes.func.isRequired,\n theme: PropTypes.shape({\n axis: axisThemePropType.isRequired,\n labels: labelsThemePropType.isRequired\n }).isRequired\n});\n_defineProperty$2(PieRadialLabels, \"defaultProps\", {\n skipAngle: 0,\n linkOffset: 0,\n linkDiagonalLength: 16,\n linkHorizontalLength: 24,\n linkStrokeWidth: 1,\n textXOffset: 6\n});\n\nfunction _typeof$2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$2(obj); }\nfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }\nfunction _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$2(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); } }\nfunction _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$2(self, call) { if (call && (_typeof$2(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$2(self); }\nfunction _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$2(o) { _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$2(o); }\nfunction _inherits$2(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }\nfunction _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }\nfunction _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar sliceStyle = {\n pointerEvents: 'none'\n};\nvar PieSlicesLabels =\nfunction (_Component) {\n _inherits$2(PieSlicesLabels, _Component);\n function PieSlicesLabels() {\n _classCallCheck$2(this, PieSlicesLabels);\n return _possibleConstructorReturn$2(this, _getPrototypeOf$2(PieSlicesLabels).apply(this, arguments));\n }\n _createClass$2(PieSlicesLabels, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n arcs = _this$props.arcs,\n label = _this$props.label,\n radius = _this$props.radius,\n skipAngle = _this$props.skipAngle,\n innerRadius = _this$props.innerRadius,\n textColor = _this$props.textColor,\n theme = _this$props.theme;\n var centerRadius = innerRadius + (radius - innerRadius) / 2;\n return React.createElement(Fragment, null, arcs.filter(function (arc) {\n return skipAngle === 0 || arc.angleDeg > skipAngle;\n }).map(function (arc) {\n var angle = midAngle(arc) - Math.PI / 2;\n var position = positionFromAngle(angle, centerRadius);\n return React.createElement(\"g\", {\n key: arc.data.id,\n transform: \"translate(\".concat(position.x, \", \").concat(position.y, \")\"),\n style: sliceStyle\n }, React.createElement(\"text\", {\n textAnchor: \"middle\",\n dominantBaseline: \"central\",\n style: _objectSpread$3({}, theme.labels.text, {\n fill: textColor(arc.data, theme)\n })\n }, label(arc.data)));\n }));\n }\n }]);\n return PieSlicesLabels;\n}(Component);\n_defineProperty$3(PieSlicesLabels, \"propTypes\", {\n arcs: PropTypes.arrayOf(arcPropType).isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n skipAngle: PropTypes.number.isRequired,\n radius: PropTypes.number.isRequired,\n innerRadius: PropTypes.number.isRequired,\n textColor: PropTypes.func.isRequired,\n theme: PropTypes.shape({\n labels: labelsThemePropType.isRequired\n }).isRequired\n});\n_defineProperty$3(PieSlicesLabels, \"defaultProps\", {\n skipAngle: 0\n});\n\nfunction _typeof$3(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$3(obj); }\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$3(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); } }\nfunction _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$3(self, call) { if (call && (_typeof$3(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$3(self); }\nfunction _assertThisInitialized$3(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$3(o) { _getPrototypeOf$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$3(o); }\nfunction _inherits$3(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$3(subClass, superClass); }\nfunction _setPrototypeOf$3(o, p) { _setPrototypeOf$3 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$3(o, p); }\nfunction _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PieLegends =\nfunction (_Component) {\n _inherits$3(PieLegends, _Component);\n function PieLegends() {\n _classCallCheck$3(this, PieLegends);\n return _possibleConstructorReturn$3(this, _getPrototypeOf$3(PieLegends).apply(this, arguments));\n }\n _createClass$3(PieLegends, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n width = _this$props.width,\n height = _this$props.height,\n legends = _this$props.legends,\n data = _this$props.data,\n theme = _this$props.theme;\n return legends.map(function (legend, i) {\n return React.createElement(BoxLegendSvg, _extends({\n key: i\n }, legend, {\n containerWidth: width,\n containerHeight: height,\n data: data,\n theme: theme\n }));\n });\n }\n }]);\n return PieLegends;\n}(Component);\n_defineProperty$4(PieLegends, \"propTypes\", {\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n arcs: PropTypes.arrayOf(arcPropType).isRequired,\n data: PropTypes.arrayOf(PropTypes.object).isRequired,\n legends: PropTypes.arrayOf(PropTypes.shape(LegendPropShape)).isRequired,\n theme: themePropType.isRequired\n});\nvar enhance$2 = function enhance(Component) {\n return compose(withPropsOnChange(['arcs'], function (_ref) {\n var arcs = _ref.arcs;\n return {\n data: arcs.map(function (arc) {\n return {\n id: arc.data.id,\n label: arc.data.id,\n color: arc.color,\n fill: arc.fill\n };\n })\n };\n }), pure)(Component);\n};\nvar PieLegends$1 = setDisplayName('PieLegends')(enhance$2(PieLegends));\n\nfunction _typeof$4(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$4(obj); }\nfunction _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$4(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); } }\nfunction _createClass$4(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); if (staticProps) _defineProperties$4(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$4(self, call) { if (call && (_typeof$4(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$4(self); }\nfunction _assertThisInitialized$4(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$4(o) { _getPrototypeOf$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$4(o); }\nfunction _inherits$4(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$4(subClass, superClass); }\nfunction _setPrototypeOf$4(o, p) { _setPrototypeOf$4 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$4(o, p); }\nfunction _defineProperty$5(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar Pie =\nfunction (_Component) {\n _inherits$4(Pie, _Component);\n function Pie() {\n _classCallCheck$4(this, Pie);\n return _possibleConstructorReturn$4(this, _getPrototypeOf$4(Pie).apply(this, arguments));\n }\n _createClass$4(Pie, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n data = _this$props.data,\n sortByValue = _this$props.sortByValue,\n startAngle = _this$props.startAngle,\n endAngle = _this$props.endAngle,\n padAngle = _this$props.padAngle,\n fit = _this$props.fit,\n innerRadius = _this$props.innerRadius,\n cornerRadius = _this$props.cornerRadius,\n margin = _this$props.margin,\n width = _this$props.width,\n height = _this$props.height,\n outerWidth = _this$props.outerWidth,\n outerHeight = _this$props.outerHeight,\n colors = _this$props.colors,\n colorBy = _this$props.colorBy,\n borderWidth = _this$props.borderWidth,\n _borderColor = _this$props.borderColor,\n enableRadialLabels = _this$props.enableRadialLabels,\n getRadialLabel = _this$props.getRadialLabel,\n radialLabelsSkipAngle = _this$props.radialLabelsSkipAngle,\n radialLabelsLinkOffset = _this$props.radialLabelsLinkOffset,\n radialLabelsLinkDiagonalLength = _this$props.radialLabelsLinkDiagonalLength,\n radialLabelsLinkHorizontalLength = _this$props.radialLabelsLinkHorizontalLength,\n radialLabelsLinkStrokeWidth = _this$props.radialLabelsLinkStrokeWidth,\n radialLabelsTextXOffset = _this$props.radialLabelsTextXOffset,\n radialLabelsTextColor = _this$props.radialLabelsTextColor,\n radialLabelsLinkColor = _this$props.radialLabelsLinkColor,\n enableSlicesLabels = _this$props.enableSlicesLabels,\n getSliceLabel = _this$props.getSliceLabel,\n slicesLabelsSkipAngle = _this$props.slicesLabelsSkipAngle,\n slicesLabelsTextColor = _this$props.slicesLabelsTextColor,\n theme = _this$props.theme,\n defs = _this$props.defs,\n fill = _this$props.fill,\n isInteractive = _this$props.isInteractive,\n onClick = _this$props.onClick,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseLeave = _this$props.onMouseLeave,\n tooltipFormat = _this$props.tooltipFormat,\n tooltip = _this$props.tooltip,\n legends = _this$props.legends;\n var borderColor = getInheritedColorGenerator(_borderColor, theme);\n return React.createElement(PieLayout$1, {\n width: width,\n height: height,\n data: data,\n sortByValue: sortByValue,\n startAngle: startAngle,\n endAngle: endAngle,\n fit: fit,\n padAngle: padAngle,\n innerRadius: innerRadius,\n cornerRadius: cornerRadius,\n colors: colors,\n colorBy: colorBy\n }, function (_ref) {\n var centerX = _ref.centerX,\n centerY = _ref.centerY,\n radius = _ref.radius,\n innerRadius = _ref.innerRadius,\n arcs = _ref.arcs,\n arcGenerator = _ref.arcGenerator;\n var boundDefs = bindDefs(defs, arcs, fill, {\n dataKey: 'data'\n });\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function (_ref2) {\n var showTooltip = _ref2.showTooltip,\n hideTooltip = _ref2.hideTooltip;\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n defs: boundDefs,\n theme: theme\n }, React.createElement(\"g\", {\n transform: \"translate(\".concat(centerX, \",\").concat(centerY, \")\")\n }, arcs.map(function (arc) {\n return React.createElement(PieSlice$1, {\n key: arc.data.id,\n data: arc.data,\n path: arcGenerator(arc),\n color: arc.color,\n fill: arc.fill ? arc.fill : arc.color,\n borderWidth: borderWidth,\n borderColor: borderColor(arc),\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n tooltipFormat: tooltipFormat,\n tooltip: tooltip,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n theme: theme\n });\n }), enableRadialLabels && React.createElement(PieRadialLabels, {\n arcs: arcs,\n radius: radius,\n label: getRadialLabel,\n skipAngle: radialLabelsSkipAngle,\n linkOffset: radialLabelsLinkOffset,\n linkDiagonalLength: radialLabelsLinkDiagonalLength,\n linkHorizontalLength: radialLabelsLinkHorizontalLength,\n linkStrokeWidth: radialLabelsLinkStrokeWidth,\n textXOffset: radialLabelsTextXOffset,\n textColor: getInheritedColorGenerator(radialLabelsTextColor, theme),\n linkColor: getInheritedColorGenerator(radialLabelsLinkColor, theme),\n theme: theme\n }), enableSlicesLabels && React.createElement(PieSlicesLabels, {\n arcs: arcs,\n radius: radius,\n innerRadius: innerRadius,\n theme: theme,\n label: getSliceLabel,\n skipAngle: slicesLabelsSkipAngle,\n textColor: getInheritedColorGenerator(slicesLabelsTextColor, theme)\n })), React.createElement(PieLegends$1, {\n width: width,\n height: height,\n arcs: arcs,\n legends: legends,\n theme: theme\n }));\n });\n });\n }\n }]);\n return Pie;\n}(Component);\n_defineProperty$5(Pie, \"propTypes\", PiePropTypes);\nvar enhance$3 = function enhance(Component) {\n return compose(defaultProps(PieDefaultProps), withTheme(), withDimensions(), withPropsOnChange(['radialLabel'], function (_ref3) {\n var radialLabel = _ref3.radialLabel;\n return {\n getRadialLabel: getLabelGenerator(radialLabel)\n };\n }), withPropsOnChange(['sliceLabel'], function (_ref4) {\n var sliceLabel = _ref4.sliceLabel;\n return {\n getSliceLabel: getLabelGenerator(sliceLabel)\n };\n }), pure)(Component);\n};\nvar Pie$1 = setDisplayName('Pie')(enhance$3(Pie));\n\nfunction _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }\nvar ResponsivePie = function ResponsivePie(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Pie$1, _extends$1({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar enhance$4 = (function (Component) {\n return compose(defaultProps(PieDefaultProps), withTheme(), withDimensions(), pure)(Component);\n});\n\nfunction _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$6(target, key, source[key]); }); } return target; }\nfunction _defineProperty$6(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar drawSliceLabels = function drawSliceLabels(ctx, arcs, _ref) {\n var arcGenerator = _ref.arcGenerator,\n getLabel = _ref.getLabel,\n skipAngle = _ref.skipAngle,\n getTextColor = _ref.getTextColor,\n theme = _ref.theme;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n arcs.filter(function (arc) {\n return skipAngle === 0 || arc.angleDeg > skipAngle;\n }).forEach(function (arc) {\n var _arcGenerator$centroi = arcGenerator.centroid(arc),\n _arcGenerator$centroi2 = _slicedToArray(_arcGenerator$centroi, 2),\n centroidX = _arcGenerator$centroi2[0],\n centroidY = _arcGenerator$centroi2[1];\n var sliceLabel = getLabel(arc.data);\n var textColor = getTextColor(arc, theme);\n ctx.save();\n ctx.translate(centroidX, centroidY);\n ctx.fillStyle = textColor;\n ctx.fillText(sliceLabel, 0, 0);\n ctx.restore();\n });\n};\nvar drawRadialLabels = function drawRadialLabels(ctx, arcs, _ref2) {\n var radius = _ref2.radius,\n getLabel = _ref2.getLabel,\n skipAngle = _ref2.skipAngle,\n linkOffset = _ref2.linkOffset,\n linkDiagonalLength = _ref2.linkDiagonalLength,\n linkHorizontalLength = _ref2.linkHorizontalLength,\n linkStrokeWidth = _ref2.linkStrokeWidth,\n textXOffset = _ref2.textXOffset,\n getTextColor = _ref2.getTextColor,\n getLinkColor = _ref2.getLinkColor,\n theme = _ref2.theme;\n var radialLabels = computeRadialLabels(arcs, {\n getLabel: getLabel,\n radius: radius,\n skipAngle: skipAngle,\n linkOffset: linkOffset,\n linkDiagonalLength: linkDiagonalLength,\n linkHorizontalLength: linkHorizontalLength,\n textXOffset: textXOffset\n });\n ctx.textBaseline = 'middle';\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n radialLabels.forEach(function (label) {\n var dataWithColor = _objectSpread$4({}, label.arc.data, {\n color: label.arc.color\n });\n ctx.save();\n ctx.translate(label.position.x, label.position.y);\n ctx.fillStyle = getTextColor(dataWithColor, theme);\n ctx.textAlign = textPropsByEngine.canvas.align[label.align];\n ctx.fillText(label.text, 0, 0);\n ctx.restore();\n ctx.beginPath();\n ctx.strokeStyle = getLinkColor(dataWithColor, theme);\n ctx.lineWidth = linkStrokeWidth;\n label.line.forEach(function (point, index) {\n if (index === 0) ctx.moveTo(point.x, point.y);else ctx.lineTo(point.x, point.y);\n });\n if (linkStrokeWidth > 0) ctx.stroke();\n });\n};\n\nfunction _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$7(target, key, source[key]); }); } return target; }\nfunction _defineProperty$7(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PieTooltip = function PieTooltip(_ref) {\n var data = _ref.data,\n color = _ref.color,\n tooltipFormat = _ref.tooltipFormat,\n tooltip = _ref.tooltip,\n theme = _ref.theme;\n return React.createElement(BasicTooltip, {\n id: data.label,\n value: data.value,\n enableChip: true,\n color: color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread$5({\n color: color\n }, data)) : null\n });\n};\nPieTooltip.propTypes = {\n data: PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n label: PropTypes.string.isRequired,\n value: PropTypes.number.isRequired\n }).isRequired,\n color: PropTypes.string.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func,\n theme: PropTypes.shape({\n tooltip: PropTypes.shape({}).isRequired\n }).isRequired\n};\nvar PieTooltip$1 = pure(PieTooltip);\n\nfunction _typeof$5(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$5 = function _typeof(obj) { return typeof obj; }; } else { _typeof$5 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$5(obj); }\nfunction _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$8(target, key, source[key]); }); } return target; }\nfunction _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1(); }\nfunction _nonIterableRest$1() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit$1(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$5(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); } }\nfunction _createClass$5(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$5(Constructor.prototype, protoProps); if (staticProps) _defineProperties$5(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$5(self, call) { if (call && (_typeof$5(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$5(self); }\nfunction _getPrototypeOf$5(o) { _getPrototypeOf$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$5(o); }\nfunction _assertThisInitialized$5(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _inherits$5(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$5(subClass, superClass); }\nfunction _setPrototypeOf$5(o, p) { _setPrototypeOf$5 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$5(o, p); }\nfunction _defineProperty$8(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PieCanvasRenderer =\nfunction (_Component) {\n _inherits$5(PieCanvasRenderer, _Component);\n function PieCanvasRenderer() {\n var _getPrototypeOf2;\n var _this;\n _classCallCheck$5(this, PieCanvasRenderer);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _possibleConstructorReturn$5(this, (_getPrototypeOf2 = _getPrototypeOf$5(PieCanvasRenderer)).call.apply(_getPrototypeOf2, [this].concat(args)));\n _defineProperty$8(_assertThisInitialized$5(_this), \"getArcFromMouse\", function (event) {\n var _getRelativeCursor = getRelativeCursor(_this.surface, event),\n _getRelativeCursor2 = _slicedToArray$1(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n var _this$props = _this.props,\n centerX = _this$props.centerX,\n centerY = _this$props.centerY,\n margin = _this$props.margin,\n radius = _this$props.radius,\n innerRadius = _this$props.innerRadius,\n arcs = _this$props.arcs;\n return getHoveredArc(margin.left + centerX, margin.top + centerY, radius, innerRadius, arcs, x, y);\n });\n _defineProperty$8(_assertThisInitialized$5(_this), \"handleMouseHover\", function (showTooltip, hideTooltip) {\n return function (event) {\n if (_this.props.isInteractive !== true) return;\n var arc = _this.getArcFromMouse(event);\n if (arc) {\n showTooltip(React.createElement(PieTooltip$1, {\n data: arc.data,\n color: arc.color,\n theme: _this.props.theme\n }), event);\n } else {\n hideTooltip();\n }\n };\n });\n _defineProperty$8(_assertThisInitialized$5(_this), \"handleMouseLeave\", function (hideTooltip) {\n return function () {\n if (_this.props.isInteractive !== true) return;\n hideTooltip();\n };\n });\n _defineProperty$8(_assertThisInitialized$5(_this), \"handleClick\", function (event) {\n var arc = _this.getArcFromMouse(event);\n if (arc) _this.props.onClick(arc.data, event);\n });\n return _this;\n }\n _createClass$5(PieCanvasRenderer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(props) {\n if (this.props.outerWidth !== props.outerWidth || this.props.outerHeight !== props.outerHeight || this.props.isInteractive !== props.isInteractive || this.props.theme !== props.theme) {\n return true;\n }\n this.draw(props);\n return false;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"draw\",\n value: function draw(props) {\n var _this2 = this;\n var arcs = props.arcs,\n arcGenerator = props.arcGenerator,\n width = props.width,\n height = props.height,\n centerX = props.centerX,\n centerY = props.centerY,\n radius = props.radius,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n pixelRatio = props.pixelRatio,\n margin = props.margin,\n borderWidth = props.borderWidth,\n borderColor = props.borderColor,\n enableSlicesLabels = props.enableSlicesLabels,\n enableRadialLabels = props.enableRadialLabels,\n legends = props.legends,\n theme = props.theme;\n this.surface.width = outerWidth * pixelRatio;\n this.surface.height = outerHeight * pixelRatio;\n this.ctx.scale(pixelRatio, pixelRatio);\n this.ctx.fillStyle = theme.background;\n this.ctx.fillRect(0, 0, outerWidth, outerHeight);\n this.ctx.save();\n this.ctx.translate(margin.left, margin.top);\n arcGenerator.context(this.ctx);\n this.ctx.save();\n this.ctx.translate(centerX, centerY);\n var getBorderColor = getInheritedColorGenerator(borderColor, theme);\n arcs.forEach(function (arc) {\n _this2.ctx.beginPath();\n _this2.ctx.fillStyle = arc.color;\n _this2.ctx.strokeStyle = getBorderColor(_objectSpread$6({}, arc.data, {\n color: arc.color\n }));\n _this2.ctx.lineWidth = borderWidth;\n arcGenerator(arc);\n _this2.ctx.fill();\n if (borderWidth > 0) _this2.ctx.stroke();\n });\n if (enableSlicesLabels === true) {\n var sliceLabel = props.sliceLabel,\n slicesLabelsSkipAngle = props.slicesLabelsSkipAngle,\n slicesLabelsTextColor = props.slicesLabelsTextColor;\n drawSliceLabels(this.ctx, arcs, {\n arcGenerator: arcGenerator,\n skipAngle: slicesLabelsSkipAngle,\n getLabel: getLabelGenerator(sliceLabel),\n getTextColor: getInheritedColorGenerator(slicesLabelsTextColor, theme),\n theme: theme\n });\n }\n if (enableRadialLabels === true) {\n var radialLabel = props.radialLabel,\n radialLabelsSkipAngle = props.radialLabelsSkipAngle,\n radialLabelsLinkOffset = props.radialLabelsLinkOffset,\n radialLabelsLinkStrokeWidth = props.radialLabelsLinkStrokeWidth,\n radialLabelsLinkDiagonalLength = props.radialLabelsLinkDiagonalLength,\n radialLabelsLinkHorizontalLength = props.radialLabelsLinkHorizontalLength,\n radialLabelsTextXOffset = props.radialLabelsTextXOffset,\n radialLabelsTextColor = props.radialLabelsTextColor,\n radialLabelsLinkColor = props.radialLabelsLinkColor;\n drawRadialLabels(this.ctx, arcs, {\n radius: radius,\n getLabel: getLabelGenerator(radialLabel),\n skipAngle: radialLabelsSkipAngle,\n linkOffset: radialLabelsLinkOffset,\n linkDiagonalLength: radialLabelsLinkDiagonalLength,\n linkHorizontalLength: radialLabelsLinkHorizontalLength,\n linkStrokeWidth: radialLabelsLinkStrokeWidth,\n textXOffset: radialLabelsTextXOffset,\n getTextColor: getInheritedColorGenerator(radialLabelsTextColor, theme),\n getLinkColor: getInheritedColorGenerator(radialLabelsLinkColor, theme),\n theme: theme\n });\n }\n this.ctx.restore();\n legends.forEach(function (legend) {\n renderLegendToCanvas(_this2.ctx, _objectSpread$6({}, legend, {\n data: arcs.map(function (arc) {\n return {\n id: arc.data.id,\n label: arc.data.id,\n color: arc.color\n };\n }),\n containerWidth: width,\n containerHeight: height,\n theme: theme\n }));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var _this$props2 = this.props,\n outerWidth = _this$props2.outerWidth,\n outerHeight = _this$props2.outerHeight,\n pixelRatio = _this$props2.pixelRatio,\n isInteractive = _this$props2.isInteractive,\n theme = _this$props2.theme;\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function (_ref) {\n var showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip;\n return React.createElement(\"canvas\", {\n ref: function ref(surface) {\n _this3.surface = surface;\n },\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight\n },\n onMouseEnter: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseMove: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseLeave: _this3.handleMouseLeave(hideTooltip),\n onClick: _this3.handleClick\n });\n });\n }\n }]);\n return PieCanvasRenderer;\n}(Component);\n_defineProperty$8(PieCanvasRenderer, \"propTypes\", {\n arcs: PropTypes.arrayOf(arcPropType).isRequired,\n arcGenerator: PropTypes.func.isRequired,\n pixelRatio: PropTypes.number.isRequired,\n outerWidth: PropTypes.number.isRequired,\n outerHeight: PropTypes.number.isRequired,\n centerX: PropTypes.number.isRequired,\n centerY: PropTypes.number.isRequired,\n margin: PropTypes.object.isRequired,\n radius: PropTypes.number.isRequired,\n innerRadius: PropTypes.number.isRequired,\n isInteractive: PropTypes.bool.isRequired,\n onClick: PropTypes.func.isRequired,\n theme: PropTypes.object.isRequired\n});\n\nfunction _typeof$6(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof$6 = function _typeof(obj) { return typeof obj; }; } else { _typeof$6 = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof$6(obj); }\nfunction _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }\nfunction _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _classCallCheck$6(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties$6(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); } }\nfunction _createClass$6(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$6(Constructor.prototype, protoProps); if (staticProps) _defineProperties$6(Constructor, staticProps); return Constructor; }\nfunction _possibleConstructorReturn$6(self, call) { if (call && (_typeof$6(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized$6(self); }\nfunction _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }\nfunction _inherits$6(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$6(subClass, superClass); }\nfunction _setPrototypeOf$6(o, p) { _setPrototypeOf$6 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$6(o, p); }\nfunction _defineProperty$9(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar PieCanvas =\nfunction (_Component) {\n _inherits$6(PieCanvas, _Component);\n function PieCanvas() {\n _classCallCheck$6(this, PieCanvas);\n return _possibleConstructorReturn$6(this, _getPrototypeOf$6(PieCanvas).apply(this, arguments));\n }\n _createClass$6(PieCanvas, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n data = _this$props.data,\n sortByValue = _this$props.sortByValue,\n startAngle = _this$props.startAngle,\n endAngle = _this$props.endAngle,\n fit = _this$props.fit,\n padAngle = _this$props.padAngle,\n innerRadius = _this$props.innerRadius,\n cornerRadius = _this$props.cornerRadius,\n width = _this$props.width,\n height = _this$props.height,\n colors = _this$props.colors,\n colorBy = _this$props.colorBy,\n topProps = _objectWithoutProperties$1(_this$props, [\"data\", \"sortByValue\", \"startAngle\", \"endAngle\", \"fit\", \"padAngle\", \"innerRadius\", \"cornerRadius\", \"width\", \"height\", \"colors\", \"colorBy\"]);\n return React.createElement(PieLayout$1, {\n width: width,\n height: height,\n data: data,\n sortByValue: sortByValue,\n startAngle: startAngle,\n endAngle: endAngle,\n fit: fit,\n padAngle: padAngle,\n innerRadius: innerRadius,\n cornerRadius: cornerRadius,\n colors: colors,\n colorBy: colorBy\n }, function (props) {\n return React.createElement(PieCanvasRenderer, _extends$2({}, topProps, props));\n });\n }\n }]);\n return PieCanvas;\n}(Component);\n_defineProperty$9(PieCanvas, \"propTypes\", PiePropTypes);\nvar PieCanvas$1 = setDisplayName('PieCanvas')(enhance$4(PieCanvas));\n\nfunction _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }\nvar ResponsivePieCanvas = function ResponsivePieCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(PieCanvas$1, _extends$3({\n width: width,\n height: height\n }, props));\n });\n};\n\nfunction _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$a(target, key, source[key]); }); } return target; }\nfunction _defineProperty$a(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar usePie = function usePie(_ref) {\n var data = _ref.data,\n radius = _ref.radius,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? function (v) {\n return v;\n } : _ref$value,\n _ref$startAngle = _ref.startAngle,\n startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle,\n _ref$endAngle = _ref.endAngle,\n endAngle = _ref$endAngle === void 0 ? 360 : _ref$endAngle,\n _ref$innerRadius = _ref.innerRadius,\n innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,\n _ref$cornerRadius = _ref.cornerRadius,\n cornerRadius = _ref$cornerRadius === void 0 ? 0 : _ref$cornerRadius,\n _ref$sortByValue = _ref.sortByValue,\n sortByValue = _ref$sortByValue === void 0 ? false : _ref$sortByValue,\n _ref$padAngle = _ref.padAngle,\n padAngle = _ref$padAngle === void 0 ? 0 : _ref$padAngle;\n var arcGenerator = useMemo(function () {\n return arc().outerRadius(radius).innerRadius(innerRadius).cornerRadius(cornerRadius);\n }, [radius, innerRadius, cornerRadius]);\n var getValue = useMemo(function () {\n return typeof value === 'function' ? value : function (d) {\n return get(d, value);\n };\n }, [value]);\n var pie$1 = useMemo(function () {\n var computedPie = pie().value(getValue).padAngle(degreesToRadians(padAngle)).startAngle(degreesToRadians(startAngle)).endAngle(degreesToRadians(endAngle));\n if (sortByValue !== true) computedPie.sortValues(null);\n return computedPie;\n }, [getValue, padAngle, startAngle, endAngle, sortByValue]);\n var arcs = useMemo(function () {\n return pie$1(data).map(function (arc) {\n var angle = arc.endAngle - (arc.endAngle - arc.startAngle) * 0.5;\n return _objectSpread$7({}, arc, {\n startAngleDeg: radiansToDegrees(angle.startAngle),\n endAngleDeg: radiansToDegrees(arc.endAngle),\n angle: angle,\n angleDeg: radiansToDegrees(angle)\n });\n });\n }, [data, pie$1]);\n return {\n arcs: arcs,\n arcGenerator: arcGenerator\n };\n};\n\nexport { Pie$1 as Pie, PieCanvas$1 as PieCanvas, PieDefaultProps, PieLayout$1 as PieLayout, PiePropTypes, ResponsivePie, ResponsivePieCanvas, arcPropType, usePie };\n","import React, { memo, useState, useMemo, createContext, useCallback, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport Measure from 'react-measure';\nimport { Motion, spring } from 'react-motion';\nimport { useTheme, useMotionConfig, useValueFormatter } from '@nivo/core';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar TOOLTIP_OFFSET = 14;\nvar tooltipStyle = {\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 10,\n top: 0,\n left: 0\n};\nvar TooltipWrapper = memo(function (_ref) {\n var position = _ref.position,\n anchor = _ref.anchor,\n children = _ref.children;\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n dimensions = _useState2[0],\n setDimensions = _useState2[1];\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.springConfig;\n var x = Math.round(position[0]);\n var y = Math.round(position[1]);\n if (dimensions !== null) {\n if (anchor === 'top') {\n x -= dimensions[0] / 2;\n y -= dimensions[1] + TOOLTIP_OFFSET;\n } else if (anchor === 'right') {\n x += TOOLTIP_OFFSET;\n y -= dimensions[1] / 2;\n } else if (anchor === 'bottom') {\n x -= dimensions[0] / 2;\n y += TOOLTIP_OFFSET;\n } else if (anchor === 'left') {\n x -= dimensions[0] + TOOLTIP_OFFSET;\n y -= dimensions[1] / 2;\n } else if (anchor === 'center') {\n x -= dimensions[0] / 2;\n y -= dimensions[1] / 2;\n }\n }\n var style = useMemo(function () {\n return _objectSpread({}, tooltipStyle, theme.tooltip, {\n transform: \"translate(\".concat(x, \"px, \").concat(y, \"px)\"),\n opacity: dimensions === null ? 0 : 1\n });\n }, [x, y, dimensions, theme.tooltip]);\n if (animate !== true || dimensions === null) {\n return React.createElement(Measure, {\n client: false,\n offset: false,\n bounds: true,\n margin: false,\n onResize: function onResize(_ref2) {\n var bounds = _ref2.bounds;\n setDimensions([bounds.width, bounds.height]);\n }\n }, function (_ref3) {\n var measureRef = _ref3.measureRef;\n return React.createElement(\"div\", {\n ref: measureRef,\n style: style\n }, children);\n });\n }\n return React.createElement(Motion, {\n style: {\n x: spring(x, springConfig),\n y: spring(y, springConfig)\n }\n }, function (animatedPosition) {\n return React.createElement(Measure, {\n client: false,\n offset: false,\n bounds: true,\n margin: false,\n onResize: function onResize(_ref4) {\n var bounds = _ref4.bounds;\n setDimensions([bounds.width, bounds.height]);\n }\n }, function (_ref5) {\n var measureRef = _ref5.measureRef;\n return React.createElement(\"div\", {\n ref: measureRef,\n style: _objectSpread({}, tooltipStyle, theme.tooltip, {\n transform: \"translate3d(\".concat(animatedPosition.x, \"px, \").concat(animatedPosition.y, \"px, 0)\")\n })\n }, children);\n });\n });\n});\nTooltipWrapper.displayName = 'TooltipWrapper';\nTooltipWrapper.propTypes = {\n position: PropTypes.array.isRequired,\n anchor: PropTypes.oneOf(['top', 'right', 'bottom', 'left', 'center']).isRequired,\n children: PropTypes.node.isRequired\n};\nTooltipWrapper.defaultProps = {\n anchor: 'top'\n};\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }\nfunction _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar Chip = memo(function (_ref) {\n var size = _ref.size,\n color = _ref.color,\n style = _ref.style;\n return React.createElement(\"span\", {\n style: _objectSpread$1({\n display: 'block',\n width: size,\n height: size,\n background: color\n }, style)\n });\n});\nChip.propTypes = {\n size: PropTypes.number.isRequired,\n color: PropTypes.string.isRequired,\n style: PropTypes.object.isRequired\n};\nChip.defaultProps = {\n size: 12,\n style: {}\n};\nChip.displayName = 'Chip';\n\nvar BasicTooltip = memo(function (_ref) {\n var id = _ref.id,\n _value = _ref.value,\n format = _ref.format,\n enableChip = _ref.enableChip,\n color = _ref.color,\n renderContent = _ref.renderContent;\n var theme = useTheme();\n var formatValue = useValueFormatter(format);\n var content;\n if (typeof renderContent === 'function') {\n content = renderContent();\n } else {\n var value = _value;\n if (formatValue !== undefined && value !== undefined) {\n value = formatValue(value);\n }\n content = React.createElement(\"div\", {\n style: theme.tooltip.basic\n }, enableChip && React.createElement(Chip, {\n color: color,\n style: theme.tooltip.chip\n }), value !== undefined ? React.createElement(\"span\", null, id, \": \", React.createElement(\"strong\", null, isNaN(value) ? String(value) : value)) : id);\n }\n return React.createElement(\"div\", {\n style: theme.tooltip.container\n }, content);\n});\nBasicTooltip.displayName = 'BasicTooltip';\nBasicTooltip.propTypes = {\n id: PropTypes.node.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n enableChip: PropTypes.bool.isRequired,\n color: PropTypes.string,\n format: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n renderContent: PropTypes.func\n};\nBasicTooltip.defaultProps = {\n enableChip: false\n};\n\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }\nfunction _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar tableStyle = {\n width: '100%',\n borderCollapse: 'collapse'\n};\nvar TableTooltip = memo(function (_ref) {\n var title = _ref.title,\n rows = _ref.rows,\n renderContent = _ref.renderContent;\n var theme = useTheme();\n if (!rows.length) return null;\n var content;\n if (typeof renderContent === 'function') {\n content = renderContent();\n } else {\n content = React.createElement(\"div\", null, title && title, React.createElement(\"table\", {\n style: _objectSpread$2({}, tableStyle, theme.tooltip.table)\n }, React.createElement(\"tbody\", null, rows.map(function (row, i) {\n return React.createElement(\"tr\", {\n key: i\n }, row.map(function (column, j) {\n return React.createElement(\"td\", {\n key: j,\n style: theme.tooltip.tableCell\n }, column);\n }));\n }))));\n }\n return React.createElement(\"div\", {\n style: theme.tooltip.container\n }, content);\n});\nTableTooltip.propTypes = {\n title: PropTypes.node,\n rows: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.node)).isRequired,\n renderContent: PropTypes.func\n};\nTableTooltip.displayName = 'TableTooltip';\n\nvar crosshairTypes = ['x', 'y', 'top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'cross'];\nvar crosshairPropTypes = {\n type: PropTypes.oneOf(crosshairTypes)\n};\n\nfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }\nfunction _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar CrosshairLine = memo(function (_ref) {\n var x0 = _ref.x0,\n x1 = _ref.x1,\n y0 = _ref.y0,\n y1 = _ref.y1;\n var theme = useTheme();\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.springConfig;\n var style = useMemo(function () {\n return _objectSpread$3({}, theme.crosshair.line, {\n pointerEvents: 'none'\n });\n }, [theme.crosshair.line]);\n if (animate !== true) {\n return React.createElement(\"line\", {\n x1: x0,\n x2: x1,\n y1: y0,\n y2: y1,\n fill: \"none\",\n style: style\n });\n }\n return React.createElement(Motion, {\n style: {\n x0: spring(x0, springConfig),\n x1: spring(x1, springConfig),\n y0: spring(y0, springConfig),\n y1: spring(y1, springConfig)\n }\n }, function (line) {\n return React.createElement(\"line\", {\n x1: line.x0,\n x2: line.x1,\n y1: line.y0,\n y2: line.y1,\n fill: \"none\",\n style: style\n });\n });\n});\nCrosshairLine.displayName = 'CrosshairLine';\nCrosshairLine.propTypes = {\n x0: PropTypes.number.isRequired,\n x1: PropTypes.number.isRequired,\n y0: PropTypes.number.isRequired,\n y1: PropTypes.number.isRequired\n};\n\nvar Crosshair = memo(function (_ref) {\n var width = _ref.width,\n height = _ref.height,\n type = _ref.type,\n x = _ref.x,\n y = _ref.y;\n var xLine;\n var yLine;\n if (type === 'cross') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: height\n };\n yLine = {\n x0: 0,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'top-left') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: y\n };\n yLine = {\n x0: 0,\n x1: x,\n y0: y,\n y1: y\n };\n } else if (type === 'top') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: y\n };\n } else if (type === 'top-right') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: y\n };\n yLine = {\n x0: x,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'right') {\n yLine = {\n x0: x,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'bottom-right') {\n xLine = {\n x0: x,\n x1: x,\n y0: y,\n y1: height\n };\n yLine = {\n x0: x,\n x1: width,\n y0: y,\n y1: y\n };\n } else if (type === 'bottom') {\n xLine = {\n x0: x,\n x1: x,\n y0: y,\n y1: height\n };\n } else if (type === 'bottom-left') {\n xLine = {\n x0: x,\n x1: x,\n y0: y,\n y1: height\n };\n yLine = {\n x0: 0,\n x1: x,\n y0: y,\n y1: y\n };\n } else if (type === 'left') {\n yLine = {\n x0: 0,\n x1: x,\n y0: y,\n y1: y\n };\n } else if (type === 'x') {\n xLine = {\n x0: x,\n x1: x,\n y0: 0,\n y1: height\n };\n } else if (type === 'y') {\n yLine = {\n x0: 0,\n x1: width,\n y0: y,\n y1: y\n };\n }\n return React.createElement(React.Fragment, null, xLine && React.createElement(CrosshairLine, {\n x0: xLine.x0,\n x1: xLine.x1,\n y0: xLine.y0,\n y1: xLine.y1\n }), yLine && React.createElement(CrosshairLine, {\n x0: yLine.x0,\n x1: yLine.x1,\n y0: yLine.y0,\n y1: yLine.y1\n }));\n});\nCrosshair.displayName = 'Crosshair';\nCrosshair.propTypes = {\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n type: crosshairPropTypes.type.isRequired\n};\nCrosshair.defaultProps = {\n type: 'cross'\n};\n\nvar tooltipContext = createContext();\n\nfunction _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1(); }\nfunction _nonIterableRest$1() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\nfunction _iterableToArrayLimit$1(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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; }\nfunction _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }\nvar useTooltipHandlers = function useTooltipHandlers(container) {\n var _useState = useState({\n isVisible: false,\n content: null,\n position: {}\n }),\n _useState2 = _slicedToArray$1(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n var showTooltipAt = useCallback(function (content, _ref, anchor) {\n var _ref2 = _slicedToArray$1(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n setState({\n isVisible: true,\n position: [x, y],\n anchor: anchor,\n content: content\n });\n }, []);\n var showTooltipFromEvent = useCallback(function (content, event, anchor) {\n var bounds = container.current.getBoundingClientRect();\n var x = event.clientX - bounds.left;\n var y = event.clientY - bounds.top;\n if (anchor === 'left' || anchor === 'right') {\n if (x < bounds.width / 2) anchor = 'right';else anchor = 'left';\n }\n setState({\n isVisible: true,\n position: [x, y],\n anchor: anchor,\n content: content\n });\n }, [container]);\n var hideTooltip = useCallback(function () {\n setState({\n isVisible: false,\n content: null\n });\n });\n return {\n showTooltipAt: showTooltipAt,\n showTooltipFromEvent: showTooltipFromEvent,\n hideTooltip: hideTooltip,\n isTooltipVisible: state.isVisible,\n tooltipPosition: state.position,\n tooltipAnchor: state.anchor,\n tooltipContent: state.content\n };\n};\nvar useTooltip = function useTooltip() {\n return useContext(tooltipContext);\n};\n\nexport { BasicTooltip, Chip, Crosshair, TableTooltip, TooltipWrapper, crosshairPropTypes, crosshairTypes, tooltipContext, useTooltip, useTooltipHandlers };\n","var __accessCheck = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet = (obj, member, getter) => {\n __accessCheck(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd = (obj, member, value) => {\n if (member.has(obj))\n throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet = (obj, member, value, setter) => {\n __accessCheck(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar __privateWrapper = (obj, member, setter, getter) => ({\n set _(value) {\n __privateSet(obj, member, value, setter);\n },\n get _() {\n return __privateGet(obj, member, getter);\n }\n});\nvar __privateMethod = (obj, member, method) => {\n __accessCheck(obj, member, \"access private method\");\n return method;\n};\n\nexport {\n __privateGet,\n __privateAdd,\n __privateSet,\n __privateWrapper,\n __privateMethod\n};\n//# sourceMappingURL=chunk-2HYBKCYP.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/focusManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar _focused, _cleanup, _setup;\nvar FocusManager = class extends Subscribable {\n constructor() {\n super();\n __privateAdd(this, _focused, void 0);\n __privateAdd(this, _cleanup, void 0);\n __privateAdd(this, _setup, void 0);\n __privateSet(this, _setup, (onFocus) => {\n if (!isServer && window.addEventListener) {\n const listener = () => onFocus();\n window.addEventListener(\"visibilitychange\", listener, false);\n return () => {\n window.removeEventListener(\"visibilitychange\", listener);\n };\n }\n return;\n });\n }\n onSubscribe() {\n if (!__privateGet(this, _cleanup)) {\n this.setEventListener(__privateGet(this, _setup));\n }\n }\n onUnsubscribe() {\n var _a;\n if (!this.hasListeners()) {\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, void 0);\n }\n }\n setEventListener(setup) {\n var _a;\n __privateSet(this, _setup, setup);\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, setup((focused) => {\n if (typeof focused === \"boolean\") {\n this.setFocused(focused);\n } else {\n this.onFocus();\n }\n }));\n }\n setFocused(focused) {\n const changed = __privateGet(this, _focused) !== focused;\n if (changed) {\n __privateSet(this, _focused, focused);\n this.onFocus();\n }\n }\n onFocus() {\n this.listeners.forEach((listener) => {\n listener();\n });\n }\n isFocused() {\n var _a;\n if (typeof __privateGet(this, _focused) === \"boolean\") {\n return __privateGet(this, _focused);\n }\n return ((_a = globalThis.document) == null ? void 0 : _a.visibilityState) !== \"hidden\";\n }\n};\n_focused = new WeakMap();\n_cleanup = new WeakMap();\n_setup = new WeakMap();\nvar focusManager = new FocusManager();\nexport {\n FocusManager,\n focusManager\n};\n//# sourceMappingURL=focusManager.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/hydration.ts\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state,\n ...mutation.meta && { meta: mutation.meta }\n };\n}\nfunction dehydrateQuery(query) {\n return {\n state: query.state,\n queryKey: query.queryKey,\n queryHash: query.queryHash,\n ...query.meta && { meta: query.meta }\n };\n}\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === \"success\";\n}\nfunction dehydrate(client, options = {}) {\n const filterMutation = options.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;\n const mutations = client.getMutationCache().getAll().flatMap(\n (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []\n );\n const filterQuery = options.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;\n const queries = client.getQueryCache().getAll().flatMap((query) => filterQuery(query) ? [dehydrateQuery(query)] : []);\n return { mutations, queries };\n}\nfunction hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== \"object\" || dehydratedState === null) {\n return;\n }\n const mutationCache = client.getMutationCache();\n const queryCache = client.getQueryCache();\n const mutations = dehydratedState.mutations || [];\n const queries = dehydratedState.queries || [];\n mutations.forEach((dehydratedMutation) => {\n var _a;\n mutationCache.build(\n client,\n {\n ...(_a = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _a.mutations,\n mutationKey: dehydratedMutation.mutationKey,\n meta: dehydratedMutation.meta\n },\n dehydratedMutation.state\n );\n });\n queries.forEach(({ queryKey, state, queryHash, meta }) => {\n var _a;\n const query = queryCache.get(queryHash);\n if (query) {\n if (query.state.dataUpdatedAt < state.dataUpdatedAt) {\n const { fetchStatus: _ignored, ...dehydratedQueryState } = state;\n query.setState(dehydratedQueryState);\n }\n return;\n }\n queryCache.build(\n client,\n {\n ...(_a = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _a.queries,\n queryKey,\n queryHash,\n meta\n },\n // Reset fetch status to idle to avoid\n // query being stuck in fetching state upon hydration\n {\n ...state,\n fetchStatus: \"idle\"\n }\n );\n });\n}\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate\n};\n//# sourceMappingURL=hydration.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/index.ts\nimport { CancelledError } from \"./retryer.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { QueryClient } from \"./queryClient.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\nimport { QueriesObserver } from \"./queriesObserver.js\";\nimport { InfiniteQueryObserver } from \"./infiniteQueryObserver.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { MutationObserver } from \"./mutationObserver.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport {\n hashKey,\n replaceEqualDeep,\n isServer,\n matchQuery,\n matchMutation,\n keepPreviousData,\n skipToken\n} from \"./utils.js\";\nimport { isCancelledError } from \"./retryer.js\";\nimport {\n dehydrate,\n hydrate,\n defaultShouldDehydrateQuery,\n defaultShouldDehydrateMutation\n} from \"./hydration.js\";\nexport * from \"./types.js\";\nimport { Query } from \"./query.js\";\nexport {\n CancelledError,\n InfiniteQueryObserver,\n MutationCache,\n MutationObserver,\n QueriesObserver,\n Query,\n QueryCache,\n QueryClient,\n QueryObserver,\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n focusManager,\n hashKey,\n hydrate,\n isCancelledError,\n isServer,\n keepPreviousData,\n matchMutation,\n matchQuery,\n notifyManager,\n onlineManager,\n replaceEqualDeep,\n skipToken\n};\n//# sourceMappingURL=index.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/infiniteQueryBehavior.ts\nimport { addToEnd, addToStart, skipToken } from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const fetchFn = async () => {\n var _a, _b, _c, _d, _e;\n const options = context.options;\n const direction = (_c = (_b = (_a = context.fetchOptions) == null ? void 0 : _a.meta) == null ? void 0 : _b.fetchMore) == null ? void 0 : _c.direction;\n const oldPages = ((_d = context.state.data) == null ? void 0 : _d.pages) || [];\n const oldPageParams = ((_e = context.state.data) == null ? void 0 : _e.pageParams) || [];\n const empty = { pages: [], pageParams: [] };\n let cancelled = false;\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n if (context.signal.aborted) {\n cancelled = true;\n } else {\n context.signal.addEventListener(\"abort\", () => {\n cancelled = true;\n });\n }\n return context.signal;\n }\n });\n };\n const queryFn = context.options.queryFn && context.options.queryFn !== skipToken ? context.options.queryFn : () => {\n if (process.env.NODE_ENV !== \"production\") {\n if (context.options.queryFn === skipToken) {\n console.error(\n `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${context.options.queryHash}'`\n );\n }\n }\n return Promise.reject(\n new Error(`Missing queryFn: '${context.options.queryHash}'`)\n );\n };\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject();\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const page = await queryFn(\n queryFnContext\n );\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\n let result;\n if (direction && oldPages.length) {\n const previous = direction === \"backward\";\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams\n };\n const param = pageParamFn(options, oldData);\n result = await fetchPage(oldData, param, previous);\n } else {\n result = await fetchPage(\n empty,\n oldPageParams[0] ?? options.initialPageParam\n );\n const remainingPages = pages ?? oldPages.length;\n for (let i = 1; i < remainingPages; i++) {\n const param = getNextPageParam(options, result);\n result = await fetchPage(result, param);\n }\n }\n return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n var _a, _b;\n return (_b = (_a = context.options).persister) == null ? void 0 : _b.call(\n _a,\n fetchFn,\n {\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal\n },\n query\n );\n };\n } else {\n context.fetchFn = fetchFn;\n }\n }\n };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n );\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n var _a;\n return (_a = options.getPreviousPageParam) == null ? void 0 : _a.call(\n options,\n pages[0],\n pages,\n pageParams[0],\n pageParams\n );\n}\nfunction hasNextPage(options, data) {\n if (!data)\n return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam)\n return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/infiniteQueryObserver.ts\nimport { QueryObserver } from \"./queryObserver.js\";\nimport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n} from \"./infiniteQueryBehavior.js\";\nvar InfiniteQueryObserver = class extends QueryObserver {\n constructor(client, options) {\n super(client, options);\n }\n bindMethods() {\n super.bindMethods();\n this.fetchNextPage = this.fetchNextPage.bind(this);\n this.fetchPreviousPage = this.fetchPreviousPage.bind(this);\n }\n setOptions(options, notifyOptions) {\n super.setOptions(\n {\n ...options,\n behavior: infiniteQueryBehavior()\n },\n notifyOptions\n );\n }\n getOptimisticResult(options) {\n options.behavior = infiniteQueryBehavior();\n return super.getOptimisticResult(options);\n }\n fetchNextPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"forward\" }\n }\n });\n }\n fetchPreviousPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"backward\" }\n }\n });\n }\n createResult(query, options) {\n var _a, _b, _c, _d;\n const { state } = query;\n const result = super.createResult(query, options);\n const { isFetching, isRefetching } = result;\n const isFetchingNextPage = isFetching && ((_b = (_a = state.fetchMeta) == null ? void 0 : _a.fetchMore) == null ? void 0 : _b.direction) === \"forward\";\n const isFetchingPreviousPage = isFetching && ((_d = (_c = state.fetchMeta) == null ? void 0 : _c.fetchMore) == null ? void 0 : _d.direction) === \"backward\";\n return {\n ...result,\n fetchNextPage: this.fetchNextPage,\n fetchPreviousPage: this.fetchPreviousPage,\n hasNextPage: hasNextPage(options, state.data),\n hasPreviousPage: hasPreviousPage(options, state.data),\n isFetchingNextPage,\n isFetchingPreviousPage,\n isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage\n };\n }\n};\nexport {\n InfiniteQueryObserver\n};\n//# sourceMappingURL=infiniteQueryObserver.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { canFetch, createRetryer } from \"./retryer.js\";\nvar _observers, _defaultOptions, _mutationCache, _retryer, _dispatch, dispatch_fn;\nvar Mutation = class extends Removable {\n constructor(config) {\n super();\n __privateAdd(this, _dispatch);\n __privateAdd(this, _observers, void 0);\n __privateAdd(this, _defaultOptions, void 0);\n __privateAdd(this, _mutationCache, void 0);\n __privateAdd(this, _retryer, void 0);\n this.mutationId = config.mutationId;\n __privateSet(this, _defaultOptions, config.defaultOptions);\n __privateSet(this, _mutationCache, config.mutationCache);\n __privateSet(this, _observers, []);\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = { ...__privateGet(this, _defaultOptions), ...options };\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!__privateGet(this, _observers).includes(observer)) {\n __privateGet(this, _observers).push(observer);\n this.clearGcTimeout();\n __privateGet(this, _mutationCache).notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n __privateSet(this, _observers, __privateGet(this, _observers).filter((x) => x !== observer));\n this.scheduleGc();\n __privateGet(this, _mutationCache).notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!__privateGet(this, _observers).length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n __privateGet(this, _mutationCache).remove(this);\n }\n }\n }\n continue() {\n var _a;\n return ((_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;\n const executeMutation = () => {\n __privateSet(this, _retryer, createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"failed\", failureCount, error });\n },\n onPause: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"pause\" });\n },\n onContinue: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"continue\" });\n },\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode\n }));\n return __privateGet(this, _retryer).promise;\n };\n const restored = this.state.status === \"pending\";\n try {\n if (!restored) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"pending\", variables });\n await ((_b = (_a = __privateGet(this, _mutationCache).config).onMutate) == null ? void 0 : _b.call(\n _a,\n variables,\n this\n ));\n const context = await ((_d = (_c = this.options).onMutate) == null ? void 0 : _d.call(_c, variables));\n if (context !== this.state.context) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, {\n type: \"pending\",\n context,\n variables\n });\n }\n }\n const data = await executeMutation();\n await ((_f = (_e = __privateGet(this, _mutationCache).config).onSuccess) == null ? void 0 : _f.call(\n _e,\n data,\n variables,\n this.state.context,\n this\n ));\n await ((_h = (_g = this.options).onSuccess) == null ? void 0 : _h.call(_g, data, variables, this.state.context));\n await ((_j = (_i = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _j.call(\n _i,\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n ));\n await ((_l = (_k = this.options).onSettled) == null ? void 0 : _l.call(_k, data, null, variables, this.state.context));\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await ((_n = (_m = __privateGet(this, _mutationCache).config).onError) == null ? void 0 : _n.call(\n _m,\n error,\n variables,\n this.state.context,\n this\n ));\n await ((_p = (_o = this.options).onError) == null ? void 0 : _p.call(\n _o,\n error,\n variables,\n this.state.context\n ));\n await ((_r = (_q = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _r.call(\n _q,\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n ));\n await ((_t = (_s = this.options).onSettled) == null ? void 0 : _t.call(\n _s,\n void 0,\n error,\n variables,\n this.state.context\n ));\n throw error;\n } finally {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"error\", error });\n }\n }\n }\n};\n_observers = new WeakMap();\n_defaultOptions = new WeakMap();\n_mutationCache = new WeakMap();\n_retryer = new WeakMap();\n_dispatch = new WeakSet();\ndispatch_fn = function(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: !canFetch(this.options.networkMode),\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n __privateGet(this, _observers).forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n __privateGet(this, _mutationCache).notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet,\n __privateWrapper\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar _mutations, _mutationId, _resuming;\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n __privateAdd(this, _mutations, void 0);\n __privateAdd(this, _mutationId, void 0);\n __privateAdd(this, _resuming, void 0);\n __privateSet(this, _mutations, []);\n __privateSet(this, _mutationId, 0);\n }\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n mutationId: ++__privateWrapper(this, _mutationId)._,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n __privateGet(this, _mutations).push(mutation);\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n __privateSet(this, _mutations, __privateGet(this, _mutations).filter((x) => x !== mutation));\n this.notify({ type: \"removed\", mutation });\n }\n clear() {\n notifyManager.batch(() => {\n __privateGet(this, _mutations).forEach((mutation) => {\n this.remove(mutation);\n });\n });\n }\n getAll() {\n return __privateGet(this, _mutations);\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return __privateGet(this, _mutations).find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return __privateGet(this, _mutations).filter(\n (mutation) => matchMutation(filters, mutation)\n );\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n __privateSet(this, _resuming, (__privateGet(this, _resuming) ?? Promise.resolve()).then(() => {\n const pausedMutations = __privateGet(this, _mutations).filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => pausedMutations.reduce(\n (promise, mutation) => promise.then(() => mutation.continue().catch(noop)),\n Promise.resolve()\n )\n );\n }).then(() => {\n __privateSet(this, _resuming, void 0);\n }));\n return __privateGet(this, _resuming);\n }\n};\n_mutations = new WeakMap();\n_mutationId = new WeakMap();\n_resuming = new WeakMap();\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar _client, _currentResult, _currentMutation, _mutateOptions, _updateResult, updateResult_fn, _notify, notify_fn;\nvar MutationObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n __privateAdd(this, _updateResult);\n __privateAdd(this, _notify);\n __privateAdd(this, _client, void 0);\n __privateAdd(this, _currentResult, void 0);\n __privateAdd(this, _currentMutation, void 0);\n __privateAdd(this, _mutateOptions, void 0);\n __privateSet(this, _client, client);\n this.setOptions(options);\n this.bindMethods();\n __privateMethod(this, _updateResult, updateResult_fn).call(this);\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n var _a;\n const prevOptions = this.options;\n this.options = __privateGet(this, _client).defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n __privateGet(this, _client).getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: __privateGet(this, _currentMutation),\n observer: this\n });\n }\n if ((prevOptions == null ? void 0 : prevOptions.mutationKey) && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else {\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n var _a;\n if (!this.hasListeners()) {\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n __privateMethod(this, _updateResult, updateResult_fn).call(this);\n __privateMethod(this, _notify, notify_fn).call(this, action);\n }\n getCurrentResult() {\n return __privateGet(this, _currentResult);\n }\n reset() {\n var _a;\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.removeObserver(this);\n __privateSet(this, _currentMutation, void 0);\n __privateMethod(this, _updateResult, updateResult_fn).call(this);\n __privateMethod(this, _notify, notify_fn).call(this);\n }\n mutate(variables, options) {\n var _a;\n __privateSet(this, _mutateOptions, options);\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.removeObserver(this);\n __privateSet(this, _currentMutation, __privateGet(this, _client).getMutationCache().build(__privateGet(this, _client), this.options));\n __privateGet(this, _currentMutation).addObserver(this);\n return __privateGet(this, _currentMutation).execute(variables);\n }\n};\n_client = new WeakMap();\n_currentResult = new WeakMap();\n_currentMutation = new WeakMap();\n_mutateOptions = new WeakMap();\n_updateResult = new WeakSet();\nupdateResult_fn = function() {\n var _a;\n const state = ((_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.state) ?? getDefaultState();\n __privateSet(this, _currentResult, {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n });\n};\n_notify = new WeakSet();\nnotify_fn = function(action) {\n notifyManager.batch(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (__privateGet(this, _mutateOptions) && this.hasListeners()) {\n const variables = __privateGet(this, _currentResult).variables;\n const context = __privateGet(this, _currentResult).context;\n if ((action == null ? void 0 : action.type) === \"success\") {\n (_b = (_a = __privateGet(this, _mutateOptions)).onSuccess) == null ? void 0 : _b.call(_a, action.data, variables, context);\n (_d = (_c = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _d.call(_c, action.data, null, variables, context);\n } else if ((action == null ? void 0 : action.type) === \"error\") {\n (_f = (_e = __privateGet(this, _mutateOptions)).onError) == null ? void 0 : _f.call(_e, action.error, variables, context);\n (_h = (_g = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _h.call(\n _g,\n void 0,\n action.error,\n variables,\n context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(__privateGet(this, _currentResult));\n });\n });\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/notifyManager.ts\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n let notifyFn = (callback) => {\n callback();\n };\n let batchNotifyFn = (callback) => {\n callback();\n };\n let scheduleFn = (cb) => setTimeout(cb, 0);\n const setScheduler = (fn) => {\n scheduleFn = fn;\n };\n const batch = (callback) => {\n let result;\n transactions++;\n try {\n result = callback();\n } finally {\n transactions--;\n if (!transactions) {\n flush();\n }\n }\n return result;\n };\n const schedule = (callback) => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleFn(() => {\n notifyFn(callback);\n });\n }\n };\n const batchCalls = (callback) => {\n return (...args) => {\n schedule(() => {\n callback(...args);\n });\n };\n };\n const flush = () => {\n const originalQueue = queue;\n queue = [];\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback);\n });\n });\n });\n }\n };\n const setNotifyFunction = (fn) => {\n notifyFn = fn;\n };\n const setBatchNotifyFunction = (fn) => {\n batchNotifyFn = fn;\n };\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction,\n setScheduler\n };\n}\nvar notifyManager = createNotifyManager();\nexport {\n createNotifyManager,\n notifyManager\n};\n//# sourceMappingURL=notifyManager.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/onlineManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar _online, _cleanup, _setup;\nvar OnlineManager = class extends Subscribable {\n constructor() {\n super();\n __privateAdd(this, _online, true);\n __privateAdd(this, _cleanup, void 0);\n __privateAdd(this, _setup, void 0);\n __privateSet(this, _setup, (onOnline) => {\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true);\n const offlineListener = () => onOnline(false);\n window.addEventListener(\"online\", onlineListener, false);\n window.addEventListener(\"offline\", offlineListener, false);\n return () => {\n window.removeEventListener(\"online\", onlineListener);\n window.removeEventListener(\"offline\", offlineListener);\n };\n }\n return;\n });\n }\n onSubscribe() {\n if (!__privateGet(this, _cleanup)) {\n this.setEventListener(__privateGet(this, _setup));\n }\n }\n onUnsubscribe() {\n var _a;\n if (!this.hasListeners()) {\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, void 0);\n }\n }\n setEventListener(setup) {\n var _a;\n __privateSet(this, _setup, setup);\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, setup(this.setOnline.bind(this)));\n }\n setOnline(online) {\n const changed = __privateGet(this, _online) !== online;\n if (changed) {\n __privateSet(this, _online, online);\n this.listeners.forEach((listener) => {\n listener(online);\n });\n }\n }\n isOnline() {\n return __privateGet(this, _online);\n }\n};\n_online = new WeakMap();\n_cleanup = new WeakMap();\n_setup = new WeakMap();\nvar onlineManager = new OnlineManager();\nexport {\n OnlineManager,\n onlineManager\n};\n//# sourceMappingURL=onlineManager.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/queriesObserver.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { replaceEqualDeep } from \"./utils.js\";\nfunction difference(array1, array2) {\n return array1.filter((x) => !array2.includes(x));\n}\nfunction replaceAt(array, index, value) {\n const copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nvar _client, _result, _queries, _observers, _options, _combinedResult, _setResult, setResult_fn, _combineResult, combineResult_fn, _findMatchingObservers, findMatchingObservers_fn, _onUpdate, onUpdate_fn, _notify, notify_fn;\nvar QueriesObserver = class extends Subscribable {\n constructor(client, queries, options) {\n super();\n __privateAdd(this, _setResult);\n __privateAdd(this, _combineResult);\n __privateAdd(this, _findMatchingObservers);\n __privateAdd(this, _onUpdate);\n __privateAdd(this, _notify);\n __privateAdd(this, _client, void 0);\n __privateAdd(this, _result, void 0);\n __privateAdd(this, _queries, void 0);\n __privateAdd(this, _observers, void 0);\n __privateAdd(this, _options, void 0);\n __privateAdd(this, _combinedResult, void 0);\n __privateSet(this, _client, client);\n __privateSet(this, _queries, []);\n __privateSet(this, _observers, []);\n __privateMethod(this, _setResult, setResult_fn).call(this, []);\n this.setQueries(queries, options);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n __privateGet(this, _observers).forEach((observer) => {\n observer.subscribe((result) => {\n __privateMethod(this, _onUpdate, onUpdate_fn).call(this, observer, result);\n });\n });\n }\n }\n onUnsubscribe() {\n if (!this.listeners.size) {\n this.destroy();\n }\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n __privateGet(this, _observers).forEach((observer) => {\n observer.destroy();\n });\n }\n setQueries(queries, options, notifyOptions) {\n __privateSet(this, _queries, queries);\n __privateSet(this, _options, options);\n notifyManager.batch(() => {\n const prevObservers = __privateGet(this, _observers);\n const newObserverMatches = __privateMethod(this, _findMatchingObservers, findMatchingObservers_fn).call(this, __privateGet(this, _queries));\n newObserverMatches.forEach(\n (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)\n );\n const newObservers = newObserverMatches.map((match) => match.observer);\n const newResult = newObservers.map(\n (observer) => observer.getCurrentResult()\n );\n const hasIndexChange = newObservers.some(\n (observer, index) => observer !== prevObservers[index]\n );\n if (prevObservers.length === newObservers.length && !hasIndexChange) {\n return;\n }\n __privateSet(this, _observers, newObservers);\n __privateMethod(this, _setResult, setResult_fn).call(this, newResult);\n if (!this.hasListeners()) {\n return;\n }\n difference(prevObservers, newObservers).forEach((observer) => {\n observer.destroy();\n });\n difference(newObservers, prevObservers).forEach((observer) => {\n observer.subscribe((result) => {\n __privateMethod(this, _onUpdate, onUpdate_fn).call(this, observer, result);\n });\n });\n __privateMethod(this, _notify, notify_fn).call(this);\n });\n }\n getCurrentResult() {\n return __privateGet(this, _combinedResult);\n }\n getQueries() {\n return __privateGet(this, _observers).map((observer) => observer.getCurrentQuery());\n }\n getObservers() {\n return __privateGet(this, _observers);\n }\n getOptimisticResult(queries, combine) {\n const matches = __privateMethod(this, _findMatchingObservers, findMatchingObservers_fn).call(this, queries);\n const result = matches.map(\n (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)\n );\n return [\n result,\n (r) => {\n return __privateMethod(this, _combineResult, combineResult_fn).call(this, r ?? result, combine);\n },\n () => {\n return matches.map((match, index) => {\n const observerResult = result[index];\n return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {\n matches.forEach((m) => {\n m.observer.trackProp(accessedProp);\n });\n }) : observerResult;\n });\n }\n ];\n }\n};\n_client = new WeakMap();\n_result = new WeakMap();\n_queries = new WeakMap();\n_observers = new WeakMap();\n_options = new WeakMap();\n_combinedResult = new WeakMap();\n_setResult = new WeakSet();\nsetResult_fn = function(value) {\n var _a;\n __privateSet(this, _result, value);\n __privateSet(this, _combinedResult, __privateMethod(this, _combineResult, combineResult_fn).call(this, value, (_a = __privateGet(this, _options)) == null ? void 0 : _a.combine));\n};\n_combineResult = new WeakSet();\ncombineResult_fn = function(input, combine) {\n if (combine) {\n return replaceEqualDeep(__privateGet(this, _combinedResult), combine(input));\n }\n return input;\n};\n_findMatchingObservers = new WeakSet();\nfindMatchingObservers_fn = function(queries) {\n const prevObservers = __privateGet(this, _observers);\n const prevObserversMap = new Map(\n prevObservers.map((observer) => [observer.options.queryHash, observer])\n );\n const defaultedQueryOptions = queries.map(\n (options) => __privateGet(this, _client).defaultQueryOptions(options)\n );\n const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => {\n const match = prevObserversMap.get(defaultedOptions.queryHash);\n if (match != null) {\n return [{ defaultedQueryOptions: defaultedOptions, observer: match }];\n }\n return [];\n });\n const matchedQueryHashes = new Set(\n matchingObservers.map((match) => match.defaultedQueryOptions.queryHash)\n );\n const unmatchedQueries = defaultedQueryOptions.filter(\n (defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash)\n );\n const getObserver = (options) => {\n const defaultedOptions = __privateGet(this, _client).defaultQueryOptions(options);\n const currentObserver = __privateGet(this, _observers).find(\n (o) => o.options.queryHash === defaultedOptions.queryHash\n );\n return currentObserver ?? new QueryObserver(__privateGet(this, _client), defaultedOptions);\n };\n const newOrReusedObservers = unmatchedQueries.map((options) => {\n return {\n defaultedQueryOptions: options,\n observer: getObserver(options)\n };\n });\n const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions);\n return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries);\n};\n_onUpdate = new WeakSet();\nonUpdate_fn = function(observer, result) {\n const index = __privateGet(this, _observers).indexOf(observer);\n if (index !== -1) {\n __privateMethod(this, _setResult, setResult_fn).call(this, replaceAt(__privateGet(this, _result), index, result));\n __privateMethod(this, _notify, notify_fn).call(this);\n }\n};\n_notify = new WeakSet();\nnotify_fn = function() {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(__privateGet(this, _result));\n });\n });\n};\nexport {\n QueriesObserver\n};\n//# sourceMappingURL=queriesObserver.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/query.ts\nimport { noop, replaceData, skipToken, timeUntilStale } from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { canFetch, createRetryer, isCancelledError } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nvar _initialState, _revertState, _cache, _promise, _retryer, _observers, _defaultOptions, _abortSignalConsumed, _setOptions, setOptions_fn, _dispatch, dispatch_fn;\nvar Query = class extends Removable {\n constructor(config) {\n super();\n __privateAdd(this, _setOptions);\n __privateAdd(this, _dispatch);\n __privateAdd(this, _initialState, void 0);\n __privateAdd(this, _revertState, void 0);\n __privateAdd(this, _cache, void 0);\n __privateAdd(this, _promise, void 0);\n __privateAdd(this, _retryer, void 0);\n __privateAdd(this, _observers, void 0);\n __privateAdd(this, _defaultOptions, void 0);\n __privateAdd(this, _abortSignalConsumed, void 0);\n __privateSet(this, _abortSignalConsumed, false);\n __privateSet(this, _defaultOptions, config.defaultOptions);\n __privateMethod(this, _setOptions, setOptions_fn).call(this, config.options);\n __privateSet(this, _observers, []);\n __privateSet(this, _cache, config.cache);\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n __privateSet(this, _initialState, config.state || getDefaultState(this.options));\n this.state = __privateGet(this, _initialState);\n this.scheduleGc();\n }\n get meta() {\n return this.options.meta;\n }\n optionalRemove() {\n if (!__privateGet(this, _observers).length && this.state.fetchStatus === \"idle\") {\n __privateGet(this, _cache).remove(this);\n }\n }\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options);\n __privateMethod(this, _dispatch, dispatch_fn).call(this, {\n data,\n type: \"success\",\n dataUpdatedAt: options == null ? void 0 : options.updatedAt,\n manual: options == null ? void 0 : options.manual\n });\n return data;\n }\n setState(state, setStateOptions) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"setState\", state, setStateOptions });\n }\n cancel(options) {\n var _a;\n const promise = __privateGet(this, _promise);\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n destroy() {\n super.destroy();\n this.cancel({ silent: true });\n }\n reset() {\n this.destroy();\n this.setState(__privateGet(this, _initialState));\n }\n isActive() {\n return __privateGet(this, _observers).some(\n (observer) => observer.options.enabled !== false\n );\n }\n isDisabled() {\n return this.getObserversCount() > 0 && !this.isActive();\n }\n isStale() {\n return this.state.isInvalidated || this.state.data === void 0 || __privateGet(this, _observers).some((observer) => observer.getCurrentResult().isStale);\n }\n isStaleByTime(staleTime = 0) {\n return this.state.isInvalidated || this.state.data === void 0 || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n onFocus() {\n var _a;\n const observer = __privateGet(this, _observers).find((x) => x.shouldFetchOnWindowFocus());\n observer == null ? void 0 : observer.refetch({ cancelRefetch: false });\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continue();\n }\n onOnline() {\n var _a;\n const observer = __privateGet(this, _observers).find((x) => x.shouldFetchOnReconnect());\n observer == null ? void 0 : observer.refetch({ cancelRefetch: false });\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continue();\n }\n addObserver(observer) {\n if (!__privateGet(this, _observers).includes(observer)) {\n __privateGet(this, _observers).push(observer);\n this.clearGcTimeout();\n __privateGet(this, _cache).notify({ type: \"observerAdded\", query: this, observer });\n }\n }\n removeObserver(observer) {\n if (__privateGet(this, _observers).includes(observer)) {\n __privateSet(this, _observers, __privateGet(this, _observers).filter((x) => x !== observer));\n if (!__privateGet(this, _observers).length) {\n if (__privateGet(this, _retryer)) {\n if (__privateGet(this, _abortSignalConsumed)) {\n __privateGet(this, _retryer).cancel({ revert: true });\n } else {\n __privateGet(this, _retryer).cancelRetry();\n }\n }\n this.scheduleGc();\n }\n __privateGet(this, _cache).notify({ type: \"observerRemoved\", query: this, observer });\n }\n }\n getObserversCount() {\n return __privateGet(this, _observers).length;\n }\n invalidate() {\n if (!this.state.isInvalidated) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"invalidate\" });\n }\n }\n fetch(options, fetchOptions) {\n var _a, _b, _c, _d;\n if (this.state.fetchStatus !== \"idle\") {\n if (this.state.data !== void 0 && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n this.cancel({ silent: true });\n } else if (__privateGet(this, _promise)) {\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continueRetry();\n return __privateGet(this, _promise);\n }\n }\n if (options) {\n __privateMethod(this, _setOptions, setOptions_fn).call(this, options);\n }\n if (!this.options.queryFn) {\n const observer = __privateGet(this, _observers).find((x) => x.options.queryFn);\n if (observer) {\n __privateMethod(this, _setOptions, setOptions_fn).call(this, observer.options);\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!Array.isArray(this.options.queryKey)) {\n console.error(\n `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`\n );\n }\n }\n const abortController = new AbortController();\n const queryFnContext = {\n queryKey: this.queryKey,\n meta: this.meta\n };\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n __privateSet(this, _abortSignalConsumed, true);\n return abortController.signal;\n }\n });\n };\n addSignalProperty(queryFnContext);\n const fetchFn = () => {\n if (process.env.NODE_ENV !== \"production\") {\n if (this.options.queryFn === skipToken) {\n console.error(\n `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${this.options.queryHash}'`\n );\n }\n }\n if (!this.options.queryFn || this.options.queryFn === skipToken) {\n return Promise.reject(\n new Error(`Missing queryFn: '${this.options.queryHash}'`)\n );\n }\n __privateSet(this, _abortSignalConsumed, false);\n if (this.options.persister) {\n return this.options.persister(\n this.options.queryFn,\n queryFnContext,\n this\n );\n }\n return this.options.queryFn(\n queryFnContext\n );\n };\n const context = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n state: this.state,\n fetchFn\n };\n addSignalProperty(context);\n (_b = this.options.behavior) == null ? void 0 : _b.onFetch(\n context,\n this\n );\n __privateSet(this, _revertState, this.state);\n if (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== ((_c = context.fetchOptions) == null ? void 0 : _c.meta)) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"fetch\", meta: (_d = context.fetchOptions) == null ? void 0 : _d.meta });\n }\n const onError = (error) => {\n var _a2, _b2, _c2, _d2;\n if (!(isCancelledError(error) && error.silent)) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, {\n type: \"error\",\n error\n });\n }\n if (!isCancelledError(error)) {\n (_b2 = (_a2 = __privateGet(this, _cache).config).onError) == null ? void 0 : _b2.call(\n _a2,\n error,\n this\n );\n (_d2 = (_c2 = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _d2.call(\n _c2,\n this.state.data,\n error,\n this\n );\n }\n if (!this.isFetchingOptimistic) {\n this.scheduleGc();\n }\n this.isFetchingOptimistic = false;\n };\n __privateSet(this, _retryer, createRetryer({\n fn: context.fetchFn,\n abort: abortController.abort.bind(abortController),\n onSuccess: (data) => {\n var _a2, _b2, _c2, _d2;\n if (data === void 0) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\n `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`\n );\n }\n onError(new Error(`${this.queryHash} data is undefined`));\n return;\n }\n this.setData(data);\n (_b2 = (_a2 = __privateGet(this, _cache).config).onSuccess) == null ? void 0 : _b2.call(_a2, data, this);\n (_d2 = (_c2 = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _d2.call(\n _c2,\n data,\n this.state.error,\n this\n );\n if (!this.isFetchingOptimistic) {\n this.scheduleGc();\n }\n this.isFetchingOptimistic = false;\n },\n onError,\n onFail: (failureCount, error) => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"failed\", failureCount, error });\n },\n onPause: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"pause\" });\n },\n onContinue: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"continue\" });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode\n }));\n __privateSet(this, _promise, __privateGet(this, _retryer).promise);\n return __privateGet(this, _promise);\n }\n};\n_initialState = new WeakMap();\n_revertState = new WeakMap();\n_cache = new WeakMap();\n_promise = new WeakMap();\n_retryer = new WeakMap();\n_observers = new WeakMap();\n_defaultOptions = new WeakMap();\n_abortSignalConsumed = new WeakMap();\n_setOptions = new WeakSet();\nsetOptions_fn = function(options) {\n this.options = { ...__privateGet(this, _defaultOptions), ...options };\n this.updateGcTime(this.options.gcTime);\n};\n_dispatch = new WeakSet();\ndispatch_fn = function(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n fetchStatus: \"paused\"\n };\n case \"continue\":\n return {\n ...state,\n fetchStatus: \"fetching\"\n };\n case \"fetch\":\n return {\n ...state,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: action.meta ?? null,\n fetchStatus: canFetch(this.options.networkMode) ? \"fetching\" : \"paused\",\n ...state.data === void 0 && {\n error: null,\n status: \"pending\"\n }\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),\n error: null,\n isInvalidated: false,\n status: \"success\",\n ...!action.manual && {\n fetchStatus: \"idle\",\n fetchFailureCount: 0,\n fetchFailureReason: null\n }\n };\n case \"error\":\n const error = action.error;\n if (isCancelledError(error) && error.revert && __privateGet(this, _revertState)) {\n return { ...__privateGet(this, _revertState), fetchStatus: \"idle\" };\n }\n return {\n ...state,\n error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n fetchFailureReason: error,\n fetchStatus: \"idle\",\n status: \"error\"\n };\n case \"invalidate\":\n return {\n ...state,\n isInvalidated: true\n };\n case \"setState\":\n return {\n ...state,\n ...action.state\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n __privateGet(this, _observers).forEach((observer) => {\n observer.onQueryUpdate();\n });\n __privateGet(this, _cache).notify({ query: this, type: \"updated\", action });\n });\n};\nfunction getDefaultState(options) {\n const data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n const hasData = data !== void 0;\n const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n return {\n data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: null,\n isInvalidated: false,\n status: hasData ? \"success\" : \"pending\",\n fetchStatus: \"idle\"\n };\n}\nexport {\n Query\n};\n//# sourceMappingURL=query.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar _queries;\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n __privateAdd(this, _queries, void 0);\n __privateSet(this, _queries, /* @__PURE__ */ new Map());\n }\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n cache: this,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!__privateGet(this, _queries).has(query.queryHash)) {\n __privateGet(this, _queries).set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = __privateGet(this, _queries).get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n __privateGet(this, _queries).delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return __privateGet(this, _queries).get(queryHash);\n }\n getAll() {\n return [...__privateGet(this, _queries).values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\n_queries = new WeakMap();\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet,\n __privateWrapper\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey,\n skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar _queryCache, _mutationCache, _defaultOptions, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline;\nvar QueryClient = class {\n constructor(config = {}) {\n __privateAdd(this, _queryCache, void 0);\n __privateAdd(this, _mutationCache, void 0);\n __privateAdd(this, _defaultOptions, void 0);\n __privateAdd(this, _queryDefaults, void 0);\n __privateAdd(this, _mutationDefaults, void 0);\n __privateAdd(this, _mountCount, void 0);\n __privateAdd(this, _unsubscribeFocus, void 0);\n __privateAdd(this, _unsubscribeOnline, void 0);\n __privateSet(this, _queryCache, config.queryCache || new QueryCache());\n __privateSet(this, _mutationCache, config.mutationCache || new MutationCache());\n __privateSet(this, _defaultOptions, config.defaultOptions || {});\n __privateSet(this, _queryDefaults, /* @__PURE__ */ new Map());\n __privateSet(this, _mutationDefaults, /* @__PURE__ */ new Map());\n __privateSet(this, _mountCount, 0);\n }\n mount() {\n __privateWrapper(this, _mountCount)._++;\n if (__privateGet(this, _mountCount) !== 1)\n return;\n __privateSet(this, _unsubscribeFocus, focusManager.subscribe(() => {\n if (focusManager.isFocused()) {\n this.resumePausedMutations();\n __privateGet(this, _queryCache).onFocus();\n }\n }));\n __privateSet(this, _unsubscribeOnline, onlineManager.subscribe((online) => {\n if (online) {\n this.resumePausedMutations();\n __privateGet(this, _queryCache).onOnline();\n }\n }));\n }\n unmount() {\n var _a, _b;\n __privateWrapper(this, _mountCount)._--;\n if (__privateGet(this, _mountCount) !== 0)\n return;\n (_a = __privateGet(this, _unsubscribeFocus)) == null ? void 0 : _a.call(this);\n __privateSet(this, _unsubscribeFocus, void 0);\n (_b = __privateGet(this, _unsubscribeOnline)) == null ? void 0 : _b.call(this);\n __privateSet(this, _unsubscribeOnline, void 0);\n }\n isFetching(filters) {\n return __privateGet(this, _queryCache).findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return __privateGet(this, _mutationCache).findAll({ ...filters, status: \"pending\" }).length;\n }\n getQueryData(queryKey) {\n var _a;\n const options = this.defaultQueryOptions({ queryKey });\n return (_a = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a.state.data;\n }\n ensureQueryData(options) {\n const cachedData = this.getQueryData(options.queryKey);\n return cachedData !== void 0 ? Promise.resolve(cachedData) : this.fetchQuery(options);\n }\n getQueriesData(filters) {\n return this.getQueryCache().findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n const query = __privateGet(this, _queryCache).get(\n defaultedOptions.queryHash\n );\n const prevData = query == null ? void 0 : query.state.data;\n const data = functionalUpdate(updater, prevData);\n if (data === void 0) {\n return void 0;\n }\n return __privateGet(this, _queryCache).build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.getQueryCache().findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n var _a;\n const options = this.defaultQueryOptions({ queryKey });\n return (_a = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a.state;\n }\n removeQueries(filters) {\n const queryCache = __privateGet(this, _queryCache);\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = __privateGet(this, _queryCache);\n const refetchFilters = {\n type: \"active\",\n ...filters\n };\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(refetchFilters, options);\n });\n }\n cancelQueries(filters = {}, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => __privateGet(this, _queryCache).findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters = {}, options = {}) {\n return notifyManager.batch(() => {\n __privateGet(this, _queryCache).findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters.refetchType === \"none\") {\n return Promise.resolve();\n }\n const refetchFilters = {\n ...filters,\n type: filters.refetchType ?? filters.type ?? \"active\"\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n refetchQueries(filters = {}, options) {\n const fetchOptions = {\n ...options,\n cancelRefetch: (options == null ? void 0 : options.cancelRefetch) ?? true\n };\n const promises = notifyManager.batch(\n () => __privateGet(this, _queryCache).findAll(filters).filter((query) => !query.isDisabled()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (defaultedOptions.retry === void 0) {\n defaultedOptions.retry = false;\n }\n const query = __privateGet(this, _queryCache).build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n resumePausedMutations() {\n if (onlineManager.isOnline()) {\n return __privateGet(this, _mutationCache).resumePausedMutations();\n }\n return Promise.resolve();\n }\n getQueryCache() {\n return __privateGet(this, _queryCache);\n }\n getMutationCache() {\n return __privateGet(this, _mutationCache);\n }\n getDefaultOptions() {\n return __privateGet(this, _defaultOptions);\n }\n setDefaultOptions(options) {\n __privateSet(this, _defaultOptions, options);\n }\n setQueryDefaults(queryKey, options) {\n __privateGet(this, _queryDefaults).set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...__privateGet(this, _queryDefaults).values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n __privateGet(this, _mutationDefaults).set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...__privateGet(this, _mutationDefaults).values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...__privateGet(this, _defaultOptions).queries,\n ...this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (defaultedOptions.refetchOnReconnect === void 0) {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (defaultedOptions.throwOnError === void 0) {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n if (defaultedOptions.enabled !== true && defaultedOptions.queryFn === skipToken) {\n defaultedOptions.enabled = false;\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n return {\n ...__privateGet(this, _defaultOptions).mutations,\n ...(options == null ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n __privateGet(this, _queryCache).clear();\n __privateGet(this, _mutationCache).clear();\n }\n};\n_queryCache = new WeakMap();\n_mutationCache = new WeakMap();\n_defaultOptions = new WeakMap();\n_queryDefaults = new WeakMap();\n_mutationDefaults = new WeakMap();\n_mountCount = new WeakMap();\n_unsubscribeFocus = new WeakMap();\n_unsubscribeOnline = new WeakMap();\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/queryObserver.ts\nimport {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n shallowEqualObjects,\n timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { canFetch } from \"./retryer.js\";\nvar _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _executeFetch, executeFetch_fn, _updateStaleTimeout, updateStaleTimeout_fn, _computeRefetchInterval, computeRefetchInterval_fn, _updateRefetchInterval, updateRefetchInterval_fn, _updateTimers, updateTimers_fn, _clearStaleTimeout, clearStaleTimeout_fn, _clearRefetchInterval, clearRefetchInterval_fn, _updateQuery, updateQuery_fn, _notify, notify_fn;\nvar QueryObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n this.options = options;\n __privateAdd(this, _executeFetch);\n __privateAdd(this, _updateStaleTimeout);\n __privateAdd(this, _computeRefetchInterval);\n __privateAdd(this, _updateRefetchInterval);\n __privateAdd(this, _updateTimers);\n __privateAdd(this, _clearStaleTimeout);\n __privateAdd(this, _clearRefetchInterval);\n __privateAdd(this, _updateQuery);\n __privateAdd(this, _notify);\n __privateAdd(this, _client, void 0);\n __privateAdd(this, _currentQuery, void 0);\n __privateAdd(this, _currentQueryInitialState, void 0);\n __privateAdd(this, _currentResult, void 0);\n __privateAdd(this, _currentResultState, void 0);\n __privateAdd(this, _currentResultOptions, void 0);\n __privateAdd(this, _selectError, void 0);\n __privateAdd(this, _selectFn, void 0);\n __privateAdd(this, _selectResult, void 0);\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n __privateAdd(this, _lastQueryWithDefinedData, void 0);\n __privateAdd(this, _staleTimeoutId, void 0);\n __privateAdd(this, _refetchIntervalId, void 0);\n __privateAdd(this, _currentRefetchInterval, void 0);\n __privateAdd(this, _trackedProps, /* @__PURE__ */ new Set());\n __privateSet(this, _client, client);\n __privateSet(this, _selectError, null);\n this.bindMethods();\n this.setOptions(options);\n }\n bindMethods() {\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n __privateGet(this, _currentQuery).addObserver(this);\n if (shouldFetchOnMount(__privateGet(this, _currentQuery), this.options)) {\n __privateMethod(this, _executeFetch, executeFetch_fn).call(this);\n } else {\n this.updateResult();\n }\n __privateMethod(this, _updateTimers, updateTimers_fn).call(this);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n shouldFetchOnReconnect() {\n return shouldFetchOn(\n __privateGet(this, _currentQuery),\n this.options,\n this.options.refetchOnReconnect\n );\n }\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(\n __privateGet(this, _currentQuery),\n this.options,\n this.options.refetchOnWindowFocus\n );\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);\n __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);\n __privateGet(this, _currentQuery).removeObserver(this);\n }\n setOptions(options, notifyOptions) {\n const prevOptions = this.options;\n const prevQuery = __privateGet(this, _currentQuery);\n this.options = __privateGet(this, _client).defaultQueryOptions(options);\n if (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\") {\n throw new Error(\"Expected enabled to be a boolean\");\n }\n __privateMethod(this, _updateQuery, updateQuery_fn).call(this);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n __privateGet(this, _client).getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: __privateGet(this, _currentQuery),\n observer: this\n });\n }\n const mounted = this.hasListeners();\n if (mounted && shouldFetchOptionally(\n __privateGet(this, _currentQuery),\n prevQuery,\n this.options,\n prevOptions\n )) {\n __privateMethod(this, _executeFetch, executeFetch_fn).call(this);\n }\n this.updateResult(notifyOptions);\n if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);\n }\n const nextRefetchInterval = __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this);\n if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== __privateGet(this, _currentRefetchInterval))) {\n __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, nextRefetchInterval);\n }\n }\n getOptimisticResult(options) {\n const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), options);\n const result = this.createResult(query, options);\n if (shouldAssignObserverCurrentProperties(this, result)) {\n __privateSet(this, _currentResult, result);\n __privateSet(this, _currentResultOptions, this.options);\n __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);\n }\n return result;\n }\n getCurrentResult() {\n return __privateGet(this, _currentResult);\n }\n trackResult(result, onPropTracked) {\n const trackedResult = {};\n Object.keys(result).forEach((key) => {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: () => {\n this.trackProp(key);\n onPropTracked == null ? void 0 : onPropTracked(key);\n return result[key];\n }\n });\n });\n return trackedResult;\n }\n trackProp(key) {\n __privateGet(this, _trackedProps).add(key);\n }\n getCurrentQuery() {\n return __privateGet(this, _currentQuery);\n }\n refetch({ ...options } = {}) {\n return this.fetch({\n ...options\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = __privateGet(this, _client).defaultQueryOptions(options);\n const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), defaultedOptions);\n query.isFetchingOptimistic = true;\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n return __privateMethod(this, _executeFetch, executeFetch_fn).call(this, {\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true\n }).then(() => {\n this.updateResult();\n return __privateGet(this, _currentResult);\n });\n }\n createResult(query, options) {\n var _a;\n const prevQuery = __privateGet(this, _currentQuery);\n const prevOptions = this.options;\n const prevResult = __privateGet(this, _currentResult);\n const prevResultState = __privateGet(this, _currentResultState);\n const prevResultOptions = __privateGet(this, _currentResultOptions);\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : __privateGet(this, _currentQueryInitialState);\n const { state } = query;\n let { error, errorUpdatedAt, fetchStatus, status } = state;\n let isPlaceholderData = false;\n let data;\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n if (fetchOnMount || fetchOptionally) {\n fetchStatus = canFetch(query.options.networkMode) ? \"fetching\" : \"paused\";\n if (state.data === void 0) {\n status = \"pending\";\n }\n }\n if (options._optimisticResults === \"isRestoring\") {\n fetchStatus = \"idle\";\n }\n }\n if (options.select && state.data !== void 0) {\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === __privateGet(this, _selectFn)) {\n data = __privateGet(this, _selectResult);\n } else {\n try {\n __privateSet(this, _selectFn, options.select);\n data = options.select(state.data);\n data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options);\n __privateSet(this, _selectResult, data);\n __privateSet(this, _selectError, null);\n } catch (selectError) {\n __privateSet(this, _selectError, selectError);\n }\n }\n } else {\n data = state.data;\n }\n if (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n let placeholderData;\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n (_a = __privateGet(this, _lastQueryWithDefinedData)) == null ? void 0 : _a.state.data,\n __privateGet(this, _lastQueryWithDefinedData)\n ) : options.placeholderData;\n if (options.select && placeholderData !== void 0) {\n try {\n placeholderData = options.select(placeholderData);\n __privateSet(this, _selectError, null);\n } catch (selectError) {\n __privateSet(this, _selectError, selectError);\n }\n }\n }\n if (placeholderData !== void 0) {\n status = \"success\";\n data = replaceData(\n prevResult == null ? void 0 : prevResult.data,\n placeholderData,\n options\n );\n isPlaceholderData = true;\n }\n }\n if (__privateGet(this, _selectError)) {\n error = __privateGet(this, _selectError);\n data = __privateGet(this, _selectResult);\n errorUpdatedAt = Date.now();\n status = \"error\";\n }\n const isFetching = fetchStatus === \"fetching\";\n const isPending = status === \"pending\";\n const isError = status === \"error\";\n const isLoading = isPending && isFetching;\n const hasData = state.data !== void 0;\n const result = {\n status,\n fetchStatus,\n isPending,\n isSuccess: status === \"success\",\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: state.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n failureReason: state.fetchFailureReason,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && !hasData,\n isPaused: fetchStatus === \"paused\",\n isPlaceholderData,\n isRefetchError: isError && hasData,\n isStale: isStale(query, options),\n refetch: this.refetch\n };\n return result;\n }\n updateResult(notifyOptions) {\n const prevResult = __privateGet(this, _currentResult);\n const nextResult = this.createResult(__privateGet(this, _currentQuery), this.options);\n __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);\n __privateSet(this, _currentResultOptions, this.options);\n if (__privateGet(this, _currentResultState).data !== void 0) {\n __privateSet(this, _lastQueryWithDefinedData, __privateGet(this, _currentQuery));\n }\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n __privateSet(this, _currentResult, nextResult);\n const defaultNotifyOptions = {};\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n const { notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) {\n return true;\n }\n const includedProps = new Set(\n notifyOnChangePropsValue ?? __privateGet(this, _trackedProps)\n );\n if (this.options.throwOnError) {\n includedProps.add(\"error\");\n }\n return Object.keys(__privateGet(this, _currentResult)).some((key) => {\n const typedKey = key;\n const changed = __privateGet(this, _currentResult)[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && shouldNotifyListeners()) {\n defaultNotifyOptions.listeners = true;\n }\n __privateMethod(this, _notify, notify_fn).call(this, { ...defaultNotifyOptions, ...notifyOptions });\n }\n onQueryUpdate() {\n this.updateResult();\n if (this.hasListeners()) {\n __privateMethod(this, _updateTimers, updateTimers_fn).call(this);\n }\n }\n};\n_client = new WeakMap();\n_currentQuery = new WeakMap();\n_currentQueryInitialState = new WeakMap();\n_currentResult = new WeakMap();\n_currentResultState = new WeakMap();\n_currentResultOptions = new WeakMap();\n_selectError = new WeakMap();\n_selectFn = new WeakMap();\n_selectResult = new WeakMap();\n_lastQueryWithDefinedData = new WeakMap();\n_staleTimeoutId = new WeakMap();\n_refetchIntervalId = new WeakMap();\n_currentRefetchInterval = new WeakMap();\n_trackedProps = new WeakMap();\n_executeFetch = new WeakSet();\nexecuteFetch_fn = function(fetchOptions) {\n __privateMethod(this, _updateQuery, updateQuery_fn).call(this);\n let promise = __privateGet(this, _currentQuery).fetch(\n this.options,\n fetchOptions\n );\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n return promise;\n};\n_updateStaleTimeout = new WeakSet();\nupdateStaleTimeout_fn = function() {\n __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);\n if (isServer || __privateGet(this, _currentResult).isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n const time = timeUntilStale(\n __privateGet(this, _currentResult).dataUpdatedAt,\n this.options.staleTime\n );\n const timeout = time + 1;\n __privateSet(this, _staleTimeoutId, setTimeout(() => {\n if (!__privateGet(this, _currentResult).isStale) {\n this.updateResult();\n }\n }, timeout));\n};\n_computeRefetchInterval = new WeakSet();\ncomputeRefetchInterval_fn = function() {\n return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(__privateGet(this, _currentQuery)) : this.options.refetchInterval) ?? false;\n};\n_updateRefetchInterval = new WeakSet();\nupdateRefetchInterval_fn = function(nextInterval) {\n __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);\n __privateSet(this, _currentRefetchInterval, nextInterval);\n if (isServer || this.options.enabled === false || !isValidTimeout(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) {\n return;\n }\n __privateSet(this, _refetchIntervalId, setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n __privateMethod(this, _executeFetch, executeFetch_fn).call(this);\n }\n }, __privateGet(this, _currentRefetchInterval)));\n};\n_updateTimers = new WeakSet();\nupdateTimers_fn = function() {\n __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);\n __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this));\n};\n_clearStaleTimeout = new WeakSet();\nclearStaleTimeout_fn = function() {\n if (__privateGet(this, _staleTimeoutId)) {\n clearTimeout(__privateGet(this, _staleTimeoutId));\n __privateSet(this, _staleTimeoutId, void 0);\n }\n};\n_clearRefetchInterval = new WeakSet();\nclearRefetchInterval_fn = function() {\n if (__privateGet(this, _refetchIntervalId)) {\n clearInterval(__privateGet(this, _refetchIntervalId));\n __privateSet(this, _refetchIntervalId, void 0);\n }\n};\n_updateQuery = new WeakSet();\nupdateQuery_fn = function() {\n const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), this.options);\n if (query === __privateGet(this, _currentQuery)) {\n return;\n }\n const prevQuery = __privateGet(this, _currentQuery);\n __privateSet(this, _currentQuery, query);\n __privateSet(this, _currentQueryInitialState, query.state);\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n};\n_notify = new WeakSet();\nnotify_fn = function(notifyOptions) {\n notifyManager.batch(() => {\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(__privateGet(this, _currentResult));\n });\n }\n __privateGet(this, _client).getQueryCache().notify({\n query: __privateGet(this, _currentQuery),\n type: \"observerResultsUpdated\"\n });\n });\n};\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && query.state.data === void 0 && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && isStale(query, options);\n }\n return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n }\n return false;\n}\nexport {\n QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-2HYBKCYP.js\";\n\n// src/removable.ts\nimport { isServer, isValidTimeout } from \"./utils.js\";\nvar _gcTimeout;\nvar Removable = class {\n constructor() {\n __privateAdd(this, _gcTimeout, void 0);\n }\n destroy() {\n this.clearGcTimeout();\n }\n scheduleGc() {\n this.clearGcTimeout();\n if (isValidTimeout(this.gcTime)) {\n __privateSet(this, _gcTimeout, setTimeout(() => {\n this.optionalRemove();\n }, this.gcTime));\n }\n }\n updateGcTime(newGcTime) {\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3)\n );\n }\n clearGcTimeout() {\n if (__privateGet(this, _gcTimeout)) {\n clearTimeout(__privateGet(this, _gcTimeout));\n __privateSet(this, _gcTimeout, void 0);\n }\n }\n};\n_gcTimeout = new WeakMap();\nexport {\n Removable\n};\n//# sourceMappingURL=removable.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/retryer.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { isServer, sleep } from \"./utils.js\";\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n return (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class {\n constructor(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n }\n};\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n let isRetryCancelled = false;\n let failureCount = 0;\n let isResolved = false;\n let continueFn;\n let promiseResolve;\n let promiseReject;\n const promise = new Promise((outerResolve, outerReject) => {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n const cancel = (cancelOptions) => {\n var _a;\n if (!isResolved) {\n reject(new CancelledError(cancelOptions));\n (_a = config.abort) == null ? void 0 : _a.call(config);\n }\n };\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n const shouldPause = () => !focusManager.isFocused() || config.networkMode !== \"always\" && !onlineManager.isOnline();\n const resolve = (value) => {\n var _a;\n if (!isResolved) {\n isResolved = true;\n (_a = config.onSuccess) == null ? void 0 : _a.call(config, value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n const reject = (value) => {\n var _a;\n if (!isResolved) {\n isResolved = true;\n (_a = config.onError) == null ? void 0 : _a.call(config, value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n const pause = () => {\n return new Promise((continueResolve) => {\n var _a;\n continueFn = (value) => {\n const canContinue = isResolved || !shouldPause();\n if (canContinue) {\n continueResolve(value);\n }\n return canContinue;\n };\n (_a = config.onPause) == null ? void 0 : _a.call(config);\n }).then(() => {\n var _a;\n continueFn = void 0;\n if (!isResolved) {\n (_a = config.onContinue) == null ? void 0 : _a.call(config);\n }\n });\n };\n const run = () => {\n if (isResolved) {\n return;\n }\n let promiseOrValue;\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n Promise.resolve(promiseOrValue).then(resolve).catch((error) => {\n var _a;\n if (isResolved) {\n return;\n }\n const retry = config.retry ?? (isServer ? 0 : 3);\n const retryDelay = config.retryDelay ?? defaultRetryDelay;\n const delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n const shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n if (isRetryCancelled || !shouldRetry) {\n reject(error);\n return;\n }\n failureCount++;\n (_a = config.onFail) == null ? void 0 : _a.call(config, failureCount, error);\n sleep(delay).then(() => {\n if (shouldPause()) {\n return pause();\n }\n return;\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\n }\n });\n });\n };\n if (canFetch(config.networkMode)) {\n run();\n } else {\n pause().then(run);\n }\n return {\n promise,\n cancel,\n continue: () => {\n const didContinue = continueFn == null ? void 0 : continueFn();\n return didContinue ? promise : Promise.resolve();\n },\n cancelRetry,\n continueRetry\n };\n}\nexport {\n CancelledError,\n canFetch,\n createRetryer,\n isCancelledError\n};\n//# sourceMappingURL=retryer.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/subscribable.ts\nvar Subscribable = class {\n constructor() {\n this.listeners = /* @__PURE__ */ new Set();\n this.subscribe = this.subscribe.bind(this);\n }\n subscribe(listener) {\n this.listeners.add(listener);\n this.onSubscribe();\n return () => {\n this.listeners.delete(listener);\n this.onUnsubscribe();\n };\n }\n hasListeners() {\n return this.listeners.size > 0;\n }\n onSubscribe() {\n }\n onUnsubscribe() {\n }\n};\nexport {\n Subscribable\n};\n//# sourceMappingURL=subscribable.js.map","import \"./chunk-2HYBKCYP.js\";\n\n// src/utils.ts\nvar isServer = typeof window === \"undefined\" || \"Deno\" in window;\nfunction noop() {\n return void 0;\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction matchQuery(filters, query) {\n const {\n type = \"all\",\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\n if (queryKey) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n if (type !== \"all\") {\n const isActive = query.isActive();\n if (type === \"active\" && !isActive) {\n return false;\n }\n if (type === \"inactive\" && isActive) {\n return false;\n }\n }\n if (typeof stale === \"boolean\" && query.isStale() !== stale) {\n return false;\n }\n if (fetchStatus && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n if (predicate && !predicate(query)) {\n return false;\n }\n return true;\n}\nfunction matchMutation(filters, mutation) {\n const { exact, status, predicate, mutationKey } = filters;\n if (mutationKey) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n if (exact) {\n if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n if (status && mutation.state.status !== status) {\n return false;\n }\n if (predicate && !predicate(mutation)) {\n return false;\n }\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashKey;\n return hashFn(queryKey);\n}\nfunction hashKey(queryKey) {\n return JSON.stringify(\n queryKey,\n (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val\n );\n}\nfunction partialMatchKey(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (a && b && typeof a === \"object\" && typeof b === \"object\") {\n return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));\n }\n return false;\n}\nfunction replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n const array = isPlainArray(a) && isPlainArray(b);\n if (array || isPlainObject(a) && isPlainObject(b)) {\n const aItems = array ? a : Object.keys(a);\n const aSize = aItems.length;\n const bItems = array ? b : Object.keys(b);\n const bSize = bItems.length;\n const copy = array ? [] : {};\n let equalItems = 0;\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n if (!array && a[key] === void 0 && b[key] === void 0 && aItems.includes(key)) {\n copy[key] = void 0;\n equalItems++;\n } else {\n copy[key] = replaceEqualDeep(a[key], b[key]);\n if (copy[key] === a[key] && a[key] !== void 0) {\n equalItems++;\n }\n }\n }\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n return b;\n}\nfunction shallowEqualObjects(a, b) {\n if (!b || Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n }\n const ctor = o.constructor;\n if (ctor === void 0) {\n return true;\n }\n const prot = ctor.prototype;\n if (!hasObjectPrototype(prot)) {\n return false;\n }\n if (!prot.hasOwnProperty(\"isPrototypeOf\")) {\n return false;\n }\n return true;\n}\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(ms) {\n return new Promise((resolve) => {\n setTimeout(resolve, ms);\n });\n}\nfunction replaceData(prevData, data, options) {\n if (typeof options.structuralSharing === \"function\") {\n return options.structuralSharing(prevData, data);\n } else if (options.structuralSharing !== false) {\n return replaceEqualDeep(prevData, data);\n }\n return data;\n}\nfunction keepPreviousData(previousData) {\n return previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n const newItems = [...items, item];\n return max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n const newItems = [item, ...items];\n return max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nvar skipToken = Symbol();\nexport {\n addToEnd,\n addToStart,\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n isPlainArray,\n isPlainObject,\n isServer,\n isValidTimeout,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceData,\n replaceEqualDeep,\n shallowEqualObjects,\n skipToken,\n sleep,\n timeUntilStale\n};\n//# sourceMappingURL=utils.js.map","\"use client\";\n\n// src/HydrationBoundary.tsx\nimport * as React from \"react\";\nimport { hydrate } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nvar HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient\n}) => {\n const client = useQueryClient(queryClient);\n const [hydrationQueue, setHydrationQueue] = React.useState();\n const optionsRef = React.useRef(options);\n optionsRef.current = options;\n React.useMemo(() => {\n if (state) {\n if (typeof state !== \"object\") {\n return;\n }\n const queryCache = client.getQueryCache();\n const queries = state.queries || [];\n const newQueries = [];\n const existingQueries = [];\n for (const dehydratedQuery of queries) {\n const existingQuery = queryCache.get(dehydratedQuery.queryHash);\n if (!existingQuery) {\n newQueries.push(dehydratedQuery);\n } else {\n const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;\n const queryAlreadyQueued = hydrationQueue == null ? void 0 : hydrationQueue.find(\n (query) => query.queryHash === dehydratedQuery.queryHash\n );\n if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {\n existingQueries.push(dehydratedQuery);\n }\n }\n }\n if (newQueries.length > 0) {\n hydrate(client, { queries: newQueries }, optionsRef.current);\n }\n if (existingQueries.length > 0) {\n setHydrationQueue(\n (prev) => prev ? [...prev, ...existingQueries] : existingQueries\n );\n }\n }\n }, [client, hydrationQueue, state]);\n React.useEffect(() => {\n if (hydrationQueue) {\n hydrate(client, { queries: hydrationQueue }, optionsRef.current);\n setHydrationQueue(void 0);\n }\n }, [client, hydrationQueue]);\n return children;\n};\nexport {\n HydrationBoundary\n};\n//# sourceMappingURL=HydrationBoundary.js.map","\"use client\";\n\n// src/QueryClientProvider.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar QueryClientContext = React.createContext(\n void 0\n);\nvar useQueryClient = (queryClient) => {\n const client = React.useContext(QueryClientContext);\n if (queryClient) {\n return queryClient;\n }\n if (!client) {\n throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n }\n return client;\n};\nvar QueryClientProvider = ({\n client,\n children\n}) => {\n React.useEffect(() => {\n client.mount();\n return () => {\n client.unmount();\n };\n }, [client]);\n return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });\n};\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient\n};\n//# sourceMappingURL=QueryClientProvider.js.map","\"use client\";\n\n// src/QueryErrorResetBoundary.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createValue() {\n let isReset = false;\n return {\n clearReset: () => {\n isReset = false;\n },\n reset: () => {\n isReset = true;\n },\n isReset: () => {\n return isReset;\n }\n };\n}\nvar QueryErrorResetBoundaryContext = React.createContext(createValue());\nvar useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nvar QueryErrorResetBoundary = ({\n children\n}) => {\n const [value] = React.useState(() => createValue());\n return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === \"function\" ? children(value) : children });\n};\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary\n};\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\n\n// src/errorBoundaryUtils.ts\nimport * as React from \"react\";\nimport { shouldThrowError } from \"./utils.js\";\nvar ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {\n if (options.suspense || options.throwOnError) {\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false;\n }\n }\n};\nvar useClearResetErrorBoundary = (errorResetBoundary) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset();\n }, [errorResetBoundary]);\n};\nvar getHasError = ({\n result,\n errorResetBoundary,\n throwOnError,\n query\n}) => {\n return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && shouldThrowError(throwOnError, [result.error, query]);\n};\nexport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n};\n//# sourceMappingURL=errorBoundaryUtils.js.map","// src/index.ts\nexport * from \"@tanstack/query-core\";\nexport * from \"./types.js\";\nimport { useQueries } from \"./useQueries.js\";\nimport { useQuery } from \"./useQuery.js\";\nimport { useSuspenseQuery } from \"./useSuspenseQuery.js\";\nimport { useSuspenseInfiniteQuery } from \"./useSuspenseInfiniteQuery.js\";\nimport { useSuspenseQueries } from \"./useSuspenseQueries.js\";\nimport { queryOptions } from \"./queryOptions.js\";\nimport { infiniteQueryOptions } from \"./infiniteQueryOptions.js\";\nimport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient\n} from \"./QueryClientProvider.js\";\nimport { HydrationBoundary } from \"./HydrationBoundary.js\";\nimport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary\n} from \"./QueryErrorResetBoundary.js\";\nimport { useIsFetching } from \"./useIsFetching.js\";\nimport { useIsMutating, useMutationState } from \"./useMutationState.js\";\nimport { useMutation } from \"./useMutation.js\";\nimport { useInfiniteQuery } from \"./useInfiniteQuery.js\";\nimport { useIsRestoring, IsRestoringProvider } from \"./isRestoring.js\";\nexport {\n HydrationBoundary,\n IsRestoringProvider,\n QueryClientContext,\n QueryClientProvider,\n QueryErrorResetBoundary,\n infiniteQueryOptions,\n queryOptions,\n useInfiniteQuery,\n useIsFetching,\n useIsMutating,\n useIsRestoring,\n useMutation,\n useMutationState,\n useQueries,\n useQuery,\n useQueryClient,\n useQueryErrorResetBoundary,\n useSuspenseInfiniteQuery,\n useSuspenseQueries,\n useSuspenseQuery\n};\n//# sourceMappingURL=index.js.map","// src/infiniteQueryOptions.ts\nfunction infiniteQueryOptions(options) {\n return options;\n}\nexport {\n infiniteQueryOptions\n};\n//# sourceMappingURL=infiniteQueryOptions.js.map","\"use client\";\n\n// src/isRestoring.ts\nimport * as React from \"react\";\nvar IsRestoringContext = React.createContext(false);\nvar useIsRestoring = () => React.useContext(IsRestoringContext);\nvar IsRestoringProvider = IsRestoringContext.Provider;\nexport {\n IsRestoringProvider,\n useIsRestoring\n};\n//# sourceMappingURL=isRestoring.js.map","// src/queryOptions.ts\nfunction queryOptions(options) {\n return options;\n}\nexport {\n queryOptions\n};\n//# sourceMappingURL=queryOptions.js.map","// src/suspense.ts\nvar defaultThrowOnError = (_error, query) => query.state.data === void 0;\nvar ensureStaleTime = (defaultedOptions) => {\n if (defaultedOptions.suspense) {\n if (typeof defaultedOptions.staleTime !== \"number\") {\n defaultedOptions.staleTime = 1e3;\n }\n }\n};\nvar willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;\nvar shouldSuspend = (defaultedOptions, result) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && result.isPending;\nvar fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset();\n});\nexport {\n defaultThrowOnError,\n ensureStaleTime,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n};\n//# sourceMappingURL=suspense.js.map","\"use client\";\n\n// src/useBaseQuery.ts\nimport * as React from \"react\";\nimport { notifyManager } from \"@tanstack/query-core\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./isRestoring.js\";\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport { ensureStaleTime, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nfunction useBaseQuery(options, Observer, queryClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof options !== \"object\" || Array.isArray(options)) {\n throw new Error(\n 'Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'\n );\n }\n }\n const client = useQueryClient(queryClient);\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const defaultedOptions = client.defaultQueryOptions(options);\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n ensureStaleTime(defaultedOptions);\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);\n useClearResetErrorBoundary(errorResetBoundary);\n const [observer] = React.useState(\n () => new Observer(\n client,\n defaultedOptions\n )\n );\n const result = observer.getOptimisticResult(defaultedOptions);\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => {\n const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(notifyManager.batchCalls(onStoreChange));\n observer.updateResult();\n return unsubscribe;\n },\n [observer, isRestoring]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n React.useEffect(() => {\n observer.setOptions(defaultedOptions, { listeners: false });\n }, [defaultedOptions, observer]);\n if (shouldSuspend(defaultedOptions, result)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n }\n if (getHasError({\n result,\n errorResetBoundary,\n throwOnError: defaultedOptions.throwOnError,\n query: client.getQueryCache().get(defaultedOptions.queryHash)\n })) {\n throw result.error;\n }\n return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\nexport {\n useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\n\n// src/useInfiniteQuery.ts\nimport { InfiniteQueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useInfiniteQuery(options, queryClient) {\n return useBaseQuery(\n options,\n InfiniteQueryObserver,\n queryClient\n );\n}\nexport {\n useInfiniteQuery\n};\n//# sourceMappingURL=useInfiniteQuery.js.map","\"use client\";\n\n// src/useIsFetching.ts\nimport * as React from \"react\";\nimport { notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useIsFetching(filters, queryClient) {\n const client = useQueryClient(queryClient);\n const queryCache = client.getQueryCache();\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache]\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters)\n );\n}\nexport {\n useIsFetching\n};\n//# sourceMappingURL=useIsFetching.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport { MutationObserver, notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { noop, shouldThrowError } from \"./utils.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","\"use client\";\n\n// src/useMutationState.ts\nimport * as React from \"react\";\nimport { notifyManager, replaceEqualDeep } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useIsMutating(filters, queryClient) {\n const client = useQueryClient(queryClient);\n return useMutationState(\n { filters: { ...filters, status: \"pending\" } },\n client\n ).length;\n}\nfunction getResult(mutationCache, options) {\n return mutationCache.findAll(options.filters).map(\n (mutation) => options.select ? options.select(\n mutation\n ) : mutation.state\n );\n}\nfunction useMutationState(options = {}, queryClient) {\n const mutationCache = useQueryClient(queryClient).getMutationCache();\n const optionsRef = React.useRef(options);\n const result = React.useRef();\n if (!result.current) {\n result.current = getResult(mutationCache, options);\n }\n React.useEffect(() => {\n optionsRef.current = options;\n });\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => mutationCache.subscribe(() => {\n const nextResult = replaceEqualDeep(\n result.current,\n getResult(mutationCache, optionsRef.current)\n );\n if (result.current !== nextResult) {\n result.current = nextResult;\n notifyManager.schedule(onStoreChange);\n }\n }),\n [mutationCache]\n ),\n () => result.current,\n () => result.current\n );\n}\nexport {\n useIsMutating,\n useMutationState\n};\n//# sourceMappingURL=useMutationState.js.map","\"use client\";\n\n// src/useQueries.ts\nimport * as React from \"react\";\nimport {\n QueriesObserver,\n QueryObserver,\n notifyManager\n} from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./isRestoring.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport {\n ensureStaleTime,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n} from \"./suspense.js\";\nfunction useQueries({\n queries,\n ...options\n}, queryClient) {\n const client = useQueryClient(queryClient);\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const defaultedQueries = React.useMemo(\n () => queries.map((opts) => {\n const defaultedOptions = client.defaultQueryOptions(opts);\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n return defaultedOptions;\n }),\n [queries, client, isRestoring]\n );\n defaultedQueries.forEach((query) => {\n ensureStaleTime(query);\n ensurePreventErrorBoundaryRetry(query, errorResetBoundary);\n });\n useClearResetErrorBoundary(errorResetBoundary);\n const [observer] = React.useState(\n () => new QueriesObserver(\n client,\n defaultedQueries,\n options\n )\n );\n const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(\n defaultedQueries,\n options.combine\n );\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => isRestoring ? () => void 0 : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n React.useEffect(() => {\n observer.setQueries(\n defaultedQueries,\n options,\n {\n listeners: false\n }\n );\n }, [defaultedQueries, options, observer]);\n const shouldAtLeastOneSuspend = optimisticResult.some(\n (result, index) => shouldSuspend(defaultedQueries[index], result)\n );\n const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {\n const opts = defaultedQueries[index];\n if (opts) {\n const queryObserver = new QueryObserver(client, opts);\n if (shouldSuspend(opts, result)) {\n return fetchOptimistic(opts, queryObserver, errorResetBoundary);\n } else if (willFetch(result, isRestoring)) {\n void fetchOptimistic(opts, queryObserver, errorResetBoundary);\n }\n }\n return [];\n }) : [];\n if (suspensePromises.length > 0) {\n throw Promise.all(suspensePromises);\n }\n const firstSingleResultWhichShouldThrow = optimisticResult.find(\n (result, index) => {\n const query = defaultedQueries[index];\n return query && getHasError({\n result,\n errorResetBoundary,\n throwOnError: query.throwOnError,\n query: client.getQueryCache().get(query.queryHash)\n });\n }\n );\n if (firstSingleResultWhichShouldThrow == null ? void 0 : firstSingleResultWhichShouldThrow.error) {\n throw firstSingleResultWhichShouldThrow.error;\n }\n return getCombinedResult(trackResult());\n}\nexport {\n useQueries\n};\n//# sourceMappingURL=useQueries.js.map","\"use client\";\n\n// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n return useBaseQuery(options, QueryObserver, queryClient);\n}\nexport {\n useQuery\n};\n//# sourceMappingURL=useQuery.js.map","\"use client\";\n\n// src/useSuspenseInfiniteQuery.ts\nimport { InfiniteQueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { defaultThrowOnError } from \"./suspense.js\";\nfunction useSuspenseInfiniteQuery(options, queryClient) {\n return useBaseQuery(\n {\n ...options,\n enabled: true,\n suspense: true,\n throwOnError: defaultThrowOnError\n },\n InfiniteQueryObserver,\n queryClient\n );\n}\nexport {\n useSuspenseInfiniteQuery\n};\n//# sourceMappingURL=useSuspenseInfiniteQuery.js.map","\"use client\";\n\n// src/useSuspenseQueries.ts\nimport { useQueries } from \"./useQueries.js\";\nimport { defaultThrowOnError } from \"./suspense.js\";\nfunction useSuspenseQueries(options, queryClient) {\n return useQueries(\n {\n ...options,\n queries: options.queries.map((query) => ({\n ...query,\n suspense: true,\n throwOnError: defaultThrowOnError,\n enabled: true,\n placeholderData: void 0\n }))\n },\n queryClient\n );\n}\nexport {\n useSuspenseQueries\n};\n//# sourceMappingURL=useSuspenseQueries.js.map","\"use client\";\n\n// src/useSuspenseQuery.ts\nimport { QueryObserver, skipToken } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { defaultThrowOnError } from \"./suspense.js\";\nfunction useSuspenseQuery(options, queryClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (options.queryFn === skipToken) {\n console.error(\"skipToken is not allowed for useSuspenseQuery\");\n }\n }\n return useBaseQuery(\n {\n ...options,\n enabled: true,\n suspense: true,\n throwOnError: defaultThrowOnError,\n placeholderData: void 0\n },\n QueryObserver,\n queryClient\n );\n}\nexport {\n useSuspenseQuery\n};\n//# sourceMappingURL=useSuspenseQuery.js.map","// src/utils.ts\nfunction shouldThrowError(throwError, params) {\n if (typeof throwError === \"function\") {\n return throwError(...params);\n }\n return !!throwError;\n}\nfunction noop() {\n}\nexport {\n noop,\n shouldThrowError\n};\n//# sourceMappingURL=utils.js.map","import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport { Line } from '@vx/shape';\nimport { Point } from '@vx/point';\nimport { Group } from '@vx/group';\nimport { Text } from '@vx/text';\n\nfunction center(scale) {\n var offset = scale.bandwidth() / 2;\n if (scale.round()) offset = Math.round(offset);\n return function (d) {\n return scale(d) + offset;\n };\n}\n\nfunction identity(x) {\n return x;\n}\n\nvar ORIENT = {\n top: 'top',\n left: 'left',\n right: 'right',\n bottom: 'bottom'\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\nvar toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\nfunction labelTransform(_ref) {\n var labelOffset = _ref.labelOffset,\n labelProps = _ref.labelProps,\n orientation = _ref.orientation,\n range = _ref.range,\n tickLabelFontSize = _ref.tickLabelFontSize,\n tickLength = _ref.tickLength;\n\n var sign = orientation === ORIENT.left || orientation === ORIENT.top ? -1 : 1;\n\n var x = void 0,\n y = void 0,\n transform = null;\n if (orientation === ORIENT.top || orientation === ORIENT.bottom) {\n x = Math.max.apply(Math, toConsumableArray(range)) / 2;\n y = sign * (tickLength + labelOffset + tickLabelFontSize + (orientation === ORIENT.bottom ? labelProps.fontSize : 0));\n } else {\n x = sign * (Math.max.apply(Math, toConsumableArray(range)) / 2);\n y = -(tickLength + labelOffset);\n transform = 'rotate(' + sign * 90 + ')';\n }\n\n return { x: x, y: y, transform: transform };\n}\n\nvar propTypes = {\n axisClassName: PropTypes.string,\n axisLineClassName: PropTypes.string,\n hideAxisLine: PropTypes.bool,\n hideTicks: PropTypes.bool,\n hideZero: PropTypes.bool,\n label: PropTypes.string,\n labelClassName: PropTypes.string,\n labelOffset: PropTypes.number,\n labelProps: PropTypes.object,\n left: PropTypes.number,\n numTicks: PropTypes.number,\n orientation: PropTypes.oneOf([ORIENT.top, ORIENT.right, ORIENT.bottom, ORIENT.left]),\n rangePadding: PropTypes.number,\n scale: PropTypes.func.isRequired,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n strokeDasharray: PropTypes.string,\n tickClassName: PropTypes.string,\n tickFormat: PropTypes.func,\n tickLabelProps: PropTypes.func,\n tickLength: PropTypes.number,\n tickStroke: PropTypes.string,\n tickTransform: PropTypes.string,\n tickValues: PropTypes.array,\n tickComponent: PropTypes.func,\n top: PropTypes.number,\n children: PropTypes.func\n};\n\nfunction Axis(_ref) {\n var children = _ref.children,\n axisClassName = _ref.axisClassName,\n axisLineClassName = _ref.axisLineClassName,\n _ref$hideAxisLine = _ref.hideAxisLine,\n hideAxisLine = _ref$hideAxisLine === undefined ? false : _ref$hideAxisLine,\n _ref$hideTicks = _ref.hideTicks,\n hideTicks = _ref$hideTicks === undefined ? false : _ref$hideTicks,\n _ref$hideZero = _ref.hideZero,\n hideZero = _ref$hideZero === undefined ? false : _ref$hideZero,\n _ref$label = _ref.label,\n label = _ref$label === undefined ? '' : _ref$label,\n labelClassName = _ref.labelClassName,\n _ref$labelOffset = _ref.labelOffset,\n labelOffset = _ref$labelOffset === undefined ? 14 : _ref$labelOffset,\n _ref$labelProps = _ref.labelProps,\n labelProps = _ref$labelProps === undefined ? {\n textAnchor: 'middle',\n fontFamily: 'Arial',\n fontSize: 10,\n fill: 'black'\n } : _ref$labelProps,\n _ref$left = _ref.left,\n left = _ref$left === undefined ? 0 : _ref$left,\n _ref$numTicks = _ref.numTicks,\n numTicks = _ref$numTicks === undefined ? 10 : _ref$numTicks,\n _ref$orientation = _ref.orientation,\n orientation = _ref$orientation === undefined ? ORIENT.bottom : _ref$orientation,\n _ref$rangePadding = _ref.rangePadding,\n rangePadding = _ref$rangePadding === undefined ? 0 : _ref$rangePadding,\n scale = _ref.scale,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === undefined ? 'black' : _ref$stroke,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === undefined ? 1 : _ref$strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n tickClassName = _ref.tickClassName,\n tickFormat = _ref.tickFormat,\n _ref$tickLabelProps = _ref.tickLabelProps,\n tickLabelProps = _ref$tickLabelProps === undefined ? function (tickValue, index) {\n return {\n textAnchor: 'middle',\n fontFamily: 'Arial',\n fontSize: 10,\n fill: 'black'\n };\n } : _ref$tickLabelProps,\n _ref$tickLength = _ref.tickLength,\n tickLength = _ref$tickLength === undefined ? 8 : _ref$tickLength,\n _ref$tickStroke = _ref.tickStroke,\n tickStroke = _ref$tickStroke === undefined ? 'black' : _ref$tickStroke,\n tickTransform = _ref.tickTransform,\n tickValues = _ref.tickValues,\n tickComponent = _ref.tickComponent,\n _ref$top = _ref.top,\n top = _ref$top === undefined ? 0 : _ref$top;\n\n var values = scale.ticks ? scale.ticks(numTicks) : scale.domain();\n if (tickValues) values = tickValues;\n var format = scale.tickFormat ? scale.tickFormat() : identity;\n if (tickFormat) format = tickFormat;\n\n var range = scale.range();\n var range0 = range[0] + 0.5 - rangePadding;\n var range1 = range[range.length - 1] + 0.5 + rangePadding;\n\n var horizontal = orientation !== ORIENT.left && orientation !== ORIENT.right;\n var isLeft = orientation === ORIENT.left;\n var isTop = orientation === ORIENT.top;\n var tickSign = isLeft || isTop ? -1 : 1;\n\n var position = (scale.bandwidth ? center : identity)(scale.copy());\n\n var axisFromPoint = new Point({\n x: horizontal ? range0 : 0,\n y: horizontal ? 0 : range0\n });\n var axisToPoint = new Point({\n x: horizontal ? range1 : 0,\n y: horizontal ? 0 : range1\n });\n\n var tickLabelFontSize = 10; // track the max tick label size to compute label offset\n\n if (!!children) {\n return React.createElement(\n Group,\n { className: cx('vx-axis', axisClassName), top: top, left: left },\n children({\n axisFromPoint: axisFromPoint,\n axisToPoint: axisToPoint,\n horizontal: horizontal,\n tickSign: tickSign,\n numTicks: numTicks,\n label: label,\n rangePadding: rangePadding,\n tickLength: tickLength,\n tickFormat: format,\n tickPosition: position,\n ticks: values.map(function (value, index) {\n var from = new Point({\n x: horizontal ? position(value) : 0,\n y: horizontal ? 0 : position(value)\n });\n var to = new Point({\n x: horizontal ? position(value) : tickSign * tickLength,\n y: horizontal ? tickLength * tickSign : position(value)\n });\n return {\n value: value,\n index: index,\n from: from,\n to: to,\n formattedValue: format(value, index)\n };\n })\n })\n );\n }\n\n return React.createElement(\n Group,\n { className: cx('vx-axis', axisClassName), top: top, left: left },\n values.map(function (val, index) {\n if (hideZero && val === 0) return null;\n\n var tickFromPoint = new Point({\n x: horizontal ? position(val) : 0,\n y: horizontal ? 0 : position(val)\n });\n var tickToPoint = new Point({\n x: horizontal ? position(val) : tickSign * tickLength,\n y: horizontal ? tickLength * tickSign : position(val)\n });\n\n var tickLabelPropsObj = tickLabelProps(val, index);\n tickLabelFontSize = Math.max(tickLabelFontSize, tickLabelPropsObj.fontSize || 0);\n\n return React.createElement(\n Group,\n {\n key: 'vx-tick-' + val + '-' + index,\n className: cx('vx-axis-tick', tickClassName),\n transform: tickTransform\n },\n !hideTicks && React.createElement(Line, { from: tickFromPoint, to: tickToPoint, stroke: tickStroke }),\n tickComponent ? tickComponent(_extends({\n x: tickToPoint.x,\n y: tickToPoint.y + (horizontal && !isTop ? tickLabelFontSize : 0),\n formattedValue: format(val, index)\n }, tickLabelPropsObj)) : React.createElement(\n Text,\n _extends({\n x: tickToPoint.x,\n y: tickToPoint.y + (horizontal && !isTop ? tickLabelFontSize : 0)\n }, tickLabelPropsObj),\n format(val, index)\n )\n );\n }),\n !hideAxisLine && React.createElement(Line, {\n className: cx('vx-axis-line', axisLineClassName),\n from: axisFromPoint,\n to: axisToPoint,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray\n }),\n label && React.createElement(\n Text,\n _extends({\n className: cx('vx-axis-label', labelClassName)\n }, labelTransform({\n labelOffset: labelOffset,\n labelProps: labelProps,\n orientation: orientation,\n range: range,\n tickLabelFontSize: tickLabelFontSize,\n tickLength: tickLength\n }), labelProps),\n label\n )\n );\n}\n\nAxis.propTypes = propTypes;\n\nvar propTypes$1 = {\n axisClassName: PropTypes.string,\n axisLineClassName: PropTypes.string,\n hideAxisLine: PropTypes.bool,\n hideTicks: PropTypes.bool,\n hideZero: PropTypes.bool,\n label: PropTypes.string,\n labelClassName: PropTypes.string,\n labelOffset: PropTypes.number,\n labelProps: PropTypes.object,\n left: PropTypes.number,\n numTicks: PropTypes.number,\n rangePadding: PropTypes.number,\n scale: PropTypes.func.isRequired,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n strokeDasharray: PropTypes.string,\n tickClassName: PropTypes.string,\n tickFormat: PropTypes.func,\n tickLabelProps: PropTypes.func,\n tickLength: PropTypes.number,\n tickStroke: PropTypes.string,\n tickTransform: PropTypes.string,\n tickValues: PropTypes.array,\n tickComponent: PropTypes.func,\n top: PropTypes.number,\n children: PropTypes.func\n};\n\nfunction AxisLeft(_ref) {\n var children = _ref.children,\n axisClassName = _ref.axisClassName,\n axisLineClassName = _ref.axisLineClassName,\n hideAxisLine = _ref.hideAxisLine,\n hideTicks = _ref.hideTicks,\n hideZero = _ref.hideZero,\n label = _ref.label,\n labelClassName = _ref.labelClassName,\n _ref$labelOffset = _ref.labelOffset,\n labelOffset = _ref$labelOffset === undefined ? 36 : _ref$labelOffset,\n labelProps = _ref.labelProps,\n left = _ref.left,\n numTicks = _ref.numTicks,\n rangePadding = _ref.rangePadding,\n scale = _ref.scale,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n tickClassName = _ref.tickClassName,\n tickFormat = _ref.tickFormat,\n _ref$tickLabelProps = _ref.tickLabelProps,\n tickLabelProps = _ref$tickLabelProps === undefined ? function (_ref2) {\n var tick = _ref2.tick,\n index = _ref2.index;\n return {\n dx: '-0.25em',\n dy: '0.25em',\n fill: 'black',\n fontFamily: 'Arial',\n fontSize: 10,\n textAnchor: 'end'\n };\n } : _ref$tickLabelProps,\n _ref$tickLength = _ref.tickLength,\n tickLength = _ref$tickLength === undefined ? 8 : _ref$tickLength,\n tickStroke = _ref.tickStroke,\n tickTransform = _ref.tickTransform,\n tickValues = _ref.tickValues,\n tickComponent = _ref.tickComponent,\n top = _ref.top;\n\n return React.createElement(Axis, {\n axisClassName: cx('vx-axis-left', axisClassName),\n axisLineClassName: axisLineClassName,\n hideAxisLine: hideAxisLine,\n hideTicks: hideTicks,\n hideZero: hideZero,\n label: label,\n labelClassName: labelClassName,\n labelOffset: labelOffset,\n labelProps: labelProps,\n left: left,\n numTicks: numTicks,\n orientation: ORIENT.left,\n rangePadding: rangePadding,\n scale: scale,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n tickClassName: tickClassName,\n tickFormat: tickFormat,\n tickLabelProps: tickLabelProps,\n tickLength: tickLength,\n tickStroke: tickStroke,\n tickTransform: tickTransform,\n tickValues: tickValues,\n tickComponent: tickComponent,\n top: top,\n children: children\n });\n}\n\nAxisLeft.propTypes = propTypes$1;\n\nvar propTypes$2 = {\n axisClassName: PropTypes.string,\n axisLineClassName: PropTypes.string,\n hideAxisLine: PropTypes.bool,\n hideTicks: PropTypes.bool,\n hideZero: PropTypes.bool,\n label: PropTypes.string,\n labelClassName: PropTypes.string,\n labelOffset: PropTypes.number,\n labelProps: PropTypes.object,\n left: PropTypes.number,\n numTicks: PropTypes.number,\n rangePadding: PropTypes.number,\n scale: PropTypes.func.isRequired,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n strokeDasharray: PropTypes.string,\n tickClassName: PropTypes.string,\n tickFormat: PropTypes.func,\n tickLabelProps: PropTypes.func,\n tickLength: PropTypes.number,\n tickStroke: PropTypes.string,\n tickTransform: PropTypes.string,\n tickValues: PropTypes.array,\n tickComponent: PropTypes.func,\n top: PropTypes.number,\n children: PropTypes.func\n};\n\nfunction AxisRight(_ref) {\n var children = _ref.children,\n axisClassName = _ref.axisClassName,\n axisLineClassName = _ref.axisLineClassName,\n hideAxisLine = _ref.hideAxisLine,\n hideTicks = _ref.hideTicks,\n hideZero = _ref.hideZero,\n label = _ref.label,\n labelClassName = _ref.labelClassName,\n _ref$labelOffset = _ref.labelOffset,\n labelOffset = _ref$labelOffset === undefined ? 36 : _ref$labelOffset,\n labelProps = _ref.labelProps,\n left = _ref.left,\n numTicks = _ref.numTicks,\n rangePadding = _ref.rangePadding,\n scale = _ref.scale,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n tickClassName = _ref.tickClassName,\n tickFormat = _ref.tickFormat,\n _ref$tickLabelProps = _ref.tickLabelProps,\n tickLabelProps = _ref$tickLabelProps === undefined ? function (_ref2) {\n var tick = _ref2.tick,\n index = _ref2.index;\n return {\n dx: '0.25em',\n dy: '0.25em',\n fill: 'black',\n fontFamily: 'Arial',\n fontSize: 10,\n textAnchor: 'start'\n };\n } : _ref$tickLabelProps,\n _ref$tickLength = _ref.tickLength,\n tickLength = _ref$tickLength === undefined ? 8 : _ref$tickLength,\n tickStroke = _ref.tickStroke,\n tickTransform = _ref.tickTransform,\n tickValues = _ref.tickValues,\n tickComponent = _ref.tickComponent,\n top = _ref.top;\n\n return React.createElement(Axis, {\n axisClassName: cx('vx-axis-right', axisClassName),\n axisLineClassName: axisLineClassName,\n hideAxisLine: hideAxisLine,\n hideTicks: hideTicks,\n hideZero: hideZero,\n label: label,\n labelClassName: labelClassName,\n labelOffset: labelOffset,\n labelProps: labelProps,\n left: left,\n numTicks: numTicks,\n orientation: ORIENT.right,\n rangePadding: rangePadding,\n scale: scale,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n tickClassName: tickClassName,\n tickFormat: tickFormat,\n tickLabelProps: tickLabelProps,\n tickLength: tickLength,\n tickStroke: tickStroke,\n tickTransform: tickTransform,\n tickValues: tickValues,\n tickComponent: tickComponent,\n top: top,\n children: children\n });\n}\n\nAxisRight.propTypes = propTypes$2;\n\nvar propTypes$3 = {\n axisClassName: PropTypes.string,\n axisLineClassName: PropTypes.string,\n hideAxisLine: PropTypes.bool,\n hideTicks: PropTypes.bool,\n hideZero: PropTypes.bool,\n label: PropTypes.string,\n labelClassName: PropTypes.string,\n labelOffset: PropTypes.number,\n labelProps: PropTypes.object,\n left: PropTypes.number,\n numTicks: PropTypes.number,\n rangePadding: PropTypes.number,\n scale: PropTypes.func.isRequired,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n strokeDasharray: PropTypes.string,\n tickClassName: PropTypes.string,\n tickFormat: PropTypes.func,\n tickLabelProps: PropTypes.func,\n tickLength: PropTypes.number,\n tickStroke: PropTypes.string,\n tickTransform: PropTypes.string,\n tickValues: PropTypes.array,\n tickComponent: PropTypes.func,\n top: PropTypes.number,\n children: PropTypes.func\n};\n\nfunction AxisTop(_ref) {\n var children = _ref.children,\n axisClassName = _ref.axisClassName,\n axisLineClassName = _ref.axisLineClassName,\n hideAxisLine = _ref.hideAxisLine,\n hideTicks = _ref.hideTicks,\n hideZero = _ref.hideZero,\n label = _ref.label,\n labelClassName = _ref.labelClassName,\n _ref$labelOffset = _ref.labelOffset,\n labelOffset = _ref$labelOffset === undefined ? 8 : _ref$labelOffset,\n labelProps = _ref.labelProps,\n left = _ref.left,\n numTicks = _ref.numTicks,\n rangePadding = _ref.rangePadding,\n scale = _ref.scale,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n tickClassName = _ref.tickClassName,\n tickFormat = _ref.tickFormat,\n _ref$tickLabelProps = _ref.tickLabelProps,\n tickLabelProps = _ref$tickLabelProps === undefined ? function (_ref2) {\n var tick = _ref2.tick,\n index = _ref2.index;\n return {\n dy: '-0.25em',\n fill: 'black',\n fontFamily: 'Arial',\n fontSize: 10,\n textAnchor: 'middle'\n };\n } : _ref$tickLabelProps,\n _ref$tickLength = _ref.tickLength,\n tickLength = _ref$tickLength === undefined ? 8 : _ref$tickLength,\n tickStroke = _ref.tickStroke,\n tickTransform = _ref.tickTransform,\n tickValues = _ref.tickValues,\n tickComponent = _ref.tickComponent,\n top = _ref.top;\n\n return React.createElement(Axis, {\n axisClassName: cx('vx-axis-top', axisClassName),\n axisLineClassName: axisLineClassName,\n hideAxisLine: hideAxisLine,\n hideTicks: hideTicks,\n hideZero: hideZero,\n label: label,\n labelClassName: labelClassName,\n labelOffset: labelOffset,\n labelProps: labelProps,\n left: left,\n numTicks: numTicks,\n orientation: ORIENT.top,\n rangePadding: rangePadding,\n scale: scale,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n tickClassName: tickClassName,\n tickFormat: tickFormat,\n tickLabelProps: tickLabelProps,\n tickLength: tickLength,\n tickStroke: tickStroke,\n tickTransform: tickTransform,\n tickValues: tickValues,\n tickComponent: tickComponent,\n top: top,\n children: children\n });\n}\n\nAxisTop.propTypes = propTypes$3;\n\nvar propTypes$4 = {\n axisClassName: PropTypes.string,\n axisLineClassName: PropTypes.string,\n hideAxisLine: PropTypes.bool,\n hideTicks: PropTypes.bool,\n hideZero: PropTypes.bool,\n label: PropTypes.string,\n labelClassName: PropTypes.string,\n labelOffset: PropTypes.number,\n labelProps: PropTypes.object,\n left: PropTypes.number,\n numTicks: PropTypes.number,\n rangePadding: PropTypes.number,\n scale: PropTypes.func.isRequired,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n strokeDasharray: PropTypes.string,\n tickClassName: PropTypes.string,\n tickFormat: PropTypes.func,\n tickLabelProps: PropTypes.func,\n tickLength: PropTypes.number,\n tickStroke: PropTypes.string,\n tickTransform: PropTypes.string,\n tickValues: PropTypes.array,\n tickComponent: PropTypes.func,\n top: PropTypes.number,\n children: PropTypes.func\n};\n\nfunction AxisBottom(_ref) {\n var children = _ref.children,\n axisClassName = _ref.axisClassName,\n axisLineClassName = _ref.axisLineClassName,\n hideAxisLine = _ref.hideAxisLine,\n hideTicks = _ref.hideTicks,\n hideZero = _ref.hideZero,\n label = _ref.label,\n labelClassName = _ref.labelClassName,\n _ref$labelOffset = _ref.labelOffset,\n labelOffset = _ref$labelOffset === undefined ? 8 : _ref$labelOffset,\n labelProps = _ref.labelProps,\n left = _ref.left,\n numTicks = _ref.numTicks,\n rangePadding = _ref.rangePadding,\n scale = _ref.scale,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n tickClassName = _ref.tickClassName,\n tickFormat = _ref.tickFormat,\n _ref$tickLabelProps = _ref.tickLabelProps,\n tickLabelProps = _ref$tickLabelProps === undefined ? function (_ref2) {\n var tick = _ref2.tick,\n index = _ref2.index;\n return {\n dy: '0.25em',\n fill: 'black',\n fontFamily: 'Arial',\n fontSize: 10,\n textAnchor: 'middle'\n };\n } : _ref$tickLabelProps,\n _ref$tickLength = _ref.tickLength,\n tickLength = _ref$tickLength === undefined ? 8 : _ref$tickLength,\n tickStroke = _ref.tickStroke,\n tickTransform = _ref.tickTransform,\n tickValues = _ref.tickValues,\n tickComponent = _ref.tickComponent,\n top = _ref.top;\n\n return React.createElement(Axis, {\n axisClassName: cx('vx-axis-bottom', axisClassName),\n axisLineClassName: axisLineClassName,\n hideAxisLine: hideAxisLine,\n hideTicks: hideTicks,\n hideZero: hideZero,\n label: label,\n labelClassName: labelClassName,\n labelOffset: labelOffset,\n labelProps: labelProps,\n left: left,\n numTicks: numTicks,\n orientation: ORIENT.bottom,\n rangePadding: rangePadding,\n scale: scale,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n tickClassName: tickClassName,\n tickFormat: tickFormat,\n tickLabelProps: tickLabelProps,\n tickLength: tickLength,\n tickStroke: tickStroke,\n tickTransform: tickTransform,\n tickValues: tickValues,\n tickComponent: tickComponent,\n top: top,\n children: children\n });\n}\n\nAxisBottom.propTypes = propTypes$4;\n\nexport { Axis, AxisLeft, AxisRight, AxisTop, AxisBottom, ORIENT as Orientation };\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\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\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\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\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\n/* eslint react/no-did-mount-set-state: 0, react/no-find-dom-node: 0 */\n\nvar emptyRect = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n width: 0,\n height: 0\n};\n\nvar rectShape = PropTypes.shape({\n top: PropTypes.number.isRequired,\n right: PropTypes.number.isRequired,\n bottom: PropTypes.number.isRequired,\n left: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired\n});\n\nvar withBoundingRectsProps = {\n getRects: PropTypes.func,\n rect: rectShape,\n parentRect: rectShape\n};\n\nfunction withBoundingRects(BaseComponent) {\n var WrappedComponent = function (_React$PureComponent) {\n inherits(WrappedComponent, _React$PureComponent);\n\n function WrappedComponent(props) {\n classCallCheck(this, WrappedComponent);\n\n var _this = possibleConstructorReturn(this, (WrappedComponent.__proto__ || Object.getPrototypeOf(WrappedComponent)).call(this, props));\n\n _this.state = {\n rect: undefined,\n parentRect: undefined\n };\n _this.getRects = _this.getRects.bind(_this);\n return _this;\n }\n\n createClass(WrappedComponent, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n this.node = ReactDOM.findDOMNode(this);\n this.setState(function () {\n return _this2.getRects();\n });\n }\n }, {\n key: 'getRects',\n value: function getRects() {\n if (!this.node) return this.state;\n\n var node = this.node;\n var parentNode = this.node.parentNode;\n\n var rect = node.getBoundingClientRect ? node.getBoundingClientRect() : emptyRect;\n\n var parentRect = parentNode && parentNode.getBoundingClientRect ? parentNode.getBoundingClientRect() : emptyRect;\n\n return { rect: rect, parentRect: parentRect };\n }\n }, {\n key: 'render',\n value: function render() {\n return React.createElement(BaseComponent, _extends({ getRects: this.getRects }, this.state, this.props));\n }\n }]);\n return WrappedComponent;\n }(React.PureComponent);\n\n WrappedComponent.propTypes = BaseComponent.propTypes;\n WrappedComponent.defaultProps = BaseComponent.defaultProps;\n WrappedComponent.displayName = 'withBoundingRects(' + (BaseComponent.displayName || '') + ')';\n\n return WrappedComponent;\n}\n\nexport { withBoundingRects, withBoundingRectsProps };\n","export { curveBasis, curveBasisClosed, curveBasisOpen, curveStep, curveStepAfter, curveStepBefore, curveBundle, curveLinear, curveLinearClosed, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveMonotoneX, curveMonotoneY, curveNatural } from 'd3-shape';\n","import { Point } from '@vx/point';\n\nfunction localPoint(node, event) {\n // called with no args\n if (!node) return;\n\n // called with localPoint(event)\n if (node.target) {\n event = node;\n\n // set node to targets owner svg\n node = event.target.ownerSVGElement;\n\n // find the outermost svg\n while (node.ownerSVGElement) {\n node = node.ownerSVGElement;\n }\n }\n\n // default to mouse event\n var _event = event,\n clientX = _event.clientX,\n clientY = _event.clientY;\n\n // support touch event\n\n if (event.changedTouches) {\n clientX = event.changedTouches[0].clientX;\n clientY = event.changedTouches[0].clientY;\n }\n\n // calculate coordinates from svg\n if (node.createSVGPoint) {\n var point = node.createSVGPoint();\n point.x = clientX;\n point.y = clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return new Point({\n x: point.x,\n y: point.y\n });\n }\n\n // fallback to calculating position from non-svg dom node\n var rect = node.getBoundingClientRect();\n return new Point({\n x: clientX - rect.left - node.clientLeft,\n y: clientY - rect.top - node.clientTop\n });\n}\n\nfunction touchPoint(node, event) {\n if (!node) return;\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.changedTouches[0].clientX;\n point.y = event.changedTouches[0].clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return new Point({\n x: point.x,\n y: point.y\n });\n }\n var rect = node.getBoundingClientRect();\n return new Point({\n x: event.changedTouches[0].clientX - rect.left - node.clientLeft,\n y: event.changedTouches[0].clientY - rect.top - node.clientTop\n });\n}\n\nexport { localPoint, touchPoint };\n","import React from 'react';\nimport { Group } from '@vx/group';\nimport cx from 'classnames';\nimport { symbol, symbolCross, symbolDiamond, symbolStar, symbolTriangle, symbolWye, symbolSquare, symbolCircle } from 'd3-shape';\n\nfunction Glyph(_ref) {\n var _ref$top = _ref.top,\n top = _ref$top === undefined ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === undefined ? 0 : _ref$left,\n className = _ref.className,\n children = _ref.children;\n\n return React.createElement(\n Group,\n { className: cx('vx-glyph', className), top: top, left: left },\n children\n );\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\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\nfunction GlyphDot(_ref) {\n var _ref$top = _ref.top,\n top = _ref$top === undefined ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === undefined ? 0 : _ref$left,\n className = _ref.className,\n children = _ref.children,\n cx$$1 = _ref.cx,\n cy = _ref.cy,\n r = _ref.r,\n fill = _ref.fill,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n restProps = objectWithoutProperties(_ref, ['top', 'left', 'className', 'children', 'cx', 'cy', 'r', 'fill', 'stroke', 'strokeWidth', 'strokeDasharray']);\n\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('circle', _extends({\n className: cx('vx-glyph-dot', className),\n cx: cx$$1,\n cy: cy,\n r: r,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray\n }, restProps)),\n children\n );\n}\n\nfunction callOrValue(maybeFn, data) {\n if (typeof maybeFn === 'function') {\n return maybeFn(data);\n }\n return maybeFn;\n}\n\nfunction additionalProps(restProps, data) {\n return Object.keys(restProps).reduce(function (ret, cur) {\n ret[cur] = callOrValue(restProps[cur], data);\n return ret;\n }, {});\n}\n\nfunction GlyphCross(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolCross);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({\n className: cx('vx-glyph-cross', className),\n d: path()\n }, additionalProps(restProps))),\n children\n );\n}\n\nfunction GlyphDiamond(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolDiamond);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({\n className: cx('vx-glyph-diamond', className),\n d: path()\n }, additionalProps(restProps))),\n children\n );\n}\n\nfunction GlyphStar(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolStar);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({ className: cx('vx-glyph-star', className), d: path() }, additionalProps(restProps))),\n children\n );\n}\n\nfunction GlyphTriangle(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolTriangle);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({\n className: cx('vx-glyph-triangle', className),\n d: path()\n }, additionalProps(restProps))),\n children\n );\n}\n\nfunction GlyphWye(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolWye);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({ className: cx('vx-glyph-wye', className), d: path() }, additionalProps(restProps))),\n children\n );\n}\n\nfunction GlyphSquare(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolSquare);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({\n className: cx('vx-glyph-square', className),\n d: path()\n }, additionalProps(restProps))),\n children\n );\n}\n\nfunction GlyphCircle(_ref) {\n var children = _ref.children,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n size = _ref.size,\n restProps = objectWithoutProperties(_ref, ['children', 'className', 'top', 'left', 'size']);\n\n var path = symbol();\n path.type(symbolCircle);\n if (size) path.size(size);\n return React.createElement(\n Glyph,\n { top: top, left: left },\n React.createElement('path', _extends({\n className: cx('vx-glyph-circle', className),\n d: path()\n }, additionalProps(restProps))),\n children\n );\n}\n\nexport { Glyph, GlyphDot, GlyphCross, GlyphDiamond, GlyphStar, GlyphTriangle, GlyphWye, GlyphSquare, GlyphCircle };\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientDarkgreenGreen(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#184E86' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#57CA85' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientLightgreenGreen(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#42E695' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#3BB2B8' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientOrangeRed(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#FCE38A' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#F38181' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientPinkBlue(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#F02FC2' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#6094EA' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientPinkRed(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#F54EA2' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#FF7676' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientPurpleOrange(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#7117EA' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#EA6060' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientPurpleRed(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#622774' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#C53364' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientPurpleTeal(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#5B247A' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#1BCEDF' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientSteelPurple(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#65799B' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#5E2563' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport LinearGradient from './LinearGradient';\n/**\n * All props pass through to ``\n */\n\nexport default function GradientTealBlue(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? '#17EAD9' : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? '#6078EA' : _ref$to,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"from\", \"to\"]);\n\n return /*#__PURE__*/React.createElement(LinearGradient, _extends({\n from: from,\n to: to\n }, restProps));\n}","import _pt from \"prop-types\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nexport default function LinearGradient(_ref) {\n var children = _ref.children,\n id = _ref.id,\n from = _ref.from,\n to = _ref.to,\n _x1 = _ref.x1,\n _y1 = _ref.y1,\n _x2 = _ref.x2,\n _y2 = _ref.y2,\n _ref$fromOffset = _ref.fromOffset,\n fromOffset = _ref$fromOffset === void 0 ? '0%' : _ref$fromOffset,\n _ref$fromOpacity = _ref.fromOpacity,\n fromOpacity = _ref$fromOpacity === void 0 ? 1 : _ref$fromOpacity,\n _ref$toOffset = _ref.toOffset,\n toOffset = _ref$toOffset === void 0 ? '100%' : _ref$toOffset,\n _ref$toOpacity = _ref.toOpacity,\n toOpacity = _ref$toOpacity === void 0 ? 1 : _ref$toOpacity,\n rotate = _ref.rotate,\n transform = _ref.transform,\n _ref$vertical = _ref.vertical,\n vertical = _ref$vertical === void 0 ? true : _ref$vertical,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"children\", \"id\", \"from\", \"to\", \"x1\", \"y1\", \"x2\", \"y2\", \"fromOffset\", \"fromOpacity\", \"toOffset\", \"toOpacity\", \"rotate\", \"transform\", \"vertical\"]);\n\n var x1 = _x1;\n var x2 = _x2;\n var y1 = _y1;\n var y2 = _y2;\n\n if (vertical && !x1 && !x2 && !y1 && !y2) {\n x1 = '0';\n x2 = '0';\n y1 = '0';\n y2 = '1';\n }\n\n return /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"linearGradient\", _extends({\n id: id,\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n gradientTransform: rotate ? \"rotate(\" + rotate + \")\" : transform\n }, restProps), !!children && children, !children && /*#__PURE__*/React.createElement(\"stop\", {\n offset: fromOffset,\n stopColor: from,\n stopOpacity: fromOpacity\n }), !children && /*#__PURE__*/React.createElement(\"stop\", {\n offset: toOffset,\n stopColor: to,\n stopOpacity: toOpacity\n })));\n}\nLinearGradient.propTypes = {\n id: _pt.string.isRequired,\n from: _pt.string,\n to: _pt.string,\n x1: _pt.oneOfType([_pt.string, _pt.number]),\n x2: _pt.oneOfType([_pt.string, _pt.number]),\n y1: _pt.oneOfType([_pt.string, _pt.number]),\n y2: _pt.oneOfType([_pt.string, _pt.number]),\n fromOffset: _pt.oneOfType([_pt.string, _pt.number]),\n fromOpacity: _pt.oneOfType([_pt.string, _pt.number]),\n toOffset: _pt.oneOfType([_pt.string, _pt.number]),\n toOpacity: _pt.oneOfType([_pt.string, _pt.number]),\n rotate: _pt.oneOfType([_pt.string, _pt.number]),\n transform: _pt.string,\n children: _pt.node,\n vertical: _pt.bool\n};","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\n// passed as rest props to radialGradient\nexport default function RadialGradient(_ref) {\n var children = _ref.children,\n id = _ref.id,\n from = _ref.from,\n to = _ref.to,\n _ref$fromOffset = _ref.fromOffset,\n fromOffset = _ref$fromOffset === void 0 ? '0%' : _ref$fromOffset,\n _ref$fromOpacity = _ref.fromOpacity,\n fromOpacity = _ref$fromOpacity === void 0 ? 1 : _ref$fromOpacity,\n _ref$toOffset = _ref.toOffset,\n toOffset = _ref$toOffset === void 0 ? '100%' : _ref$toOffset,\n _ref$toOpacity = _ref.toOpacity,\n toOpacity = _ref$toOpacity === void 0 ? 1 : _ref$toOpacity,\n rotate = _ref.rotate,\n transform = _ref.transform,\n restProps = _objectWithoutPropertiesLoose(_ref, [\"children\", \"id\", \"from\", \"to\", \"fromOffset\", \"fromOpacity\", \"toOffset\", \"toOpacity\", \"rotate\", \"transform\"]);\n\n return /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"radialGradient\", _extends({\n id: id,\n gradientTransform: rotate ? \"rotate(\" + rotate + \")\" : transform\n }, restProps), !!children && children, !children && /*#__PURE__*/React.createElement(\"stop\", {\n offset: fromOffset,\n stopColor: from,\n stopOpacity: fromOpacity\n }), !children && /*#__PURE__*/React.createElement(\"stop\", {\n offset: toOffset,\n stopColor: to,\n stopOpacity: toOpacity\n })));\n}","export { default as LinearGradient } from './gradients/LinearGradient';\nexport { default as RadialGradient } from './gradients/RadialGradient';\nexport { default as GradientDarkgreenGreen } from './gradients/GradientDarkgreenGreen';\nexport { default as GradientLightgreenGreen } from './gradients/GradientLightgreenGreen';\nexport { default as GradientOrangeRed } from './gradients/GradientOrangeRed';\nexport { default as GradientPinkBlue } from './gradients/GradientPinkBlue';\nexport { default as GradientPinkRed } from './gradients/GradientPinkRed';\nexport { default as GradientPurpleOrange } from './gradients/GradientPurpleOrange';\nexport { default as GradientPurpleRed } from './gradients/GradientPurpleRed';\nexport { default as GradientPurpleTeal } from './gradients/GradientPurpleTeal';\nexport { default as GradientSteelPurple } from './gradients/GradientSteelPurple';\nexport { default as GradientTealBlue } from './gradients/GradientTealBlue';","import { Line } from '@vx/shape';\nimport { Point } from '@vx/point';\nimport React from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport { Group } from '@vx/group';\n\nfunction _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}\n\nfunction _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}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nRows.propTypes = {\n top: PropTypes.number,\n left: PropTypes.number,\n className: PropTypes.string,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n strokeDasharray: PropTypes.string,\n numTicks: PropTypes.number,\n lineStyle: PropTypes.object,\n offset: PropTypes.number,\n scale: PropTypes.func.isRequired,\n width: PropTypes.number.isRequired,\n tickValues: PropTypes.array\n};\nfunction Rows(_ref) {\n var _ref$top = _ref.top,\n top = _ref$top === void 0 ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === void 0 ? 0 : _ref$left,\n scale = _ref.scale,\n width = _ref.width,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n className = _ref.className,\n _ref$numTicks = _ref.numTicks,\n numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks,\n lineStyle = _ref.lineStyle,\n offset = _ref.offset,\n tickValues = _ref.tickValues,\n restProps = _objectWithoutProperties(_ref, [\"top\", \"left\", \"scale\", \"width\", \"stroke\", \"strokeWidth\", \"strokeDasharray\", \"className\", \"numTicks\", \"lineStyle\", \"offset\", \"tickValues\"]);\n\n var ticks = scale.ticks ? scale.ticks(numTicks) : scale.domain();\n if (tickValues) ticks = tickValues;\n return React.createElement(Group, {\n className: cx('vx-rows', className),\n top: top,\n left: left\n }, ticks.map(function (d, i) {\n var y = offset ? scale(d) + offset : scale(d);\n var fromPoint = new Point({\n x: 0,\n y: y\n });\n var toPoint = new Point({\n x: width,\n y: y\n });\n return React.createElement(Line, _extends({\n key: \"row-line-\".concat(d, \"-\").concat(i),\n from: fromPoint,\n to: toPoint,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n style: lineStyle\n }, restProps));\n }));\n}\n\nColumns.propTypes = {\n top: PropTypes.number,\n left: PropTypes.number,\n className: PropTypes.string,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n strokeDasharray: PropTypes.string,\n numTicks: PropTypes.number,\n lineStyle: PropTypes.object,\n offset: PropTypes.number,\n scale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n tickValues: PropTypes.array\n};\nfunction Columns(_ref) {\n var _ref$top = _ref.top,\n top = _ref$top === void 0 ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === void 0 ? 0 : _ref$left,\n scale = _ref.scale,\n height = _ref.height,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n className = _ref.className,\n _ref$numTicks = _ref.numTicks,\n numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks,\n lineStyle = _ref.lineStyle,\n offset = _ref.offset,\n tickValues = _ref.tickValues,\n restProps = _objectWithoutProperties(_ref, [\"top\", \"left\", \"scale\", \"height\", \"stroke\", \"strokeWidth\", \"strokeDasharray\", \"className\", \"numTicks\", \"lineStyle\", \"offset\", \"tickValues\"]);\n\n var ticks = scale.ticks ? scale.ticks(numTicks) : scale.domain();\n if (tickValues) ticks = tickValues;\n return React.createElement(Group, {\n className: cx('vx-columns', className),\n top: top,\n left: left\n }, ticks.map(function (d, i) {\n var x = offset ? scale(d) + offset : scale(d);\n var fromPoint = new Point({\n x: x,\n y: 0\n });\n var toPoint = new Point({\n x: x,\n y: height\n });\n return React.createElement(Line, _extends({\n key: \"column-line-\".concat(d, \"-\").concat(i),\n from: fromPoint,\n to: toPoint,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n style: lineStyle\n }, restProps));\n }));\n}\n\nGrid.propTypes = {\n top: PropTypes.number,\n left: PropTypes.number,\n className: PropTypes.string,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n strokeDasharray: PropTypes.string,\n numTicksRows: PropTypes.number,\n numTicksColumns: PropTypes.number,\n rowLineStyle: PropTypes.object,\n columnLineStyle: PropTypes.object,\n xOffset: PropTypes.number,\n yOffset: PropTypes.number,\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n rowTickValues: PropTypes.array,\n columnTickValues: PropTypes.array\n};\nfunction Grid(_ref) {\n var top = _ref.top,\n left = _ref.left,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n width = _ref.width,\n height = _ref.height,\n className = _ref.className,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n numTicksRows = _ref.numTicksRows,\n numTicksColumns = _ref.numTicksColumns,\n rowLineStyle = _ref.rowLineStyle,\n columnLineStyle = _ref.columnLineStyle,\n xOffset = _ref.xOffset,\n yOffset = _ref.yOffset,\n rowTickValues = _ref.rowTickValues,\n columnTickValues = _ref.columnTickValues,\n restProps = _objectWithoutProperties(_ref, [\"top\", \"left\", \"xScale\", \"yScale\", \"width\", \"height\", \"className\", \"stroke\", \"strokeWidth\", \"strokeDasharray\", \"numTicksRows\", \"numTicksColumns\", \"rowLineStyle\", \"columnLineStyle\", \"xOffset\", \"yOffset\", \"rowTickValues\", \"columnTickValues\"]);\n\n return React.createElement(Group, {\n className: cx('vx-grid', className),\n top: top,\n left: left\n }, React.createElement(Rows, _extends({\n className: className,\n scale: yScale,\n width: width,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n numTicks: numTicksRows,\n style: rowLineStyle,\n offset: yOffset,\n tickValues: rowTickValues\n }, restProps)), React.createElement(Columns, _extends({\n className: className,\n scale: xScale,\n height: height,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n numTicks: numTicksColumns,\n style: columnLineStyle,\n offset: xOffset,\n tickValues: columnTickValues\n }, restProps)));\n}\n\nexport { Rows as GridRows, Columns as GridColumns, Grid };\n","import React from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\n\nfunction _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}\n\nfunction _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}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nGroup.propTypes = {\n top: PropTypes.number,\n left: PropTypes.number,\n transform: PropTypes.string,\n className: PropTypes.string,\n children: PropTypes.any,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n};\nfunction Group(_ref) {\n var _ref$top = _ref.top,\n top = _ref$top === void 0 ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === void 0 ? 0 : _ref$left,\n transform = _ref.transform,\n className = _ref.className,\n children = _ref.children,\n innerRef = _ref.innerRef,\n restProps = _objectWithoutProperties(_ref, [\"top\", \"left\", \"transform\", \"className\", \"children\", \"innerRef\"]);\n\n return React.createElement(\"g\", _extends({\n ref: innerRef,\n className: cx('vx-group', className),\n transform: transform || \"translate(\".concat(left, \", \").concat(top, \")\")\n }, restProps), children);\n}\n\nexport { Group };\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar Point =\n/*#__PURE__*/\nfunction () {\n function Point(_ref) {\n var _ref$x = _ref.x,\n x = _ref$x === void 0 ? 0 : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === void 0 ? 0 : _ref$y;\n\n _classCallCheck(this, Point);\n\n this.x = x;\n this.y = y;\n }\n\n _createClass(Point, [{\n key: \"value\",\n value: function value() {\n return {\n x: this.x,\n y: this.y\n };\n }\n }, {\n key: \"toArray\",\n value: function toArray() {\n return [this.x, this.y];\n }\n }]);\n\n return Point;\n}();\n\nexport { Point };\n","import { Group } from '@vx/group';\nimport { arc, pie, line, radialLine, area, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stack, linkHorizontal, linkVertical, linkRadial } from 'd3-shape';\nimport { path } from 'd3-path';\nimport { Point } from '@vx/point';\nimport React from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\n\nfunction _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}\n\nfunction _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}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nArc.propTypes = {\n className: PropTypes.string,\n data: PropTypes.any,\n children: PropTypes.func,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n centroid: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n innerRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n outerRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n cornerRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n startAngle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n endAngle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n padAngle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n padRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number])\n};\nfunction Arc(_ref) {\n var className = _ref.className,\n data = _ref.data,\n centroid = _ref.centroid,\n innerRadius = _ref.innerRadius,\n outerRadius = _ref.outerRadius,\n cornerRadius = _ref.cornerRadius,\n startAngle = _ref.startAngle,\n endAngle = _ref.endAngle,\n padAngle = _ref.padAngle,\n padRadius = _ref.padRadius,\n children = _ref.children,\n innerRef = _ref.innerRef,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"data\", \"centroid\", \"innerRadius\", \"outerRadius\", \"cornerRadius\", \"startAngle\", \"endAngle\", \"padAngle\", \"padRadius\", \"children\", \"innerRef\"]);\n\n var arc$$1 = arc();\n if (centroid) arc$$1.centroid(centroid);\n if (innerRadius !== undefined) arc$$1.innerRadius(innerRadius);\n if (outerRadius !== undefined) arc$$1.outerRadius(outerRadius);\n if (cornerRadius !== undefined) arc$$1.cornerRadius(cornerRadius);\n if (startAngle !== undefined) arc$$1.startAngle(startAngle);\n if (endAngle !== undefined) arc$$1.endAngle(endAngle);\n if (padAngle !== undefined) arc$$1.padAngle(padAngle);\n if (padRadius !== undefined) arc$$1.padRadius(padRadius);\n if (children) return children({\n path: arc$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-arc', className),\n d: arc$$1(data)\n }, restProps));\n}\n\nPie.propTypes = {\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number,\n data: PropTypes.array,\n centroid: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n innerRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n outerRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n cornerRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n startAngle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n endAngle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n padAngle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n padRadius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n pieValue: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n pieSort: PropTypes.func,\n pieSortValues: PropTypes.func,\n children: PropTypes.func\n};\nfunction Pie(_ref) {\n var className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n data = _ref.data,\n centroid = _ref.centroid,\n _ref$innerRadius = _ref.innerRadius,\n innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,\n outerRadius = _ref.outerRadius,\n cornerRadius = _ref.cornerRadius,\n startAngle = _ref.startAngle,\n endAngle = _ref.endAngle,\n padAngle = _ref.padAngle,\n padRadius = _ref.padRadius,\n pieSort = _ref.pieSort,\n pieSortValues = _ref.pieSortValues,\n pieValue = _ref.pieValue,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"top\", \"left\", \"data\", \"centroid\", \"innerRadius\", \"outerRadius\", \"cornerRadius\", \"startAngle\", \"endAngle\", \"padAngle\", \"padRadius\", \"pieSort\", \"pieSortValues\", \"pieValue\", \"children\"]);\n\n var path$$1 = arc();\n if (innerRadius != null) path$$1.innerRadius(innerRadius);\n if (outerRadius != null) path$$1.outerRadius(outerRadius);\n if (cornerRadius != null) path$$1.cornerRadius(cornerRadius);\n if (padRadius != null) path$$1.padRadius(padRadius);\n var pie$$1 = pie();\n if (pieSort !== undefined) pie$$1.sort(pieSort);\n if (pieSortValues !== undefined) pie$$1.sortValues(pieSortValues);\n if (pieValue !== undefined) pie$$1.value(pieValue);\n if (padAngle != null) pie$$1.padAngle(padAngle);\n if (startAngle != null) pie$$1.startAngle(startAngle);\n if (endAngle != null) pie$$1.endAngle(endAngle);\n var arcs = pie$$1(data);\n if (children) return children({\n arcs: arcs,\n path: path$$1,\n pie: pie$$1\n });\n return React.createElement(Group, {\n className: \"vx-pie-arcs-group\",\n top: top,\n left: left\n }, arcs.map(function (arc$$1, i) {\n return React.createElement(\"g\", {\n key: \"pie-arc-\".concat(i)\n }, React.createElement(\"path\", _extends({\n className: cx('vx-pie-arc', className),\n d: path$$1(arc$$1)\n }, restProps)), centroid && centroid(path$$1.centroid(arc$$1), arc$$1));\n }));\n}\n\nLine.propTypes = {\n className: PropTypes.string,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n from: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n to: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n })\n};\nfunction Line(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === void 0 ? new Point({\n x: 0,\n y: 0\n }) : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === void 0 ? new Point({\n x: 1,\n y: 1\n }) : _ref$to,\n _ref$fill = _ref.fill,\n fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,\n _ref$className = _ref.className,\n className = _ref$className === void 0 ? '' : _ref$className,\n innerRef = _ref.innerRef,\n restProps = _objectWithoutProperties(_ref, [\"from\", \"to\", \"fill\", \"className\", \"innerRef\"]);\n\n return React.createElement(\"line\", _extends({\n ref: innerRef,\n className: cx('vx-line', className),\n x1: from.x,\n y1: from.y,\n x2: to.x,\n y2: to.y,\n fill: fill\n }, restProps));\n}\n\nLinePath.propTypes = {\n data: PropTypes.array,\n curve: PropTypes.func,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n defined: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n x: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y: PropTypes.oneOfType([PropTypes.func, PropTypes.number])\n};\nfunction LinePath(_ref) {\n var children = _ref.children,\n data = _ref.data,\n x = _ref.x,\n y = _ref.y,\n _ref$fill = _ref.fill,\n fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,\n className = _ref.className,\n curve = _ref.curve,\n innerRef = _ref.innerRef,\n _ref$defined = _ref.defined,\n defined = _ref$defined === void 0 ? function () {\n return true;\n } : _ref$defined,\n restProps = _objectWithoutProperties(_ref, [\"children\", \"data\", \"x\", \"y\", \"fill\", \"className\", \"curve\", \"innerRef\", \"defined\"]);\n\n var path$$1 = line();\n if (x) path$$1.x(x);\n if (y) path$$1.y(y);\n if (defined) path$$1.defined(defined);\n if (curve) path$$1.curve(curve);\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-linepath', className),\n d: path$$1(data),\n fill: fill\n }, restProps));\n}\n\nLineRadial.propTypes = {\n className: PropTypes.string,\n data: PropTypes.any,\n curve: PropTypes.func,\n angle: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n radius: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n};\nfunction LineRadial(_ref) {\n var className = _ref.className,\n angle = _ref.angle,\n radius = _ref.radius,\n defined = _ref.defined,\n curve = _ref.curve,\n data = _ref.data,\n innerRef = _ref.innerRef,\n children = _ref.children,\n _ref$fill = _ref.fill,\n fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"angle\", \"radius\", \"defined\", \"curve\", \"data\", \"innerRef\", \"children\", \"fill\"]);\n\n var path$$1 = radialLine();\n if (angle) path$$1.angle(angle);\n if (radius) path$$1.radius(radius);\n if (defined) path$$1.defined(defined);\n if (curve) path$$1.curve(curve);\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-line-radial', className),\n d: path$$1(data),\n fill: fill\n }, restProps));\n}\n\nArea.propTypes = {\n children: PropTypes.func,\n className: PropTypes.string,\n data: PropTypes.any,\n defined: PropTypes.func,\n curve: PropTypes.func,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n x: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y1: PropTypes.oneOfType([PropTypes.func, PropTypes.number])\n};\nfunction Area(_ref) {\n var children = _ref.children,\n x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y = _ref.y,\n y0 = _ref.y0,\n y1 = _ref.y1,\n data = _ref.data,\n _ref$defined = _ref.defined,\n defined = _ref$defined === void 0 ? function () {\n return true;\n } : _ref$defined,\n className = _ref.className,\n curve = _ref.curve,\n innerRef = _ref.innerRef,\n restProps = _objectWithoutProperties(_ref, [\"children\", \"x\", \"x0\", \"x1\", \"y\", \"y0\", \"y1\", \"data\", \"defined\", \"className\", \"curve\", \"innerRef\"]);\n\n var path$$1 = area();\n if (x) path$$1.x(x);\n if (x0) path$$1.x0(x0);\n if (x1) path$$1.x1(x1);\n if (y) path$$1.y(y);\n if (y0) path$$1.y0(y0);\n if (y1) path$$1.y1(y1);\n if (defined) path$$1.defined(defined);\n if (curve) path$$1.curve(curve);\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"g\", null, React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-area', className),\n d: path$$1(data)\n }, restProps)));\n}\n\nAreaClosed.propTypes = {\n children: PropTypes.func,\n className: PropTypes.string,\n data: PropTypes.any,\n defined: PropTypes.func,\n curve: PropTypes.func,\n yScale: PropTypes.func,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n x: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y0: PropTypes.oneOfType([PropTypes.func, PropTypes.number])\n};\nfunction AreaClosed(_ref) {\n var x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y = _ref.y,\n y1 = _ref.y1,\n y0 = _ref.y0,\n yScale = _ref.yScale,\n data = _ref.data,\n _ref$defined = _ref.defined,\n defined = _ref$defined === void 0 ? function () {\n return true;\n } : _ref$defined,\n className = _ref.className,\n curve = _ref.curve,\n innerRef = _ref.innerRef,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"x\", \"x0\", \"x1\", \"y\", \"y1\", \"y0\", \"yScale\", \"data\", \"defined\", \"className\", \"curve\", \"innerRef\", \"children\"]);\n\n var path$$1 = area();\n if (x) path$$1.x(x);\n if (x0) path$$1.x0(x0);\n if (x1) path$$1.x1(x1);\n\n if (y0) {\n path$$1.y0(y0);\n } else {\n path$$1.y0(yScale.range()[0]);\n }\n\n if (y && !y1) path$$1.y1(y);\n if (y1 && !y) path$$1.y1(y1);\n if (defined) path$$1.defined(defined);\n if (curve) path$$1.curve(curve);\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-area-closed', className),\n d: path$$1(data)\n }, restProps));\n}\n\nvar STACK_ORDERS = {\n ascending: stackOrderAscending,\n descending: stackOrderDescending,\n insideout: stackOrderInsideOut,\n none: stackOrderNone,\n reverse: stackOrderReverse\n};\nvar STACK_ORDER_NAMES = Object.keys(STACK_ORDERS);\nfunction stackOrder(order) {\n return STACK_ORDERS[order] || STACK_ORDERS.none;\n}\n\nvar STACK_OFFSETS = {\n expand: stackOffsetExpand,\n diverging: stackOffsetDiverging,\n none: stackOffsetNone,\n silhouette: stackOffsetSilhouette,\n wiggle: stackOffsetWiggle\n};\nvar STACK_OFFSET_NAMES = Object.keys(STACK_OFFSETS);\nfunction stackOffset(offset) {\n return STACK_OFFSETS[offset] || STACK_OFFSETS.none;\n}\n\nStack.propTypes = {\n data: PropTypes.array.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number,\n curve: PropTypes.func,\n color: PropTypes.func,\n keys: PropTypes.array,\n children: PropTypes.func,\n x: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n value: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n defined: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n order: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string]),\n offset: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string])\n};\nfunction Stack(_ref) {\n var className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n keys = _ref.keys,\n data = _ref.data,\n curve = _ref.curve,\n defined = _ref.defined,\n x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y0 = _ref.y0,\n y1 = _ref.y1,\n value = _ref.value,\n order = _ref.order,\n offset = _ref.offset,\n color = _ref.color,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"top\", \"left\", \"keys\", \"data\", \"curve\", \"defined\", \"x\", \"x0\", \"x1\", \"y0\", \"y1\", \"value\", \"order\", \"offset\", \"color\", \"children\"]);\n\n var stack$$1 = stack();\n if (keys) stack$$1.keys(keys);\n if (value) stack$$1.value(value);\n if (order) stack$$1.order(stackOrder(order));\n if (offset) stack$$1.offset(stackOffset(offset));\n var path$$1 = area();\n if (x) path$$1.x(x);\n if (x0) path$$1.x0(x0);\n if (x1) path$$1.x1(x1);\n if (y0) path$$1.y0(y0);\n if (y1) path$$1.y1(y1);\n if (curve) path$$1.curve(curve);\n if (defined) path$$1.defined(defined);\n var stacks = stack$$1(data);\n if (children) return children({\n stacks: stacks,\n path: path$$1,\n stack: stack$$1\n });\n return React.createElement(Group, {\n top: top,\n left: left\n }, stacks.map(function (series, i) {\n return React.createElement(\"path\", _extends({\n className: cx('vx-stack', className),\n key: \"stack-\".concat(i, \"-\").concat(series.key || ''),\n d: path$$1(series),\n fill: color(series.key, i)\n }, restProps));\n }));\n}\n\nAreaStack.propTypes = {\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number,\n keys: PropTypes.array,\n data: PropTypes.array,\n curve: PropTypes.func,\n color: PropTypes.func,\n children: PropTypes.func,\n x: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n x1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y0: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n y1: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n value: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n defined: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n order: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string]),\n offset: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string])\n};\nfunction AreaStack(_ref) {\n var className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n keys = _ref.keys,\n data = _ref.data,\n curve = _ref.curve,\n defined = _ref.defined,\n x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y0 = _ref.y0,\n y1 = _ref.y1,\n value = _ref.value,\n order = _ref.order,\n offset = _ref.offset,\n color = _ref.color,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"top\", \"left\", \"keys\", \"data\", \"curve\", \"defined\", \"x\", \"x0\", \"x1\", \"y0\", \"y1\", \"value\", \"order\", \"offset\", \"color\", \"children\"]);\n\n return React.createElement(Stack, _extends({\n className: className,\n top: top,\n left: left,\n keys: keys,\n data: data,\n curve: curve,\n defined: defined,\n x: x,\n x0: x0,\n x1: x1,\n y0: y0,\n y1: y1,\n value: value,\n order: order,\n offset: offset,\n color: color\n }, restProps), !!children ? children : function (_ref2) {\n var stacks = _ref2.stacks,\n path$$1 = _ref2.path,\n stack$$1 = _ref2.stack;\n return stacks.map(function (series, i) {\n return React.createElement(\"path\", _extends({\n className: cx('vx-area-stack', className),\n key: \"area-stack-\".concat(i, \"-\").concat(series.key || ''),\n d: path$$1(series),\n fill: color(series.key, i)\n }, restProps));\n });\n });\n}\n\nBar.propTypes = {\n className: PropTypes.string,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n};\nfunction Bar(_ref) {\n var className = _ref.className,\n innerRef = _ref.innerRef,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"innerRef\"]);\n\n return React.createElement(\"rect\", _extends({\n ref: innerRef,\n className: cx('vx-bar', className)\n }, restProps));\n}\n\nfunction objHasMethod(obj, funcName) {\n return !!obj[funcName] && typeof obj[funcName] === 'function';\n}\n\nBarGroup.propTypes = {\n /**\n * An array of bar group objects.\n */\n data: PropTypes.array.isRequired,\n\n /**\n * ```js\n * x0(barGroup)\n * ```\n * An accessor function that returns the `x0` value for each datum in *props*.**data**.\n */\n x0: PropTypes.func.isRequired,\n\n /**\n * ```js\n * x0Scale(x0(barGroup))\n * ```\n * A scale function that returns the x position of the bar group.\n */\n x0Scale: PropTypes.func.isRequired,\n\n /**\n * ```js\n * x1Scale(key)\n * ```\n * A scale function that returns the x position of the bar within a bar group.\n */\n x1Scale: PropTypes.func.isRequired,\n\n /**\n * ```js\n * yScale(value)\n * ```\n * A scale function that retuns the y position of the bar within a bar group. `value` is the value of the `key` in the bar group.\n */\n yScale: PropTypes.func.isRequired,\n\n /**\n * ```js\n * color(key, barIndex)\n * ```\n * A function that returns color for each bar within a bar group.\n */\n color: PropTypes.func.isRequired,\n\n /**\n * An array of strings containing the key for each bar group. Each bar within a bar group will follow the order of this array.\n */\n keys: PropTypes.array.isRequired,\n\n /**\n * Height is used to align the bottom of the the bars. barHeight = height - yScale(bar.value), where bar.y = yScale(bar.value).\n */\n height: PropTypes.number.isRequired,\n\n /**\n * Add a class name to the containing `` element.\n */\n className: PropTypes.string,\n\n /**\n * A top pixel offset applied to the entire bar group.\n */\n top: PropTypes.number,\n\n /**\n * A left pixel offset applied to the entire bar group.\n */\n left: PropTypes.number,\n\n /**\n * A function that returns a react component. Useful for generating the bar group data with full control over what is rendered. The functions first argument will be the bar groups data as an array of objects with the following properties:\n *\n * - `index` - the index of the group based on *props*.**data** array.\n * - `x0` - the position of the group based on *props*.**x0** & *props*.**x0Scale**.\n * - `bars` - array of objects, ordered by *props*.**keys**, with the following properties:\n * + `index` - the index of the bar for the current group.\n * + `key` - the key of the bar.\n * + `width` - the width of the bar. This will be `x1Scale.bandwidth()`. If `x1Scale` does not have a bandwidth property, then it becomes:\n * ```js\n * x1Range = x1Scale.range();\n * x1Domain = x1Scale.domain();\n * barWidth = Math.abs(x1Range[x1Range.length - 1] - x1Range[0]) / x1Domain.length\n * ```\n * + `height` - the height of the bar.\n * + `x` - the x position of the bar.\n * + `y` - the y position of the bar.\n * + `color` - the color of the bar.\n */\n children: PropTypes.func\n};\n/**\n * Generates bar groups as an array of objects and renders ``s for each datum grouped by `key`. A general setup might look like this:\n *\n * ```js\n * const data = [{\n * date: date1,\n * key1: value,\n * key2: value,\n * key3: value\n * }, {\n * date: date2,\n * key1: value,\n * key2: value,\n * key3: value,\n * }];\n *\n * const x0 = d => d.date;\n * const keys = [key1, key2, key3];\n *\n * const x0Scale = scaleBand({\n * domain: data.map(x0),\n * padding: 0.2\n * });\n * const x1Scale = scaleBand({\n * domain: keys,\n * padding: 0.1\n * });\n * const yScale = scaleLinear({\n * domain: [0, Math.max(...data.map(d => Math.max(...keys.map(key => d[key]))))]\n * });\n * const color = scaleOrdinal({\n * domain: keys,\n * range: [blue, green, purple]\n * });\n * ```\n *\n * Example: [https://vx-demo.now.sh/bargroup](https://vx-demo.now.sh/bargroup)\n */\n\nfunction BarGroup(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n x0 = _ref.x0,\n x0Scale = _ref.x0Scale,\n x1Scale = _ref.x1Scale,\n yScale = _ref.yScale,\n color = _ref.color,\n keys = _ref.keys,\n height = _ref.height,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"data\", \"className\", \"top\", \"left\", \"x0\", \"x0Scale\", \"x1Scale\", \"yScale\", \"color\", \"keys\", \"height\", \"children\"]);\n\n var x1Range = x1Scale.range();\n var x1Domain = x1Scale.domain();\n var barWidth = objHasMethod(x1Scale, 'bandwidth') ? x1Scale.bandwidth() : Math.abs(x1Range[x1Range.length - 1] - x1Range[0]) / x1Domain.length;\n var barGroups = data.map(function (group, i) {\n return {\n index: i,\n x0: x0Scale(x0(group)),\n bars: keys.map(function (key, j) {\n var value = group[key];\n return {\n index: j,\n key: key,\n value: value,\n width: barWidth,\n x: x1Scale(key),\n y: yScale(value),\n color: color(key, j),\n height: height - yScale(value)\n };\n })\n };\n });\n if (children) return children(barGroups);\n return React.createElement(Group, {\n className: cx('vx-bar-group', className),\n top: top,\n left: left\n }, barGroups.map(function (barGroup) {\n return React.createElement(Group, {\n key: \"bar-group-\".concat(barGroup.index, \"-\").concat(barGroup.x0),\n left: barGroup.x0\n }, barGroup.bars.map(function (bar) {\n return React.createElement(Bar, _extends({\n key: \"bar-group-bar-\".concat(barGroup.index, \"-\").concat(bar.index, \"-\").concat(bar.value, \"-\").concat(bar.key),\n x: bar.x,\n y: bar.y,\n width: bar.width,\n height: bar.height,\n fill: bar.color\n }, restProps));\n }));\n }));\n}\n\nBarGroupHorizontal.propTypes = {\n data: PropTypes.array.isRequired,\n y0: PropTypes.func.isRequired,\n y0Scale: PropTypes.func.isRequired,\n y1Scale: PropTypes.func.isRequired,\n xScale: PropTypes.func.isRequired,\n color: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n width: PropTypes.number.isRequired,\n className: PropTypes.string,\n x: PropTypes.func,\n top: PropTypes.number,\n left: PropTypes.number,\n children: PropTypes.func\n};\nfunction BarGroupHorizontal(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n _ref$x = _ref.x,\n x = _ref$x === void 0 ? function (val) {\n return 0;\n } : _ref$x,\n y0 = _ref.y0,\n y0Scale = _ref.y0Scale,\n y1Scale = _ref.y1Scale,\n xScale = _ref.xScale,\n color = _ref.color,\n keys = _ref.keys,\n width = _ref.width,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"data\", \"className\", \"top\", \"left\", \"x\", \"y0\", \"y0Scale\", \"y1Scale\", \"xScale\", \"color\", \"keys\", \"width\", \"children\"]);\n\n var y1Range = y1Scale.range();\n var y1Domain = y1Scale.domain();\n var barHeight = objHasMethod(y1Scale, 'bandwidth') ? y1Scale.bandwidth() : Math.abs(y1Range[y1Range.length - 1] - y1Range[0]) / y1Domain.length;\n var barGroups = data.map(function (group, i) {\n return {\n index: i,\n y0: y0Scale(y0(group)),\n bars: keys.map(function (key, j) {\n var value = group[key];\n return {\n index: j,\n key: key,\n value: value,\n height: barHeight,\n x: x(value),\n y: y1Scale(key),\n color: color(key, j),\n width: width - xScale(value)\n };\n })\n };\n });\n if (children) return children(barGroups);\n return React.createElement(Group, {\n className: cx('vx-bar-group-horizontal', className),\n top: top,\n left: left\n }, barGroups.map(function (barGroup) {\n return React.createElement(Group, {\n key: \"bar-group-\".concat(barGroup.index, \"-\").concat(barGroup.y0),\n top: barGroup.y0\n }, barGroup.bars.map(function (bar) {\n return React.createElement(Bar, _extends({\n key: \"bar-group-bar-\".concat(barGroup.index, \"-\").concat(bar.index, \"-\").concat(bar.value, \"-\").concat(bar.key),\n x: bar.x,\n y: bar.y,\n width: bar.width,\n height: bar.height,\n fill: bar.color\n }, restProps));\n }));\n }));\n}\n\nBarStack.propTypes = {\n data: PropTypes.array.isRequired,\n x: PropTypes.func.isRequired,\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n color: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number,\n children: PropTypes.func,\n y0: PropTypes.func,\n y1: PropTypes.func,\n order: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string]),\n offset: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string]),\n value: PropTypes.oneOfType([PropTypes.func, PropTypes.number])\n};\nfunction BarStack(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n x = _ref.x,\n _ref$y = _ref.y0,\n y0 = _ref$y === void 0 ? function (d) {\n return d[0];\n } : _ref$y,\n _ref$y2 = _ref.y1,\n y1 = _ref$y2 === void 0 ? function (d) {\n return d[1];\n } : _ref$y2,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n color = _ref.color,\n keys = _ref.keys,\n value = _ref.value,\n order = _ref.order,\n offset = _ref.offset,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"data\", \"className\", \"top\", \"left\", \"x\", \"y0\", \"y1\", \"xScale\", \"yScale\", \"color\", \"keys\", \"value\", \"order\", \"offset\", \"children\"]);\n\n var stack$$1 = stack();\n if (keys) stack$$1.keys(keys);\n if (value) stack$$1.value(value);\n if (order) stack$$1.order(stackOrder(order));\n if (offset) stack$$1.offset(stackOffset(offset));\n var stacks = stack$$1(data);\n var xRange = xScale.range();\n var xDomain = xScale.domain();\n var barWidth = objHasMethod(xScale, 'bandwidth') ? xScale.bandwidth() : Math.abs(xRange[xRange.length - 1] - xRange[0]) / xDomain.length;\n var barStacks = stacks.map(function (barStack, i) {\n var key = barStack.key;\n return {\n index: i,\n key: key,\n bars: barStack.map(function (bar, j) {\n var barHeight = yScale(y0(bar)) - yScale(y1(bar));\n var barY = yScale(y1(bar));\n var barX = objHasMethod(xScale, 'bandwidth') ? xScale(x(bar.data)) : Math.max(xScale(x(bar.data)) - barWidth / 2);\n return {\n bar: bar,\n key: key,\n index: j,\n height: barHeight,\n width: barWidth,\n x: barX,\n y: barY,\n color: color(barStack.key, j)\n };\n })\n };\n });\n if (children) return children(barStacks);\n return React.createElement(Group, {\n className: cx('vx-bar-stack', className),\n top: top,\n left: left\n }, barStacks.map(function (barStack) {\n return barStack.bars.map(function (bar) {\n return React.createElement(Bar, _extends({\n key: \"bar-stack-\".concat(barStack.index, \"-\").concat(bar.index),\n x: bar.x,\n y: bar.y,\n height: bar.height,\n width: bar.width,\n fill: bar.color\n }, restProps));\n });\n }));\n}\n\nBarStackHorizontal.propTypes = {\n data: PropTypes.array.isRequired,\n y: PropTypes.func.isRequired,\n x0: PropTypes.func,\n x1: PropTypes.func,\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n color: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number,\n order: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string]),\n offset: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.string]),\n value: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),\n children: PropTypes.func\n};\nfunction BarStackHorizontal(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n y = _ref.y,\n _ref$x = _ref.x0,\n x0 = _ref$x === void 0 ? function (d) {\n return d[0];\n } : _ref$x,\n _ref$x2 = _ref.x1,\n x1 = _ref$x2 === void 0 ? function (d) {\n return d[1];\n } : _ref$x2,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n color = _ref.color,\n keys = _ref.keys,\n value = _ref.value,\n order = _ref.order,\n offset = _ref.offset,\n children = _ref.children,\n restProps = _objectWithoutProperties(_ref, [\"data\", \"className\", \"top\", \"left\", \"y\", \"x0\", \"x1\", \"xScale\", \"yScale\", \"color\", \"keys\", \"value\", \"order\", \"offset\", \"children\"]);\n\n var stack$$1 = stack();\n if (keys) stack$$1.keys(keys);\n if (value) stack$$1.value(value);\n if (order) stack$$1.order(stackOrder(order));\n if (offset) stack$$1.offset(stackOffset(offset));\n var stacks = stack$$1(data);\n var yRange = yScale.range();\n var yDomain = yScale.domain();\n var barHeight = objHasMethod(yScale, 'bandwidth') ? yScale.bandwidth() : Math.abs(yRange[yRange.length - 1] - yRange[0]) / yDomain.length;\n var barStacks = stacks.map(function (barStack, i) {\n var key = barStack.key;\n return {\n index: i,\n key: key,\n bars: barStack.map(function (bar, j) {\n var barWidth = xScale(x1(bar)) - xScale(x0(bar));\n var barX = xScale(x0(bar));\n var barY = objHasMethod(yScale, 'bandwidth') ? yScale(y(bar.data)) : Math.max(yScale(y(bar.data)) - barWidth / 2);\n return {\n bar: bar,\n key: key,\n index: j,\n height: barHeight,\n width: barWidth,\n x: barX,\n y: barY,\n color: color(barStack.key, j)\n };\n })\n };\n });\n if (children) return children(barStacks);\n return React.createElement(Group, {\n className: cx('vx-bar-stack-horizontal', className),\n top: top,\n left: left\n }, barStacks.map(function (barStack) {\n return barStack.bars.map(function (bar) {\n return React.createElement(Bar, _extends({\n key: \"bar-stack-\".concat(barStack.index, \"-\").concat(bar.index),\n x: bar.x,\n y: bar.y,\n height: bar.height,\n width: bar.width,\n fill: bar.color\n }, restProps));\n });\n }));\n}\n\nvar degreesToRadians = function degreesToRadians(degrees) {\n return Math.PI / 180 * degrees;\n};\n\nfunction pathHorizontalDiagonal(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n return function (data) {\n var link = linkHorizontal();\n link.x(x);\n link.y(y);\n link.source(source);\n link.target(target);\n return link(data);\n };\n}\nLinkHorizontal.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkHorizontal(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathHorizontalDiagonal({\n source: source,\n target: target,\n x: x,\n y: y\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-horizontal-diagonal', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathVerticalDiagonal(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n return function (data) {\n var link = linkVertical();\n link.x(x);\n link.y(y);\n link.source(source);\n link.target(target);\n return link(data);\n };\n}\nLinkVertical.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\nfunction LinkVertical(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathVerticalDiagonal({\n source: source,\n target: target,\n x: x,\n y: y\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-vertical-diagonal', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathRadialDiagonal(_ref) {\n var source = _ref.source,\n target = _ref.target,\n angle = _ref.angle,\n radius = _ref.radius;\n return function (data) {\n var link = linkRadial();\n link.angle(angle);\n link.radius(radius);\n link.source(source);\n link.target(target);\n return link(data);\n };\n}\nLinkRadial.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n angle: PropTypes.func,\n radius: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkRadial(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$angle = _ref2.angle,\n angle = _ref2$angle === void 0 ? function (d) {\n return d.x;\n } : _ref2$angle,\n _ref2$radius = _ref2.radius,\n radius = _ref2$radius === void 0 ? function (d) {\n return d.y;\n } : _ref2$radius,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"angle\", \"radius\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathRadialDiagonal({\n source: source,\n target: target,\n angle: angle,\n radius: radius\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-radial-diagonal', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathHorizontalCurve(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var dx = tx - sx;\n var dy = ty - sy;\n var ix = percent * (dx + dy);\n var iy = percent * (dy - dx);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.bezierCurveTo(sx + ix, sy + iy, tx + iy, ty - ix, tx, ty);\n return path$$1.toString();\n };\n}\nLinkHorizontalCurve.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkHorizontalCurve(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"percent\", \"children\"]);\n\n path$$1 = path$$1 || pathHorizontalCurve({\n source: source,\n target: target,\n x: x,\n y: y,\n percent: percent\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-horizontal-curve', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathVerticalCurve(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var dx = tx - sx;\n var dy = ty - sy;\n var ix = percent * (dx + dy);\n var iy = percent * (dy - dx);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.bezierCurveTo(sx + ix, sy + iy, tx + iy, ty - ix, tx, ty);\n return path$$1.toString();\n };\n}\nLinkVerticalCurve.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkVerticalCurve(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"percent\", \"children\"]);\n\n path$$1 = path$$1 || pathVerticalCurve({\n source: source,\n target: target,\n x: x,\n y: y,\n percent: percent\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-vertical-curve', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathRadialCurve(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sa = x(sourceData) - Math.PI / 2;\n var sr = y(sourceData);\n var ta = x(targetData) - Math.PI / 2;\n var tr = y(targetData);\n var sc = Math.cos(sa);\n var ss = Math.sin(sa);\n var tc = Math.cos(ta);\n var ts = Math.sin(ta);\n var sx = sr * sc;\n var sy = sr * ss;\n var tx = tr * tc;\n var ty = tr * ts;\n var dx = tx - sx;\n var dy = ty - sy;\n var ix = percent * (dx + dy);\n var iy = percent * (dy - dx);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.bezierCurveTo(sx + ix, sy + iy, tx + iy, ty - ix, tx, ty);\n return path$$1.toString();\n };\n}\nLinkRadialCurve.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkRadialCurve(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"percent\", \"children\"]);\n\n path$$1 = path$$1 || pathRadialCurve({\n source: source,\n target: target,\n x: x,\n y: y,\n percent: percent\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-radial-curve', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathHorizontalLine(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(tx, ty);\n return path$$1.toString();\n };\n}\nLinkHorizontalLine.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n path: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkHorizontalLine(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathHorizontalLine({\n source: source,\n target: target,\n x: x,\n y: y\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-horizontal-line', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathVerticalLine(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(tx, ty);\n return path$$1.toString();\n };\n}\nLinkVerticalLine.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n path: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkVerticalLine(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathVerticalLine({\n source: source,\n target: target,\n x: x,\n y: y\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-vertical-line', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathRadialLine(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sa = x(sourceData) - Math.PI / 2;\n var sr = y(sourceData);\n var ta = x(targetData) - Math.PI / 2;\n var tr = y(targetData);\n var sc = Math.cos(sa);\n var ss = Math.sin(sa);\n var tc = Math.cos(ta);\n var ts = Math.sin(ta);\n var path$$1 = path();\n path$$1.moveTo(sr * sc, sr * ss);\n path$$1.lineTo(tr * tc, tr * ts);\n return path$$1.toString();\n };\n}\nLinkRadialStep.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n path: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkRadialStep(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathRadialLine({\n source: source,\n target: target,\n x: x,\n y: y\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-radial-line', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathHorizontalStep(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(sx + (tx - sx) * percent, sy);\n path$$1.lineTo(sx + (tx - sx) * percent, ty);\n path$$1.lineTo(tx, ty);\n return path$$1.toString();\n };\n}\nLinkHorizontalStep.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkHorizontalStep(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"percent\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathHorizontalStep({\n source: source,\n target: target,\n x: x,\n y: y,\n percent: percent\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-horizontal-step', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathVerticalStep(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(sx, sy + (ty - sy) * percent);\n path$$1.lineTo(tx, sy + (ty - sy) * percent);\n path$$1.lineTo(tx, ty);\n return path$$1.toString();\n };\n}\nLinkVerticalStep.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkVerticalStep(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"percent\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathVerticalStep({\n source: source,\n target: target,\n x: x,\n y: y,\n percent: percent\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-vertical-step', className),\n d: path$$1(data)\n }, restProps));\n}\n\nfunction pathRadialStep(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n var sa = sx - Math.PI / 2;\n var sr = sy;\n var ta = tx - Math.PI / 2;\n var tr = ty;\n var sc = Math.cos(sa);\n var ss = Math.sin(sa);\n var tc = Math.cos(ta);\n var ts = Math.sin(ta);\n var sf = Math.abs(ta - sa) > Math.PI ? ta <= sa : ta > sa;\n return \"\\n M\".concat(sr * sc, \",\").concat(sr * ss, \"\\n A\").concat(sr, \",\").concat(sr, \",0,0,\").concat(sf ? 1 : 0, \",\").concat(sr * tc, \",\").concat(sr * ts, \"\\n L\").concat(tr * tc, \",\").concat(tr * ts, \"\\n \");\n };\n}\nLinkRadialStep$1.propTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func,\n children: PropTypes.func\n};\nfunction LinkRadialStep$1(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === void 0 ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === void 0 ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === void 0 ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === void 0 ? function (d) {\n return d.target;\n } : _ref2$target,\n children = _ref2.children,\n restProps = _objectWithoutProperties(_ref2, [\"className\", \"innerRef\", \"data\", \"path\", \"x\", \"y\", \"source\", \"target\", \"children\"]);\n\n path$$1 = path$$1 || pathRadialStep({\n source: source,\n target: target,\n x: x,\n y: y\n });\n if (children) return children({\n path: path$$1\n });\n return React.createElement(\"path\", _extends({\n ref: innerRef,\n className: cx('vx-link vx-link-radial-step', className),\n d: path$$1(data)\n }, restProps));\n}\n\nPolygon.propTypes = {\n sides: PropTypes.number.isRequired,\n size: PropTypes.number.isRequired,\n className: PropTypes.string,\n rotate: PropTypes.number,\n children: PropTypes.func,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n center: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n })\n};\nvar getPoint = function getPoint(_ref) {\n var sides = _ref.sides,\n size = _ref.size,\n center = _ref.center,\n rotate = _ref.rotate,\n side = _ref.side;\n var degrees = 360 / sides * side - rotate;\n var radians = degreesToRadians(degrees);\n return new Point({\n x: center.x + size * Math.cos(radians),\n y: center.y + size * Math.sin(radians)\n });\n};\nvar getPoints = function getPoints(_ref2) {\n var sides = _ref2.sides,\n size = _ref2.size,\n center = _ref2.center,\n rotate = _ref2.rotate;\n return _toConsumableArray(Array(sides).keys()).map(function (side) {\n return getPoint({\n sides: sides,\n size: size,\n center: center,\n rotate: rotate,\n side: side\n });\n });\n};\nfunction Polygon(_ref3) {\n var sides = _ref3.sides,\n _ref3$size = _ref3.size,\n size = _ref3$size === void 0 ? 25 : _ref3$size,\n _ref3$center = _ref3.center,\n center = _ref3$center === void 0 ? new Point({\n x: 0,\n y: 0\n }) : _ref3$center,\n _ref3$rotate = _ref3.rotate,\n rotate = _ref3$rotate === void 0 ? 0 : _ref3$rotate,\n className = _ref3.className,\n children = _ref3.children,\n innerRef = _ref3.innerRef,\n restProps = _objectWithoutProperties(_ref3, [\"sides\", \"size\", \"center\", \"rotate\", \"className\", \"children\", \"innerRef\"]);\n\n var points = getPoints({\n sides: sides,\n size: size,\n center: center,\n rotate: rotate\n }).map(function (p) {\n return p.toArray();\n });\n if (children) return children({\n points: points\n });\n return React.createElement(\"polygon\", _extends({\n ref: innerRef,\n className: cx('vx-polygon', className),\n points: points.join(' ')\n }, restProps));\n}\n\nCircle.propTypes = {\n className: PropTypes.string,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n};\nfunction Circle(_ref) {\n var className = _ref.className,\n innerRef = _ref.innerRef,\n restProps = _objectWithoutProperties(_ref, [\"className\", \"innerRef\"]);\n\n return React.createElement(\"circle\", _extends({\n ref: innerRef,\n className: cx('vx-circle', className)\n }, restProps));\n}\n\nexport { Arc, Pie, Line, LinePath, LineRadial, Area, AreaClosed, AreaStack, Bar, BarGroup, BarGroupHorizontal, BarStack, BarStackHorizontal, Stack, stackOffset, STACK_OFFSETS, STACK_OFFSET_NAMES, stackOrder, STACK_ORDERS, STACK_ORDER_NAMES, degreesToRadians, LinkHorizontal, pathHorizontalDiagonal, LinkVertical, pathVerticalDiagonal, LinkRadial, pathRadialDiagonal, LinkHorizontalCurve, pathHorizontalCurve, LinkVerticalCurve, pathVerticalCurve, LinkRadialCurve, pathRadialCurve, LinkHorizontalLine, pathHorizontalLine, LinkVerticalLine, pathVerticalLine, LinkRadialStep as LinkRadialLine, pathRadialLine, LinkHorizontalStep, pathHorizontalStep, LinkVerticalStep, pathVerticalStep, LinkRadialStep$1 as LinkRadialStep, pathRadialStep, Polygon, getPoints, getPoint, Circle };\n","import React from 'react';\nimport cx from 'classnames';\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\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\nfunction Group(_ref) {\n var _ref$top = _ref.top,\n top = _ref$top === undefined ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === undefined ? 0 : _ref$left,\n transform = _ref.transform,\n className = _ref.className,\n children = _ref.children,\n restProps = objectWithoutProperties(_ref, ['top', 'left', 'transform', 'className', 'children']);\n\n return React.createElement(\n 'g',\n _extends({\n className: cx('vx-group', className),\n transform: transform || 'translate(' + left + ', ' + top + ')'\n }, restProps),\n children\n );\n}\n\nexport { Group };\n","var 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\nvar Point = function () {\n function Point(_ref) {\n var _ref$x = _ref.x,\n x = _ref$x === undefined ? 0 : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === undefined ? 0 : _ref$y;\n classCallCheck(this, Point);\n\n this.x = x;\n this.y = y;\n }\n\n createClass(Point, [{\n key: \"value\",\n value: function value() {\n return {\n x: this.x,\n y: this.y\n };\n }\n }, {\n key: \"toArray\",\n value: function toArray$$1() {\n return [this.x, this.y];\n }\n }]);\n return Point;\n}();\n\nexport { Point };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nfunction ResponsiveSVG(_ref) {\n var children = _ref.children,\n width = _ref.width,\n height = _ref.height,\n _ref$xOrigin = _ref.xOrigin,\n xOrigin = _ref$xOrigin === undefined ? 0 : _ref$xOrigin,\n _ref$yOrigin = _ref.yOrigin,\n yOrigin = _ref$yOrigin === undefined ? 0 : _ref$yOrigin,\n _ref$preserveAspectRa = _ref.preserveAspectRatio,\n preserveAspectRatio = _ref$preserveAspectRa === undefined ? 'xMinYMin meet' : _ref$preserveAspectRa;\n\n return React.createElement(\n 'div',\n {\n style: {\n display: 'inline-block',\n position: 'relative',\n width: '100%',\n verticalAlign: 'top',\n overflow: 'hidden'\n }\n },\n React.createElement(\n 'svg',\n {\n preserveAspectRatio: preserveAspectRatio,\n viewBox: xOrigin + ' ' + yOrigin + ' ' + width + ' ' + height\n },\n children\n )\n );\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 != null && (type == 'object' || type == 'function');\n}\n\nvar isObject_1 = isObject;\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\nvar _freeGlobal = freeGlobal;\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\nvar _root = root;\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 */\nvar now = function() {\n return _root.Date.now();\n};\n\nvar now_1 = now;\n\n/** Built-in value references. */\nvar Symbol$1 = _root.Symbol;\n\nvar _Symbol = Symbol$1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\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 */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nvar _getRawTag = getRawTag;\n\n/** Used for built-in method references. */\nvar objectProto$1 = Object.prototype;\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 nativeObjectToString$1 = objectProto$1.toString;\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 */\nfunction objectToString(value) {\n return nativeObjectToString$1.call(value);\n}\n\nvar _objectToString = objectToString;\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;\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 */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag$1 && symToStringTag$1 in Object(value))\n ? _getRawTag(value)\n : _objectToString(value);\n}\n\nvar _baseGetTag = baseGetTag;\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 != null && typeof value == 'object';\n}\n\nvar isObjectLike_1 = isObjectLike;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\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_1(value) && _baseGetTag(value) == symbolTag);\n}\n\nvar isSymbol_1 = isSymbol;\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\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 */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol_1(value)) {\n return NAN;\n }\n if (isObject_1(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject_1(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\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\nvar toNumber_1 = toNumber;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\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 */\nfunction 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_1(wait) || 0;\n if (isObject_1(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber_1(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_1();\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_1());\n }\n\n function debounced() {\n var time = now_1(),\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 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\nvar debounce_1 = debounce;\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\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\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\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 ParentSize = function (_React$Component) {\n inherits(ParentSize, _React$Component);\n\n function ParentSize(props) {\n classCallCheck(this, ParentSize);\n\n var _this = possibleConstructorReturn(this, (ParentSize.__proto__ || Object.getPrototypeOf(ParentSize)).call(this, props));\n\n _this.state = { width: 0, height: 0, top: 0, left: 0 };\n _this.resize = debounce_1(_this.resize.bind(_this), props.debounceTime);\n _this.setTarget = _this.setTarget.bind(_this);\n return _this;\n }\n\n createClass(ParentSize, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n this.ro = new ResizeObserver(function (entries, observer) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = entries[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var entry = _step.value;\n var _entry$contentRect = entry.contentRect,\n left = _entry$contentRect.left,\n top = _entry$contentRect.top,\n width = _entry$contentRect.width,\n height = _entry$contentRect.height;\n\n _this2.resize({\n width: width,\n height: height,\n top: top,\n left: left\n });\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 this.ro.observe(this.target);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.ro.disconnect();\n }\n }, {\n key: 'resize',\n value: function resize(_ref) {\n var width = _ref.width,\n height = _ref.height,\n top = _ref.top,\n left = _ref.left;\n\n this.setState(function () {\n return {\n width: width,\n height: height,\n top: top,\n left: left\n };\n });\n }\n }, {\n key: 'setTarget',\n value: function setTarget(ref) {\n this.target = ref;\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children;\n\n return React.createElement(\n 'div',\n { style: { width: '100%', height: '100%' }, ref: this.setTarget, className: className },\n children(_extends({}, this.state, {\n ref: this.target,\n resize: this.resize\n }))\n );\n }\n }]);\n return ParentSize;\n}(React.Component);\n\n\nParentSize.defaultProps = {\n debounceTime: 300\n};\n\nParentSize.propTypes = {\n className: PropTypes.string,\n children: PropTypes.func.isRequired,\n debounceTime: PropTypes.number\n};\n\nfunction withParentSize(BaseComponent) {\n var WrappedComponent = function (_React$Component) {\n inherits(WrappedComponent, _React$Component);\n\n function WrappedComponent(props) {\n classCallCheck(this, WrappedComponent);\n\n var _this = possibleConstructorReturn(this, (WrappedComponent.__proto__ || Object.getPrototypeOf(WrappedComponent)).call(this, props));\n\n _this.state = {\n parentWidth: null,\n parentHeight: null\n };\n\n _this.handleResize = debounce_1(_this.resize.bind(_this), props.windowResizeDebounceTime).bind(_this);\n return _this;\n }\n\n createClass(WrappedComponent, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n window.addEventListener('resize', this.handleResize, false);\n this.resize();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize, false);\n }\n }, {\n key: 'resize',\n value: function resize(event) {\n if (this.container) {\n var boundingRect = this.container.getBoundingClientRect();\n this.setState(function (prevState, props) {\n return {\n parentWidth: boundingRect.width,\n parentHeight: boundingRect.height\n };\n });\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _state = this.state,\n parentWidth = _state.parentWidth,\n parentHeight = _state.parentHeight;\n\n return React.createElement(\n 'div',\n {\n style: { width: '100%', height: '100%' },\n ref: function ref(_ref) {\n _this2.container = _ref;\n }\n },\n parentWidth !== null && parentHeight !== null && React.createElement(BaseComponent, _extends({\n parentWidth: parentWidth,\n parentHeight: parentHeight\n }, this.props))\n );\n }\n }]);\n return WrappedComponent;\n }(React.Component);\n\n WrappedComponent.defaultProps = {\n windowResizeDebounceTime: 300\n };\n\n return WrappedComponent;\n}\n\nfunction withScreenSize(BaseComponent) {\n var WrappedComponent = function (_React$Component) {\n inherits(WrappedComponent, _React$Component);\n\n function WrappedComponent(props) {\n classCallCheck(this, WrappedComponent);\n\n var _this = possibleConstructorReturn(this, (WrappedComponent.__proto__ || Object.getPrototypeOf(WrappedComponent)).call(this, props));\n\n _this.state = {\n screenWidth: null,\n screenHeight: null\n };\n\n _this.handleResize = debounce_1(_this.resize.bind(_this), props.windowResizeDebounceTime).bind(_this);\n return _this;\n }\n\n createClass(WrappedComponent, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n window.addEventListener('resize', this.handleResize, false);\n this.resize();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize, false);\n }\n }, {\n key: 'resize',\n value: function resize(event) {\n this.setState(function (prevState, props) {\n return {\n screenWidth: window.innerWidth,\n screenHeight: window.innerHeight\n };\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n screenWidth = _state.screenWidth,\n screenHeight = _state.screenHeight;\n\n if (!screenWidth && !screenHeight) return null;\n return React.createElement(BaseComponent, _extends({ screenWidth: screenWidth, screenHeight: screenHeight }, this.props));\n }\n }]);\n return WrappedComponent;\n }(React.Component);\n\n WrappedComponent.defaultProps = {\n windowResizeDebounceTime: 300\n };\n\n return WrappedComponent;\n}\n\nexport { ResponsiveSVG as ScaleSVG, ParentSize, withParentSize, withScreenSize };\n","import { scaleBand, scalePoint, scaleLinear, scaleTime, scaleUtc, scaleLog, scalePow, scaleOrdinal, scaleQuantize, scaleQuantile, scaleThreshold } from 'd3-scale';\n\nvar band = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n padding = _ref.padding,\n paddingInner = _ref.paddingInner,\n paddingOuter = _ref.paddingOuter,\n align = _ref.align,\n tickFormat = _ref.tickFormat;\n\n var scale = scaleBand();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (padding) scale.padding(padding);\n if (paddingInner) scale.paddingInner(paddingInner);\n if (paddingOuter) scale.paddingOuter(paddingOuter);\n if (align) scale.align(align);\n if (tickFormat) scale.tickFormat = tickFormat;\n\n return scale;\n});\n\nvar point = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n padding = _ref.padding,\n align = _ref.align,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice;\n\n var scale = scalePoint();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (padding) scale.padding(padding);\n if (align) scale.align(align);\n\n return scale;\n});\n\nvar linear = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice,\n _ref$clamp = _ref.clamp,\n clamp = _ref$clamp === undefined ? false : _ref$clamp;\n\n var scale = scaleLinear();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (clamp) scale.clamp(true);\n\n return scale;\n});\n\nvar time = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice,\n _ref$clamp = _ref.clamp,\n clamp = _ref$clamp === undefined ? false : _ref$clamp;\n\n var scale = scaleTime();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (clamp) scale.clamp(true);\n\n return scale;\n});\n\nvar utc = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice,\n _ref$clamp = _ref.clamp,\n clamp = _ref$clamp === undefined ? false : _ref$clamp;\n\n var scale = scaleUtc();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (clamp) scale.clamp(true);\n\n return scale;\n});\n\nvar log = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n base = _ref.base,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice,\n _ref$clamp = _ref.clamp,\n clamp = _ref$clamp === undefined ? false : _ref$clamp;\n\n var scale = scaleLog();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (clamp) scale.clamp(true);\n if (base) scale.base(base);\n\n return scale;\n});\n\nvar power = (function (_ref) {\n var range = _ref.range,\n rangeRound = _ref.rangeRound,\n domain = _ref.domain,\n exponent = _ref.exponent,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice,\n _ref$clamp = _ref.clamp,\n clamp = _ref$clamp === undefined ? false : _ref$clamp;\n\n var scale = scalePow();\n\n if (range) scale.range(range);\n if (rangeRound) scale.rangeRound(rangeRound);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (clamp) scale.clamp(true);\n if (exponent) scale.exponent(exponent);\n\n return scale;\n});\n\nvar ordinal = (function (_ref) {\n var range = _ref.range,\n domain = _ref.domain,\n unknown = _ref.unknown;\n\n var scale = scaleOrdinal();\n\n if (range) scale.range(range);\n if (domain) scale.domain(domain);\n if (unknown) scale.unknown(unknown);\n\n return scale;\n});\n\nvar quantize = (function (_ref) {\n var range = _ref.range,\n domain = _ref.domain,\n ticks = _ref.ticks,\n tickFormat = _ref.tickFormat,\n _ref$nice = _ref.nice,\n nice = _ref$nice === undefined ? false : _ref$nice;\n\n var scale = scaleQuantize();\n\n if (range) scale.range(range);\n if (domain) scale.domain(domain);\n if (nice) scale.nice();\n if (ticks) scale.ticks(ticks);\n if (tickFormat) scale.tickFormat(tickFormat);\n\n return scale;\n});\n\nvar quantile = (function (_ref) {\n var range = _ref.range,\n domain = _ref.domain;\n\n var scale = scaleQuantile();\n\n if (range) scale.range(range);\n if (domain) scale.domain(domain);\n\n return scale;\n});\n\nvar threshold = (function (_ref) {\n var range = _ref.range,\n domain = _ref.domain;\n\n var scale = scaleThreshold();\n\n if (range) scale.range(range);\n if (domain) scale.domain(domain);\n\n return scale;\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\nfunction updateScale(scale, _ref) {\n var args = objectWithoutProperties(_ref, []);\n\n var nextScale = scale.copy();\n Object.keys(args).forEach(function (key) {\n if (nextScale.hasOwnProperty(key)) nextScale[key](args[key]);\n });\n return nextScale;\n}\n\nexport { band as scaleBand, point as scalePoint, linear as scaleLinear, time as scaleTime, utc as scaleUtc, log as scaleLog, power as scalePower, ordinal as scaleOrdinal, quantize as scaleQuantize, quantile as scaleQuantile, threshold as scaleThreshold, updateScale };\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n","import ascending from \"./ascending\";\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","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {pair} from \"./pairs\";\n\nexport default function(values0, values1, reduce) {\n var n0 = values0.length,\n n1 = values1.length,\n values = new Array(n0 * n1),\n i0,\n i1,\n i,\n value0;\n\n if (reduce == null) reduce = pair;\n\n for (i0 = i = 0; i0 < n0; ++i0) {\n for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n values[i] = reduce(value0, values1[i1]);\n }\n }\n\n return values;\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","import variance from \"./variance\";\n\nexport default function(array, f) {\n var v = variance(array, f);\n return v ? Math.sqrt(v) : v;\n}\n","export default function(values, valueof) {\n var n = values.length,\n i = -1,\n value,\n min,\n max;\n\n if (valueof == null) {\n while (++i < n) { // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n min = max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = values[i]) != null) {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n }\n\n else {\n while (++i < n) { // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n min = max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null) {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n }\n\n return [min, max];\n}\n","import {slice} from \"./array\";\nimport bisect from \"./bisect\";\nimport constant from \"./constant\";\nimport extent from \"./extent\";\nimport identity from \"./identity\";\nimport range from \"./range\";\nimport {tickStep} from \"./ticks\";\nimport sturges from \"./threshold/sturges\";\n\nexport default function() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n var i,\n n = data.length,\n x,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds.\n if (!Array.isArray(tz)) {\n tz = tickStep(x0, x1, tz);\n tz = range(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive\n }\n\n // Remove any thresholds outside the domain.\n var m = tz.length;\n while (tz[0] <= x0) tz.shift(), --m;\n while (tz[m - 1] > x1) tz.pop(), --m;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n for (i = 0; i < n; ++i) {\n x = values[i];\n if (x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;\n };\n\n return histogram;\n}\n","export default function(x) {\n return x;\n}\n","export {default as bisect, bisectRight, bisectLeft} from \"./bisect\";\nexport {default as ascending} from \"./ascending\";\nexport {default as bisector} from \"./bisector\";\nexport {default as cross} from \"./cross\";\nexport {default as descending} from \"./descending\";\nexport {default as deviation} from \"./deviation\";\nexport {default as extent} from \"./extent\";\nexport {default as histogram} from \"./histogram\";\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis\";\nexport {default as thresholdScott} from \"./threshold/scott\";\nexport {default as thresholdSturges} from \"./threshold/sturges\";\nexport {default as max} from \"./max\";\nexport {default as mean} from \"./mean\";\nexport {default as median} from \"./median\";\nexport {default as merge} from \"./merge\";\nexport {default as min} from \"./min\";\nexport {default as pairs} from \"./pairs\";\nexport {default as permute} from \"./permute\";\nexport {default as quantile} from \"./quantile\";\nexport {default as range} from \"./range\";\nexport {default as scan} from \"./scan\";\nexport {default as shuffle} from \"./shuffle\";\nexport {default as sum} from \"./sum\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks\";\nexport {default as transpose} from \"./transpose\";\nexport {default as variance} from \"./variance\";\nexport {default as zip} from \"./zip\";\n","export default function(values, valueof) {\n var n = values.length,\n i = -1,\n value,\n max;\n\n if (valueof == null) {\n while (++i < n) { // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = values[i]) != null && value > max) {\n max = value;\n }\n }\n }\n }\n }\n\n else {\n while (++i < n) { // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null && value > max) {\n max = value;\n }\n }\n }\n }\n }\n\n return max;\n}\n","import number from \"./number\";\n\nexport default function(values, valueof) {\n var n = values.length,\n m = n,\n i = -1,\n value,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) sum += value;\n else --m;\n }\n }\n\n else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value;\n else --m;\n }\n }\n\n if (m) return sum / m;\n}\n","import ascending from \"./ascending\";\nimport number from \"./number\";\nimport quantile from \"./quantile\";\n\nexport default function(values, valueof) {\n var n = values.length,\n i = -1,\n value,\n numbers = [];\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) {\n numbers.push(value);\n }\n }\n }\n\n else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) {\n numbers.push(value);\n }\n }\n }\n\n return quantile(numbers.sort(ascending), 0.5);\n}\n","export default function(arrays) {\n var n = arrays.length,\n m,\n i = -1,\n j = 0,\n merged,\n array;\n\n while (++i < n) j += arrays[i].length;\n merged = new Array(j);\n\n while (--n >= 0) {\n array = arrays[n];\n m = array.length;\n while (--m >= 0) {\n merged[--j] = array[m];\n }\n }\n\n return merged;\n}\n","export default function(values, valueof) {\n var n = values.length,\n i = -1,\n value,\n min;\n\n if (valueof == null) {\n while (++i < n) { // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n min = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = values[i]) != null && min > value) {\n min = value;\n }\n }\n }\n }\n }\n\n else {\n while (++i < n) { // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n min = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null && min > value) {\n min = value;\n }\n }\n }\n }\n }\n\n return min;\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n","export default function(array, f) {\n if (f == null) f = pair;\n var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);\n while (i < n) pairs[i] = f(p, p = array[++i]);\n return pairs;\n}\n\nexport function pair(a, b) {\n return [a, b];\n}\n","export default function(array, indexes) {\n var i = indexes.length, permutes = new Array(i);\n while (i--) permutes[i] = array[indexes[i]];\n return permutes;\n}\n","import number from \"./number\";\n\nexport default function(values, p, valueof) {\n if (valueof == null) valueof = number;\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\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","import ascending from \"./ascending\";\n\nexport default function(values, compare) {\n if (!(n = values.length)) return;\n var n,\n i = 0,\n j = 0,\n xi,\n xj = values[j];\n\n if (compare == null) compare = ascending;\n\n while (++i < n) {\n if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {\n xj = xi, j = i;\n }\n }\n\n if (compare(xj, xj) === 0) return j;\n}\n","export default function(array, i0, i1) {\n var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),\n t,\n i;\n\n while (m) {\n i = Math.random() * m-- | 0;\n t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n\n return array;\n}\n","export default function(values, valueof) {\n var n = values.length,\n i = -1,\n value,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n }\n }\n\n else {\n while (++i < n) {\n if (value = +valueof(values[i], i, values)) sum += value;\n }\n }\n\n return sum;\n}\n","import {map} from \"../array\";\nimport ascending from \"../ascending\";\nimport number from \"../number\";\nimport quantile from \"../quantile\";\n\nexport default function(values, min, max) {\n values = map.call(values, number).sort(ascending);\n return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3)));\n}\n","import deviation from \"../deviation\";\n\nexport default function(values, min, max) {\n return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3)));\n}\n","export default function(values) {\n return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\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","import min from \"./min\";\n\nexport default function(matrix) {\n if (!(n = matrix.length)) return [];\n for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n row[j] = matrix[j][i];\n }\n }\n return transpose;\n}\n\nfunction length(d) {\n return d.length;\n}\n","import number from \"./number\";\n\nexport default function(values, valueof) {\n var n = values.length,\n m = 0,\n i = -1,\n mean = 0,\n value,\n delta,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) {\n delta = value - mean;\n mean += delta / ++m;\n sum += delta * (value - mean);\n }\n }\n }\n\n else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) {\n delta = value - mean;\n mean += delta / ++m;\n sum += delta * (value - mean);\n }\n }\n }\n\n if (m > 1) return sum / (m - 1);\n}\n","import transpose from \"./transpose\";\n\nexport default function() {\n return transpose(arguments);\n}\n","var array = Array.prototype;\n\nexport var map = array.map;\nexport var slice = array.slice;\n","import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init\";\nimport ordinal from \"./ordinal\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n range = [0, 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 = range[1] < range[0],\n start = range[reverse - 0],\n stop = range[1 - reverse];\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 ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = [+_[0], +_[1]], 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(), range)\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(x) {\n return function() {\n return x;\n };\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport {map, slice} from \"./array\";\nimport constant from \"./constant\";\nimport number from \"./number\";\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(domain) {\n var a = domain[0], b = domain[domain.length - 1], 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 piecewise = Math.min(domain.length, range.length) > 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 = map.call(_, number), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = slice.call(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : 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(transform, untransform) {\n return transformer()(transform, untransform);\n}\n","import {identity} from \"./continuous\";\nimport {initInterpolator} from \"./init\";\nimport {linearish} from \"./linear\";\nimport {loggish} from \"./log\";\nimport {copy} from \"./sequential\";\nimport {symlogish} from \"./symlog\";\nimport {powish} from \"./pow\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1);\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function() {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}\n","import {map} from \"./array\";\nimport {linearish} from \"./linear\";\nimport number from \"./number\";\n\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function(_) {\n return arguments.length ? (domain = map.call(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? map.call(domain, number) : [0, 1];\n\n return linearish(scale);\n}\n","export {\n default as scaleBand,\n point as scalePoint\n} from \"./band\";\n\nexport {\n default as scaleIdentity\n} from \"./identity\";\n\nexport {\n default as scaleLinear\n} from \"./linear\";\n\nexport {\n default as scaleLog\n} from \"./log\";\n\nexport {\n default as scaleSymlog\n} from \"./symlog\";\n\nexport {\n default as scaleOrdinal,\n implicit as scaleImplicit\n} from \"./ordinal\";\n\nexport {\n default as scalePow,\n sqrt as scaleSqrt\n} from \"./pow\";\n\nexport {\n default as scaleQuantile\n} from \"./quantile\";\n\nexport {\n default as scaleQuantize\n} from \"./quantize\";\n\nexport {\n default as scaleThreshold\n} from \"./threshold\";\n\nexport {\n default as scaleTime\n} from \"./time\";\n\nexport {\n default as scaleUtc\n} from \"./utcTime\";\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\";\n\nexport {\n default as scaleSequentialQuantile\n} from \"./sequentialQuantile\";\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\";\n\nexport {\n default as tickFormat\n} from \"./tickFormat\";\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: this.interpolator(domain); break;\n default: this.interpolator(interpolator).domain(domain); break;\n }\n return this;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy, identity} from \"./continuous\";\nimport {initRange} from \"./init\";\nimport tickFormat from \"./tickFormat\";\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(identity, identity);\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {ticks} from \"d3-array\";\nimport {format} from \"d3-format\";\nimport nice from \"./nice\";\nimport {copy, transformer} from \"./continuous\";\nimport {initRange} from \"./init\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n return function(x) {\n return -f(-x);\n };\n}\n\nexport function loggish(transform) {\n var scale = transform(transformLog, transformExp),\n domain = scale.domain,\n base = 10,\n logs,\n pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = function(count) {\n var d = domain(),\n u = d[0],\n v = d[d.length - 1],\n r;\n\n if (r = v < u) i = u, u = v, v = i;\n\n var i = logs(u),\n j = logs(v),\n p,\n k,\n t,\n n = count == null ? 10 : +count,\n z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.round(i) - 1, j = Math.round(j) + 1;\n if (u > 0) for (; i < j; ++i) {\n for (k = 1, p = pows(i); k < base; ++k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i < j; ++i) {\n for (k = base - 1, p = pows(i); k >= 1; --k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = function(count, specifier) {\n if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n if (typeof specifier !== \"function\") specifier = format(specifier);\n if (count === Infinity) return specifier;\n if (count == null) count = 10;\n var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return function(d) {\n var i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = function() {\n return domain(nice(domain(), {\n floor: function(x) { return pows(Math.floor(logs(x))); },\n ceil: function(x) { return pows(Math.ceil(logs(x))); }\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, log()).base(scale.base());\n };\n\n initRange.apply(scale, arguments);\n\n return 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","export default function(x) {\n return +x;\n}\n","import {map} from \"d3-collection\";\nimport {slice} from \"./array\";\nimport {initRange} from \"./init\";\n\nexport var implicit = {name: \"implicit\"};\n\nexport default function ordinal() {\n var index = 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 = map();\n var i = -1, n = _.length, d, key;\n while (++i < n) if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), 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 {linearish} from \"./linear\";\nimport {copy, identity, transformer} from \"./continuous\";\nimport {initRange} from \"./init\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantile as threshold} from \"d3-array\";\nimport {slice} from \"./array\";\nimport {initRange} from \"./init\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {slice} from \"./array\";\nimport {linearish} from \"./linear\";\nimport {initRange} from \"./init\";\n\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n return scale;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];\n };\n\n scale.range = function(_) {\n return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN]\n : i < 1 ? [x0, domain[0]]\n : i >= n ? [domain[n - 1], x1]\n : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function() {\n return domain.slice();\n };\n\n scale.copy = function() {\n return quantize()\n .domain([x0, x1])\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}\n","import {identity} from \"./continuous\";\nimport {initInterpolator} from \"./init\";\nimport {linearish} from \"./linear\";\nimport {loggish} from \"./log\";\nimport {symlogish} from \"./symlog\";\nimport {powish} from \"./pow\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect} from \"d3-array\";\nimport {identity} from \"./continuous\";\nimport {initInterpolator} from \"./init\";\n\nexport default function sequentialQuantile() {\n var domain = [],\n interpolator = identity;\n\n function scale(x) {\n if (!isNaN(x = +x)) return interpolator((bisect(domain, x) - 1) / (domain.length - 1));\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return scale;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.copy = function() {\n return sequentialQuantile(interpolator).domain(domain);\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n","import {linearish} from \"./linear\";\nimport {copy, transformer} from \"./continuous\";\nimport {initRange} from \"./init\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {slice} from \"./array\";\nimport {initRange} from \"./init\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\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 {bisector, tickStep} from \"d3-array\";\nimport {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport {map} from \"./array\";\nimport continuous, {copy, identity} from \"./continuous\";\nimport {initRange} from \"./init\";\nimport nice from \"./nice\";\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(identity, identity),\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, step) {\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 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 }\n\n return step == null ? interval : interval.every(step);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(map.call(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval, step) {\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, step);\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, step) {\n var d = domain();\n return (interval = tickInterval(interval, d[0], d[d.length - 1], step))\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","import {calendar} from \"./time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond} from \"d3-time\";\nimport {initRange} from \"./init\";\n\nexport default function() {\n return initRange.apply(calendar(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","import React from 'react';\nimport cx from 'classnames';\nimport { arc, pie, line, radialLine, area, stack, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, linkHorizontal, linkVertical, linkRadial } from 'd3-shape';\nimport { Group } from '@vx/group';\nimport PropTypes from 'prop-types';\nimport { Point } from '@vx/point';\nimport { curveLinear } from '@vx/curve';\nimport { path } from 'd3-path';\n\nfunction callOrValue(maybeFn, data) {\n if (typeof maybeFn === 'function') {\n return maybeFn(data);\n }\n return maybeFn;\n}\n\nfunction additionalProps(restProps, data) {\n return Object.keys(restProps).reduce(function (ret, cur) {\n ret[cur] = callOrValue(restProps[cur], data);\n return ret;\n }, {});\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\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\nfunction Arc(_ref) {\n var className = _ref.className,\n data = _ref.data,\n centroid = _ref.centroid,\n innerRadius = _ref.innerRadius,\n outerRadius = _ref.outerRadius,\n cornerRadius = _ref.cornerRadius,\n startAngle = _ref.startAngle,\n endAngle = _ref.endAngle,\n padAngle = _ref.padAngle,\n padRadius = _ref.padRadius,\n restProps = objectWithoutProperties(_ref, ['className', 'data', 'centroid', 'innerRadius', 'outerRadius', 'cornerRadius', 'startAngle', 'endAngle', 'padAngle', 'padRadius']);\n\n var arc$$1 = arc();\n if (centroid) arc$$1.centroid(centroid);\n if (innerRadius) arc$$1.innerRadius(innerRadius);\n if (outerRadius) arc$$1.outerRadius(outerRadius);\n if (cornerRadius) arc$$1.cornerRadius(cornerRadius);\n if (startAngle) arc$$1.startAngle(startAngle);\n if (endAngle) arc$$1.endAngle(endAngle);\n if (padAngle) arc$$1.padAngle(padAngle);\n if (padRadius) arc$$1.padRadius(padRadius);\n return React.createElement('path', _extends({ className: cx('vx-arc', className), d: arc$$1(data) }, additionalProps(restProps, data)));\n}\n\nfunction Pie(_ref) {\n var _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className,\n _ref$top = _ref.top,\n top = _ref$top === undefined ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === undefined ? 0 : _ref$left,\n data = _ref.data,\n centroid = _ref.centroid,\n _ref$innerRadius = _ref.innerRadius,\n innerRadius = _ref$innerRadius === undefined ? 0 : _ref$innerRadius,\n outerRadius = _ref.outerRadius,\n cornerRadius = _ref.cornerRadius,\n _ref$startAngle = _ref.startAngle,\n startAngle = _ref$startAngle === undefined ? 0 : _ref$startAngle,\n endAngle = _ref.endAngle,\n padAngle = _ref.padAngle,\n padRadius = _ref.padRadius,\n pieSort = _ref.pieSort,\n pieSortValues = _ref.pieSortValues,\n pieValue = _ref.pieValue,\n children = _ref.children,\n restProps = objectWithoutProperties(_ref, ['className', 'top', 'left', 'data', 'centroid', 'innerRadius', 'outerRadius', 'cornerRadius', 'startAngle', 'endAngle', 'padAngle', 'padRadius', 'pieSort', 'pieSortValues', 'pieValue', 'children']);\n\n var path$$1 = arc();\n path$$1.innerRadius(innerRadius);\n if (outerRadius) path$$1.outerRadius(outerRadius);\n if (cornerRadius) path$$1.cornerRadius(cornerRadius);\n if (padRadius) path$$1.padRadius(padRadius);\n var pie$$1 = pie();\n if (pieSort) pie$$1.sort(pieSort);\n if (pieSortValues) pie$$1.sortValues(pieSortValues);\n if (pieValue) pie$$1.value(pieValue);\n if (padAngle != null) pie$$1.padAngle(padAngle);\n if (startAngle != null) pie$$1.startAngle(startAngle);\n if (endAngle != null) pie$$1.endAngle(endAngle);\n var arcs = pie$$1(data);\n var renderFunctionArg = {\n arcs: arcs,\n generatePathProps: function generatePathProps(arc$$1, index) {\n return _extends({\n className: cx('vx-pie-arc', className),\n d: path$$1(arc$$1)\n }, additionalProps(restProps, _extends({}, arc$$1, {\n index: index,\n centroid: centroid ? path$$1.centroid(arc$$1) : undefined\n })));\n },\n generateCentroid: function generateCentroid(arc$$1) {\n return centroid && centroid(path$$1.centroid(arc$$1), arc$$1);\n }\n };\n return React.createElement(\n Group,\n { className: 'vx-pie-arcs-group', top: top, left: left },\n children ? children(renderFunctionArg) : arcs.map(function (arc$$1, i) {\n var pathProps = renderFunctionArg.generatePathProps(arc$$1, i);\n return React.createElement(\n 'g',\n { key: 'pie-arc-' + i },\n React.createElement('path', pathProps),\n renderFunctionArg.generateCentroid(arc$$1)\n );\n })\n );\n}\n\nLine.propTypes = {\n innerRef: PropTypes.func\n};\n\nfunction Line(_ref) {\n var _ref$from = _ref.from,\n from = _ref$from === undefined ? new Point({ x: 0, y: 0 }) : _ref$from,\n _ref$to = _ref.to,\n to = _ref$to === undefined ? new Point({ x: 1, y: 1 }) : _ref$to,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === undefined ? 'black' : _ref$stroke,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === undefined ? 1 : _ref$strokeWidth,\n _ref$strokeDasharray = _ref.strokeDasharray,\n strokeDasharray = _ref$strokeDasharray === undefined ? '' : _ref$strokeDasharray,\n _ref$transform = _ref.transform,\n transform = _ref$transform === undefined ? '' : _ref$transform,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className,\n data = _ref.data,\n innerRef = _ref.innerRef,\n restProps = objectWithoutProperties(_ref, ['from', 'to', 'stroke', 'strokeWidth', 'strokeDasharray', 'transform', 'className', 'data', 'innerRef']);\n\n return React.createElement('line', _extends({\n ref: innerRef,\n className: cx('vx-line', className),\n x1: from.x,\n y1: from.y,\n x2: to.x,\n y2: to.y,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n transform: transform\n }, additionalProps(restProps, data)));\n}\n\nLinePath.propTypes = {\n innerRef: PropTypes.func,\n xScale: PropTypes.func,\n yScale: PropTypes.func,\n data: PropTypes.array,\n x: PropTypes.func,\n y: PropTypes.func,\n defined: PropTypes.func,\n stroke: PropTypes.string,\n strokeWidth: PropTypes.number,\n glyph: PropTypes.func,\n curve: PropTypes.func\n};\n\nfunction LinePath(_ref) {\n var children = _ref.children,\n data = _ref.data,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n x = _ref.x,\n y = _ref.y,\n _ref$defined = _ref.defined,\n defined = _ref$defined === undefined ? function () {\n return true;\n } : _ref$defined,\n className = _ref.className,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === undefined ? 'steelblue' : _ref$stroke,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === undefined ? 2 : _ref$strokeWidth,\n _ref$strokeDasharray = _ref.strokeDasharray,\n strokeDasharray = _ref$strokeDasharray === undefined ? '' : _ref$strokeDasharray,\n _ref$strokeDashoffset = _ref.strokeDashoffset,\n strokeDashoffset = _ref$strokeDashoffset === undefined ? 0 : _ref$strokeDashoffset,\n _ref$fill = _ref.fill,\n fill = _ref$fill === undefined ? 'none' : _ref$fill,\n _ref$curve = _ref.curve,\n curve = _ref$curve === undefined ? curveLinear : _ref$curve,\n glyph = _ref.glyph,\n innerRef = _ref.innerRef,\n restProps = objectWithoutProperties(_ref, ['children', 'data', 'xScale', 'yScale', 'x', 'y', 'defined', 'className', 'stroke', 'strokeWidth', 'strokeDasharray', 'strokeDashoffset', 'fill', 'curve', 'glyph', 'innerRef']);\n\n var path$$1 = line().x(function () {\n return xScale(x.apply(undefined, arguments));\n }).y(function () {\n return yScale(y.apply(undefined, arguments));\n }).defined(defined).curve(curve);\n if (children) return children({ path: path$$1 });\n return React.createElement(\n 'g',\n null,\n React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-linepath', className),\n d: path$$1(data),\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n strokeDashoffset: strokeDashoffset,\n fill: fill\n }, additionalProps(restProps, data))),\n glyph && React.createElement(\n 'g',\n { className: 'vx-linepath-glyphs' },\n data.map(glyph)\n )\n );\n}\n\nLineRadial.propTypes = {\n innerRef: PropTypes.func\n};\n\nfunction LineRadial(_ref) {\n var _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className,\n angle = _ref.angle,\n radius = _ref.radius,\n defined = _ref.defined,\n curve = _ref.curve,\n data = _ref.data,\n innerRef = _ref.innerRef,\n restProps = objectWithoutProperties(_ref, ['className', 'angle', 'radius', 'defined', 'curve', 'data', 'innerRef']);\n\n var path$$1 = radialLine();\n if (angle) path$$1.angle(angle);\n if (radius) path$$1.radius(radius);\n if (defined) path$$1.defined(defined);\n if (curve) path$$1.curve(curve);\n return React.createElement(\n 'g',\n null,\n React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-line-radial', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)))\n );\n}\n\nArea.propTypes = {\n x: PropTypes.func,\n x0: PropTypes.func,\n x1: PropTypes.func,\n y: PropTypes.func,\n y0: PropTypes.func,\n y1: PropTypes.func,\n xScale: PropTypes.func,\n yScale: PropTypes.func,\n data: PropTypes.array,\n defined: PropTypes.func,\n className: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.object, PropTypes.array]),\n innerRef: PropTypes.func,\n strokeDasharray: PropTypes.string,\n strokeWidth: PropTypes.number,\n stroke: PropTypes.string,\n fill: PropTypes.string,\n curve: PropTypes.func\n};\n\nfunction Area(_ref) {\n var children = _ref.children,\n x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y = _ref.y,\n y0 = _ref.y0,\n y1 = _ref.y1,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n _ref$data = _ref.data,\n data = _ref$data === undefined ? [] : _ref$data,\n _ref$defined = _ref.defined,\n defined = _ref$defined === undefined ? function () {\n return true;\n } : _ref$defined,\n className = _ref.className,\n strokeDasharray = _ref.strokeDasharray,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === undefined ? 2 : _ref$strokeWidth,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === undefined ? 'black' : _ref$stroke,\n _ref$fill = _ref.fill,\n fill = _ref$fill === undefined ? 'rgba(0,0,0,0.3)' : _ref$fill,\n curve = _ref.curve,\n innerRef = _ref.innerRef,\n restProps = objectWithoutProperties(_ref, ['children', 'x', 'x0', 'x1', 'y', 'y0', 'y1', 'xScale', 'yScale', 'data', 'defined', 'className', 'strokeDasharray', 'strokeWidth', 'stroke', 'fill', 'curve', 'innerRef']);\n\n var path$$1 = area();\n if (x) path$$1.x(function () {\n return xScale(x.apply(undefined, arguments));\n });\n if (x0) path$$1.x0(function () {\n return xScale(x0.apply(undefined, arguments));\n });\n if (x1) path$$1.x1(function () {\n return xScale(x1.apply(undefined, arguments));\n });\n if (y) path$$1.y(function () {\n return yScale(y.apply(undefined, arguments));\n });\n if (y0) path$$1.y0(function () {\n return yScale(y0.apply(undefined, arguments));\n });\n if (y1) path$$1.y1(function () {\n return yScale(y1.apply(undefined, arguments));\n });\n if (defined) path$$1.defined(defined);\n if (curve) path$$1.curve(curve);\n if (children) return children({ path: path$$1 });\n return React.createElement(\n 'g',\n null,\n React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-area', className),\n d: path$$1(data),\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n fill: fill\n }, additionalProps(restProps, data)))\n );\n}\n\nAreaClosed.propTypes = {\n innerRef: PropTypes.func\n};\n\nfunction AreaClosed(_ref) {\n var x = _ref.x,\n y = _ref.y,\n y0 = _ref.y0,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n data = _ref.data,\n _ref$defined = _ref.defined,\n defined = _ref$defined === undefined ? function () {\n return true;\n } : _ref$defined,\n className = _ref.className,\n strokeDasharray = _ref.strokeDasharray,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === undefined ? 2 : _ref$strokeWidth,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === undefined ? 'black' : _ref$stroke,\n _ref$fill = _ref.fill,\n fill = _ref$fill === undefined ? 'rgba(0,0,0,0.3)' : _ref$fill,\n curve = _ref.curve,\n innerRef = _ref.innerRef,\n restProps = objectWithoutProperties(_ref, ['x', 'y', 'y0', 'xScale', 'yScale', 'data', 'defined', 'className', 'strokeDasharray', 'strokeWidth', 'stroke', 'fill', 'curve', 'innerRef']);\n\n var path$$1 = area().x(function () {\n return xScale(x.apply(undefined, arguments));\n }).y0(y0 || yScale.range()[0]).y1(function () {\n return yScale(y.apply(undefined, arguments));\n }).defined(defined);\n if (curve) path$$1.curve(curve);\n return React.createElement(\n 'g',\n null,\n React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-area-closed', className),\n d: path$$1(data),\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n fill: fill\n }, additionalProps(restProps, data)))\n );\n}\n\nfunction AreaStack(_ref) {\n var className = _ref.className,\n _ref$top = _ref.top,\n _ref$left = _ref.left,\n keys = _ref.keys,\n data = _ref.data,\n curve = _ref.curve,\n defined = _ref.defined,\n x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y0 = _ref.y0,\n y1 = _ref.y1,\n glyph = _ref.glyph,\n _ref$reverse = _ref.reverse,\n reverse = _ref$reverse === undefined ? false : _ref$reverse,\n restProps = objectWithoutProperties(_ref, ['className', 'top', 'left', 'keys', 'data', 'curve', 'defined', 'x', 'x0', 'x1', 'y0', 'y1', 'glyph', 'reverse']);\n\n var stack$$1 = stack();\n if (keys) stack$$1.keys(keys);\n\n var path$$1 = area();\n if (x) path$$1.x(x);\n if (x0) path$$1.x0(x0);\n if (x1) path$$1.x1(x1);\n if (y0) path$$1.y0(y0);\n if (y1) path$$1.y1(y1);\n if (curve) path$$1.curve(curve);\n if (defined) path$$1.defined(defined);\n\n var seriesData = stack$$1(data);\n if (reverse) seriesData.reverse();\n\n return React.createElement(\n 'g',\n null,\n seriesData.map(function (series, i) {\n return React.createElement('path', _extends({\n className: cx('vx-area-stack', className),\n key: 'area-stack-' + i + '-' + (series.key || ''),\n d: path$$1(series)\n }, additionalProps(restProps, {\n datum: series[i],\n index: i,\n series: series\n })));\n }),\n !!glyph && React.createElement(\n 'g',\n { className: 'vx-area-stack-glyphs' },\n data.map(glyph)\n )\n );\n}\n\nBar.propTypes = {\n innerRef: PropTypes.func\n};\n\nfunction Bar(_ref) {\n var className = _ref.className,\n innerRef = _ref.innerRef,\n data = _ref.data,\n _ref$x = _ref.x,\n x = _ref$x === undefined ? 0 : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === undefined ? 0 : _ref$y,\n width = _ref.width,\n height = _ref.height,\n rx = _ref.rx,\n ry = _ref.ry,\n _ref$fill = _ref.fill,\n fill = _ref$fill === undefined ? 'steelblue' : _ref$fill,\n fillOpacity = _ref.fillOpacity,\n stroke = _ref.stroke,\n strokeWidth = _ref.strokeWidth,\n strokeDasharray = _ref.strokeDasharray,\n strokeLinecap = _ref.strokeLinecap,\n strokeLinejoin = _ref.strokeLinejoin,\n strokeMiterlimit = _ref.strokeMiterlimit,\n strokeOpacity = _ref.strokeOpacity,\n restProps = objectWithoutProperties(_ref, ['className', 'innerRef', 'data', 'x', 'y', 'width', 'height', 'rx', 'ry', 'fill', 'fillOpacity', 'stroke', 'strokeWidth', 'strokeDasharray', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity']);\n\n return React.createElement('rect', _extends({\n ref: innerRef,\n className: cx('vx-bar', className),\n x: x,\n y: y,\n width: width,\n height: height,\n rx: rx,\n ry: ry,\n fill: fill,\n fillOpacity: fillOpacity,\n stroke: stroke,\n strokeWidth: strokeWidth,\n strokeDasharray: strokeDasharray,\n strokeLinecap: strokeLinecap,\n strokeLinejoin: strokeLinejoin,\n strokeMiterlimit: strokeMiterlimit,\n strokeOpacity: strokeOpacity\n }, additionalProps(restProps, data)));\n}\n\nfunction BarGroup(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n x0 = _ref.x0,\n x0Scale = _ref.x0Scale,\n x1Scale = _ref.x1Scale,\n yScale = _ref.yScale,\n zScale = _ref.zScale,\n keys = _ref.keys,\n height = _ref.height,\n restProps = objectWithoutProperties(_ref, ['data', 'className', 'top', 'left', 'x0', 'x0Scale', 'x1Scale', 'yScale', 'zScale', 'keys', 'height']);\n\n var format = x0Scale.tickFormat ? x0Scale.tickFormat() : function (d) {\n return d;\n };\n return React.createElement(\n Group,\n { className: cx('vx-bar-group', className), top: top, left: left },\n data && data.map(function (d, i) {\n return React.createElement(\n Group,\n { key: 'bar-group-' + i + '-' + x0(d), left: x0Scale(x0(d)) },\n keys && keys.map(function (key, i) {\n var value = d[key];\n return React.createElement(Bar, _extends({\n key: 'bar-group-bar-' + i + '-' + value + '-' + key,\n x: x1Scale(key),\n y: yScale(value),\n width: x1Scale.bandwidth(),\n height: height - yScale(value),\n fill: zScale(key),\n data: {\n key: key,\n value: value,\n x: format(x0(d)),\n data: d\n }\n }, restProps));\n })\n );\n })\n );\n}\n\nBarGroup.propTypes = {\n data: PropTypes.array.isRequired,\n x0: PropTypes.func.isRequired,\n x0Scale: PropTypes.func.isRequired,\n x1Scale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n zScale: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n height: PropTypes.number.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number\n};\n\nfunction BarGroupHorizontal(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n y0 = _ref.y0,\n y0Scale = _ref.y0Scale,\n y1Scale = _ref.y1Scale,\n xScale = _ref.xScale,\n zScale = _ref.zScale,\n keys = _ref.keys,\n width = _ref.width,\n restProps = objectWithoutProperties(_ref, ['data', 'className', 'top', 'left', 'y0', 'y0Scale', 'y1Scale', 'xScale', 'zScale', 'keys', 'width']);\n\n var format = y0Scale.tickFormat ? y0Scale.tickFormat() : function (d) {\n return d;\n };\n return React.createElement(\n Group,\n { className: cx('vx-bar-group-horizontal', className), top: top, left: left },\n data && data.map(function (d, i) {\n return React.createElement(\n Group,\n { key: 'bar-group-' + i + '-' + y0(d), top: y0Scale(y0(d)) },\n keys && keys.map(function (key, i) {\n var value = d[key];\n return React.createElement(Bar, _extends({\n key: 'bar-group-bar-' + i + '-' + value + '-' + key,\n x: 0,\n y: y1Scale(key),\n width: width - xScale(value),\n height: y1Scale.bandwidth(),\n fill: zScale(key),\n data: {\n key: key,\n value: value,\n y: format(y0(d)),\n data: d\n }\n }, restProps));\n })\n );\n })\n );\n}\n\nBarGroupHorizontal.propTypes = {\n data: PropTypes.array.isRequired,\n y0: PropTypes.func.isRequired,\n y0Scale: PropTypes.func.isRequired,\n y1Scale: PropTypes.func.isRequired,\n xScale: PropTypes.func.isRequired,\n zScale: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n width: PropTypes.number.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number\n};\n\nfunction BarStack(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n x = _ref.x,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n zScale = _ref.zScale,\n keys = _ref.keys,\n height = _ref.height,\n restProps = objectWithoutProperties(_ref, ['data', 'className', 'top', 'left', 'x', 'xScale', 'yScale', 'zScale', 'keys', 'height']);\n\n var series = stack().keys(keys)(data);\n var format = xScale.tickFormat ? xScale.tickFormat() : function (d) {\n return d;\n };\n var bandwidth = xScale.bandwidth();\n var step = xScale.step();\n var paddingInner = xScale.paddingInner();\n var paddingOuter = xScale.paddingOuter();\n return React.createElement(\n Group,\n { className: cx('vx-bar-stack', className), top: top, left: left },\n series && series.map(function (s, i) {\n return React.createElement(\n Group,\n { key: 'vx-bar-stack-' + i },\n s.map(function (d, ii) {\n var barHeight = yScale(d[0]) - yScale(d[1]);\n return React.createElement(Bar, _extends({\n key: 'bar-group-bar-' + i + '-' + ii + '-' + s.key,\n x: xScale(x(d.data)),\n y: yScale(d[1]),\n width: bandwidth,\n height: barHeight,\n fill: zScale(s.key),\n data: {\n bandwidth: bandwidth,\n paddingInner: paddingInner,\n paddingOuter: paddingOuter,\n step: step,\n key: s.key,\n value: d[1],\n height: barHeight,\n width: bandwidth,\n x: x(d.data),\n xFormatted: format(x(d.data)),\n data: d.data\n }\n }, restProps));\n })\n );\n })\n );\n}\n\nBarStack.propTypes = {\n data: PropTypes.array.isRequired,\n x: PropTypes.func.isRequired,\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n zScale: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number\n};\n\nfunction BarStackHorizontal(_ref) {\n var data = _ref.data,\n className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n y = _ref.y,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n zScale = _ref.zScale,\n keys = _ref.keys,\n height = _ref.height,\n restProps = objectWithoutProperties(_ref, ['data', 'className', 'top', 'left', 'y', 'xScale', 'yScale', 'zScale', 'keys', 'height']);\n\n var series = stack().keys(keys)(data);\n var format = yScale.tickFormat ? yScale.tickFormat() : function (d) {\n return d;\n };\n var bandwidth = yScale.bandwidth();\n var step = yScale.step();\n var paddingInner = yScale.paddingInner();\n var paddingOuter = yScale.paddingOuter();\n return React.createElement(\n Group,\n { className: cx('vx-bar-stack-horizontal', className), top: top, left: left },\n series && series.map(function (s, i) {\n return React.createElement(\n Group,\n { key: 'vx-bar-stack-horizontal-' + i },\n s.map(function (d, ii) {\n var barWidth = xScale(d[1]) - xScale(d[0]);\n return React.createElement(Bar, _extends({\n key: 'bar-group-bar-' + i + '-' + ii + '-' + s.key,\n x: xScale(d[0]),\n y: yScale(y(d.data)),\n width: barWidth,\n height: bandwidth,\n fill: zScale(s.key),\n data: {\n bandwidth: bandwidth,\n paddingInner: paddingInner,\n paddingOuter: paddingOuter,\n step: step,\n key: s.key,\n value: d[0],\n height: bandwidth,\n width: barWidth,\n y: y(d.data),\n yFormatted: format(y(d.data)),\n data: d.data\n }\n }, restProps));\n })\n );\n })\n );\n}\n\nBarStackHorizontal.propTypes = {\n data: PropTypes.array.isRequired,\n y: PropTypes.func.isRequired,\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n zScale: PropTypes.func.isRequired,\n keys: PropTypes.array.isRequired,\n className: PropTypes.string,\n top: PropTypes.number,\n left: PropTypes.number\n};\n\nvar STACK_ORDERS = {\n ascending: stackOrderAscending,\n descending: stackOrderDescending,\n insideout: stackOrderInsideOut,\n none: stackOrderNone,\n reverse: stackOrderReverse\n};\n\nvar STACK_ORDER_NAMES = Object.keys(STACK_ORDERS);\n\nfunction stackOrder(order) {\n return STACK_ORDERS[order] || STACK_ORDERS.none;\n}\n\nvar STACK_OFFSETS = {\n expand: stackOffsetExpand,\n diverging: stackOffsetDiverging,\n none: stackOffsetNone,\n silhouette: stackOffsetSilhouette,\n wiggle: stackOffsetWiggle\n};\n\nvar STACK_OFFSET_NAMES = Object.keys(STACK_OFFSETS);\n\nfunction stackOffset(offset) {\n return STACK_OFFSETS[offset] || STACK_OFFSETS.none;\n}\n\nfunction Stack(_ref) {\n var className = _ref.className,\n _ref$top = _ref.top,\n top = _ref$top === undefined ? 0 : _ref$top,\n _ref$left = _ref.left,\n left = _ref$left === undefined ? 0 : _ref$left,\n keys = _ref.keys,\n data = _ref.data,\n curve = _ref.curve,\n defined = _ref.defined,\n x = _ref.x,\n x0 = _ref.x0,\n x1 = _ref.x1,\n y0 = _ref.y0,\n y1 = _ref.y1,\n value = _ref.value,\n order = _ref.order,\n offset = _ref.offset,\n render = _ref.render,\n _ref$reverse = _ref.reverse,\n reverse = _ref$reverse === undefined ? false : _ref$reverse,\n restProps = objectWithoutProperties(_ref, ['className', 'top', 'left', 'keys', 'data', 'curve', 'defined', 'x', 'x0', 'x1', 'y0', 'y1', 'value', 'order', 'offset', 'render', 'reverse']);\n\n var stack$$1 = stack();\n if (keys) stack$$1.keys(keys);\n if (value) stack$$1.value(value);\n if (order) stack$$1.order(stackOrder(order));\n if (offset) stack$$1.offset(stackOffset(offset));\n\n var path$$1 = area();\n if (x) path$$1.x(x);\n if (x0) path$$1.x0(x0);\n if (x1) path$$1.x1(x1);\n if (y0) path$$1.y0(y0);\n if (y1) path$$1.y1(y1);\n if (curve) path$$1.curve(curve);\n if (defined) path$$1.defined(defined);\n\n var seriesData = stack$$1(data);\n if (reverse) seriesData.reverse();\n\n if (render) return React.createElement(\n Group,\n { top: top, left: left },\n render({ seriesData: seriesData, path: path$$1 })\n );\n\n return React.createElement(\n Group,\n { top: top, left: left },\n seriesData.map(function (series, i) {\n return React.createElement('path', _extends({\n className: cx('vx-stack', className),\n key: 'stack-' + i + '-' + (series.key || ''),\n d: path$$1(series)\n }, additionalProps(restProps, {\n datum: series[i],\n index: i,\n series: series\n })));\n })\n );\n}\n\nfunction pathHorizontalDiagonal(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n\n return function (data) {\n var link = linkHorizontal();\n link.x(x);\n link.y(y);\n link.source(source);\n link.target(target);\n return link(data);\n };\n}\n\nLinkHorizontal.propTypes = {\n innerRef: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkHorizontal(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathHorizontalDiagonal({ source: source, target: target, x: x, y: y });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link-horizontal', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathVerticalDiagonal(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n\n return function (data) {\n var link = linkVertical();\n link.x(x);\n link.y(y);\n link.source(source);\n link.target(target);\n return link(data);\n };\n}\n\nLinkVertical.propTypes = {\n innerRef: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkVertical(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathVerticalDiagonal({ source: source, target: target, x: x, y: y });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link-vertical', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathRadialDiagonal(_ref) {\n var source = _ref.source,\n target = _ref.target,\n angle = _ref.angle,\n radius = _ref.radius;\n\n return function (data) {\n var link = linkRadial();\n link.angle(angle);\n link.radius(radius);\n link.source(source);\n link.target(target);\n return link(data);\n };\n}\n\nLinkRadial.propTypes = {\n innerRef: PropTypes.func,\n angle: PropTypes.func,\n radius: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkRadial(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$angle = _ref2.angle,\n angle = _ref2$angle === undefined ? function (d) {\n return d.x;\n } : _ref2$angle,\n _ref2$radius = _ref2.radius,\n radius = _ref2$radius === undefined ? function (d) {\n return d.y;\n } : _ref2$radius,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'angle', 'radius', 'source', 'target']);\n\n path$$1 = path$$1 || pathRadialDiagonal({ source: source, target: target, angle: angle, radius: radius });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link-radius', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathHorizontalCurve(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var dx = tx - sx;\n var dy = ty - sy;\n var ix = percent * (dx + dy);\n var iy = percent * (dy - dx);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.bezierCurveTo(sx + ix, sy + iy, tx + iy, ty - ix, tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkHorizontalCurve.propTypes = {\n innerRef: PropTypes.func,\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkHorizontalCurve(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === undefined ? 0.2 : _ref2$percent,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target', 'percent']);\n\n path$$1 = path$$1 || pathHorizontalCurve({ source: source, target: target, x: x, y: y, percent: percent });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathVerticalCurve(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var dx = tx - sx;\n var dy = ty - sy;\n var ix = percent * (dx + dy);\n var iy = percent * (dy - dx);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.bezierCurveTo(sx + ix, sy + iy, tx + iy, ty - ix, tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkVerticalCurve.propTypes = {\n innerRef: PropTypes.func,\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkVerticalCurve(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === undefined ? 0.2 : _ref2$percent,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target', 'percent']);\n\n path$$1 = path$$1 || pathVerticalCurve({ source: source, target: target, x: x, y: y, percent: percent });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathRadialCurve(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sa = x(sourceData) - Math.PI / 2;\n var sr = y(sourceData);\n var ta = x(targetData) - Math.PI / 2;\n var tr = y(targetData);\n\n var sc = Math.cos(sa);\n var ss = Math.sin(sa);\n var tc = Math.cos(ta);\n var ts = Math.sin(ta);\n\n var sx = sr * sc;\n var sy = sr * ss;\n var tx = tr * tc;\n var ty = tr * ts;\n\n var dx = tx - sx;\n var dy = ty - sy;\n var ix = percent * (dx + dy);\n var iy = percent * (dy - dx);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.bezierCurveTo(sx + ix, sy + iy, tx + iy, ty - ix, tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkRadialCurve.propTypes = {\n innerRef: PropTypes.func,\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkRadialCurve(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === undefined ? 0.2 : _ref2$percent,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target', 'percent']);\n\n path$$1 = path$$1 || pathRadialCurve({ source: source, target: target, x: x, y: y, percent: percent });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathHorizontalLine(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkHorizontalLine.propTypes = {\n innerRef: PropTypes.func,\n path: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func\n};\n\nfunction LinkHorizontalLine(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathHorizontalLine({ source: source, target: target, x: x, y: y });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathVerticalLine(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkVerticalLine.propTypes = {\n innerRef: PropTypes.func,\n path: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func\n};\n\nfunction LinkVerticalLine(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathVerticalLine({ source: source, target: target, x: x, y: y });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathRadialLine(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sa = x(sourceData) - Math.PI / 2;\n var sr = y(sourceData);\n var ta = x(targetData) - Math.PI / 2;\n var tr = y(targetData);\n\n var sc = Math.cos(sa);\n var ss = Math.sin(sa);\n var tc = Math.cos(ta);\n var ts = Math.sin(ta);\n\n var path$$1 = path();\n path$$1.moveTo(sr * sc, sr * ss);\n path$$1.lineTo(tr * tc, tr * ts);\n\n return path$$1.toString();\n };\n}\n\nLinkRadialStep.propTypes = {\n innerRef: PropTypes.func,\n path: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func\n};\n\nfunction LinkRadialStep(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathRadialLine({ source: source, target: target, x: x, y: y });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathHorizontalStep(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(sx + (tx - sx) * percent, sy);\n path$$1.lineTo(sx + (tx - sx) * percent, ty);\n path$$1.lineTo(tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkHorizontalStep.propTypes = {\n innerRef: PropTypes.func,\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkHorizontalStep(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === undefined ? 0.5 : _ref2$percent,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.y;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.x;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'percent', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathHorizontalStep({ source: source, target: target, x: x, y: y, percent: percent });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathVerticalStep(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y,\n percent = _ref.percent;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var path$$1 = path();\n path$$1.moveTo(sx, sy);\n path$$1.lineTo(sx, sy + (ty - sy) * percent);\n path$$1.lineTo(tx, sy + (ty - sy) * percent);\n path$$1.lineTo(tx, ty);\n\n return path$$1.toString();\n };\n}\n\nLinkVerticalStep.propTypes = {\n innerRef: PropTypes.func,\n percent: PropTypes.number,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkVerticalStep(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$percent = _ref2.percent,\n percent = _ref2$percent === undefined ? 0.5 : _ref2$percent,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'percent', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathVerticalStep({ source: source, target: target, x: x, y: y, percent: percent });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nfunction pathRadialStep(_ref) {\n var source = _ref.source,\n target = _ref.target,\n x = _ref.x,\n y = _ref.y;\n\n return function (data) {\n var sourceData = source(data);\n var targetData = target(data);\n\n var sx = x(sourceData);\n var sy = y(sourceData);\n var tx = x(targetData);\n var ty = y(targetData);\n\n var sa = sx - Math.PI / 2;\n var sr = sy;\n var ta = tx - Math.PI / 2;\n var tr = ty;\n\n var sc = Math.cos(sa);\n var ss = Math.sin(sa);\n var tc = Math.cos(ta);\n var ts = Math.sin(ta);\n var sf = Math.abs(ta - sa) > Math.PI ? ta <= sa : ta > sa;\n\n return '\\n M' + sr * sc + ',' + sr * ss + '\\n A' + sr + ',' + sr + ',0,0,' + (sf ? 1 : 0) + ',' + sr * tc + ',' + sr * ts + '\\n L' + tr * tc + ',' + tr * ts + '\\n ';\n };\n}\n\nLinkRadialStep$1.propTypes = {\n innerRef: PropTypes.func,\n x: PropTypes.func,\n y: PropTypes.func,\n source: PropTypes.func,\n target: PropTypes.func,\n path: PropTypes.func\n};\n\nfunction LinkRadialStep$1(_ref2) {\n var className = _ref2.className,\n innerRef = _ref2.innerRef,\n data = _ref2.data,\n path$$1 = _ref2.path,\n _ref2$x = _ref2.x,\n x = _ref2$x === undefined ? function (d) {\n return d.x;\n } : _ref2$x,\n _ref2$y = _ref2.y,\n y = _ref2$y === undefined ? function (d) {\n return d.y;\n } : _ref2$y,\n _ref2$source = _ref2.source,\n source = _ref2$source === undefined ? function (d) {\n return d.source;\n } : _ref2$source,\n _ref2$target = _ref2.target,\n target = _ref2$target === undefined ? function (d) {\n return d.target;\n } : _ref2$target,\n restProps = objectWithoutProperties(_ref2, ['className', 'innerRef', 'data', 'path', 'x', 'y', 'source', 'target']);\n\n path$$1 = path$$1 || pathRadialStep({ source: source, target: target, x: x, y: y });\n return React.createElement('path', _extends({\n ref: innerRef,\n className: cx('vx-link', className),\n d: path$$1(data)\n }, additionalProps(restProps, data)));\n}\n\nexport { Arc, Pie, Line, LinePath, LineRadial, Area, AreaClosed, AreaStack, Bar, BarGroup, BarGroupHorizontal, BarStack, BarStackHorizontal, Stack, callOrValue, stackOffset, STACK_OFFSETS, STACK_OFFSET_NAMES, stackOrder, STACK_ORDERS, STACK_ORDER_NAMES, LinkHorizontal, pathHorizontalDiagonal, LinkVertical, pathVerticalDiagonal, LinkRadial, pathRadialDiagonal, LinkHorizontalCurve, pathHorizontalCurve, LinkVerticalCurve, pathVerticalCurve, LinkRadialCurve, pathRadialCurve, LinkHorizontalLine, pathHorizontalLine, LinkVerticalLine, pathVerticalLine, LinkRadialStep as LinkRadialLine, pathRadialLine, LinkHorizontalStep, pathHorizontalStep, LinkVerticalStep, pathVerticalStep, LinkRadialStep$1 as LinkRadialStep, pathRadialStep };\n","import React, { Component } from 'react';\nimport reduceCSSCalc from 'reduce-css-calc';\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\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\nvar emptyFunction_1 = emptyFunction;\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/**\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\nvar invariant_1 = invariant;\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_1;\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\nvar warning_1 = warning;\n\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\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\nvar objectAssign = 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\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nvar ReactPropTypesSecret_1 = ReactPropTypesSecret;\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant$1 = invariant_1;\n var warning$1 = warning_1;\n var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);\n } catch (ex) {\n error = ex;\n }\n warning$1(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning$1(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nvar checkPropTypes_1 = checkPropTypes;\n\nvar factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret_1) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant_1(\n false,\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning_1(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction_1.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning_1(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction_1.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning_1(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction_1.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning_1(\n false,\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction_1.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = objectAssign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes_1;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\nvar factoryWithThrowingShims = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret_1) {\n // It is still safe when called from React.\n return;\n }\n invariant_1(\n false,\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 } shim.isRequired = shim;\n function getShim() {\n return shim;\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 instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction_1;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\nvar propTypes = createCommonjsModule(function (module) {\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 REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\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 = factoryWithTypeCheckers(isValidElement, 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 = factoryWithThrowingShims();\n}\n});\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\nvar _freeGlobal = freeGlobal;\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\nvar _root = root;\n\n/** Built-in value references. */\nvar Symbol$1 = _root.Symbol;\n\nvar _Symbol = Symbol$1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$1 = 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 nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\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 */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty$1.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nvar _getRawTag = getRawTag;\n\n/** Used for built-in method references. */\nvar objectProto$1 = Object.prototype;\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 nativeObjectToString$1 = objectProto$1.toString;\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 */\nfunction objectToString(value) {\n return nativeObjectToString$1.call(value);\n}\n\nvar _objectToString = objectToString;\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;\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 */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag$1 && symToStringTag$1 in Object(value))\n ? _getRawTag(value)\n : _objectToString(value);\n}\n\nvar _baseGetTag = baseGetTag;\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 != null && (type == 'object' || type == 'function');\n}\n\nvar isObject_1 = isObject;\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\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 if (!isObject_1(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\nvar isFunction_1 = isFunction;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = _root['__core-js_shared__'];\n\nvar _coreJsData = coreJsData;\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/**\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\nvar _isMasked = isMasked;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\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 */\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\nvar _toSource = toSource;\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 detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto$1 = Function.prototype,\n objectProto$2 = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString$1 = funcProto$1.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$2 = objectProto$2.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$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_1(value) || _isMasked(value)) {\n return false;\n }\n var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;\n return pattern.test(_toSource(value));\n}\n\nvar _baseIsNative = baseIsNative;\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\nvar _getValue = getValue;\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\nvar _getNative = getNative;\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = _getNative(Object, 'create');\n\nvar _nativeCreate = nativeCreate;\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 this.size = 0;\n}\n\nvar _hashClear = hashClear;\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 var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _hashDelete = hashDelete;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto$3 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$3 = objectProto$3.hasOwnProperty;\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$3.call(data, key) ? data[key] : undefined;\n}\n\nvar _hashGet = hashGet;\n\n/** Used for built-in method references. */\nvar objectProto$4 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$4 = objectProto$4.hasOwnProperty;\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$4.call(data, key);\n}\n\nvar _hashHas = hashHas;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED$1 = '__lodash_hash_undefined__';\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 this.size += this.has(key) ? 0 : 1;\n data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;\n return this;\n}\n\nvar _hashSet = hashSet;\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 == 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// 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\nvar _Hash = Hash;\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 this.size = 0;\n}\n\nvar _listCacheClear = listCacheClear;\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\nvar eq_1 = eq;\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_1(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nvar _assocIndexOf = assocIndexOf;\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\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 --this.size;\n return true;\n}\n\nvar _listCacheDelete = listCacheDelete;\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\nvar _listCacheGet = listCacheGet;\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\nvar _listCacheHas = listCacheHas;\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 ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nvar _listCacheSet = listCacheSet;\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 == 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// 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\nvar _ListCache = ListCache;\n\n/* Built-in method references that are verified to be native. */\nvar Map = _getNative(_root, 'Map');\n\nvar _Map = Map;\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.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n}\n\nvar _mapCacheClear = mapCacheClear;\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\nvar _isKeyable = isKeyable;\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\nvar _getMapData = getMapData;\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 var result = _getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _mapCacheDelete = mapCacheDelete;\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\nvar _mapCacheGet = mapCacheGet;\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\nvar _mapCacheHas = mapCacheHas;\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 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\nvar _mapCacheSet = mapCacheSet;\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 == 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// 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\nvar _MapCache = MapCache;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 */\nfunction 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`.\nmemoize.Cache = _MapCache;\n\nvar memoize_1 = memoize;\n\nvar MEASUREMENT_ELEMENT_ID = '__react_svg_text_measurement_id';\n\nfunction getStringWidth(str, style) {\n try {\n // Calculate length of each word to be used to determine number of words per line\n var textEl = document.getElementById(MEASUREMENT_ELEMENT_ID);\n if (!textEl) {\n var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.style.width = 0;\n svg.style.height = 0;\n textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n textEl.setAttribute('id', MEASUREMENT_ELEMENT_ID);\n svg.appendChild(textEl);\n document.body.appendChild(svg);\n }\n\n Object.assign(textEl.style, style);\n textEl.textContent = str;\n return textEl.getComputedTextLength();\n } catch (e) {\n return null;\n }\n}\n\nvar getStringWidth$1 = memoize_1(getStringWidth, function (str, style) {\n return str + '_' + JSON.stringify(style);\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\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\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\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 Text = function (_Component) {\n inherits(Text, _Component);\n\n function Text(props) {\n classCallCheck(this, Text);\n\n var _this = possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, props));\n\n _this.state = {\n wordsByLines: []\n };\n return _this;\n }\n\n createClass(Text, [{\n key: 'componentWillMount',\n value: function componentWillMount() {\n this.updateWordsByLines(this.props, true);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var needCalculate = this.props.children !== nextProps.children || this.props.style !== nextProps.style;\n this.updateWordsByLines(nextProps, needCalculate);\n }\n }, {\n key: 'updateWordsByLines',\n value: function updateWordsByLines(props, needCalculate) {\n // Only perform calculations if using features that require them (multiline, scaleToFit)\n if (props.width || props.scaleToFit) {\n if (needCalculate) {\n var words = props.children ? props.children.toString().split(/\\s+/) : [];\n\n this.wordsWithComputedWidth = words.map(function (word) {\n return {\n word: word,\n width: getStringWidth$1(word, props.style)\n };\n });\n this.spaceWidth = getStringWidth$1('\\xA0', props.style);\n }\n\n var wordsByLines = this.calculateWordsByLines(this.wordsWithComputedWidth, this.spaceWidth, props.width);\n this.setState({ wordsByLines: wordsByLines });\n } else {\n this.updateWordsWithoutCalculate(props);\n }\n }\n }, {\n key: 'updateWordsWithoutCalculate',\n value: function updateWordsWithoutCalculate(props) {\n var words = props.children ? props.children.toString().split(/\\s+/) : [];\n this.setState({ wordsByLines: [{ words: words }] });\n }\n }, {\n key: 'calculateWordsByLines',\n value: function calculateWordsByLines(wordsWithComputedWidth, spaceWidth, lineWidth) {\n var scaleToFit = this.props.scaleToFit;\n\n return wordsWithComputedWidth.reduce(function (result, _ref) {\n var word = _ref.word,\n width = _ref.width;\n\n var currentLine = result[result.length - 1];\n\n if (currentLine && (lineWidth == null || scaleToFit || currentLine.width + width + spaceWidth < lineWidth)) {\n // Word can be added to an existing line\n currentLine.words.push(word);\n currentLine.width += width + spaceWidth;\n } else {\n // Add first word to line or word is too long to scaleToFit on existing line\n var newLine = { words: [word], width: width };\n result.push(newLine);\n }\n\n return result;\n }, []);\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n dx = _props.dx,\n dy = _props.dy,\n textAnchor = _props.textAnchor,\n verticalAnchor = _props.verticalAnchor,\n scaleToFit = _props.scaleToFit,\n angle = _props.angle,\n lineHeight = _props.lineHeight,\n capHeight = _props.capHeight,\n textProps = objectWithoutProperties(_props, ['dx', 'dy', 'textAnchor', 'verticalAnchor', 'scaleToFit', 'angle', 'lineHeight', 'capHeight']);\n var wordsByLines = this.state.wordsByLines;\n\n\n var x = textProps.x;\n var y = textProps.y;\n\n var startDy = void 0;\n switch (verticalAnchor) {\n case 'start':\n startDy = reduceCSSCalc('calc(' + capHeight + ')');\n break;\n case 'middle':\n startDy = reduceCSSCalc('calc(' + (wordsByLines.length - 1) / 2 + ' * -' + lineHeight + ' + (' + capHeight + ' / 2))');\n break;\n default:\n startDy = reduceCSSCalc('calc(' + (wordsByLines.length - 1) + ' * -' + lineHeight + ')');\n break;\n }\n\n var transforms = [];\n if (scaleToFit && wordsByLines.length) {\n var lineWidth = wordsByLines[0].width;\n var sx = this.props.width / lineWidth;\n var sy = sx;\n var originX = x - sx * x;\n var originY = y - sy * y;\n transforms.push('matrix(' + sx + ', 0, 0, ' + sy + ', ' + originX + ', ' + originY + ')');\n }\n if (angle) {\n transforms.push('rotate(' + angle + ', ' + x + ', ' + y + ')');\n }\n if (transforms.length) {\n textProps.transform = transforms.join(' ');\n }\n\n return React.createElement(\n 'svg',\n { x: dx, y: dy, fontSize: textProps.fontSize, style: { overflow: 'visible' } },\n React.createElement(\n 'text',\n _extends({}, textProps, { textAnchor: textAnchor }),\n wordsByLines.map(function (line, index) {\n return React.createElement(\n 'tspan',\n { x: x, dy: index === 0 ? startDy : lineHeight, key: index },\n line.words.join(' ')\n );\n })\n )\n );\n }\n }]);\n return Text;\n}(Component);\n\nText.defaultProps = {\n x: 0,\n y: 0,\n dx: 0,\n dy: 0,\n lineHeight: '1em',\n capHeight: '0.71em', // Magic number from d3\n scaleToFit: false,\n textAnchor: 'start',\n verticalAnchor: 'end' // default SVG behavior\n};\n\nText.propTypes = {\n scaleToFit: propTypes.bool,\n angle: propTypes.number,\n textAnchor: propTypes.oneOf(['start', 'middle', 'end', 'inherit']),\n verticalAnchor: propTypes.oneOf(['start', 'middle', 'end']),\n style: propTypes.object\n};\n\nexport { Text, getStringWidth$1 as getStringWidth };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport { withBoundingRects, withBoundingRectsProps } from '@vx/bounds';\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\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\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\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 withTooltipPropTypes = {\n tooltipOpen: PropTypes.bool,\n tooltipLeft: PropTypes.number,\n tooltipTop: PropTypes.number,\n tooltipData: PropTypes.object,\n updateTooltip: PropTypes.func,\n showTooltip: PropTypes.func,\n hideTooltip: PropTypes.func\n};\n\nfunction withTooltip(BaseComponent) {\n var containerProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n style: {\n position: 'relative',\n width: 'inherit',\n height: 'inherit'\n }\n };\n\n var WrappedComponent = function (_React$PureComponent) {\n inherits(WrappedComponent, _React$PureComponent);\n\n function WrappedComponent(props) {\n classCallCheck(this, WrappedComponent);\n\n var _this = possibleConstructorReturn(this, (WrappedComponent.__proto__ || Object.getPrototypeOf(WrappedComponent)).call(this, props));\n\n _this.state = {\n tooltipOpen: false,\n tooltipLeft: undefined,\n tooltipTop: undefined,\n tooltipData: undefined\n };\n _this.updateTooltip = _this.updateTooltip.bind(_this);\n _this.showTooltip = _this.showTooltip.bind(_this);\n _this.hideTooltip = _this.hideTooltip.bind(_this);\n return _this;\n }\n\n createClass(WrappedComponent, [{\n key: 'updateTooltip',\n value: function updateTooltip(_ref) {\n var tooltipOpen = _ref.tooltipOpen,\n tooltipLeft = _ref.tooltipLeft,\n tooltipTop = _ref.tooltipTop,\n tooltipData = _ref.tooltipData;\n\n this.setState(function (prevState) {\n return _extends({}, prevState, {\n tooltipOpen: tooltipOpen,\n tooltipLeft: tooltipLeft,\n tooltipTop: tooltipTop,\n tooltipData: tooltipData\n });\n });\n }\n }, {\n key: 'showTooltip',\n value: function showTooltip(_ref2) {\n var tooltipLeft = _ref2.tooltipLeft,\n tooltipTop = _ref2.tooltipTop,\n tooltipData = _ref2.tooltipData;\n\n this.updateTooltip({\n tooltipOpen: true,\n tooltipLeft: tooltipLeft,\n tooltipTop: tooltipTop,\n tooltipData: tooltipData\n });\n }\n }, {\n key: 'hideTooltip',\n value: function hideTooltip() {\n this.updateTooltip({\n tooltipOpen: false,\n tooltipLeft: undefined,\n tooltipTop: undefined,\n tooltipData: undefined\n });\n }\n }, {\n key: 'render',\n value: function render() {\n return React.createElement(\n 'div',\n containerProps,\n React.createElement(BaseComponent, _extends({\n updateTooltip: this.updateTooltip,\n showTooltip: this.showTooltip,\n hideTooltip: this.hideTooltip\n }, this.state, this.props))\n );\n }\n }]);\n return WrappedComponent;\n }(React.PureComponent);\n\n return WrappedComponent;\n}\n\nfunction Tooltip(_ref) {\n var className = _ref.className,\n top = _ref.top,\n left = _ref.left,\n style = _ref.style,\n children = _ref.children,\n restProps = objectWithoutProperties(_ref, ['className', 'top', 'left', 'style', 'children']);\n\n return React.createElement(\n 'div',\n _extends({\n className: cx('vx-tooltip-portal', className),\n style: _extends({\n position: 'absolute',\n backgroundColor: 'white',\n color: '#666666',\n padding: '.3rem .5rem',\n borderRadius: '3px',\n fontSize: '14px',\n boxShadow: '0 1px 2px rgba(33,33,33,0.2)',\n lineHeight: '1em',\n pointerEvents: 'none',\n top: top,\n left: left\n }, style)\n }, restProps),\n children\n );\n}\n\nTooltip.propTypes = {\n left: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string,\n style: PropTypes.object,\n children: PropTypes.any\n};\n\n/* eslint react/forbid-prop-types: 0 */\n\nvar propTypes = _extends({}, withBoundingRectsProps, Tooltip.propTypes, {\n offsetLeft: PropTypes.number,\n offsetTop: PropTypes.number\n});\n\nvar defaultProps = {};\n\nfunction TooltipWithBounds(_ref) {\n var initialLeft = _ref.left,\n initialTop = _ref.top,\n _ref$offsetLeft = _ref.offsetLeft,\n offsetLeft = _ref$offsetLeft === undefined ? 10 : _ref$offsetLeft,\n _ref$offsetTop = _ref.offsetTop,\n offsetTop = _ref$offsetTop === undefined ? 10 : _ref$offsetTop,\n rect = _ref.rect,\n parentRect = _ref.parentRect,\n getRects = _ref.getRects,\n children = _ref.children,\n style = _ref.style,\n otherProps = objectWithoutProperties(_ref, ['left', 'top', 'offsetLeft', 'offsetTop', 'rect', 'parentRect', 'getRects', 'children', 'style']);\n\n var left = initialLeft;\n var top = initialTop;\n\n if (rect && parentRect) {\n left = offsetLeft + rect.right > parentRect.right || offsetLeft + rect.right > window.innerWidth ? left - rect.width - offsetLeft : left + offsetLeft;\n\n top = offsetTop + rect.bottom > parentRect.bottom || offsetTop + rect.bottom > window.innerHeight ? top - rect.height - offsetTop : top + offsetTop;\n }\n\n return React.createElement(\n Tooltip,\n _extends({\n style: _extends({ top: 0, transform: 'translate(' + left + 'px, ' + top + 'px)' }, style)\n }, otherProps),\n children\n );\n}\n\nTooltipWithBounds.propTypes = propTypes;\nTooltipWithBounds.defaultProps = defaultProps;\n\nvar TooltipWithBounds$1 = withBoundingRects(TooltipWithBounds);\n\nexport { withTooltip, Tooltip, TooltipWithBounds$1 as TooltipWithBounds };\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","/**\n * Throw a given error.\n *\n * @param {Error|null|undefined} [error]\n * Maybe error.\n * @returns {asserts error is null|undefined}\n */\nexport function bail(error) {\n if (error) {\n throw error\n }\n}\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","/**\n * Map of named character references.\n *\n * @type {Record}\n */\nexport const characterEntities = {\n AElig: 'Æ',\n AMP: '&',\n Aacute: 'Á',\n Abreve: 'Ă',\n Acirc: 'Â',\n Acy: 'А',\n Afr: '𝔄',\n Agrave: 'À',\n Alpha: 'Α',\n Amacr: 'Ā',\n And: '⩓',\n Aogon: 'Ą',\n Aopf: '𝔸',\n ApplyFunction: '⁡',\n Aring: 'Å',\n Ascr: '𝒜',\n Assign: '≔',\n Atilde: 'Ã',\n Auml: 'Ä',\n Backslash: '∖',\n Barv: '⫧',\n Barwed: '⌆',\n Bcy: 'Б',\n Because: '∵',\n Bernoullis: 'ℬ',\n Beta: 'Β',\n Bfr: '𝔅',\n Bopf: '𝔹',\n Breve: '˘',\n Bscr: 'ℬ',\n Bumpeq: '≎',\n CHcy: 'Ч',\n COPY: '©',\n Cacute: 'Ć',\n Cap: '⋒',\n CapitalDifferentialD: 'ⅅ',\n Cayleys: 'ℭ',\n Ccaron: 'Č',\n Ccedil: 'Ç',\n Ccirc: 'Ĉ',\n Cconint: '∰',\n Cdot: 'Ċ',\n Cedilla: '¸',\n CenterDot: '·',\n Cfr: 'ℭ',\n Chi: 'Χ',\n CircleDot: '⊙',\n CircleMinus: '⊖',\n CirclePlus: '⊕',\n CircleTimes: '⊗',\n ClockwiseContourIntegral: '∲',\n CloseCurlyDoubleQuote: '”',\n CloseCurlyQuote: '’',\n Colon: '∷',\n Colone: '⩴',\n Congruent: '≡',\n Conint: '∯',\n ContourIntegral: '∮',\n Copf: 'ℂ',\n Coproduct: '∐',\n CounterClockwiseContourIntegral: '∳',\n Cross: '⨯',\n Cscr: '𝒞',\n Cup: '⋓',\n CupCap: '≍',\n DD: 'ⅅ',\n DDotrahd: '⤑',\n DJcy: 'Ђ',\n DScy: 'Ѕ',\n DZcy: 'Џ',\n Dagger: '‡',\n Darr: '↡',\n Dashv: '⫤',\n Dcaron: 'Ď',\n Dcy: 'Д',\n Del: '∇',\n Delta: 'Δ',\n Dfr: '𝔇',\n DiacriticalAcute: '´',\n DiacriticalDot: '˙',\n DiacriticalDoubleAcute: '˝',\n DiacriticalGrave: '`',\n DiacriticalTilde: '˜',\n Diamond: '⋄',\n DifferentialD: 'ⅆ',\n Dopf: '𝔻',\n Dot: '¨',\n DotDot: '⃜',\n DotEqual: '≐',\n DoubleContourIntegral: '∯',\n DoubleDot: '¨',\n DoubleDownArrow: '⇓',\n DoubleLeftArrow: '⇐',\n DoubleLeftRightArrow: '⇔',\n DoubleLeftTee: '⫤',\n DoubleLongLeftArrow: '⟸',\n DoubleLongLeftRightArrow: '⟺',\n DoubleLongRightArrow: '⟹',\n DoubleRightArrow: '⇒',\n DoubleRightTee: '⊨',\n DoubleUpArrow: '⇑',\n DoubleUpDownArrow: '⇕',\n DoubleVerticalBar: '∥',\n DownArrow: '↓',\n DownArrowBar: '⤓',\n DownArrowUpArrow: '⇵',\n DownBreve: '̑',\n DownLeftRightVector: '⥐',\n DownLeftTeeVector: '⥞',\n DownLeftVector: '↽',\n DownLeftVectorBar: '⥖',\n DownRightTeeVector: '⥟',\n DownRightVector: '⇁',\n DownRightVectorBar: '⥗',\n DownTee: '⊤',\n DownTeeArrow: '↧',\n Downarrow: '⇓',\n Dscr: '𝒟',\n Dstrok: 'Đ',\n ENG: 'Ŋ',\n ETH: 'Ð',\n Eacute: 'É',\n Ecaron: 'Ě',\n Ecirc: 'Ê',\n Ecy: 'Э',\n Edot: 'Ė',\n Efr: '𝔈',\n Egrave: 'È',\n Element: '∈',\n Emacr: 'Ē',\n EmptySmallSquare: '◻',\n EmptyVerySmallSquare: '▫',\n Eogon: 'Ę',\n Eopf: '𝔼',\n Epsilon: 'Ε',\n Equal: '⩵',\n EqualTilde: '≂',\n Equilibrium: '⇌',\n Escr: 'ℰ',\n Esim: '⩳',\n Eta: 'Η',\n Euml: 'Ë',\n Exists: '∃',\n ExponentialE: 'ⅇ',\n Fcy: 'Ф',\n Ffr: '𝔉',\n FilledSmallSquare: '◼',\n FilledVerySmallSquare: '▪',\n Fopf: '𝔽',\n ForAll: '∀',\n Fouriertrf: 'ℱ',\n Fscr: 'ℱ',\n GJcy: 'Ѓ',\n GT: '>',\n Gamma: 'Γ',\n Gammad: 'Ϝ',\n Gbreve: 'Ğ',\n Gcedil: 'Ģ',\n Gcirc: 'Ĝ',\n Gcy: 'Г',\n Gdot: 'Ġ',\n Gfr: '𝔊',\n Gg: '⋙',\n Gopf: '𝔾',\n GreaterEqual: '≥',\n GreaterEqualLess: '⋛',\n GreaterFullEqual: '≧',\n GreaterGreater: '⪢',\n GreaterLess: '≷',\n GreaterSlantEqual: '⩾',\n GreaterTilde: '≳',\n Gscr: '𝒢',\n Gt: '≫',\n HARDcy: 'Ъ',\n Hacek: 'ˇ',\n Hat: '^',\n Hcirc: 'Ĥ',\n Hfr: 'ℌ',\n HilbertSpace: 'ℋ',\n Hopf: 'ℍ',\n HorizontalLine: '─',\n Hscr: 'ℋ',\n Hstrok: 'Ħ',\n HumpDownHump: '≎',\n HumpEqual: '≏',\n IEcy: 'Е',\n IJlig: 'IJ',\n IOcy: 'Ё',\n Iacute: 'Í',\n Icirc: 'Î',\n Icy: 'И',\n Idot: 'İ',\n Ifr: 'ℑ',\n Igrave: 'Ì',\n Im: 'ℑ',\n Imacr: 'Ī',\n ImaginaryI: 'ⅈ',\n Implies: '⇒',\n Int: '∬',\n Integral: '∫',\n Intersection: '⋂',\n InvisibleComma: '⁣',\n InvisibleTimes: '⁢',\n Iogon: 'Į',\n Iopf: '𝕀',\n Iota: 'Ι',\n Iscr: 'ℐ',\n Itilde: 'Ĩ',\n Iukcy: 'І',\n Iuml: 'Ï',\n Jcirc: 'Ĵ',\n Jcy: 'Й',\n Jfr: '𝔍',\n Jopf: '𝕁',\n Jscr: '𝒥',\n Jsercy: 'Ј',\n Jukcy: 'Є',\n KHcy: 'Х',\n KJcy: 'Ќ',\n Kappa: 'Κ',\n Kcedil: 'Ķ',\n Kcy: 'К',\n Kfr: '𝔎',\n Kopf: '𝕂',\n Kscr: '𝒦',\n LJcy: 'Љ',\n LT: '<',\n Lacute: 'Ĺ',\n Lambda: 'Λ',\n Lang: '⟪',\n Laplacetrf: 'ℒ',\n Larr: '↞',\n Lcaron: 'Ľ',\n Lcedil: 'Ļ',\n Lcy: 'Л',\n LeftAngleBracket: '⟨',\n LeftArrow: '←',\n LeftArrowBar: '⇤',\n LeftArrowRightArrow: '⇆',\n LeftCeiling: '⌈',\n LeftDoubleBracket: '⟦',\n LeftDownTeeVector: '⥡',\n LeftDownVector: '⇃',\n LeftDownVectorBar: '⥙',\n LeftFloor: '⌊',\n LeftRightArrow: '↔',\n LeftRightVector: '⥎',\n LeftTee: '⊣',\n LeftTeeArrow: '↤',\n LeftTeeVector: '⥚',\n LeftTriangle: '⊲',\n LeftTriangleBar: '⧏',\n LeftTriangleEqual: '⊴',\n LeftUpDownVector: '⥑',\n LeftUpTeeVector: '⥠',\n LeftUpVector: '↿',\n LeftUpVectorBar: '⥘',\n LeftVector: '↼',\n LeftVectorBar: '⥒',\n Leftarrow: '⇐',\n Leftrightarrow: '⇔',\n LessEqualGreater: '⋚',\n LessFullEqual: '≦',\n LessGreater: '≶',\n LessLess: '⪡',\n LessSlantEqual: '⩽',\n LessTilde: '≲',\n Lfr: '𝔏',\n Ll: '⋘',\n Lleftarrow: '⇚',\n Lmidot: 'Ŀ',\n LongLeftArrow: '⟵',\n LongLeftRightArrow: '⟷',\n LongRightArrow: '⟶',\n Longleftarrow: '⟸',\n Longleftrightarrow: '⟺',\n Longrightarrow: '⟹',\n Lopf: '𝕃',\n LowerLeftArrow: '↙',\n LowerRightArrow: '↘',\n Lscr: 'ℒ',\n Lsh: '↰',\n Lstrok: 'Ł',\n Lt: '≪',\n Map: '⤅',\n Mcy: 'М',\n MediumSpace: ' ',\n Mellintrf: 'ℳ',\n Mfr: '𝔐',\n MinusPlus: '∓',\n Mopf: '𝕄',\n Mscr: 'ℳ',\n Mu: 'Μ',\n NJcy: 'Њ',\n Nacute: 'Ń',\n Ncaron: 'Ň',\n Ncedil: 'Ņ',\n Ncy: 'Н',\n NegativeMediumSpace: '​',\n NegativeThickSpace: '​',\n NegativeThinSpace: '​',\n NegativeVeryThinSpace: '​',\n NestedGreaterGreater: '≫',\n NestedLessLess: '≪',\n NewLine: '\\n',\n Nfr: '𝔑',\n NoBreak: '⁠',\n NonBreakingSpace: ' ',\n Nopf: 'ℕ',\n Not: '⫬',\n NotCongruent: '≢',\n NotCupCap: '≭',\n NotDoubleVerticalBar: '∦',\n NotElement: '∉',\n NotEqual: '≠',\n NotEqualTilde: '≂̸',\n NotExists: '∄',\n NotGreater: '≯',\n NotGreaterEqual: '≱',\n NotGreaterFullEqual: '≧̸',\n NotGreaterGreater: '≫̸',\n NotGreaterLess: '≹',\n NotGreaterSlantEqual: '⩾̸',\n NotGreaterTilde: '≵',\n NotHumpDownHump: '≎̸',\n NotHumpEqual: '≏̸',\n NotLeftTriangle: '⋪',\n NotLeftTriangleBar: '⧏̸',\n NotLeftTriangleEqual: '⋬',\n NotLess: '≮',\n NotLessEqual: '≰',\n NotLessGreater: '≸',\n NotLessLess: '≪̸',\n NotLessSlantEqual: '⩽̸',\n NotLessTilde: '≴',\n NotNestedGreaterGreater: '⪢̸',\n NotNestedLessLess: '⪡̸',\n NotPrecedes: '⊀',\n NotPrecedesEqual: '⪯̸',\n NotPrecedesSlantEqual: '⋠',\n NotReverseElement: '∌',\n NotRightTriangle: '⋫',\n NotRightTriangleBar: '⧐̸',\n NotRightTriangleEqual: '⋭',\n NotSquareSubset: '⊏̸',\n NotSquareSubsetEqual: '⋢',\n NotSquareSuperset: '⊐̸',\n NotSquareSupersetEqual: '⋣',\n NotSubset: '⊂⃒',\n NotSubsetEqual: '⊈',\n NotSucceeds: '⊁',\n NotSucceedsEqual: '⪰̸',\n NotSucceedsSlantEqual: '⋡',\n NotSucceedsTilde: '≿̸',\n NotSuperset: '⊃⃒',\n NotSupersetEqual: '⊉',\n NotTilde: '≁',\n NotTildeEqual: '≄',\n NotTildeFullEqual: '≇',\n NotTildeTilde: '≉',\n NotVerticalBar: '∤',\n Nscr: '𝒩',\n Ntilde: 'Ñ',\n Nu: 'Ν',\n OElig: 'Œ',\n Oacute: 'Ó',\n Ocirc: 'Ô',\n Ocy: 'О',\n Odblac: 'Ő',\n Ofr: '𝔒',\n Ograve: 'Ò',\n Omacr: 'Ō',\n Omega: 'Ω',\n Omicron: 'Ο',\n Oopf: '𝕆',\n OpenCurlyDoubleQuote: '“',\n OpenCurlyQuote: '‘',\n Or: '⩔',\n Oscr: '𝒪',\n Oslash: 'Ø',\n Otilde: 'Õ',\n Otimes: '⨷',\n Ouml: 'Ö',\n OverBar: '‾',\n OverBrace: '⏞',\n OverBracket: '⎴',\n OverParenthesis: '⏜',\n PartialD: '∂',\n Pcy: 'П',\n Pfr: '𝔓',\n Phi: 'Φ',\n Pi: 'Π',\n PlusMinus: '±',\n Poincareplane: 'ℌ',\n Popf: 'ℙ',\n Pr: '⪻',\n Precedes: '≺',\n PrecedesEqual: '⪯',\n PrecedesSlantEqual: '≼',\n PrecedesTilde: '≾',\n Prime: '″',\n Product: '∏',\n Proportion: '∷',\n Proportional: '∝',\n Pscr: '𝒫',\n Psi: 'Ψ',\n QUOT: '\"',\n Qfr: '𝔔',\n Qopf: 'ℚ',\n Qscr: '𝒬',\n RBarr: '⤐',\n REG: '®',\n Racute: 'Ŕ',\n Rang: '⟫',\n Rarr: '↠',\n Rarrtl: '⤖',\n Rcaron: 'Ř',\n Rcedil: 'Ŗ',\n Rcy: 'Р',\n Re: 'ℜ',\n ReverseElement: '∋',\n ReverseEquilibrium: '⇋',\n ReverseUpEquilibrium: '⥯',\n Rfr: 'ℜ',\n Rho: 'Ρ',\n RightAngleBracket: '⟩',\n RightArrow: '→',\n RightArrowBar: '⇥',\n RightArrowLeftArrow: '⇄',\n RightCeiling: '⌉',\n RightDoubleBracket: '⟧',\n RightDownTeeVector: '⥝',\n RightDownVector: '⇂',\n RightDownVectorBar: '⥕',\n RightFloor: '⌋',\n RightTee: '⊢',\n RightTeeArrow: '↦',\n RightTeeVector: '⥛',\n RightTriangle: '⊳',\n RightTriangleBar: '⧐',\n RightTriangleEqual: '⊵',\n RightUpDownVector: '⥏',\n RightUpTeeVector: '⥜',\n RightUpVector: '↾',\n RightUpVectorBar: '⥔',\n RightVector: '⇀',\n RightVectorBar: '⥓',\n Rightarrow: '⇒',\n Ropf: 'ℝ',\n RoundImplies: '⥰',\n Rrightarrow: '⇛',\n Rscr: 'ℛ',\n Rsh: '↱',\n RuleDelayed: '⧴',\n SHCHcy: 'Щ',\n SHcy: 'Ш',\n SOFTcy: 'Ь',\n Sacute: 'Ś',\n Sc: '⪼',\n Scaron: 'Š',\n Scedil: 'Ş',\n Scirc: 'Ŝ',\n Scy: 'С',\n Sfr: '𝔖',\n ShortDownArrow: '↓',\n ShortLeftArrow: '←',\n ShortRightArrow: '→',\n ShortUpArrow: '↑',\n Sigma: 'Σ',\n SmallCircle: '∘',\n Sopf: '𝕊',\n Sqrt: '√',\n Square: '□',\n SquareIntersection: '⊓',\n SquareSubset: '⊏',\n SquareSubsetEqual: '⊑',\n SquareSuperset: '⊐',\n SquareSupersetEqual: '⊒',\n SquareUnion: '⊔',\n Sscr: '𝒮',\n Star: '⋆',\n Sub: '⋐',\n Subset: '⋐',\n SubsetEqual: '⊆',\n Succeeds: '≻',\n SucceedsEqual: '⪰',\n SucceedsSlantEqual: '≽',\n SucceedsTilde: '≿',\n SuchThat: '∋',\n Sum: '∑',\n Sup: '⋑',\n Superset: '⊃',\n SupersetEqual: '⊇',\n Supset: '⋑',\n THORN: 'Þ',\n TRADE: '™',\n TSHcy: 'Ћ',\n TScy: 'Ц',\n Tab: '\\t',\n Tau: 'Τ',\n Tcaron: 'Ť',\n Tcedil: 'Ţ',\n Tcy: 'Т',\n Tfr: '𝔗',\n Therefore: '∴',\n Theta: 'Θ',\n ThickSpace: '  ',\n ThinSpace: ' ',\n Tilde: '∼',\n TildeEqual: '≃',\n TildeFullEqual: '≅',\n TildeTilde: '≈',\n Topf: '𝕋',\n TripleDot: '⃛',\n Tscr: '𝒯',\n Tstrok: 'Ŧ',\n Uacute: 'Ú',\n Uarr: '↟',\n Uarrocir: '⥉',\n Ubrcy: 'Ў',\n Ubreve: 'Ŭ',\n Ucirc: 'Û',\n Ucy: 'У',\n Udblac: 'Ű',\n Ufr: '𝔘',\n Ugrave: 'Ù',\n Umacr: 'Ū',\n UnderBar: '_',\n UnderBrace: '⏟',\n UnderBracket: '⎵',\n UnderParenthesis: '⏝',\n Union: '⋃',\n UnionPlus: '⊎',\n Uogon: 'Ų',\n Uopf: '𝕌',\n UpArrow: '↑',\n UpArrowBar: '⤒',\n UpArrowDownArrow: '⇅',\n UpDownArrow: '↕',\n UpEquilibrium: '⥮',\n UpTee: '⊥',\n UpTeeArrow: '↥',\n Uparrow: '⇑',\n Updownarrow: '⇕',\n UpperLeftArrow: '↖',\n UpperRightArrow: '↗',\n Upsi: 'ϒ',\n Upsilon: 'Υ',\n Uring: 'Ů',\n Uscr: '𝒰',\n Utilde: 'Ũ',\n Uuml: 'Ü',\n VDash: '⊫',\n Vbar: '⫫',\n Vcy: 'В',\n Vdash: '⊩',\n Vdashl: '⫦',\n Vee: '⋁',\n Verbar: '‖',\n Vert: '‖',\n VerticalBar: '∣',\n VerticalLine: '|',\n VerticalSeparator: '❘',\n VerticalTilde: '≀',\n VeryThinSpace: ' ',\n Vfr: '𝔙',\n Vopf: '𝕍',\n Vscr: '𝒱',\n Vvdash: '⊪',\n Wcirc: 'Ŵ',\n Wedge: '⋀',\n Wfr: '𝔚',\n Wopf: '𝕎',\n Wscr: '𝒲',\n Xfr: '𝔛',\n Xi: 'Ξ',\n Xopf: '𝕏',\n Xscr: '𝒳',\n YAcy: 'Я',\n YIcy: 'Ї',\n YUcy: 'Ю',\n Yacute: 'Ý',\n Ycirc: 'Ŷ',\n Ycy: 'Ы',\n Yfr: '𝔜',\n Yopf: '𝕐',\n Yscr: '𝒴',\n Yuml: 'Ÿ',\n ZHcy: 'Ж',\n Zacute: 'Ź',\n Zcaron: 'Ž',\n Zcy: 'З',\n Zdot: 'Ż',\n ZeroWidthSpace: '​',\n Zeta: 'Ζ',\n Zfr: 'ℨ',\n Zopf: 'ℤ',\n Zscr: '𝒵',\n aacute: 'á',\n abreve: 'ă',\n ac: '∾',\n acE: '∾̳',\n acd: '∿',\n acirc: 'â',\n acute: '´',\n acy: 'а',\n aelig: 'æ',\n af: '⁡',\n afr: '𝔞',\n agrave: 'à',\n alefsym: 'ℵ',\n aleph: 'ℵ',\n alpha: 'α',\n amacr: 'ā',\n amalg: '⨿',\n amp: '&',\n and: '∧',\n andand: '⩕',\n andd: '⩜',\n andslope: '⩘',\n andv: '⩚',\n ang: '∠',\n ange: '⦤',\n angle: '∠',\n angmsd: '∡',\n angmsdaa: '⦨',\n angmsdab: '⦩',\n angmsdac: '⦪',\n angmsdad: '⦫',\n angmsdae: '⦬',\n angmsdaf: '⦭',\n angmsdag: '⦮',\n angmsdah: '⦯',\n angrt: '∟',\n angrtvb: '⊾',\n angrtvbd: '⦝',\n angsph: '∢',\n angst: 'Å',\n angzarr: '⍼',\n aogon: 'ą',\n aopf: '𝕒',\n ap: '≈',\n apE: '⩰',\n apacir: '⩯',\n ape: '≊',\n apid: '≋',\n apos: \"'\",\n approx: '≈',\n approxeq: '≊',\n aring: 'å',\n ascr: '𝒶',\n ast: '*',\n asymp: '≈',\n asympeq: '≍',\n atilde: 'ã',\n auml: 'ä',\n awconint: '∳',\n awint: '⨑',\n bNot: '⫭',\n backcong: '≌',\n backepsilon: '϶',\n backprime: '‵',\n backsim: '∽',\n backsimeq: '⋍',\n barvee: '⊽',\n barwed: '⌅',\n barwedge: '⌅',\n bbrk: '⎵',\n bbrktbrk: '⎶',\n bcong: '≌',\n bcy: 'б',\n bdquo: '„',\n becaus: '∵',\n because: '∵',\n bemptyv: '⦰',\n bepsi: '϶',\n bernou: 'ℬ',\n beta: 'β',\n beth: 'ℶ',\n between: '≬',\n bfr: '𝔟',\n bigcap: '⋂',\n bigcirc: '◯',\n bigcup: '⋃',\n bigodot: '⨀',\n bigoplus: '⨁',\n bigotimes: '⨂',\n bigsqcup: '⨆',\n bigstar: '★',\n bigtriangledown: '▽',\n bigtriangleup: '△',\n biguplus: '⨄',\n bigvee: '⋁',\n bigwedge: '⋀',\n bkarow: '⤍',\n blacklozenge: '⧫',\n blacksquare: '▪',\n blacktriangle: '▴',\n blacktriangledown: '▾',\n blacktriangleleft: '◂',\n blacktriangleright: '▸',\n blank: '␣',\n blk12: '▒',\n blk14: '░',\n blk34: '▓',\n block: '█',\n bne: '=⃥',\n bnequiv: '≡⃥',\n bnot: '⌐',\n bopf: '𝕓',\n bot: '⊥',\n bottom: '⊥',\n bowtie: '⋈',\n boxDL: '╗',\n boxDR: '╔',\n boxDl: '╖',\n boxDr: '╓',\n boxH: '═',\n boxHD: '╦',\n boxHU: '╩',\n boxHd: '╤',\n boxHu: '╧',\n boxUL: '╝',\n boxUR: '╚',\n boxUl: '╜',\n boxUr: '╙',\n boxV: '║',\n boxVH: '╬',\n boxVL: '╣',\n boxVR: '╠',\n boxVh: '╫',\n boxVl: '╢',\n boxVr: '╟',\n boxbox: '⧉',\n boxdL: '╕',\n boxdR: '╒',\n boxdl: '┐',\n boxdr: '┌',\n boxh: '─',\n boxhD: '╥',\n boxhU: '╨',\n boxhd: '┬',\n boxhu: '┴',\n boxminus: '⊟',\n boxplus: '⊞',\n boxtimes: '⊠',\n boxuL: '╛',\n boxuR: '╘',\n boxul: '┘',\n boxur: '└',\n boxv: '│',\n boxvH: '╪',\n boxvL: '╡',\n boxvR: '╞',\n boxvh: '┼',\n boxvl: '┤',\n boxvr: '├',\n bprime: '‵',\n breve: '˘',\n brvbar: '¦',\n bscr: '𝒷',\n bsemi: '⁏',\n bsim: '∽',\n bsime: '⋍',\n bsol: '\\\\',\n bsolb: '⧅',\n bsolhsub: '⟈',\n bull: '•',\n bullet: '•',\n bump: '≎',\n bumpE: '⪮',\n bumpe: '≏',\n bumpeq: '≏',\n cacute: 'ć',\n cap: '∩',\n capand: '⩄',\n capbrcup: '⩉',\n capcap: '⩋',\n capcup: '⩇',\n capdot: '⩀',\n caps: '∩︀',\n caret: '⁁',\n caron: 'ˇ',\n ccaps: '⩍',\n ccaron: 'č',\n ccedil: 'ç',\n ccirc: 'ĉ',\n ccups: '⩌',\n ccupssm: '⩐',\n cdot: 'ċ',\n cedil: '¸',\n cemptyv: '⦲',\n cent: '¢',\n centerdot: '·',\n cfr: '𝔠',\n chcy: 'ч',\n check: '✓',\n checkmark: '✓',\n chi: 'χ',\n cir: '○',\n cirE: '⧃',\n circ: 'ˆ',\n circeq: '≗',\n circlearrowleft: '↺',\n circlearrowright: '↻',\n circledR: '®',\n circledS: 'Ⓢ',\n circledast: '⊛',\n circledcirc: '⊚',\n circleddash: '⊝',\n cire: '≗',\n cirfnint: '⨐',\n cirmid: '⫯',\n cirscir: '⧂',\n clubs: '♣',\n clubsuit: '♣',\n colon: ':',\n colone: '≔',\n coloneq: '≔',\n comma: ',',\n commat: '@',\n comp: '∁',\n compfn: '∘',\n complement: '∁',\n complexes: 'ℂ',\n cong: '≅',\n congdot: '⩭',\n conint: '∮',\n copf: '𝕔',\n coprod: '∐',\n copy: '©',\n copysr: '℗',\n crarr: '↵',\n cross: '✗',\n cscr: '𝒸',\n csub: '⫏',\n csube: '⫑',\n csup: '⫐',\n csupe: '⫒',\n ctdot: '⋯',\n cudarrl: '⤸',\n cudarrr: '⤵',\n cuepr: '⋞',\n cuesc: '⋟',\n cularr: '↶',\n cularrp: '⤽',\n cup: '∪',\n cupbrcap: '⩈',\n cupcap: '⩆',\n cupcup: '⩊',\n cupdot: '⊍',\n cupor: '⩅',\n cups: '∪︀',\n curarr: '↷',\n curarrm: '⤼',\n curlyeqprec: '⋞',\n curlyeqsucc: '⋟',\n curlyvee: '⋎',\n curlywedge: '⋏',\n curren: '¤',\n curvearrowleft: '↶',\n curvearrowright: '↷',\n cuvee: '⋎',\n cuwed: '⋏',\n cwconint: '∲',\n cwint: '∱',\n cylcty: '⌭',\n dArr: '⇓',\n dHar: '⥥',\n dagger: '†',\n daleth: 'ℸ',\n darr: '↓',\n dash: '‐',\n dashv: '⊣',\n dbkarow: '⤏',\n dblac: '˝',\n dcaron: 'ď',\n dcy: 'д',\n dd: 'ⅆ',\n ddagger: '‡',\n ddarr: '⇊',\n ddotseq: '⩷',\n deg: '°',\n delta: 'δ',\n demptyv: '⦱',\n dfisht: '⥿',\n dfr: '𝔡',\n dharl: '⇃',\n dharr: '⇂',\n diam: '⋄',\n diamond: '⋄',\n diamondsuit: '♦',\n diams: '♦',\n die: '¨',\n digamma: 'ϝ',\n disin: '⋲',\n div: '÷',\n divide: '÷',\n divideontimes: '⋇',\n divonx: '⋇',\n djcy: 'ђ',\n dlcorn: '⌞',\n dlcrop: '⌍',\n dollar: '$',\n dopf: '𝕕',\n dot: '˙',\n doteq: '≐',\n doteqdot: '≑',\n dotminus: '∸',\n dotplus: '∔',\n dotsquare: '⊡',\n doublebarwedge: '⌆',\n downarrow: '↓',\n downdownarrows: '⇊',\n downharpoonleft: '⇃',\n downharpoonright: '⇂',\n drbkarow: '⤐',\n drcorn: '⌟',\n drcrop: '⌌',\n dscr: '𝒹',\n dscy: 'ѕ',\n dsol: '⧶',\n dstrok: 'đ',\n dtdot: '⋱',\n dtri: '▿',\n dtrif: '▾',\n duarr: '⇵',\n duhar: '⥯',\n dwangle: '⦦',\n dzcy: 'џ',\n dzigrarr: '⟿',\n eDDot: '⩷',\n eDot: '≑',\n eacute: 'é',\n easter: '⩮',\n ecaron: 'ě',\n ecir: '≖',\n ecirc: 'ê',\n ecolon: '≕',\n ecy: 'э',\n edot: 'ė',\n ee: 'ⅇ',\n efDot: '≒',\n efr: '𝔢',\n eg: '⪚',\n egrave: 'è',\n egs: '⪖',\n egsdot: '⪘',\n el: '⪙',\n elinters: '⏧',\n ell: 'ℓ',\n els: '⪕',\n elsdot: '⪗',\n emacr: 'ē',\n empty: '∅',\n emptyset: '∅',\n emptyv: '∅',\n emsp13: ' ',\n emsp14: ' ',\n emsp: ' ',\n eng: 'ŋ',\n ensp: ' ',\n eogon: 'ę',\n eopf: '𝕖',\n epar: '⋕',\n eparsl: '⧣',\n eplus: '⩱',\n epsi: 'ε',\n epsilon: 'ε',\n epsiv: 'ϵ',\n eqcirc: '≖',\n eqcolon: '≕',\n eqsim: '≂',\n eqslantgtr: '⪖',\n eqslantless: '⪕',\n equals: '=',\n equest: '≟',\n equiv: '≡',\n equivDD: '⩸',\n eqvparsl: '⧥',\n erDot: '≓',\n erarr: '⥱',\n escr: 'ℯ',\n esdot: '≐',\n esim: '≂',\n eta: 'η',\n eth: 'ð',\n euml: 'ë',\n euro: '€',\n excl: '!',\n exist: '∃',\n expectation: 'ℰ',\n exponentiale: 'ⅇ',\n fallingdotseq: '≒',\n fcy: 'ф',\n female: '♀',\n ffilig: 'ffi',\n fflig: 'ff',\n ffllig: 'ffl',\n ffr: '𝔣',\n filig: 'fi',\n fjlig: 'fj',\n flat: '♭',\n fllig: 'fl',\n fltns: '▱',\n fnof: 'ƒ',\n fopf: '𝕗',\n forall: '∀',\n fork: '⋔',\n forkv: '⫙',\n fpartint: '⨍',\n frac12: '½',\n frac13: '⅓',\n frac14: '¼',\n frac15: '⅕',\n frac16: '⅙',\n frac18: '⅛',\n frac23: '⅔',\n frac25: '⅖',\n frac34: '¾',\n frac35: '⅗',\n frac38: '⅜',\n frac45: '⅘',\n frac56: '⅚',\n frac58: '⅝',\n frac78: '⅞',\n frasl: '⁄',\n frown: '⌢',\n fscr: '𝒻',\n gE: '≧',\n gEl: '⪌',\n gacute: 'ǵ',\n gamma: 'γ',\n gammad: 'ϝ',\n gap: '⪆',\n gbreve: 'ğ',\n gcirc: 'ĝ',\n gcy: 'г',\n gdot: 'ġ',\n ge: '≥',\n gel: '⋛',\n geq: '≥',\n geqq: '≧',\n geqslant: '⩾',\n ges: '⩾',\n gescc: '⪩',\n gesdot: '⪀',\n gesdoto: '⪂',\n gesdotol: '⪄',\n gesl: '⋛︀',\n gesles: '⪔',\n gfr: '𝔤',\n gg: '≫',\n ggg: '⋙',\n gimel: 'ℷ',\n gjcy: 'ѓ',\n gl: '≷',\n glE: '⪒',\n gla: '⪥',\n glj: '⪤',\n gnE: '≩',\n gnap: '⪊',\n gnapprox: '⪊',\n gne: '⪈',\n gneq: '⪈',\n gneqq: '≩',\n gnsim: '⋧',\n gopf: '𝕘',\n grave: '`',\n gscr: 'ℊ',\n gsim: '≳',\n gsime: '⪎',\n gsiml: '⪐',\n gt: '>',\n gtcc: '⪧',\n gtcir: '⩺',\n gtdot: '⋗',\n gtlPar: '⦕',\n gtquest: '⩼',\n gtrapprox: '⪆',\n gtrarr: '⥸',\n gtrdot: '⋗',\n gtreqless: '⋛',\n gtreqqless: '⪌',\n gtrless: '≷',\n gtrsim: '≳',\n gvertneqq: '≩︀',\n gvnE: '≩︀',\n hArr: '⇔',\n hairsp: ' ',\n half: '½',\n hamilt: 'ℋ',\n hardcy: 'ъ',\n harr: '↔',\n harrcir: '⥈',\n harrw: '↭',\n hbar: 'ℏ',\n hcirc: 'ĥ',\n hearts: '♥',\n heartsuit: '♥',\n hellip: '…',\n hercon: '⊹',\n hfr: '𝔥',\n hksearow: '⤥',\n hkswarow: '⤦',\n hoarr: '⇿',\n homtht: '∻',\n hookleftarrow: '↩',\n hookrightarrow: '↪',\n hopf: '𝕙',\n horbar: '―',\n hscr: '𝒽',\n hslash: 'ℏ',\n hstrok: 'ħ',\n hybull: '⁃',\n hyphen: '‐',\n iacute: 'í',\n ic: '⁣',\n icirc: 'î',\n icy: 'и',\n iecy: 'е',\n iexcl: '¡',\n iff: '⇔',\n ifr: '𝔦',\n igrave: 'ì',\n ii: 'ⅈ',\n iiiint: '⨌',\n iiint: '∭',\n iinfin: '⧜',\n iiota: '℩',\n ijlig: 'ij',\n imacr: 'ī',\n image: 'ℑ',\n imagline: 'ℐ',\n imagpart: 'ℑ',\n imath: 'ı',\n imof: '⊷',\n imped: 'Ƶ',\n in: '∈',\n incare: '℅',\n infin: '∞',\n infintie: '⧝',\n inodot: 'ı',\n int: '∫',\n intcal: '⊺',\n integers: 'ℤ',\n intercal: '⊺',\n intlarhk: '⨗',\n intprod: '⨼',\n iocy: 'ё',\n iogon: 'į',\n iopf: '𝕚',\n iota: 'ι',\n iprod: '⨼',\n iquest: '¿',\n iscr: '𝒾',\n isin: '∈',\n isinE: '⋹',\n isindot: '⋵',\n isins: '⋴',\n isinsv: '⋳',\n isinv: '∈',\n it: '⁢',\n itilde: 'ĩ',\n iukcy: 'і',\n iuml: 'ï',\n jcirc: 'ĵ',\n jcy: 'й',\n jfr: '𝔧',\n jmath: 'ȷ',\n jopf: '𝕛',\n jscr: '𝒿',\n jsercy: 'ј',\n jukcy: 'є',\n kappa: 'κ',\n kappav: 'ϰ',\n kcedil: 'ķ',\n kcy: 'к',\n kfr: '𝔨',\n kgreen: 'ĸ',\n khcy: 'х',\n kjcy: 'ќ',\n kopf: '𝕜',\n kscr: '𝓀',\n lAarr: '⇚',\n lArr: '⇐',\n lAtail: '⤛',\n lBarr: '⤎',\n lE: '≦',\n lEg: '⪋',\n lHar: '⥢',\n lacute: 'ĺ',\n laemptyv: '⦴',\n lagran: 'ℒ',\n lambda: 'λ',\n lang: '⟨',\n langd: '⦑',\n langle: '⟨',\n lap: '⪅',\n laquo: '«',\n larr: '←',\n larrb: '⇤',\n larrbfs: '⤟',\n larrfs: '⤝',\n larrhk: '↩',\n larrlp: '↫',\n larrpl: '⤹',\n larrsim: '⥳',\n larrtl: '↢',\n lat: '⪫',\n latail: '⤙',\n late: '⪭',\n lates: '⪭︀',\n lbarr: '⤌',\n lbbrk: '❲',\n lbrace: '{',\n lbrack: '[',\n lbrke: '⦋',\n lbrksld: '⦏',\n lbrkslu: '⦍',\n lcaron: 'ľ',\n lcedil: 'ļ',\n lceil: '⌈',\n lcub: '{',\n lcy: 'л',\n ldca: '⤶',\n ldquo: '“',\n ldquor: '„',\n ldrdhar: '⥧',\n ldrushar: '⥋',\n ldsh: '↲',\n le: '≤',\n leftarrow: '←',\n leftarrowtail: '↢',\n leftharpoondown: '↽',\n leftharpoonup: '↼',\n leftleftarrows: '⇇',\n leftrightarrow: '↔',\n leftrightarrows: '⇆',\n leftrightharpoons: '⇋',\n leftrightsquigarrow: '↭',\n leftthreetimes: '⋋',\n leg: '⋚',\n leq: '≤',\n leqq: '≦',\n leqslant: '⩽',\n les: '⩽',\n lescc: '⪨',\n lesdot: '⩿',\n lesdoto: '⪁',\n lesdotor: '⪃',\n lesg: '⋚︀',\n lesges: '⪓',\n lessapprox: '⪅',\n lessdot: '⋖',\n lesseqgtr: '⋚',\n lesseqqgtr: '⪋',\n lessgtr: '≶',\n lesssim: '≲',\n lfisht: '⥼',\n lfloor: '⌊',\n lfr: '𝔩',\n lg: '≶',\n lgE: '⪑',\n lhard: '↽',\n lharu: '↼',\n lharul: '⥪',\n lhblk: '▄',\n ljcy: 'љ',\n ll: '≪',\n llarr: '⇇',\n llcorner: '⌞',\n llhard: '⥫',\n lltri: '◺',\n lmidot: 'ŀ',\n lmoust: '⎰',\n lmoustache: '⎰',\n lnE: '≨',\n lnap: '⪉',\n lnapprox: '⪉',\n lne: '⪇',\n lneq: '⪇',\n lneqq: '≨',\n lnsim: '⋦',\n loang: '⟬',\n loarr: '⇽',\n lobrk: '⟦',\n longleftarrow: '⟵',\n longleftrightarrow: '⟷',\n longmapsto: '⟼',\n longrightarrow: '⟶',\n looparrowleft: '↫',\n looparrowright: '↬',\n lopar: '⦅',\n lopf: '𝕝',\n loplus: '⨭',\n lotimes: '⨴',\n lowast: '∗',\n lowbar: '_',\n loz: '◊',\n lozenge: '◊',\n lozf: '⧫',\n lpar: '(',\n lparlt: '⦓',\n lrarr: '⇆',\n lrcorner: '⌟',\n lrhar: '⇋',\n lrhard: '⥭',\n lrm: '‎',\n lrtri: '⊿',\n lsaquo: '‹',\n lscr: '𝓁',\n lsh: '↰',\n lsim: '≲',\n lsime: '⪍',\n lsimg: '⪏',\n lsqb: '[',\n lsquo: '‘',\n lsquor: '‚',\n lstrok: 'ł',\n lt: '<',\n ltcc: '⪦',\n ltcir: '⩹',\n ltdot: '⋖',\n lthree: '⋋',\n ltimes: '⋉',\n ltlarr: '⥶',\n ltquest: '⩻',\n ltrPar: '⦖',\n ltri: '◃',\n ltrie: '⊴',\n ltrif: '◂',\n lurdshar: '⥊',\n luruhar: '⥦',\n lvertneqq: '≨︀',\n lvnE: '≨︀',\n mDDot: '∺',\n macr: '¯',\n male: '♂',\n malt: '✠',\n maltese: '✠',\n map: '↦',\n mapsto: '↦',\n mapstodown: '↧',\n mapstoleft: '↤',\n mapstoup: '↥',\n marker: '▮',\n mcomma: '⨩',\n mcy: 'м',\n mdash: '—',\n measuredangle: '∡',\n mfr: '𝔪',\n mho: '℧',\n micro: 'µ',\n mid: '∣',\n midast: '*',\n midcir: '⫰',\n middot: '·',\n minus: '−',\n minusb: '⊟',\n minusd: '∸',\n minusdu: '⨪',\n mlcp: '⫛',\n mldr: '…',\n mnplus: '∓',\n models: '⊧',\n mopf: '𝕞',\n mp: '∓',\n mscr: '𝓂',\n mstpos: '∾',\n mu: 'μ',\n multimap: '⊸',\n mumap: '⊸',\n nGg: '⋙̸',\n nGt: '≫⃒',\n nGtv: '≫̸',\n nLeftarrow: '⇍',\n nLeftrightarrow: '⇎',\n nLl: '⋘̸',\n nLt: '≪⃒',\n nLtv: '≪̸',\n nRightarrow: '⇏',\n nVDash: '⊯',\n nVdash: '⊮',\n nabla: '∇',\n nacute: 'ń',\n nang: '∠⃒',\n nap: '≉',\n napE: '⩰̸',\n napid: '≋̸',\n napos: 'ʼn',\n napprox: '≉',\n natur: '♮',\n natural: '♮',\n naturals: 'ℕ',\n nbsp: ' ',\n nbump: '≎̸',\n nbumpe: '≏̸',\n ncap: '⩃',\n ncaron: 'ň',\n ncedil: 'ņ',\n ncong: '≇',\n ncongdot: '⩭̸',\n ncup: '⩂',\n ncy: 'н',\n ndash: '–',\n ne: '≠',\n neArr: '⇗',\n nearhk: '⤤',\n nearr: '↗',\n nearrow: '↗',\n nedot: '≐̸',\n nequiv: '≢',\n nesear: '⤨',\n nesim: '≂̸',\n nexist: '∄',\n nexists: '∄',\n nfr: '𝔫',\n ngE: '≧̸',\n nge: '≱',\n ngeq: '≱',\n ngeqq: '≧̸',\n ngeqslant: '⩾̸',\n nges: '⩾̸',\n ngsim: '≵',\n ngt: '≯',\n ngtr: '≯',\n nhArr: '⇎',\n nharr: '↮',\n nhpar: '⫲',\n ni: '∋',\n nis: '⋼',\n nisd: '⋺',\n niv: '∋',\n njcy: 'њ',\n nlArr: '⇍',\n nlE: '≦̸',\n nlarr: '↚',\n nldr: '‥',\n nle: '≰',\n nleftarrow: '↚',\n nleftrightarrow: '↮',\n nleq: '≰',\n nleqq: '≦̸',\n nleqslant: '⩽̸',\n nles: '⩽̸',\n nless: '≮',\n nlsim: '≴',\n nlt: '≮',\n nltri: '⋪',\n nltrie: '⋬',\n nmid: '∤',\n nopf: '𝕟',\n not: '¬',\n notin: '∉',\n notinE: '⋹̸',\n notindot: '⋵̸',\n notinva: '∉',\n notinvb: '⋷',\n notinvc: '⋶',\n notni: '∌',\n notniva: '∌',\n notnivb: '⋾',\n notnivc: '⋽',\n npar: '∦',\n nparallel: '∦',\n nparsl: '⫽⃥',\n npart: '∂̸',\n npolint: '⨔',\n npr: '⊀',\n nprcue: '⋠',\n npre: '⪯̸',\n nprec: '⊀',\n npreceq: '⪯̸',\n nrArr: '⇏',\n nrarr: '↛',\n nrarrc: '⤳̸',\n nrarrw: '↝̸',\n nrightarrow: '↛',\n nrtri: '⋫',\n nrtrie: '⋭',\n nsc: '⊁',\n nsccue: '⋡',\n nsce: '⪰̸',\n nscr: '𝓃',\n nshortmid: '∤',\n nshortparallel: '∦',\n nsim: '≁',\n nsime: '≄',\n nsimeq: '≄',\n nsmid: '∤',\n nspar: '∦',\n nsqsube: '⋢',\n nsqsupe: '⋣',\n nsub: '⊄',\n nsubE: '⫅̸',\n nsube: '⊈',\n nsubset: '⊂⃒',\n nsubseteq: '⊈',\n nsubseteqq: '⫅̸',\n nsucc: '⊁',\n nsucceq: '⪰̸',\n nsup: '⊅',\n nsupE: '⫆̸',\n nsupe: '⊉',\n nsupset: '⊃⃒',\n nsupseteq: '⊉',\n nsupseteqq: '⫆̸',\n ntgl: '≹',\n ntilde: 'ñ',\n ntlg: '≸',\n ntriangleleft: '⋪',\n ntrianglelefteq: '⋬',\n ntriangleright: '⋫',\n ntrianglerighteq: '⋭',\n nu: 'ν',\n num: '#',\n numero: '№',\n numsp: ' ',\n nvDash: '⊭',\n nvHarr: '⤄',\n nvap: '≍⃒',\n nvdash: '⊬',\n nvge: '≥⃒',\n nvgt: '>⃒',\n nvinfin: '⧞',\n nvlArr: '⤂',\n nvle: '≤⃒',\n nvlt: '<⃒',\n nvltrie: '⊴⃒',\n nvrArr: '⤃',\n nvrtrie: '⊵⃒',\n nvsim: '∼⃒',\n nwArr: '⇖',\n nwarhk: '⤣',\n nwarr: '↖',\n nwarrow: '↖',\n nwnear: '⤧',\n oS: 'Ⓢ',\n oacute: 'ó',\n oast: '⊛',\n ocir: '⊚',\n ocirc: 'ô',\n ocy: 'о',\n odash: '⊝',\n odblac: 'ő',\n odiv: '⨸',\n odot: '⊙',\n odsold: '⦼',\n oelig: 'œ',\n ofcir: '⦿',\n ofr: '𝔬',\n ogon: '˛',\n ograve: 'ò',\n ogt: '⧁',\n ohbar: '⦵',\n ohm: 'Ω',\n oint: '∮',\n olarr: '↺',\n olcir: '⦾',\n olcross: '⦻',\n oline: '‾',\n olt: '⧀',\n omacr: 'ō',\n omega: 'ω',\n omicron: 'ο',\n omid: '⦶',\n ominus: '⊖',\n oopf: '𝕠',\n opar: '⦷',\n operp: '⦹',\n oplus: '⊕',\n or: '∨',\n orarr: '↻',\n ord: '⩝',\n order: 'ℴ',\n orderof: 'ℴ',\n ordf: 'ª',\n ordm: 'º',\n origof: '⊶',\n oror: '⩖',\n orslope: '⩗',\n orv: '⩛',\n oscr: 'ℴ',\n oslash: 'ø',\n osol: '⊘',\n otilde: 'õ',\n otimes: '⊗',\n otimesas: '⨶',\n ouml: 'ö',\n ovbar: '⌽',\n par: '∥',\n para: '¶',\n parallel: '∥',\n parsim: '⫳',\n parsl: '⫽',\n part: '∂',\n pcy: 'п',\n percnt: '%',\n period: '.',\n permil: '‰',\n perp: '⊥',\n pertenk: '‱',\n pfr: '𝔭',\n phi: 'φ',\n phiv: 'ϕ',\n phmmat: 'ℳ',\n phone: '☎',\n pi: 'π',\n pitchfork: '⋔',\n piv: 'ϖ',\n planck: 'ℏ',\n planckh: 'ℎ',\n plankv: 'ℏ',\n plus: '+',\n plusacir: '⨣',\n plusb: '⊞',\n pluscir: '⨢',\n plusdo: '∔',\n plusdu: '⨥',\n pluse: '⩲',\n plusmn: '±',\n plussim: '⨦',\n plustwo: '⨧',\n pm: '±',\n pointint: '⨕',\n popf: '𝕡',\n pound: '£',\n pr: '≺',\n prE: '⪳',\n prap: '⪷',\n prcue: '≼',\n pre: '⪯',\n prec: '≺',\n precapprox: '⪷',\n preccurlyeq: '≼',\n preceq: '⪯',\n precnapprox: '⪹',\n precneqq: '⪵',\n precnsim: '⋨',\n precsim: '≾',\n prime: '′',\n primes: 'ℙ',\n prnE: '⪵',\n prnap: '⪹',\n prnsim: '⋨',\n prod: '∏',\n profalar: '⌮',\n profline: '⌒',\n profsurf: '⌓',\n prop: '∝',\n propto: '∝',\n prsim: '≾',\n prurel: '⊰',\n pscr: '𝓅',\n psi: 'ψ',\n puncsp: ' ',\n qfr: '𝔮',\n qint: '⨌',\n qopf: '𝕢',\n qprime: '⁗',\n qscr: '𝓆',\n quaternions: 'ℍ',\n quatint: '⨖',\n quest: '?',\n questeq: '≟',\n quot: '\"',\n rAarr: '⇛',\n rArr: '⇒',\n rAtail: '⤜',\n rBarr: '⤏',\n rHar: '⥤',\n race: '∽̱',\n racute: 'ŕ',\n radic: '√',\n raemptyv: '⦳',\n rang: '⟩',\n rangd: '⦒',\n range: '⦥',\n rangle: '⟩',\n raquo: '»',\n rarr: '→',\n rarrap: '⥵',\n rarrb: '⇥',\n rarrbfs: '⤠',\n rarrc: '⤳',\n rarrfs: '⤞',\n rarrhk: '↪',\n rarrlp: '↬',\n rarrpl: '⥅',\n rarrsim: '⥴',\n rarrtl: '↣',\n rarrw: '↝',\n ratail: '⤚',\n ratio: '∶',\n rationals: 'ℚ',\n rbarr: '⤍',\n rbbrk: '❳',\n rbrace: '}',\n rbrack: ']',\n rbrke: '⦌',\n rbrksld: '⦎',\n rbrkslu: '⦐',\n rcaron: 'ř',\n rcedil: 'ŗ',\n rceil: '⌉',\n rcub: '}',\n rcy: 'р',\n rdca: '⤷',\n rdldhar: '⥩',\n rdquo: '”',\n rdquor: '”',\n rdsh: '↳',\n real: 'ℜ',\n realine: 'ℛ',\n realpart: 'ℜ',\n reals: 'ℝ',\n rect: '▭',\n reg: '®',\n rfisht: '⥽',\n rfloor: '⌋',\n rfr: '𝔯',\n rhard: '⇁',\n rharu: '⇀',\n rharul: '⥬',\n rho: 'ρ',\n rhov: 'ϱ',\n rightarrow: '→',\n rightarrowtail: '↣',\n rightharpoondown: '⇁',\n rightharpoonup: '⇀',\n rightleftarrows: '⇄',\n rightleftharpoons: '⇌',\n rightrightarrows: '⇉',\n rightsquigarrow: '↝',\n rightthreetimes: '⋌',\n ring: '˚',\n risingdotseq: '≓',\n rlarr: '⇄',\n rlhar: '⇌',\n rlm: '‏',\n rmoust: '⎱',\n rmoustache: '⎱',\n rnmid: '⫮',\n roang: '⟭',\n roarr: '⇾',\n robrk: '⟧',\n ropar: '⦆',\n ropf: '𝕣',\n roplus: '⨮',\n rotimes: '⨵',\n rpar: ')',\n rpargt: '⦔',\n rppolint: '⨒',\n rrarr: '⇉',\n rsaquo: '›',\n rscr: '𝓇',\n rsh: '↱',\n rsqb: ']',\n rsquo: '’',\n rsquor: '’',\n rthree: '⋌',\n rtimes: '⋊',\n rtri: '▹',\n rtrie: '⊵',\n rtrif: '▸',\n rtriltri: '⧎',\n ruluhar: '⥨',\n rx: '℞',\n sacute: 'ś',\n sbquo: '‚',\n sc: '≻',\n scE: '⪴',\n scap: '⪸',\n scaron: 'š',\n sccue: '≽',\n sce: '⪰',\n scedil: 'ş',\n scirc: 'ŝ',\n scnE: '⪶',\n scnap: '⪺',\n scnsim: '⋩',\n scpolint: '⨓',\n scsim: '≿',\n scy: 'с',\n sdot: '⋅',\n sdotb: '⊡',\n sdote: '⩦',\n seArr: '⇘',\n searhk: '⤥',\n searr: '↘',\n searrow: '↘',\n sect: '§',\n semi: ';',\n seswar: '⤩',\n setminus: '∖',\n setmn: '∖',\n sext: '✶',\n sfr: '𝔰',\n sfrown: '⌢',\n sharp: '♯',\n shchcy: 'щ',\n shcy: 'ш',\n shortmid: '∣',\n shortparallel: '∥',\n shy: '­',\n sigma: 'σ',\n sigmaf: 'ς',\n sigmav: 'ς',\n sim: '∼',\n simdot: '⩪',\n sime: '≃',\n simeq: '≃',\n simg: '⪞',\n simgE: '⪠',\n siml: '⪝',\n simlE: '⪟',\n simne: '≆',\n simplus: '⨤',\n simrarr: '⥲',\n slarr: '←',\n smallsetminus: '∖',\n smashp: '⨳',\n smeparsl: '⧤',\n smid: '∣',\n smile: '⌣',\n smt: '⪪',\n smte: '⪬',\n smtes: '⪬︀',\n softcy: 'ь',\n sol: '/',\n solb: '⧄',\n solbar: '⌿',\n sopf: '𝕤',\n spades: '♠',\n spadesuit: '♠',\n spar: '∥',\n sqcap: '⊓',\n sqcaps: '⊓︀',\n sqcup: '⊔',\n sqcups: '⊔︀',\n sqsub: '⊏',\n sqsube: '⊑',\n sqsubset: '⊏',\n sqsubseteq: '⊑',\n sqsup: '⊐',\n sqsupe: '⊒',\n sqsupset: '⊐',\n sqsupseteq: '⊒',\n squ: '□',\n square: '□',\n squarf: '▪',\n squf: '▪',\n srarr: '→',\n sscr: '𝓈',\n ssetmn: '∖',\n ssmile: '⌣',\n sstarf: '⋆',\n star: '☆',\n starf: '★',\n straightepsilon: 'ϵ',\n straightphi: 'ϕ',\n strns: '¯',\n sub: '⊂',\n subE: '⫅',\n subdot: '⪽',\n sube: '⊆',\n subedot: '⫃',\n submult: '⫁',\n subnE: '⫋',\n subne: '⊊',\n subplus: '⪿',\n subrarr: '⥹',\n subset: '⊂',\n subseteq: '⊆',\n subseteqq: '⫅',\n subsetneq: '⊊',\n subsetneqq: '⫋',\n subsim: '⫇',\n subsub: '⫕',\n subsup: '⫓',\n succ: '≻',\n succapprox: '⪸',\n succcurlyeq: '≽',\n succeq: '⪰',\n succnapprox: '⪺',\n succneqq: '⪶',\n succnsim: '⋩',\n succsim: '≿',\n sum: '∑',\n sung: '♪',\n sup1: '¹',\n sup2: '²',\n sup3: '³',\n sup: '⊃',\n supE: '⫆',\n supdot: '⪾',\n supdsub: '⫘',\n supe: '⊇',\n supedot: '⫄',\n suphsol: '⟉',\n suphsub: '⫗',\n suplarr: '⥻',\n supmult: '⫂',\n supnE: '⫌',\n supne: '⊋',\n supplus: '⫀',\n supset: '⊃',\n supseteq: '⊇',\n supseteqq: '⫆',\n supsetneq: '⊋',\n supsetneqq: '⫌',\n supsim: '⫈',\n supsub: '⫔',\n supsup: '⫖',\n swArr: '⇙',\n swarhk: '⤦',\n swarr: '↙',\n swarrow: '↙',\n swnwar: '⤪',\n szlig: 'ß',\n target: '⌖',\n tau: 'τ',\n tbrk: '⎴',\n tcaron: 'ť',\n tcedil: 'ţ',\n tcy: 'т',\n tdot: '⃛',\n telrec: '⌕',\n tfr: '𝔱',\n there4: '∴',\n therefore: '∴',\n theta: 'θ',\n thetasym: 'ϑ',\n thetav: 'ϑ',\n thickapprox: '≈',\n thicksim: '∼',\n thinsp: ' ',\n thkap: '≈',\n thksim: '∼',\n thorn: 'þ',\n tilde: '˜',\n times: '×',\n timesb: '⊠',\n timesbar: '⨱',\n timesd: '⨰',\n tint: '∭',\n toea: '⤨',\n top: '⊤',\n topbot: '⌶',\n topcir: '⫱',\n topf: '𝕥',\n topfork: '⫚',\n tosa: '⤩',\n tprime: '‴',\n trade: '™',\n triangle: '▵',\n triangledown: '▿',\n triangleleft: '◃',\n trianglelefteq: '⊴',\n triangleq: '≜',\n triangleright: '▹',\n trianglerighteq: '⊵',\n tridot: '◬',\n trie: '≜',\n triminus: '⨺',\n triplus: '⨹',\n trisb: '⧍',\n tritime: '⨻',\n trpezium: '⏢',\n tscr: '𝓉',\n tscy: 'ц',\n tshcy: 'ћ',\n tstrok: 'ŧ',\n twixt: '≬',\n twoheadleftarrow: '↞',\n twoheadrightarrow: '↠',\n uArr: '⇑',\n uHar: '⥣',\n uacute: 'ú',\n uarr: '↑',\n ubrcy: 'ў',\n ubreve: 'ŭ',\n ucirc: 'û',\n ucy: 'у',\n udarr: '⇅',\n udblac: 'ű',\n udhar: '⥮',\n ufisht: '⥾',\n ufr: '𝔲',\n ugrave: 'ù',\n uharl: '↿',\n uharr: '↾',\n uhblk: '▀',\n ulcorn: '⌜',\n ulcorner: '⌜',\n ulcrop: '⌏',\n ultri: '◸',\n umacr: 'ū',\n uml: '¨',\n uogon: 'ų',\n uopf: '𝕦',\n uparrow: '↑',\n updownarrow: '↕',\n upharpoonleft: '↿',\n upharpoonright: '↾',\n uplus: '⊎',\n upsi: 'υ',\n upsih: 'ϒ',\n upsilon: 'υ',\n upuparrows: '⇈',\n urcorn: '⌝',\n urcorner: '⌝',\n urcrop: '⌎',\n uring: 'ů',\n urtri: '◹',\n uscr: '𝓊',\n utdot: '⋰',\n utilde: 'ũ',\n utri: '▵',\n utrif: '▴',\n uuarr: '⇈',\n uuml: 'ü',\n uwangle: '⦧',\n vArr: '⇕',\n vBar: '⫨',\n vBarv: '⫩',\n vDash: '⊨',\n vangrt: '⦜',\n varepsilon: 'ϵ',\n varkappa: 'ϰ',\n varnothing: '∅',\n varphi: 'ϕ',\n varpi: 'ϖ',\n varpropto: '∝',\n varr: '↕',\n varrho: 'ϱ',\n varsigma: 'ς',\n varsubsetneq: '⊊︀',\n varsubsetneqq: '⫋︀',\n varsupsetneq: '⊋︀',\n varsupsetneqq: '⫌︀',\n vartheta: 'ϑ',\n vartriangleleft: '⊲',\n vartriangleright: '⊳',\n vcy: 'в',\n vdash: '⊢',\n vee: '∨',\n veebar: '⊻',\n veeeq: '≚',\n vellip: '⋮',\n verbar: '|',\n vert: '|',\n vfr: '𝔳',\n vltri: '⊲',\n vnsub: '⊂⃒',\n vnsup: '⊃⃒',\n vopf: '𝕧',\n vprop: '∝',\n vrtri: '⊳',\n vscr: '𝓋',\n vsubnE: '⫋︀',\n vsubne: '⊊︀',\n vsupnE: '⫌︀',\n vsupne: '⊋︀',\n vzigzag: '⦚',\n wcirc: 'ŵ',\n wedbar: '⩟',\n wedge: '∧',\n wedgeq: '≙',\n weierp: '℘',\n wfr: '𝔴',\n wopf: '𝕨',\n wp: '℘',\n wr: '≀',\n wreath: '≀',\n wscr: '𝓌',\n xcap: '⋂',\n xcirc: '◯',\n xcup: '⋃',\n xdtri: '▽',\n xfr: '𝔵',\n xhArr: '⟺',\n xharr: '⟷',\n xi: 'ξ',\n xlArr: '⟸',\n xlarr: '⟵',\n xmap: '⟼',\n xnis: '⋻',\n xodot: '⨀',\n xopf: '𝕩',\n xoplus: '⨁',\n xotime: '⨂',\n xrArr: '⟹',\n xrarr: '⟶',\n xscr: '𝓍',\n xsqcup: '⨆',\n xuplus: '⨄',\n xutri: '△',\n xvee: '⋁',\n xwedge: '⋀',\n yacute: 'ý',\n yacy: 'я',\n ycirc: 'ŷ',\n ycy: 'ы',\n yen: '¥',\n yfr: '𝔶',\n yicy: 'ї',\n yopf: '𝕪',\n yscr: '𝓎',\n yucy: 'ю',\n yuml: 'ÿ',\n zacute: 'ź',\n zcaron: 'ž',\n zcy: 'з',\n zdot: 'ż',\n zeetrf: 'ℨ',\n zeta: 'ζ',\n zfr: '𝔷',\n zhcy: 'ж',\n zigrarr: '⇝',\n zopf: '𝕫',\n zscr: '𝓏',\n zwj: '‍',\n zwnj: '‌'\n}\n","/**\n * chroma.js - JavaScript library for color conversions\n *\n * Copyright (c) 2011-2019, Gregor Aisch\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. The name Gregor Aisch may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * -------------------------------------------------------\n *\n * chroma.js includes colors from colorbrewer2.org, which are released under\n * the following license:\n *\n * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,\n * and The Pennsylvania State University.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n * ------------------------------------------------------\n *\n * Named colors are taken from X11 Color Names.\n * http://www.w3.org/TR/css3-color/#svg-color\n *\n * @preserve\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.chroma = factory());\n})(this, (function () { 'use strict';\n\n var limit$2 = function (x, min, max) {\n if ( min === void 0 ) min=0;\n if ( max === void 0 ) max=1;\n\n return x < min ? min : x > max ? max : x;\n };\n\n var limit$1 = limit$2;\n\n var clip_rgb$3 = function (rgb) {\n rgb._clipped = false;\n rgb._unclipped = rgb.slice(0);\n for (var i=0; i<=3; i++) {\n if (i < 3) {\n if (rgb[i] < 0 || rgb[i] > 255) { rgb._clipped = true; }\n rgb[i] = limit$1(rgb[i], 0, 255);\n } else if (i === 3) {\n rgb[i] = limit$1(rgb[i], 0, 1);\n }\n }\n return rgb;\n };\n\n // ported from jQuery's $.type\n var classToType = {};\n for (var i$1 = 0, list$1 = ['Boolean', 'Number', 'String', 'Function', 'Array', 'Date', 'RegExp', 'Undefined', 'Null']; i$1 < list$1.length; i$1 += 1) {\n var name = list$1[i$1];\n\n classToType[(\"[object \" + name + \"]\")] = name.toLowerCase();\n }\n var type$p = function(obj) {\n return classToType[Object.prototype.toString.call(obj)] || \"object\";\n };\n\n var type$o = type$p;\n\n var unpack$B = function (args, keyOrder) {\n if ( keyOrder === void 0 ) keyOrder=null;\n\n \t// if called with more than 3 arguments, we return the arguments\n if (args.length >= 3) { return Array.prototype.slice.call(args); }\n // with less than 3 args we check if first arg is object\n // and use the keyOrder string to extract and sort properties\n \tif (type$o(args[0]) == 'object' && keyOrder) {\n \t\treturn keyOrder.split('')\n \t\t\t.filter(function (k) { return args[0][k] !== undefined; })\n \t\t\t.map(function (k) { return args[0][k]; });\n \t}\n \t// otherwise we just return the first argument\n \t// (which we suppose is an array of args)\n return args[0];\n };\n\n var type$n = type$p;\n\n var last$4 = function (args) {\n if (args.length < 2) { return null; }\n var l = args.length-1;\n if (type$n(args[l]) == 'string') { return args[l].toLowerCase(); }\n return null;\n };\n\n var PI$2 = Math.PI;\n\n var utils = {\n \tclip_rgb: clip_rgb$3,\n \tlimit: limit$2,\n \ttype: type$p,\n \tunpack: unpack$B,\n \tlast: last$4,\n \tPI: PI$2,\n \tTWOPI: PI$2*2,\n \tPITHIRD: PI$2/3,\n \tDEG2RAD: PI$2 / 180,\n \tRAD2DEG: 180 / PI$2\n };\n\n var input$h = {\n \tformat: {},\n \tautodetect: []\n };\n\n var last$3 = utils.last;\n var clip_rgb$2 = utils.clip_rgb;\n var type$m = utils.type;\n var _input = input$h;\n\n var Color$D = function Color() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var me = this;\n if (type$m(args[0]) === 'object' &&\n args[0].constructor &&\n args[0].constructor === this.constructor) {\n // the argument is already a Color instance\n return args[0];\n }\n\n // last argument could be the mode\n var mode = last$3(args);\n var autodetect = false;\n\n if (!mode) {\n autodetect = true;\n if (!_input.sorted) {\n _input.autodetect = _input.autodetect.sort(function (a,b) { return b.p - a.p; });\n _input.sorted = true;\n }\n // auto-detect format\n for (var i = 0, list = _input.autodetect; i < list.length; i += 1) {\n var chk = list[i];\n\n mode = chk.test.apply(chk, args);\n if (mode) { break; }\n }\n }\n\n if (_input.format[mode]) {\n var rgb = _input.format[mode].apply(null, autodetect ? args : args.slice(0,-1));\n me._rgb = clip_rgb$2(rgb);\n } else {\n throw new Error('unknown format: '+args);\n }\n\n // add alpha channel\n if (me._rgb.length === 3) { me._rgb.push(1); }\n };\n\n Color$D.prototype.toString = function toString () {\n if (type$m(this.hex) == 'function') { return this.hex(); }\n return (\"[\" + (this._rgb.join(',')) + \"]\");\n };\n\n var Color_1 = Color$D;\n\n var chroma$k = function () {\n \tvar args = [], len = arguments.length;\n \twhile ( len-- ) args[ len ] = arguments[ len ];\n\n \treturn new (Function.prototype.bind.apply( chroma$k.Color, [ null ].concat( args) ));\n };\n\n chroma$k.Color = Color_1;\n chroma$k.version = '2.4.2';\n\n var chroma_1 = chroma$k;\n\n var unpack$A = utils.unpack;\n var max$2 = Math.max;\n\n var rgb2cmyk$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$A(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n r = r / 255;\n g = g / 255;\n b = b / 255;\n var k = 1 - max$2(r,max$2(g,b));\n var f = k < 1 ? 1 / (1-k) : 0;\n var c = (1-r-k) * f;\n var m = (1-g-k) * f;\n var y = (1-b-k) * f;\n return [c,m,y,k];\n };\n\n var rgb2cmyk_1 = rgb2cmyk$1;\n\n var unpack$z = utils.unpack;\n\n var cmyk2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$z(args, 'cmyk');\n var c = args[0];\n var m = args[1];\n var y = args[2];\n var k = args[3];\n var alpha = args.length > 4 ? args[4] : 1;\n if (k === 1) { return [0,0,0,alpha]; }\n return [\n c >= 1 ? 0 : 255 * (1-c) * (1-k), // r\n m >= 1 ? 0 : 255 * (1-m) * (1-k), // g\n y >= 1 ? 0 : 255 * (1-y) * (1-k), // b\n alpha\n ];\n };\n\n var cmyk2rgb_1 = cmyk2rgb;\n\n var chroma$j = chroma_1;\n var Color$C = Color_1;\n var input$g = input$h;\n var unpack$y = utils.unpack;\n var type$l = utils.type;\n\n var rgb2cmyk = rgb2cmyk_1;\n\n Color$C.prototype.cmyk = function() {\n return rgb2cmyk(this._rgb);\n };\n\n chroma$j.cmyk = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$C, [ null ].concat( args, ['cmyk']) ));\n };\n\n input$g.format.cmyk = cmyk2rgb_1;\n\n input$g.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$y(args, 'cmyk');\n if (type$l(args) === 'array' && args.length === 4) {\n return 'cmyk';\n }\n }\n });\n\n var unpack$x = utils.unpack;\n var last$2 = utils.last;\n var rnd = function (a) { return Math.round(a*100)/100; };\n\n /*\n * supported arguments:\n * - hsl2css(h,s,l)\n * - hsl2css(h,s,l,a)\n * - hsl2css([h,s,l], mode)\n * - hsl2css([h,s,l,a], mode)\n * - hsl2css({h,s,l,a}, mode)\n */\n var hsl2css$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var hsla = unpack$x(args, 'hsla');\n var mode = last$2(args) || 'lsa';\n hsla[0] = rnd(hsla[0] || 0);\n hsla[1] = rnd(hsla[1]*100) + '%';\n hsla[2] = rnd(hsla[2]*100) + '%';\n if (mode === 'hsla' || (hsla.length > 3 && hsla[3]<1)) {\n hsla[3] = hsla.length > 3 ? hsla[3] : 1;\n mode = 'hsla';\n } else {\n hsla.length = 3;\n }\n return (mode + \"(\" + (hsla.join(',')) + \")\");\n };\n\n var hsl2css_1 = hsl2css$1;\n\n var unpack$w = utils.unpack;\n\n /*\n * supported arguments:\n * - rgb2hsl(r,g,b)\n * - rgb2hsl(r,g,b,a)\n * - rgb2hsl([r,g,b])\n * - rgb2hsl([r,g,b,a])\n * - rgb2hsl({r,g,b,a})\n */\n var rgb2hsl$3 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$w(args, 'rgba');\n var r = args[0];\n var g = args[1];\n var b = args[2];\n\n r /= 255;\n g /= 255;\n b /= 255;\n\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n\n var l = (max + min) / 2;\n var s, h;\n\n if (max === min){\n s = 0;\n h = Number.NaN;\n } else {\n s = l < 0.5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);\n }\n\n if (r == max) { h = (g - b) / (max - min); }\n else if (g == max) { h = 2 + (b - r) / (max - min); }\n else if (b == max) { h = 4 + (r - g) / (max - min); }\n\n h *= 60;\n if (h < 0) { h += 360; }\n if (args.length>3 && args[3]!==undefined) { return [h,s,l,args[3]]; }\n return [h,s,l];\n };\n\n var rgb2hsl_1 = rgb2hsl$3;\n\n var unpack$v = utils.unpack;\n var last$1 = utils.last;\n var hsl2css = hsl2css_1;\n var rgb2hsl$2 = rgb2hsl_1;\n var round$6 = Math.round;\n\n /*\n * supported arguments:\n * - rgb2css(r,g,b)\n * - rgb2css(r,g,b,a)\n * - rgb2css([r,g,b], mode)\n * - rgb2css([r,g,b,a], mode)\n * - rgb2css({r,g,b,a}, mode)\n */\n var rgb2css$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgba = unpack$v(args, 'rgba');\n var mode = last$1(args) || 'rgb';\n if (mode.substr(0,3) == 'hsl') {\n return hsl2css(rgb2hsl$2(rgba), mode);\n }\n rgba[0] = round$6(rgba[0]);\n rgba[1] = round$6(rgba[1]);\n rgba[2] = round$6(rgba[2]);\n if (mode === 'rgba' || (rgba.length > 3 && rgba[3]<1)) {\n rgba[3] = rgba.length > 3 ? rgba[3] : 1;\n mode = 'rgba';\n }\n return (mode + \"(\" + (rgba.slice(0,mode==='rgb'?3:4).join(',')) + \")\");\n };\n\n var rgb2css_1 = rgb2css$1;\n\n var unpack$u = utils.unpack;\n var round$5 = Math.round;\n\n var hsl2rgb$1 = function () {\n var assign;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$u(args, 'hsl');\n var h = args[0];\n var s = args[1];\n var l = args[2];\n var r,g,b;\n if (s === 0) {\n r = g = b = l*255;\n } else {\n var t3 = [0,0,0];\n var c = [0,0,0];\n var t2 = l < 0.5 ? l * (1+s) : l+s-l*s;\n var t1 = 2 * l - t2;\n var h_ = h / 360;\n t3[0] = h_ + 1/3;\n t3[1] = h_;\n t3[2] = h_ - 1/3;\n for (var i=0; i<3; i++) {\n if (t3[i] < 0) { t3[i] += 1; }\n if (t3[i] > 1) { t3[i] -= 1; }\n if (6 * t3[i] < 1)\n { c[i] = t1 + (t2 - t1) * 6 * t3[i]; }\n else if (2 * t3[i] < 1)\n { c[i] = t2; }\n else if (3 * t3[i] < 2)\n { c[i] = t1 + (t2 - t1) * ((2 / 3) - t3[i]) * 6; }\n else\n { c[i] = t1; }\n }\n (assign = [round$5(c[0]*255),round$5(c[1]*255),round$5(c[2]*255)], r = assign[0], g = assign[1], b = assign[2]);\n }\n if (args.length > 3) {\n // keep alpha channel\n return [r,g,b,args[3]];\n }\n return [r,g,b,1];\n };\n\n var hsl2rgb_1 = hsl2rgb$1;\n\n var hsl2rgb = hsl2rgb_1;\n var input$f = input$h;\n\n var RE_RGB = /^rgb\\(\\s*(-?\\d+),\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\)$/;\n var RE_RGBA = /^rgba\\(\\s*(-?\\d+),\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n var RE_RGB_PCT = /^rgb\\(\\s*(-?\\d+(?:\\.\\d+)?)%,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n var RE_RGBA_PCT = /^rgba\\(\\s*(-?\\d+(?:\\.\\d+)?)%,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n var RE_HSL = /^hsl\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n var RE_HSLA = /^hsla\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n\n var round$4 = Math.round;\n\n var css2rgb$1 = function (css) {\n css = css.toLowerCase().trim();\n var m;\n\n if (input$f.format.named) {\n try {\n return input$f.format.named(css);\n } catch (e) {\n // eslint-disable-next-line\n }\n }\n\n // rgb(250,20,0)\n if ((m = css.match(RE_RGB))) {\n var rgb = m.slice(1,4);\n for (var i=0; i<3; i++) {\n rgb[i] = +rgb[i];\n }\n rgb[3] = 1; // default alpha\n return rgb;\n }\n\n // rgba(250,20,0,0.4)\n if ((m = css.match(RE_RGBA))) {\n var rgb$1 = m.slice(1,5);\n for (var i$1=0; i$1<4; i$1++) {\n rgb$1[i$1] = +rgb$1[i$1];\n }\n return rgb$1;\n }\n\n // rgb(100%,0%,0%)\n if ((m = css.match(RE_RGB_PCT))) {\n var rgb$2 = m.slice(1,4);\n for (var i$2=0; i$2<3; i$2++) {\n rgb$2[i$2] = round$4(rgb$2[i$2] * 2.55);\n }\n rgb$2[3] = 1; // default alpha\n return rgb$2;\n }\n\n // rgba(100%,0%,0%,0.4)\n if ((m = css.match(RE_RGBA_PCT))) {\n var rgb$3 = m.slice(1,5);\n for (var i$3=0; i$3<3; i$3++) {\n rgb$3[i$3] = round$4(rgb$3[i$3] * 2.55);\n }\n rgb$3[3] = +rgb$3[3];\n return rgb$3;\n }\n\n // hsl(0,100%,50%)\n if ((m = css.match(RE_HSL))) {\n var hsl = m.slice(1,4);\n hsl[1] *= 0.01;\n hsl[2] *= 0.01;\n var rgb$4 = hsl2rgb(hsl);\n rgb$4[3] = 1;\n return rgb$4;\n }\n\n // hsla(0,100%,50%,0.5)\n if ((m = css.match(RE_HSLA))) {\n var hsl$1 = m.slice(1,4);\n hsl$1[1] *= 0.01;\n hsl$1[2] *= 0.01;\n var rgb$5 = hsl2rgb(hsl$1);\n rgb$5[3] = +m[4]; // default alpha = 1\n return rgb$5;\n }\n };\n\n css2rgb$1.test = function (s) {\n return RE_RGB.test(s) ||\n RE_RGBA.test(s) ||\n RE_RGB_PCT.test(s) ||\n RE_RGBA_PCT.test(s) ||\n RE_HSL.test(s) ||\n RE_HSLA.test(s);\n };\n\n var css2rgb_1 = css2rgb$1;\n\n var chroma$i = chroma_1;\n var Color$B = Color_1;\n var input$e = input$h;\n var type$k = utils.type;\n\n var rgb2css = rgb2css_1;\n var css2rgb = css2rgb_1;\n\n Color$B.prototype.css = function(mode) {\n return rgb2css(this._rgb, mode);\n };\n\n chroma$i.css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$B, [ null ].concat( args, ['css']) ));\n };\n\n input$e.format.css = css2rgb;\n\n input$e.autodetect.push({\n p: 5,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$k(h) === 'string' && css2rgb.test(h)) {\n return 'css';\n }\n }\n });\n\n var Color$A = Color_1;\n var chroma$h = chroma_1;\n var input$d = input$h;\n var unpack$t = utils.unpack;\n\n input$d.format.gl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgb = unpack$t(args, 'rgba');\n rgb[0] *= 255;\n rgb[1] *= 255;\n rgb[2] *= 255;\n return rgb;\n };\n\n chroma$h.gl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$A, [ null ].concat( args, ['gl']) ));\n };\n\n Color$A.prototype.gl = function() {\n var rgb = this._rgb;\n return [rgb[0]/255, rgb[1]/255, rgb[2]/255, rgb[3]];\n };\n\n var unpack$s = utils.unpack;\n\n var rgb2hcg$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$s(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var delta = max - min;\n var c = delta * 100 / 255;\n var _g = min / (255 - delta) * 100;\n var h;\n if (delta === 0) {\n h = Number.NaN;\n } else {\n if (r === max) { h = (g - b) / delta; }\n if (g === max) { h = 2+(b - r) / delta; }\n if (b === max) { h = 4+(r - g) / delta; }\n h *= 60;\n if (h < 0) { h += 360; }\n }\n return [h, c, _g];\n };\n\n var rgb2hcg_1 = rgb2hcg$1;\n\n var unpack$r = utils.unpack;\n var floor$3 = Math.floor;\n\n /*\n * this is basically just HSV with some minor tweaks\n *\n * hue.. [0..360]\n * chroma .. [0..1]\n * grayness .. [0..1]\n */\n\n var hcg2rgb = function () {\n var assign, assign$1, assign$2, assign$3, assign$4, assign$5;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$r(args, 'hcg');\n var h = args[0];\n var c = args[1];\n var _g = args[2];\n var r,g,b;\n _g = _g * 255;\n var _c = c * 255;\n if (c === 0) {\n r = g = b = _g;\n } else {\n if (h === 360) { h = 0; }\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 60;\n var i = floor$3(h);\n var f = h - i;\n var p = _g * (1 - c);\n var q = p + _c * (1 - f);\n var t = p + _c * f;\n var v = p + _c;\n switch (i) {\n case 0: (assign = [v, t, p], r = assign[0], g = assign[1], b = assign[2]); break\n case 1: (assign$1 = [q, v, p], r = assign$1[0], g = assign$1[1], b = assign$1[2]); break\n case 2: (assign$2 = [p, v, t], r = assign$2[0], g = assign$2[1], b = assign$2[2]); break\n case 3: (assign$3 = [p, q, v], r = assign$3[0], g = assign$3[1], b = assign$3[2]); break\n case 4: (assign$4 = [t, p, v], r = assign$4[0], g = assign$4[1], b = assign$4[2]); break\n case 5: (assign$5 = [v, p, q], r = assign$5[0], g = assign$5[1], b = assign$5[2]); break\n }\n }\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var hcg2rgb_1 = hcg2rgb;\n\n var unpack$q = utils.unpack;\n var type$j = utils.type;\n var chroma$g = chroma_1;\n var Color$z = Color_1;\n var input$c = input$h;\n\n var rgb2hcg = rgb2hcg_1;\n\n Color$z.prototype.hcg = function() {\n return rgb2hcg(this._rgb);\n };\n\n chroma$g.hcg = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$z, [ null ].concat( args, ['hcg']) ));\n };\n\n input$c.format.hcg = hcg2rgb_1;\n\n input$c.autodetect.push({\n p: 1,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$q(args, 'hcg');\n if (type$j(args) === 'array' && args.length === 3) {\n return 'hcg';\n }\n }\n });\n\n var unpack$p = utils.unpack;\n var last = utils.last;\n var round$3 = Math.round;\n\n var rgb2hex$2 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$p(args, 'rgba');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var a = ref[3];\n var mode = last(args) || 'auto';\n if (a === undefined) { a = 1; }\n if (mode === 'auto') {\n mode = a < 1 ? 'rgba' : 'rgb';\n }\n r = round$3(r);\n g = round$3(g);\n b = round$3(b);\n var u = r << 16 | g << 8 | b;\n var str = \"000000\" + u.toString(16); //#.toUpperCase();\n str = str.substr(str.length - 6);\n var hxa = '0' + round$3(a * 255).toString(16);\n hxa = hxa.substr(hxa.length - 2);\n switch (mode.toLowerCase()) {\n case 'rgba': return (\"#\" + str + hxa);\n case 'argb': return (\"#\" + hxa + str);\n default: return (\"#\" + str);\n }\n };\n\n var rgb2hex_1 = rgb2hex$2;\n\n var RE_HEX = /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;\n var RE_HEXA = /^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/;\n\n var hex2rgb$1 = function (hex) {\n if (hex.match(RE_HEX)) {\n // remove optional leading #\n if (hex.length === 4 || hex.length === 7) {\n hex = hex.substr(1);\n }\n // expand short-notation to full six-digit\n if (hex.length === 3) {\n hex = hex.split('');\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n var u = parseInt(hex, 16);\n var r = u >> 16;\n var g = u >> 8 & 0xFF;\n var b = u & 0xFF;\n return [r,g,b,1];\n }\n\n // match rgba hex format, eg #FF000077\n if (hex.match(RE_HEXA)) {\n if (hex.length === 5 || hex.length === 9) {\n // remove optional leading #\n hex = hex.substr(1);\n }\n // expand short-notation to full eight-digit\n if (hex.length === 4) {\n hex = hex.split('');\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]+hex[3]+hex[3];\n }\n var u$1 = parseInt(hex, 16);\n var r$1 = u$1 >> 24 & 0xFF;\n var g$1 = u$1 >> 16 & 0xFF;\n var b$1 = u$1 >> 8 & 0xFF;\n var a = Math.round((u$1 & 0xFF) / 0xFF * 100) / 100;\n return [r$1,g$1,b$1,a];\n }\n\n // we used to check for css colors here\n // if _input.css? and rgb = _input.css hex\n // return rgb\n\n throw new Error((\"unknown hex color: \" + hex));\n };\n\n var hex2rgb_1 = hex2rgb$1;\n\n var chroma$f = chroma_1;\n var Color$y = Color_1;\n var type$i = utils.type;\n var input$b = input$h;\n\n var rgb2hex$1 = rgb2hex_1;\n\n Color$y.prototype.hex = function(mode) {\n return rgb2hex$1(this._rgb, mode);\n };\n\n chroma$f.hex = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$y, [ null ].concat( args, ['hex']) ));\n };\n\n input$b.format.hex = hex2rgb_1;\n input$b.autodetect.push({\n p: 4,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$i(h) === 'string' && [3,4,5,6,7,8,9].indexOf(h.length) >= 0) {\n return 'hex';\n }\n }\n });\n\n var unpack$o = utils.unpack;\n var TWOPI$2 = utils.TWOPI;\n var min$2 = Math.min;\n var sqrt$4 = Math.sqrt;\n var acos = Math.acos;\n\n var rgb2hsi$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/rgb2hsi.cpp\n */\n var ref = unpack$o(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n r /= 255;\n g /= 255;\n b /= 255;\n var h;\n var min_ = min$2(r,g,b);\n var i = (r+g+b) / 3;\n var s = i > 0 ? 1 - min_/i : 0;\n if (s === 0) {\n h = NaN;\n } else {\n h = ((r-g)+(r-b)) / 2;\n h /= sqrt$4((r-g)*(r-g) + (r-b)*(g-b));\n h = acos(h);\n if (b > g) {\n h = TWOPI$2 - h;\n }\n h /= TWOPI$2;\n }\n return [h*360,s,i];\n };\n\n var rgb2hsi_1 = rgb2hsi$1;\n\n var unpack$n = utils.unpack;\n var limit = utils.limit;\n var TWOPI$1 = utils.TWOPI;\n var PITHIRD = utils.PITHIRD;\n var cos$4 = Math.cos;\n\n /*\n * hue [0..360]\n * saturation [0..1]\n * intensity [0..1]\n */\n var hsi2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/hsi2rgb.cpp\n */\n args = unpack$n(args, 'hsi');\n var h = args[0];\n var s = args[1];\n var i = args[2];\n var r,g,b;\n\n if (isNaN(h)) { h = 0; }\n if (isNaN(s)) { s = 0; }\n // normalize hue\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 360;\n if (h < 1/3) {\n b = (1-s)/3;\n r = (1+s*cos$4(TWOPI$1*h)/cos$4(PITHIRD-TWOPI$1*h))/3;\n g = 1 - (b+r);\n } else if (h < 2/3) {\n h -= 1/3;\n r = (1-s)/3;\n g = (1+s*cos$4(TWOPI$1*h)/cos$4(PITHIRD-TWOPI$1*h))/3;\n b = 1 - (r+g);\n } else {\n h -= 2/3;\n g = (1-s)/3;\n b = (1+s*cos$4(TWOPI$1*h)/cos$4(PITHIRD-TWOPI$1*h))/3;\n r = 1 - (g+b);\n }\n r = limit(i*r*3);\n g = limit(i*g*3);\n b = limit(i*b*3);\n return [r*255, g*255, b*255, args.length > 3 ? args[3] : 1];\n };\n\n var hsi2rgb_1 = hsi2rgb;\n\n var unpack$m = utils.unpack;\n var type$h = utils.type;\n var chroma$e = chroma_1;\n var Color$x = Color_1;\n var input$a = input$h;\n\n var rgb2hsi = rgb2hsi_1;\n\n Color$x.prototype.hsi = function() {\n return rgb2hsi(this._rgb);\n };\n\n chroma$e.hsi = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$x, [ null ].concat( args, ['hsi']) ));\n };\n\n input$a.format.hsi = hsi2rgb_1;\n\n input$a.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$m(args, 'hsi');\n if (type$h(args) === 'array' && args.length === 3) {\n return 'hsi';\n }\n }\n });\n\n var unpack$l = utils.unpack;\n var type$g = utils.type;\n var chroma$d = chroma_1;\n var Color$w = Color_1;\n var input$9 = input$h;\n\n var rgb2hsl$1 = rgb2hsl_1;\n\n Color$w.prototype.hsl = function() {\n return rgb2hsl$1(this._rgb);\n };\n\n chroma$d.hsl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$w, [ null ].concat( args, ['hsl']) ));\n };\n\n input$9.format.hsl = hsl2rgb_1;\n\n input$9.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$l(args, 'hsl');\n if (type$g(args) === 'array' && args.length === 3) {\n return 'hsl';\n }\n }\n });\n\n var unpack$k = utils.unpack;\n var min$1 = Math.min;\n var max$1 = Math.max;\n\n /*\n * supported arguments:\n * - rgb2hsv(r,g,b)\n * - rgb2hsv([r,g,b])\n * - rgb2hsv({r,g,b})\n */\n var rgb2hsl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$k(args, 'rgb');\n var r = args[0];\n var g = args[1];\n var b = args[2];\n var min_ = min$1(r, g, b);\n var max_ = max$1(r, g, b);\n var delta = max_ - min_;\n var h,s,v;\n v = max_ / 255.0;\n if (max_ === 0) {\n h = Number.NaN;\n s = 0;\n } else {\n s = delta / max_;\n if (r === max_) { h = (g - b) / delta; }\n if (g === max_) { h = 2+(b - r) / delta; }\n if (b === max_) { h = 4+(r - g) / delta; }\n h *= 60;\n if (h < 0) { h += 360; }\n }\n return [h, s, v]\n };\n\n var rgb2hsv$1 = rgb2hsl;\n\n var unpack$j = utils.unpack;\n var floor$2 = Math.floor;\n\n var hsv2rgb = function () {\n var assign, assign$1, assign$2, assign$3, assign$4, assign$5;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$j(args, 'hsv');\n var h = args[0];\n var s = args[1];\n var v = args[2];\n var r,g,b;\n v *= 255;\n if (s === 0) {\n r = g = b = v;\n } else {\n if (h === 360) { h = 0; }\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 60;\n\n var i = floor$2(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - s * f);\n var t = v * (1 - s * (1 - f));\n\n switch (i) {\n case 0: (assign = [v, t, p], r = assign[0], g = assign[1], b = assign[2]); break\n case 1: (assign$1 = [q, v, p], r = assign$1[0], g = assign$1[1], b = assign$1[2]); break\n case 2: (assign$2 = [p, v, t], r = assign$2[0], g = assign$2[1], b = assign$2[2]); break\n case 3: (assign$3 = [p, q, v], r = assign$3[0], g = assign$3[1], b = assign$3[2]); break\n case 4: (assign$4 = [t, p, v], r = assign$4[0], g = assign$4[1], b = assign$4[2]); break\n case 5: (assign$5 = [v, p, q], r = assign$5[0], g = assign$5[1], b = assign$5[2]); break\n }\n }\n return [r,g,b,args.length > 3?args[3]:1];\n };\n\n var hsv2rgb_1 = hsv2rgb;\n\n var unpack$i = utils.unpack;\n var type$f = utils.type;\n var chroma$c = chroma_1;\n var Color$v = Color_1;\n var input$8 = input$h;\n\n var rgb2hsv = rgb2hsv$1;\n\n Color$v.prototype.hsv = function() {\n return rgb2hsv(this._rgb);\n };\n\n chroma$c.hsv = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$v, [ null ].concat( args, ['hsv']) ));\n };\n\n input$8.format.hsv = hsv2rgb_1;\n\n input$8.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$i(args, 'hsv');\n if (type$f(args) === 'array' && args.length === 3) {\n return 'hsv';\n }\n }\n });\n\n var labConstants = {\n // Corresponds roughly to RGB brighter/darker\n Kn: 18,\n\n // D65 standard referent\n Xn: 0.950470,\n Yn: 1,\n Zn: 1.088830,\n\n t0: 0.137931034, // 4 / 29\n t1: 0.206896552, // 6 / 29\n t2: 0.12841855, // 3 * t1 * t1\n t3: 0.008856452, // t1 * t1 * t1\n };\n\n var LAB_CONSTANTS$3 = labConstants;\n var unpack$h = utils.unpack;\n var pow$a = Math.pow;\n\n var rgb2lab$2 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$h(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2xyz(r,g,b);\n var x = ref$1[0];\n var y = ref$1[1];\n var z = ref$1[2];\n var l = 116 * y - 16;\n return [l < 0 ? 0 : l, 500 * (x - y), 200 * (y - z)];\n };\n\n var rgb_xyz = function (r) {\n if ((r /= 255) <= 0.04045) { return r / 12.92; }\n return pow$a((r + 0.055) / 1.055, 2.4);\n };\n\n var xyz_lab = function (t) {\n if (t > LAB_CONSTANTS$3.t3) { return pow$a(t, 1 / 3); }\n return t / LAB_CONSTANTS$3.t2 + LAB_CONSTANTS$3.t0;\n };\n\n var rgb2xyz = function (r,g,b) {\n r = rgb_xyz(r);\n g = rgb_xyz(g);\n b = rgb_xyz(b);\n var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / LAB_CONSTANTS$3.Xn);\n var y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / LAB_CONSTANTS$3.Yn);\n var z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / LAB_CONSTANTS$3.Zn);\n return [x,y,z];\n };\n\n var rgb2lab_1 = rgb2lab$2;\n\n var LAB_CONSTANTS$2 = labConstants;\n var unpack$g = utils.unpack;\n var pow$9 = Math.pow;\n\n /*\n * L* [0..100]\n * a [-100..100]\n * b [-100..100]\n */\n var lab2rgb$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$g(args, 'lab');\n var l = args[0];\n var a = args[1];\n var b = args[2];\n var x,y,z, r,g,b_;\n\n y = (l + 16) / 116;\n x = isNaN(a) ? y : y + a / 500;\n z = isNaN(b) ? y : y - b / 200;\n\n y = LAB_CONSTANTS$2.Yn * lab_xyz(y);\n x = LAB_CONSTANTS$2.Xn * lab_xyz(x);\n z = LAB_CONSTANTS$2.Zn * lab_xyz(z);\n\n r = xyz_rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z); // D65 -> sRGB\n g = xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z);\n b_ = xyz_rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z);\n\n return [r,g,b_,args.length > 3 ? args[3] : 1];\n };\n\n var xyz_rgb = function (r) {\n return 255 * (r <= 0.00304 ? 12.92 * r : 1.055 * pow$9(r, 1 / 2.4) - 0.055)\n };\n\n var lab_xyz = function (t) {\n return t > LAB_CONSTANTS$2.t1 ? t * t * t : LAB_CONSTANTS$2.t2 * (t - LAB_CONSTANTS$2.t0)\n };\n\n var lab2rgb_1 = lab2rgb$1;\n\n var unpack$f = utils.unpack;\n var type$e = utils.type;\n var chroma$b = chroma_1;\n var Color$u = Color_1;\n var input$7 = input$h;\n\n var rgb2lab$1 = rgb2lab_1;\n\n Color$u.prototype.lab = function() {\n return rgb2lab$1(this._rgb);\n };\n\n chroma$b.lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$u, [ null ].concat( args, ['lab']) ));\n };\n\n input$7.format.lab = lab2rgb_1;\n\n input$7.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$f(args, 'lab');\n if (type$e(args) === 'array' && args.length === 3) {\n return 'lab';\n }\n }\n });\n\n var unpack$e = utils.unpack;\n var RAD2DEG = utils.RAD2DEG;\n var sqrt$3 = Math.sqrt;\n var atan2$2 = Math.atan2;\n var round$2 = Math.round;\n\n var lab2lch$2 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$e(args, 'lab');\n var l = ref[0];\n var a = ref[1];\n var b = ref[2];\n var c = sqrt$3(a * a + b * b);\n var h = (atan2$2(b, a) * RAD2DEG + 360) % 360;\n if (round$2(c*10000) === 0) { h = Number.NaN; }\n return [l, c, h];\n };\n\n var lab2lch_1 = lab2lch$2;\n\n var unpack$d = utils.unpack;\n var rgb2lab = rgb2lab_1;\n var lab2lch$1 = lab2lch_1;\n\n var rgb2lch$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$d(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2lab(r,g,b);\n var l = ref$1[0];\n var a = ref$1[1];\n var b_ = ref$1[2];\n return lab2lch$1(l,a,b_);\n };\n\n var rgb2lch_1 = rgb2lch$1;\n\n var unpack$c = utils.unpack;\n var DEG2RAD = utils.DEG2RAD;\n var sin$3 = Math.sin;\n var cos$3 = Math.cos;\n\n var lch2lab$2 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel.\n These formulas were invented by David Dalrymple to obtain maximum contrast without going\n out of gamut if the parameters are in the range 0-1.\n\n A saturation multiplier was added by Gregor Aisch\n */\n var ref = unpack$c(args, 'lch');\n var l = ref[0];\n var c = ref[1];\n var h = ref[2];\n if (isNaN(h)) { h = 0; }\n h = h * DEG2RAD;\n return [l, cos$3(h) * c, sin$3(h) * c]\n };\n\n var lch2lab_1 = lch2lab$2;\n\n var unpack$b = utils.unpack;\n var lch2lab$1 = lch2lab_1;\n var lab2rgb = lab2rgb_1;\n\n var lch2rgb$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$b(args, 'lch');\n var l = args[0];\n var c = args[1];\n var h = args[2];\n var ref = lch2lab$1 (l,c,h);\n var L = ref[0];\n var a = ref[1];\n var b_ = ref[2];\n var ref$1 = lab2rgb (L,a,b_);\n var r = ref$1[0];\n var g = ref$1[1];\n var b = ref$1[2];\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var lch2rgb_1 = lch2rgb$1;\n\n var unpack$a = utils.unpack;\n var lch2rgb = lch2rgb_1;\n\n var hcl2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var hcl = unpack$a(args, 'hcl').reverse();\n return lch2rgb.apply(void 0, hcl);\n };\n\n var hcl2rgb_1 = hcl2rgb;\n\n var unpack$9 = utils.unpack;\n var type$d = utils.type;\n var chroma$a = chroma_1;\n var Color$t = Color_1;\n var input$6 = input$h;\n\n var rgb2lch = rgb2lch_1;\n\n Color$t.prototype.lch = function() { return rgb2lch(this._rgb); };\n Color$t.prototype.hcl = function() { return rgb2lch(this._rgb).reverse(); };\n\n chroma$a.lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$t, [ null ].concat( args, ['lch']) ));\n };\n chroma$a.hcl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$t, [ null ].concat( args, ['hcl']) ));\n };\n\n input$6.format.lch = lch2rgb_1;\n input$6.format.hcl = hcl2rgb_1;\n\n ['lch','hcl'].forEach(function (m) { return input$6.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$9(args, m);\n if (type$d(args) === 'array' && args.length === 3) {\n return m;\n }\n }\n }); });\n\n /**\n \tX11 color names\n\n \thttp://www.w3.org/TR/css3-color/#svg-color\n */\n\n var w3cx11$1 = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflower: '#6495ed',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n laserlemon: '#ffff54',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrod: '#fafad2',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n maroon2: '#7f0000',\n maroon3: '#b03060',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n purple2: '#7f007f',\n purple3: '#a020f0',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n };\n\n var w3cx11_1 = w3cx11$1;\n\n var Color$s = Color_1;\n var input$5 = input$h;\n var type$c = utils.type;\n\n var w3cx11 = w3cx11_1;\n var hex2rgb = hex2rgb_1;\n var rgb2hex = rgb2hex_1;\n\n Color$s.prototype.name = function() {\n var hex = rgb2hex(this._rgb, 'rgb');\n for (var i = 0, list = Object.keys(w3cx11); i < list.length; i += 1) {\n var n = list[i];\n\n if (w3cx11[n] === hex) { return n.toLowerCase(); }\n }\n return hex;\n };\n\n input$5.format.named = function (name) {\n name = name.toLowerCase();\n if (w3cx11[name]) { return hex2rgb(w3cx11[name]); }\n throw new Error('unknown color name: '+name);\n };\n\n input$5.autodetect.push({\n p: 5,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$c(h) === 'string' && w3cx11[h.toLowerCase()]) {\n return 'named';\n }\n }\n });\n\n var unpack$8 = utils.unpack;\n\n var rgb2num$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$8(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n return (r << 16) + (g << 8) + b;\n };\n\n var rgb2num_1 = rgb2num$1;\n\n var type$b = utils.type;\n\n var num2rgb = function (num) {\n if (type$b(num) == \"number\" && num >= 0 && num <= 0xFFFFFF) {\n var r = num >> 16;\n var g = (num >> 8) & 0xFF;\n var b = num & 0xFF;\n return [r,g,b,1];\n }\n throw new Error(\"unknown num color: \"+num);\n };\n\n var num2rgb_1 = num2rgb;\n\n var chroma$9 = chroma_1;\n var Color$r = Color_1;\n var input$4 = input$h;\n var type$a = utils.type;\n\n var rgb2num = rgb2num_1;\n\n Color$r.prototype.num = function() {\n return rgb2num(this._rgb);\n };\n\n chroma$9.num = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$r, [ null ].concat( args, ['num']) ));\n };\n\n input$4.format.num = num2rgb_1;\n\n input$4.autodetect.push({\n p: 5,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (args.length === 1 && type$a(args[0]) === 'number' && args[0] >= 0 && args[0] <= 0xFFFFFF) {\n return 'num';\n }\n }\n });\n\n var chroma$8 = chroma_1;\n var Color$q = Color_1;\n var input$3 = input$h;\n var unpack$7 = utils.unpack;\n var type$9 = utils.type;\n var round$1 = Math.round;\n\n Color$q.prototype.rgb = function(rnd) {\n if ( rnd === void 0 ) rnd=true;\n\n if (rnd === false) { return this._rgb.slice(0,3); }\n return this._rgb.slice(0,3).map(round$1);\n };\n\n Color$q.prototype.rgba = function(rnd) {\n if ( rnd === void 0 ) rnd=true;\n\n return this._rgb.slice(0,4).map(function (v,i) {\n return i<3 ? (rnd === false ? v : round$1(v)) : v;\n });\n };\n\n chroma$8.rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$q, [ null ].concat( args, ['rgb']) ));\n };\n\n input$3.format.rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgba = unpack$7(args, 'rgba');\n if (rgba[3] === undefined) { rgba[3] = 1; }\n return rgba;\n };\n\n input$3.autodetect.push({\n p: 3,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$7(args, 'rgba');\n if (type$9(args) === 'array' && (args.length === 3 ||\n args.length === 4 && type$9(args[3]) == 'number' && args[3] >= 0 && args[3] <= 1)) {\n return 'rgb';\n }\n }\n });\n\n /*\n * Based on implementation by Neil Bartlett\n * https://github.com/neilbartlett/color-temperature\n */\n\n var log$1 = Math.log;\n\n var temperature2rgb$1 = function (kelvin) {\n var temp = kelvin / 100;\n var r,g,b;\n if (temp < 66) {\n r = 255;\n g = temp < 6 ? 0 : -155.25485562709179 - 0.44596950469579133 * (g = temp-2) + 104.49216199393888 * log$1(g);\n b = temp < 20 ? 0 : -254.76935184120902 + 0.8274096064007395 * (b = temp-10) + 115.67994401066147 * log$1(b);\n } else {\n r = 351.97690566805693 + 0.114206453784165 * (r = temp-55) - 40.25366309332127 * log$1(r);\n g = 325.4494125711974 + 0.07943456536662342 * (g = temp-50) - 28.0852963507957 * log$1(g);\n b = 255;\n }\n return [r,g,b,1];\n };\n\n var temperature2rgb_1 = temperature2rgb$1;\n\n /*\n * Based on implementation by Neil Bartlett\n * https://github.com/neilbartlett/color-temperature\n **/\n\n var temperature2rgb = temperature2rgb_1;\n var unpack$6 = utils.unpack;\n var round = Math.round;\n\n var rgb2temperature$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgb = unpack$6(args, 'rgb');\n var r = rgb[0], b = rgb[2];\n var minTemp = 1000;\n var maxTemp = 40000;\n var eps = 0.4;\n var temp;\n while (maxTemp - minTemp > eps) {\n temp = (maxTemp + minTemp) * 0.5;\n var rgb$1 = temperature2rgb(temp);\n if ((rgb$1[2] / rgb$1[0]) >= (b / r)) {\n maxTemp = temp;\n } else {\n minTemp = temp;\n }\n }\n return round(temp);\n };\n\n var rgb2temperature_1 = rgb2temperature$1;\n\n var chroma$7 = chroma_1;\n var Color$p = Color_1;\n var input$2 = input$h;\n\n var rgb2temperature = rgb2temperature_1;\n\n Color$p.prototype.temp =\n Color$p.prototype.kelvin =\n Color$p.prototype.temperature = function() {\n return rgb2temperature(this._rgb);\n };\n\n chroma$7.temp =\n chroma$7.kelvin =\n chroma$7.temperature = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$p, [ null ].concat( args, ['temp']) ));\n };\n\n input$2.format.temp =\n input$2.format.kelvin =\n input$2.format.temperature = temperature2rgb_1;\n\n var unpack$5 = utils.unpack;\n var cbrt = Math.cbrt;\n var pow$8 = Math.pow;\n var sign$1 = Math.sign;\n\n var rgb2oklab$2 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // OKLab color space implementation taken from\n // https://bottosson.github.io/posts/oklab/\n var ref = unpack$5(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = [rgb2lrgb(r / 255), rgb2lrgb(g / 255), rgb2lrgb(b / 255)];\n var lr = ref$1[0];\n var lg = ref$1[1];\n var lb = ref$1[2];\n var l = cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);\n var m = cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);\n var s = cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);\n\n return [\n 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,\n 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s\n ];\n };\n\n var rgb2oklab_1 = rgb2oklab$2;\n\n function rgb2lrgb(c) {\n var abs = Math.abs(c);\n if (abs < 0.04045) {\n return c / 12.92;\n }\n return (sign$1(c) || 1) * pow$8((abs + 0.055) / 1.055, 2.4);\n }\n\n var unpack$4 = utils.unpack;\n var pow$7 = Math.pow;\n var sign = Math.sign;\n\n /*\n * L* [0..100]\n * a [-100..100]\n * b [-100..100]\n */\n var oklab2rgb$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$4(args, 'lab');\n var L = args[0];\n var a = args[1];\n var b = args[2];\n\n var l = pow$7(L + 0.3963377774 * a + 0.2158037573 * b, 3);\n var m = pow$7(L - 0.1055613458 * a - 0.0638541728 * b, 3);\n var s = pow$7(L - 0.0894841775 * a - 1.291485548 * b, 3);\n\n return [\n 255 * lrgb2rgb(+4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s),\n 255 * lrgb2rgb(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s),\n 255 * lrgb2rgb(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s),\n args.length > 3 ? args[3] : 1\n ];\n };\n\n var oklab2rgb_1 = oklab2rgb$1;\n\n function lrgb2rgb(c) {\n var abs = Math.abs(c);\n if (abs > 0.0031308) {\n return (sign(c) || 1) * (1.055 * pow$7(abs, 1 / 2.4) - 0.055);\n }\n return c * 12.92;\n }\n\n var unpack$3 = utils.unpack;\n var type$8 = utils.type;\n var chroma$6 = chroma_1;\n var Color$o = Color_1;\n var input$1 = input$h;\n\n var rgb2oklab$1 = rgb2oklab_1;\n\n Color$o.prototype.oklab = function () {\n return rgb2oklab$1(this._rgb);\n };\n\n chroma$6.oklab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$o, [ null ].concat( args, ['oklab']) ));\n };\n\n input$1.format.oklab = oklab2rgb_1;\n\n input$1.autodetect.push({\n p: 3,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$3(args, 'oklab');\n if (type$8(args) === 'array' && args.length === 3) {\n return 'oklab';\n }\n }\n });\n\n var unpack$2 = utils.unpack;\n var rgb2oklab = rgb2oklab_1;\n var lab2lch = lab2lch_1;\n\n var rgb2oklch$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$2(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2oklab(r, g, b);\n var l = ref$1[0];\n var a = ref$1[1];\n var b_ = ref$1[2];\n return lab2lch(l, a, b_);\n };\n\n var rgb2oklch_1 = rgb2oklch$1;\n\n var unpack$1 = utils.unpack;\n var lch2lab = lch2lab_1;\n var oklab2rgb = oklab2rgb_1;\n\n var oklch2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$1(args, 'lch');\n var l = args[0];\n var c = args[1];\n var h = args[2];\n var ref = lch2lab(l, c, h);\n var L = ref[0];\n var a = ref[1];\n var b_ = ref[2];\n var ref$1 = oklab2rgb(L, a, b_);\n var r = ref$1[0];\n var g = ref$1[1];\n var b = ref$1[2];\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var oklch2rgb_1 = oklch2rgb;\n\n var unpack = utils.unpack;\n var type$7 = utils.type;\n var chroma$5 = chroma_1;\n var Color$n = Color_1;\n var input = input$h;\n\n var rgb2oklch = rgb2oklch_1;\n\n Color$n.prototype.oklch = function () {\n return rgb2oklch(this._rgb);\n };\n\n chroma$5.oklch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color$n, [ null ].concat( args, ['oklch']) ));\n };\n\n input.format.oklch = oklch2rgb_1;\n\n input.autodetect.push({\n p: 3,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack(args, 'oklch');\n if (type$7(args) === 'array' && args.length === 3) {\n return 'oklch';\n }\n }\n });\n\n var Color$m = Color_1;\n var type$6 = utils.type;\n\n Color$m.prototype.alpha = function(a, mutate) {\n if ( mutate === void 0 ) mutate=false;\n\n if (a !== undefined && type$6(a) === 'number') {\n if (mutate) {\n this._rgb[3] = a;\n return this;\n }\n return new Color$m([this._rgb[0], this._rgb[1], this._rgb[2], a], 'rgb');\n }\n return this._rgb[3];\n };\n\n var Color$l = Color_1;\n\n Color$l.prototype.clipped = function() {\n return this._rgb._clipped || false;\n };\n\n var Color$k = Color_1;\n var LAB_CONSTANTS$1 = labConstants;\n\n Color$k.prototype.darken = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \tvar me = this;\n \tvar lab = me.lab();\n \tlab[0] -= LAB_CONSTANTS$1.Kn * amount;\n \treturn new Color$k(lab, 'lab').alpha(me.alpha(), true);\n };\n\n Color$k.prototype.brighten = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \treturn this.darken(-amount);\n };\n\n Color$k.prototype.darker = Color$k.prototype.darken;\n Color$k.prototype.brighter = Color$k.prototype.brighten;\n\n var Color$j = Color_1;\n\n Color$j.prototype.get = function (mc) {\n var ref = mc.split('.');\n var mode = ref[0];\n var channel = ref[1];\n var src = this[mode]();\n if (channel) {\n var i = mode.indexOf(channel) - (mode.substr(0, 2) === 'ok' ? 2 : 0);\n if (i > -1) { return src[i]; }\n throw new Error((\"unknown channel \" + channel + \" in mode \" + mode));\n } else {\n return src;\n }\n };\n\n var Color$i = Color_1;\n var type$5 = utils.type;\n var pow$6 = Math.pow;\n\n var EPS = 1e-7;\n var MAX_ITER = 20;\n\n Color$i.prototype.luminance = function(lum) {\n if (lum !== undefined && type$5(lum) === 'number') {\n if (lum === 0) {\n // return pure black\n return new Color$i([0,0,0,this._rgb[3]], 'rgb');\n }\n if (lum === 1) {\n // return pure white\n return new Color$i([255,255,255,this._rgb[3]], 'rgb');\n }\n // compute new color using...\n var cur_lum = this.luminance();\n var mode = 'rgb';\n var max_iter = MAX_ITER;\n\n var test = function (low, high) {\n var mid = low.interpolate(high, 0.5, mode);\n var lm = mid.luminance();\n if (Math.abs(lum - lm) < EPS || !max_iter--) {\n // close enough\n return mid;\n }\n return lm > lum ? test(low, mid) : test(mid, high);\n };\n\n var rgb = (cur_lum > lum ? test(new Color$i([0,0,0]), this) : test(this, new Color$i([255,255,255]))).rgb();\n return new Color$i(rgb.concat( [this._rgb[3]]));\n }\n return rgb2luminance.apply(void 0, (this._rgb).slice(0,3));\n };\n\n\n var rgb2luminance = function (r,g,b) {\n // relative luminance\n // see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n r = luminance_x(r);\n g = luminance_x(g);\n b = luminance_x(b);\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n };\n\n var luminance_x = function (x) {\n x /= 255;\n return x <= 0.03928 ? x/12.92 : pow$6((x+0.055)/1.055, 2.4);\n };\n\n var interpolator$1 = {};\n\n var Color$h = Color_1;\n var type$4 = utils.type;\n var interpolator = interpolator$1;\n\n var mix$1 = function (col1, col2, f) {\n if ( f === void 0 ) f=0.5;\n var rest = [], len = arguments.length - 3;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 3 ];\n\n var mode = rest[0] || 'lrgb';\n if (!interpolator[mode] && !rest.length) {\n // fall back to the first supported mode\n mode = Object.keys(interpolator)[0];\n }\n if (!interpolator[mode]) {\n throw new Error((\"interpolation mode \" + mode + \" is not defined\"));\n }\n if (type$4(col1) !== 'object') { col1 = new Color$h(col1); }\n if (type$4(col2) !== 'object') { col2 = new Color$h(col2); }\n return interpolator[mode](col1, col2, f)\n .alpha(col1.alpha() + f * (col2.alpha() - col1.alpha()));\n };\n\n var Color$g = Color_1;\n var mix = mix$1;\n\n Color$g.prototype.mix =\n Color$g.prototype.interpolate = function(col2, f) {\n \tif ( f === void 0 ) f=0.5;\n \tvar rest = [], len = arguments.length - 2;\n \twhile ( len-- > 0 ) rest[ len ] = arguments[ len + 2 ];\n\n \treturn mix.apply(void 0, [ this, col2, f ].concat( rest ));\n };\n\n var Color$f = Color_1;\n\n Color$f.prototype.premultiply = function(mutate) {\n \tif ( mutate === void 0 ) mutate=false;\n\n \tvar rgb = this._rgb;\n \tvar a = rgb[3];\n \tif (mutate) {\n \t\tthis._rgb = [rgb[0]*a, rgb[1]*a, rgb[2]*a, a];\n \t\treturn this;\n \t} else {\n \t\treturn new Color$f([rgb[0]*a, rgb[1]*a, rgb[2]*a, a], 'rgb');\n \t}\n };\n\n var Color$e = Color_1;\n var LAB_CONSTANTS = labConstants;\n\n Color$e.prototype.saturate = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \tvar me = this;\n \tvar lch = me.lch();\n \tlch[1] += LAB_CONSTANTS.Kn * amount;\n \tif (lch[1] < 0) { lch[1] = 0; }\n \treturn new Color$e(lch, 'lch').alpha(me.alpha(), true);\n };\n\n Color$e.prototype.desaturate = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \treturn this.saturate(-amount);\n };\n\n var Color$d = Color_1;\n var type$3 = utils.type;\n\n Color$d.prototype.set = function (mc, value, mutate) {\n if ( mutate === void 0 ) mutate = false;\n\n var ref = mc.split('.');\n var mode = ref[0];\n var channel = ref[1];\n var src = this[mode]();\n if (channel) {\n var i = mode.indexOf(channel) - (mode.substr(0, 2) === 'ok' ? 2 : 0);\n if (i > -1) {\n if (type$3(value) == 'string') {\n switch (value.charAt(0)) {\n case '+':\n src[i] += +value;\n break;\n case '-':\n src[i] += +value;\n break;\n case '*':\n src[i] *= +value.substr(1);\n break;\n case '/':\n src[i] /= +value.substr(1);\n break;\n default:\n src[i] = +value;\n }\n } else if (type$3(value) === 'number') {\n src[i] = value;\n } else {\n throw new Error(\"unsupported value for Color.set\");\n }\n var out = new Color$d(src, mode);\n if (mutate) {\n this._rgb = out._rgb;\n return this;\n }\n return out;\n }\n throw new Error((\"unknown channel \" + channel + \" in mode \" + mode));\n } else {\n return src;\n }\n };\n\n var Color$c = Color_1;\n\n var rgb = function (col1, col2, f) {\n var xyz0 = col1._rgb;\n var xyz1 = col2._rgb;\n return new Color$c(\n xyz0[0] + f * (xyz1[0]-xyz0[0]),\n xyz0[1] + f * (xyz1[1]-xyz0[1]),\n xyz0[2] + f * (xyz1[2]-xyz0[2]),\n 'rgb'\n )\n };\n\n // register interpolator\n interpolator$1.rgb = rgb;\n\n var Color$b = Color_1;\n var sqrt$2 = Math.sqrt;\n var pow$5 = Math.pow;\n\n var lrgb = function (col1, col2, f) {\n var ref = col1._rgb;\n var x1 = ref[0];\n var y1 = ref[1];\n var z1 = ref[2];\n var ref$1 = col2._rgb;\n var x2 = ref$1[0];\n var y2 = ref$1[1];\n var z2 = ref$1[2];\n return new Color$b(\n sqrt$2(pow$5(x1,2) * (1-f) + pow$5(x2,2) * f),\n sqrt$2(pow$5(y1,2) * (1-f) + pow$5(y2,2) * f),\n sqrt$2(pow$5(z1,2) * (1-f) + pow$5(z2,2) * f),\n 'rgb'\n )\n };\n\n // register interpolator\n interpolator$1.lrgb = lrgb;\n\n var Color$a = Color_1;\n\n var lab = function (col1, col2, f) {\n var xyz0 = col1.lab();\n var xyz1 = col2.lab();\n return new Color$a(\n xyz0[0] + f * (xyz1[0]-xyz0[0]),\n xyz0[1] + f * (xyz1[1]-xyz0[1]),\n xyz0[2] + f * (xyz1[2]-xyz0[2]),\n 'lab'\n )\n };\n\n // register interpolator\n interpolator$1.lab = lab;\n\n var Color$9 = Color_1;\n\n var _hsx = function (col1, col2, f, m) {\n var assign, assign$1;\n\n var xyz0, xyz1;\n if (m === 'hsl') {\n xyz0 = col1.hsl();\n xyz1 = col2.hsl();\n } else if (m === 'hsv') {\n xyz0 = col1.hsv();\n xyz1 = col2.hsv();\n } else if (m === 'hcg') {\n xyz0 = col1.hcg();\n xyz1 = col2.hcg();\n } else if (m === 'hsi') {\n xyz0 = col1.hsi();\n xyz1 = col2.hsi();\n } else if (m === 'lch' || m === 'hcl') {\n m = 'hcl';\n xyz0 = col1.hcl();\n xyz1 = col2.hcl();\n } else if (m === 'oklch') {\n xyz0 = col1.oklch().reverse();\n xyz1 = col2.oklch().reverse();\n }\n\n var hue0, hue1, sat0, sat1, lbv0, lbv1;\n if (m.substr(0, 1) === 'h' || m === 'oklch') {\n (assign = xyz0, hue0 = assign[0], sat0 = assign[1], lbv0 = assign[2]);\n (assign$1 = xyz1, hue1 = assign$1[0], sat1 = assign$1[1], lbv1 = assign$1[2]);\n }\n\n var sat, hue, lbv, dh;\n\n if (!isNaN(hue0) && !isNaN(hue1)) {\n // both colors have hue\n if (hue1 > hue0 && hue1 - hue0 > 180) {\n dh = hue1 - (hue0 + 360);\n } else if (hue1 < hue0 && hue0 - hue1 > 180) {\n dh = hue1 + 360 - hue0;\n } else {\n dh = hue1 - hue0;\n }\n hue = hue0 + f * dh;\n } else if (!isNaN(hue0)) {\n hue = hue0;\n if ((lbv1 == 1 || lbv1 == 0) && m != 'hsv') { sat = sat0; }\n } else if (!isNaN(hue1)) {\n hue = hue1;\n if ((lbv0 == 1 || lbv0 == 0) && m != 'hsv') { sat = sat1; }\n } else {\n hue = Number.NaN;\n }\n\n if (sat === undefined) { sat = sat0 + f * (sat1 - sat0); }\n lbv = lbv0 + f * (lbv1 - lbv0);\n return m === 'oklch' ? new Color$9([lbv, sat, hue], m) : new Color$9([hue, sat, lbv], m);\n };\n\n var interpolate_hsx$5 = _hsx;\n\n var lch = function (col1, col2, f) {\n \treturn interpolate_hsx$5(col1, col2, f, 'lch');\n };\n\n // register interpolator\n interpolator$1.lch = lch;\n interpolator$1.hcl = lch;\n\n var Color$8 = Color_1;\n\n var num = function (col1, col2, f) {\n var c1 = col1.num();\n var c2 = col2.num();\n return new Color$8(c1 + f * (c2-c1), 'num')\n };\n\n // register interpolator\n interpolator$1.num = num;\n\n var interpolate_hsx$4 = _hsx;\n\n var hcg = function (col1, col2, f) {\n \treturn interpolate_hsx$4(col1, col2, f, 'hcg');\n };\n\n // register interpolator\n interpolator$1.hcg = hcg;\n\n var interpolate_hsx$3 = _hsx;\n\n var hsi = function (col1, col2, f) {\n \treturn interpolate_hsx$3(col1, col2, f, 'hsi');\n };\n\n // register interpolator\n interpolator$1.hsi = hsi;\n\n var interpolate_hsx$2 = _hsx;\n\n var hsl = function (col1, col2, f) {\n \treturn interpolate_hsx$2(col1, col2, f, 'hsl');\n };\n\n // register interpolator\n interpolator$1.hsl = hsl;\n\n var interpolate_hsx$1 = _hsx;\n\n var hsv = function (col1, col2, f) {\n \treturn interpolate_hsx$1(col1, col2, f, 'hsv');\n };\n\n // register interpolator\n interpolator$1.hsv = hsv;\n\n var Color$7 = Color_1;\n\n var oklab = function (col1, col2, f) {\n var xyz0 = col1.oklab();\n var xyz1 = col2.oklab();\n return new Color$7(\n xyz0[0] + f * (xyz1[0] - xyz0[0]),\n xyz0[1] + f * (xyz1[1] - xyz0[1]),\n xyz0[2] + f * (xyz1[2] - xyz0[2]),\n 'oklab'\n );\n };\n\n // register interpolator\n interpolator$1.oklab = oklab;\n\n var interpolate_hsx = _hsx;\n\n var oklch = function (col1, col2, f) {\n return interpolate_hsx(col1, col2, f, 'oklch');\n };\n\n // register interpolator\n interpolator$1.oklch = oklch;\n\n var Color$6 = Color_1;\n var clip_rgb$1 = utils.clip_rgb;\n var pow$4 = Math.pow;\n var sqrt$1 = Math.sqrt;\n var PI$1 = Math.PI;\n var cos$2 = Math.cos;\n var sin$2 = Math.sin;\n var atan2$1 = Math.atan2;\n\n var average = function (colors, mode, weights) {\n if ( mode === void 0 ) mode='lrgb';\n if ( weights === void 0 ) weights=null;\n\n var l = colors.length;\n if (!weights) { weights = Array.from(new Array(l)).map(function () { return 1; }); }\n // normalize weights\n var k = l / weights.reduce(function(a, b) { return a + b; });\n weights.forEach(function (w,i) { weights[i] *= k; });\n // convert colors to Color objects\n colors = colors.map(function (c) { return new Color$6(c); });\n if (mode === 'lrgb') {\n return _average_lrgb(colors, weights)\n }\n var first = colors.shift();\n var xyz = first.get(mode);\n var cnt = [];\n var dx = 0;\n var dy = 0;\n // initial color\n for (var i=0; i= 360) { A$1 -= 360; }\n xyz[i$1] = A$1;\n } else {\n xyz[i$1] = xyz[i$1]/cnt[i$1];\n }\n }\n alpha /= l;\n return (new Color$6(xyz, mode)).alpha(alpha > 0.99999 ? 1 : alpha, true);\n };\n\n\n var _average_lrgb = function (colors, weights) {\n var l = colors.length;\n var xyz = [0,0,0,0];\n for (var i=0; i < colors.length; i++) {\n var col = colors[i];\n var f = weights[i] / l;\n var rgb = col._rgb;\n xyz[0] += pow$4(rgb[0],2) * f;\n xyz[1] += pow$4(rgb[1],2) * f;\n xyz[2] += pow$4(rgb[2],2) * f;\n xyz[3] += rgb[3] * f;\n }\n xyz[0] = sqrt$1(xyz[0]);\n xyz[1] = sqrt$1(xyz[1]);\n xyz[2] = sqrt$1(xyz[2]);\n if (xyz[3] > 0.9999999) { xyz[3] = 1; }\n return new Color$6(clip_rgb$1(xyz));\n };\n\n // minimal multi-purpose interface\n\n // @requires utils color analyze\n\n var chroma$4 = chroma_1;\n var type$2 = utils.type;\n\n var pow$3 = Math.pow;\n\n var scale$2 = function(colors) {\n\n // constructor\n var _mode = 'rgb';\n var _nacol = chroma$4('#ccc');\n var _spread = 0;\n // const _fixed = false;\n var _domain = [0, 1];\n var _pos = [];\n var _padding = [0,0];\n var _classes = false;\n var _colors = [];\n var _out = false;\n var _min = 0;\n var _max = 1;\n var _correctLightness = false;\n var _colorCache = {};\n var _useCache = true;\n var _gamma = 1;\n\n // private methods\n\n var setColors = function(colors) {\n colors = colors || ['#fff', '#000'];\n if (colors && type$2(colors) === 'string' && chroma$4.brewer &&\n chroma$4.brewer[colors.toLowerCase()]) {\n colors = chroma$4.brewer[colors.toLowerCase()];\n }\n if (type$2(colors) === 'array') {\n // handle single color\n if (colors.length === 1) {\n colors = [colors[0], colors[0]];\n }\n // make a copy of the colors\n colors = colors.slice(0);\n // convert to chroma classes\n for (var c=0; c= _classes[i]) {\n i++;\n }\n return i-1;\n }\n return 0;\n };\n\n var tMapLightness = function (t) { return t; };\n var tMapDomain = function (t) { return t; };\n\n // const classifyValue = function(value) {\n // let val = value;\n // if (_classes.length > 2) {\n // const n = _classes.length-1;\n // const i = getClass(value);\n // const minc = _classes[0] + ((_classes[1]-_classes[0]) * (0 + (_spread * 0.5))); // center of 1st class\n // const maxc = _classes[n-1] + ((_classes[n]-_classes[n-1]) * (1 - (_spread * 0.5))); // center of last class\n // val = _min + ((((_classes[i] + ((_classes[i+1] - _classes[i]) * 0.5)) - minc) / (maxc-minc)) * (_max - _min));\n // }\n // return val;\n // };\n\n var getColor = function(val, bypassMap) {\n var col, t;\n if (bypassMap == null) { bypassMap = false; }\n if (isNaN(val) || (val === null)) { return _nacol; }\n if (!bypassMap) {\n if (_classes && (_classes.length > 2)) {\n // find the class\n var c = getClass(val);\n t = c / (_classes.length-2);\n } else if (_max !== _min) {\n // just interpolate between min/max\n t = (val - _min) / (_max - _min);\n } else {\n t = 1;\n }\n } else {\n t = val;\n }\n\n // domain map\n t = tMapDomain(t);\n\n if (!bypassMap) {\n t = tMapLightness(t); // lightness correction\n }\n\n if (_gamma !== 1) { t = pow$3(t, _gamma); }\n\n t = _padding[0] + (t * (1 - _padding[0] - _padding[1]));\n\n t = Math.min(1, Math.max(0, t));\n\n var k = Math.floor(t * 10000);\n\n if (_useCache && _colorCache[k]) {\n col = _colorCache[k];\n } else {\n if (type$2(_colors) === 'array') {\n //for i in [0.._pos.length-1]\n for (var i=0; i<_pos.length; i++) {\n var p = _pos[i];\n if (t <= p) {\n col = _colors[i];\n break;\n }\n if ((t >= p) && (i === (_pos.length-1))) {\n col = _colors[i];\n break;\n }\n if (t > p && t < _pos[i+1]) {\n t = (t-p)/(_pos[i+1]-p);\n col = chroma$4.interpolate(_colors[i], _colors[i+1], t, _mode);\n break;\n }\n }\n } else if (type$2(_colors) === 'function') {\n col = _colors(t);\n }\n if (_useCache) { _colorCache[k] = col; }\n }\n return col;\n };\n\n var resetCache = function () { return _colorCache = {}; };\n\n setColors(colors);\n\n // public interface\n\n var f = function(v) {\n var c = chroma$4(getColor(v));\n if (_out && c[_out]) { return c[_out](); } else { return c; }\n };\n\n f.classes = function(classes) {\n if (classes != null) {\n if (type$2(classes) === 'array') {\n _classes = classes;\n _domain = [classes[0], classes[classes.length-1]];\n } else {\n var d = chroma$4.analyze(_domain);\n if (classes === 0) {\n _classes = [d.min, d.max];\n } else {\n _classes = chroma$4.limits(d, 'e', classes);\n }\n }\n return f;\n }\n return _classes;\n };\n\n\n f.domain = function(domain) {\n if (!arguments.length) {\n return _domain;\n }\n _min = domain[0];\n _max = domain[domain.length-1];\n _pos = [];\n var k = _colors.length;\n if ((domain.length === k) && (_min !== _max)) {\n // update positions\n for (var i = 0, list = Array.from(domain); i < list.length; i += 1) {\n var d = list[i];\n\n _pos.push((d-_min) / (_max-_min));\n }\n } else {\n for (var c=0; c 2) {\n // set domain map\n var tOut = domain.map(function (d,i) { return i/(domain.length-1); });\n var tBreaks = domain.map(function (d) { return (d - _min) / (_max - _min); });\n if (!tBreaks.every(function (val, i) { return tOut[i] === val; })) {\n tMapDomain = function (t) {\n if (t <= 0 || t >= 1) { return t; }\n var i = 0;\n while (t >= tBreaks[i+1]) { i++; }\n var f = (t - tBreaks[i]) / (tBreaks[i+1] - tBreaks[i]);\n var out = tOut[i] + f * (tOut[i+1] - tOut[i]);\n return out;\n };\n }\n\n }\n }\n _domain = [_min, _max];\n return f;\n };\n\n f.mode = function(_m) {\n if (!arguments.length) {\n return _mode;\n }\n _mode = _m;\n resetCache();\n return f;\n };\n\n f.range = function(colors, _pos) {\n setColors(colors);\n return f;\n };\n\n f.out = function(_o) {\n _out = _o;\n return f;\n };\n\n f.spread = function(val) {\n if (!arguments.length) {\n return _spread;\n }\n _spread = val;\n return f;\n };\n\n f.correctLightness = function(v) {\n if (v == null) { v = true; }\n _correctLightness = v;\n resetCache();\n if (_correctLightness) {\n tMapLightness = function(t) {\n var L0 = getColor(0, true).lab()[0];\n var L1 = getColor(1, true).lab()[0];\n var pol = L0 > L1;\n var L_actual = getColor(t, true).lab()[0];\n var L_ideal = L0 + ((L1 - L0) * t);\n var L_diff = L_actual - L_ideal;\n var t0 = 0;\n var t1 = 1;\n var max_iter = 20;\n while ((Math.abs(L_diff) > 1e-2) && (max_iter-- > 0)) {\n (function() {\n if (pol) { L_diff *= -1; }\n if (L_diff < 0) {\n t0 = t;\n t += (t1 - t) * 0.5;\n } else {\n t1 = t;\n t += (t0 - t) * 0.5;\n }\n L_actual = getColor(t, true).lab()[0];\n return L_diff = L_actual - L_ideal;\n })();\n }\n return t;\n };\n } else {\n tMapLightness = function (t) { return t; };\n }\n return f;\n };\n\n f.padding = function(p) {\n if (p != null) {\n if (type$2(p) === 'number') {\n p = [p,p];\n }\n _padding = p;\n return f;\n } else {\n return _padding;\n }\n };\n\n f.colors = function(numColors, out) {\n // If no arguments are given, return the original colors that were provided\n if (arguments.length < 2) { out = 'hex'; }\n var result = [];\n\n if (arguments.length === 0) {\n result = _colors.slice(0);\n\n } else if (numColors === 1) {\n result = [f(0.5)];\n\n } else if (numColors > 1) {\n var dm = _domain[0];\n var dd = _domain[1] - dm;\n result = __range__(0, numColors, false).map(function (i) { return f( dm + ((i/(numColors-1)) * dd) ); });\n\n } else { // returns all colors based on the defined classes\n colors = [];\n var samples = [];\n if (_classes && (_classes.length > 2)) {\n for (var i = 1, end = _classes.length, asc = 1 <= end; asc ? i < end : i > end; asc ? i++ : i--) {\n samples.push((_classes[i-1]+_classes[i])*0.5);\n }\n } else {\n samples = _domain;\n }\n result = samples.map(function (v) { return f(v); });\n }\n\n if (chroma$4[out]) {\n result = result.map(function (c) { return c[out](); });\n }\n return result;\n };\n\n f.cache = function(c) {\n if (c != null) {\n _useCache = c;\n return f;\n } else {\n return _useCache;\n }\n };\n\n f.gamma = function(g) {\n if (g != null) {\n _gamma = g;\n return f;\n } else {\n return _gamma;\n }\n };\n\n f.nodata = function(d) {\n if (d != null) {\n _nacol = chroma$4(d);\n return f;\n } else {\n return _nacol;\n }\n };\n\n return f;\n };\n\n function __range__(left, right, inclusive) {\n var range = [];\n var ascending = left < right;\n var end = !inclusive ? right : ascending ? right + 1 : right - 1;\n for (var i = left; ascending ? i < end : i > end; ascending ? i++ : i--) {\n range.push(i);\n }\n return range;\n }\n\n //\n // interpolates between a set of colors uzing a bezier spline\n //\n\n // @requires utils lab\n var Color$5 = Color_1;\n\n var scale$1 = scale$2;\n\n // nth row of the pascal triangle\n var binom_row = function(n) {\n var row = [1, 1];\n for (var i = 1; i < n; i++) {\n var newrow = [1];\n for (var j = 1; j <= row.length; j++) {\n newrow[j] = (row[j] || 0) + row[j - 1];\n }\n row = newrow;\n }\n return row;\n };\n\n var bezier = function(colors) {\n var assign, assign$1, assign$2;\n\n var I, lab0, lab1, lab2;\n colors = colors.map(function (c) { return new Color$5(c); });\n if (colors.length === 2) {\n // linear interpolation\n (assign = colors.map(function (c) { return c.lab(); }), lab0 = assign[0], lab1 = assign[1]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return lab0[i] + (t * (lab1[i] - lab0[i])); }));\n return new Color$5(lab, 'lab');\n };\n } else if (colors.length === 3) {\n // quadratic bezier interpolation\n (assign$1 = colors.map(function (c) { return c.lab(); }), lab0 = assign$1[0], lab1 = assign$1[1], lab2 = assign$1[2]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return ((1-t)*(1-t) * lab0[i]) + (2 * (1-t) * t * lab1[i]) + (t * t * lab2[i]); }));\n return new Color$5(lab, 'lab');\n };\n } else if (colors.length === 4) {\n // cubic bezier interpolation\n var lab3;\n (assign$2 = colors.map(function (c) { return c.lab(); }), lab0 = assign$2[0], lab1 = assign$2[1], lab2 = assign$2[2], lab3 = assign$2[3]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return ((1-t)*(1-t)*(1-t) * lab0[i]) + (3 * (1-t) * (1-t) * t * lab1[i]) + (3 * (1-t) * t * t * lab2[i]) + (t*t*t * lab3[i]); }));\n return new Color$5(lab, 'lab');\n };\n } else if (colors.length >= 5) {\n // general case (degree n bezier)\n var labs, row, n;\n labs = colors.map(function (c) { return c.lab(); });\n n = colors.length - 1;\n row = binom_row(n);\n I = function (t) {\n var u = 1 - t;\n var lab = ([0, 1, 2].map(function (i) { return labs.reduce(function (sum, el, j) { return (sum + row[j] * Math.pow( u, (n - j) ) * Math.pow( t, j ) * el[i]); }, 0); }));\n return new Color$5(lab, 'lab');\n };\n } else {\n throw new RangeError(\"No point in running bezier with only one color.\")\n }\n return I;\n };\n\n var bezier_1 = function (colors) {\n var f = bezier(colors);\n f.scale = function () { return scale$1(f); };\n return f;\n };\n\n /*\n * interpolates between a set of colors uzing a bezier spline\n * blend mode formulas taken from http://www.venture-ware.com/kevin/coding/lets-learn-math-photoshop-blend-modes/\n */\n\n var chroma$3 = chroma_1;\n\n var blend = function (bottom, top, mode) {\n if (!blend[mode]) {\n throw new Error('unknown blend mode ' + mode);\n }\n return blend[mode](bottom, top);\n };\n\n var blend_f = function (f) { return function (bottom,top) {\n var c0 = chroma$3(top).rgb();\n var c1 = chroma$3(bottom).rgb();\n return chroma$3.rgb(f(c0, c1));\n }; };\n\n var each = function (f) { return function (c0, c1) {\n var out = [];\n out[0] = f(c0[0], c1[0]);\n out[1] = f(c0[1], c1[1]);\n out[2] = f(c0[2], c1[2]);\n return out;\n }; };\n\n var normal = function (a) { return a; };\n var multiply = function (a,b) { return a * b / 255; };\n var darken = function (a,b) { return a > b ? b : a; };\n var lighten = function (a,b) { return a > b ? a : b; };\n var screen = function (a,b) { return 255 * (1 - (1-a/255) * (1-b/255)); };\n var overlay = function (a,b) { return b < 128 ? 2 * a * b / 255 : 255 * (1 - 2 * (1 - a / 255 ) * ( 1 - b / 255 )); };\n var burn = function (a,b) { return 255 * (1 - (1 - b / 255) / (a/255)); };\n var dodge = function (a,b) {\n if (a === 255) { return 255; }\n a = 255 * (b / 255) / (1 - a / 255);\n return a > 255 ? 255 : a\n };\n\n // # add = (a,b) ->\n // # if (a + b > 255) then 255 else a + b\n\n blend.normal = blend_f(each(normal));\n blend.multiply = blend_f(each(multiply));\n blend.screen = blend_f(each(screen));\n blend.overlay = blend_f(each(overlay));\n blend.darken = blend_f(each(darken));\n blend.lighten = blend_f(each(lighten));\n blend.dodge = blend_f(each(dodge));\n blend.burn = blend_f(each(burn));\n // blend.add = blend_f(each(add));\n\n var blend_1 = blend;\n\n // cubehelix interpolation\n // based on D.A. Green \"A colour scheme for the display of astronomical intensity images\"\n // http://astron-soc.in/bulletin/11June/289392011.pdf\n\n var type$1 = utils.type;\n var clip_rgb = utils.clip_rgb;\n var TWOPI = utils.TWOPI;\n var pow$2 = Math.pow;\n var sin$1 = Math.sin;\n var cos$1 = Math.cos;\n var chroma$2 = chroma_1;\n\n var cubehelix = function(start, rotations, hue, gamma, lightness) {\n if ( start === void 0 ) start=300;\n if ( rotations === void 0 ) rotations=-1.5;\n if ( hue === void 0 ) hue=1;\n if ( gamma === void 0 ) gamma=1;\n if ( lightness === void 0 ) lightness=[0,1];\n\n var dh = 0, dl;\n if (type$1(lightness) === 'array') {\n dl = lightness[1] - lightness[0];\n } else {\n dl = 0;\n lightness = [lightness, lightness];\n }\n\n var f = function(fract) {\n var a = TWOPI * (((start+120)/360) + (rotations * fract));\n var l = pow$2(lightness[0] + (dl * fract), gamma);\n var h = dh !== 0 ? hue[0] + (fract * dh) : hue;\n var amp = (h * l * (1-l)) / 2;\n var cos_a = cos$1(a);\n var sin_a = sin$1(a);\n var r = l + (amp * ((-0.14861 * cos_a) + (1.78277* sin_a)));\n var g = l + (amp * ((-0.29227 * cos_a) - (0.90649* sin_a)));\n var b = l + (amp * (+1.97294 * cos_a));\n return chroma$2(clip_rgb([r*255,g*255,b*255,1]));\n };\n\n f.start = function(s) {\n if ((s == null)) { return start; }\n start = s;\n return f;\n };\n\n f.rotations = function(r) {\n if ((r == null)) { return rotations; }\n rotations = r;\n return f;\n };\n\n f.gamma = function(g) {\n if ((g == null)) { return gamma; }\n gamma = g;\n return f;\n };\n\n f.hue = function(h) {\n if ((h == null)) { return hue; }\n hue = h;\n if (type$1(hue) === 'array') {\n dh = hue[1] - hue[0];\n if (dh === 0) { hue = hue[1]; }\n } else {\n dh = 0;\n }\n return f;\n };\n\n f.lightness = function(h) {\n if ((h == null)) { return lightness; }\n if (type$1(h) === 'array') {\n lightness = h;\n dl = h[1] - h[0];\n } else {\n lightness = [h,h];\n dl = 0;\n }\n return f;\n };\n\n f.scale = function () { return chroma$2.scale(f); };\n\n f.hue(hue);\n\n return f;\n };\n\n var Color$4 = Color_1;\n var digits = '0123456789abcdef';\n\n var floor$1 = Math.floor;\n var random = Math.random;\n\n var random_1 = function () {\n var code = '#';\n for (var i=0; i<6; i++) {\n code += digits.charAt(floor$1(random() * 16));\n }\n return new Color$4(code, 'hex');\n };\n\n var type = type$p;\n var log = Math.log;\n var pow$1 = Math.pow;\n var floor = Math.floor;\n var abs$1 = Math.abs;\n\n\n var analyze = function (data, key) {\n if ( key === void 0 ) key=null;\n\n var r = {\n min: Number.MAX_VALUE,\n max: Number.MAX_VALUE*-1,\n sum: 0,\n values: [],\n count: 0\n };\n if (type(data) === 'object') {\n data = Object.values(data);\n }\n data.forEach(function (val) {\n if (key && type(val) === 'object') { val = val[key]; }\n if (val !== undefined && val !== null && !isNaN(val)) {\n r.values.push(val);\n r.sum += val;\n if (val < r.min) { r.min = val; }\n if (val > r.max) { r.max = val; }\n r.count += 1;\n }\n });\n\n r.domain = [r.min, r.max];\n\n r.limits = function (mode, num) { return limits(r, mode, num); };\n\n return r;\n };\n\n\n var limits = function (data, mode, num) {\n if ( mode === void 0 ) mode='equal';\n if ( num === void 0 ) num=7;\n\n if (type(data) == 'array') {\n data = analyze(data);\n }\n var min = data.min;\n var max = data.max;\n var values = data.values.sort(function (a,b) { return a-b; });\n\n if (num === 1) { return [min,max]; }\n\n var limits = [];\n\n if (mode.substr(0,1) === 'c') { // continuous\n limits.push(min);\n limits.push(max);\n }\n\n if (mode.substr(0,1) === 'e') { // equal interval\n limits.push(min);\n for (var i=1; i 0');\n }\n var min_log = Math.LOG10E * log(min);\n var max_log = Math.LOG10E * log(max);\n limits.push(min);\n for (var i$1=1; i$1 pb\n var pr = p - pb;\n limits.push((values[pb]*(1-pr)) + (values[pb+1]*pr));\n }\n }\n limits.push(max);\n\n }\n\n else if (mode.substr(0,1) === 'k') { // k-means clustering\n /*\n implementation based on\n http://code.google.com/p/figue/source/browse/trunk/figue.js#336\n simplified for 1-d input values\n */\n var cluster;\n var n = values.length;\n var assignments = new Array(n);\n var clusterSizes = new Array(num);\n var repeat = true;\n var nb_iters = 0;\n var centroids = null;\n\n // get seed values\n centroids = [];\n centroids.push(min);\n for (var i$3=1; i$3 200) {\n repeat = false;\n }\n }\n\n // finished k-means clustering\n // the next part is borrowed from gabrielflor.it\n var kClusters = {};\n for (var j$5=0; j$5 l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);\n };\n\n var Color$2 = Color_1;\n var sqrt = Math.sqrt;\n var pow = Math.pow;\n var min = Math.min;\n var max = Math.max;\n var atan2 = Math.atan2;\n var abs = Math.abs;\n var cos = Math.cos;\n var sin = Math.sin;\n var exp = Math.exp;\n var PI = Math.PI;\n\n var deltaE = function(a, b, Kl, Kc, Kh) {\n if ( Kl === void 0 ) Kl=1;\n if ( Kc === void 0 ) Kc=1;\n if ( Kh === void 0 ) Kh=1;\n\n // Delta E (CIE 2000)\n // see http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html\n var rad2deg = function(rad) {\n return 360 * rad / (2 * PI);\n };\n var deg2rad = function(deg) {\n return (2 * PI * deg) / 360;\n };\n a = new Color$2(a);\n b = new Color$2(b);\n var ref = Array.from(a.lab());\n var L1 = ref[0];\n var a1 = ref[1];\n var b1 = ref[2];\n var ref$1 = Array.from(b.lab());\n var L2 = ref$1[0];\n var a2 = ref$1[1];\n var b2 = ref$1[2];\n var avgL = (L1 + L2)/2;\n var C1 = sqrt(pow(a1, 2) + pow(b1, 2));\n var C2 = sqrt(pow(a2, 2) + pow(b2, 2));\n var avgC = (C1 + C2)/2;\n var G = 0.5*(1-sqrt(pow(avgC, 7)/(pow(avgC, 7) + pow(25, 7))));\n var a1p = a1*(1+G);\n var a2p = a2*(1+G);\n var C1p = sqrt(pow(a1p, 2) + pow(b1, 2));\n var C2p = sqrt(pow(a2p, 2) + pow(b2, 2));\n var avgCp = (C1p + C2p)/2;\n var arctan1 = rad2deg(atan2(b1, a1p));\n var arctan2 = rad2deg(atan2(b2, a2p));\n var h1p = arctan1 >= 0 ? arctan1 : arctan1 + 360;\n var h2p = arctan2 >= 0 ? arctan2 : arctan2 + 360;\n var avgHp = abs(h1p - h2p) > 180 ? (h1p + h2p + 360)/2 : (h1p + h2p)/2;\n var T = 1 - 0.17*cos(deg2rad(avgHp - 30)) + 0.24*cos(deg2rad(2*avgHp)) + 0.32*cos(deg2rad(3*avgHp + 6)) - 0.2*cos(deg2rad(4*avgHp - 63));\n var deltaHp = h2p - h1p;\n deltaHp = abs(deltaHp) <= 180 ? deltaHp : h2p <= h1p ? deltaHp + 360 : deltaHp - 360;\n deltaHp = 2*sqrt(C1p*C2p)*sin(deg2rad(deltaHp)/2);\n var deltaL = L2 - L1;\n var deltaCp = C2p - C1p; \n var sl = 1 + (0.015*pow(avgL - 50, 2))/sqrt(20 + pow(avgL - 50, 2));\n var sc = 1 + 0.045*avgCp;\n var sh = 1 + 0.015*avgCp*T;\n var deltaTheta = 30*exp(-pow((avgHp - 275)/25, 2));\n var Rc = 2*sqrt(pow(avgCp, 7)/(pow(avgCp, 7) + pow(25, 7)));\n var Rt = -Rc*sin(2*deg2rad(deltaTheta));\n var result = sqrt(pow(deltaL/(Kl*sl), 2) + pow(deltaCp/(Kc*sc), 2) + pow(deltaHp/(Kh*sh), 2) + Rt*(deltaCp/(Kc*sc))*(deltaHp/(Kh*sh)));\n return max(0, min(100, result));\n };\n\n var Color$1 = Color_1;\n\n // simple Euclidean distance\n var distance = function(a, b, mode) {\n if ( mode === void 0 ) mode='lab';\n\n // Delta E (CIE 1976)\n // see http://www.brucelindbloom.com/index.html?Equations.html\n a = new Color$1(a);\n b = new Color$1(b);\n var l1 = a.get(mode);\n var l2 = b.get(mode);\n var sum_sq = 0;\n for (var i in l1) {\n var d = (l1[i] || 0) - (l2[i] || 0);\n sum_sq += d*d;\n }\n return Math.sqrt(sum_sq);\n };\n\n var Color = Color_1;\n\n var valid = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n try {\n new (Function.prototype.bind.apply( Color, [ null ].concat( args) ));\n return true;\n } catch (e) {\n return false;\n }\n };\n\n // some pre-defined color scales:\n var chroma$1 = chroma_1;\n\n var scale = scale$2;\n\n var scales = {\n \tcool: function cool() { return scale([chroma$1.hsl(180,1,.9), chroma$1.hsl(250,.7,.4)]) },\n \thot: function hot() { return scale(['#000','#f00','#ff0','#fff']).mode('rgb') }\n };\n\n /**\n ColorBrewer colors for chroma.js\n\n Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The\n Pennsylvania State University.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software distributed\n under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n CONDITIONS OF ANY KIND, either express or implied. See the License for the\n specific language governing permissions and limitations under the License.\n */\n\n var colorbrewer = {\n // sequential\n OrRd: ['#fff7ec', '#fee8c8', '#fdd49e', '#fdbb84', '#fc8d59', '#ef6548', '#d7301f', '#b30000', '#7f0000'],\n PuBu: ['#fff7fb', '#ece7f2', '#d0d1e6', '#a6bddb', '#74a9cf', '#3690c0', '#0570b0', '#045a8d', '#023858'],\n BuPu: ['#f7fcfd', '#e0ecf4', '#bfd3e6', '#9ebcda', '#8c96c6', '#8c6bb1', '#88419d', '#810f7c', '#4d004b'],\n Oranges: ['#fff5eb', '#fee6ce', '#fdd0a2', '#fdae6b', '#fd8d3c', '#f16913', '#d94801', '#a63603', '#7f2704'],\n BuGn: ['#f7fcfd', '#e5f5f9', '#ccece6', '#99d8c9', '#66c2a4', '#41ae76', '#238b45', '#006d2c', '#00441b'],\n YlOrBr: ['#ffffe5', '#fff7bc', '#fee391', '#fec44f', '#fe9929', '#ec7014', '#cc4c02', '#993404', '#662506'],\n YlGn: ['#ffffe5', '#f7fcb9', '#d9f0a3', '#addd8e', '#78c679', '#41ab5d', '#238443', '#006837', '#004529'],\n Reds: ['#fff5f0', '#fee0d2', '#fcbba1', '#fc9272', '#fb6a4a', '#ef3b2c', '#cb181d', '#a50f15', '#67000d'],\n RdPu: ['#fff7f3', '#fde0dd', '#fcc5c0', '#fa9fb5', '#f768a1', '#dd3497', '#ae017e', '#7a0177', '#49006a'],\n Greens: ['#f7fcf5', '#e5f5e0', '#c7e9c0', '#a1d99b', '#74c476', '#41ab5d', '#238b45', '#006d2c', '#00441b'],\n YlGnBu: ['#ffffd9', '#edf8b1', '#c7e9b4', '#7fcdbb', '#41b6c4', '#1d91c0', '#225ea8', '#253494', '#081d58'],\n Purples: ['#fcfbfd', '#efedf5', '#dadaeb', '#bcbddc', '#9e9ac8', '#807dba', '#6a51a3', '#54278f', '#3f007d'],\n GnBu: ['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081'],\n Greys: ['#ffffff', '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000'],\n YlOrRd: ['#ffffcc', '#ffeda0', '#fed976', '#feb24c', '#fd8d3c', '#fc4e2a', '#e31a1c', '#bd0026', '#800026'],\n PuRd: ['#f7f4f9', '#e7e1ef', '#d4b9da', '#c994c7', '#df65b0', '#e7298a', '#ce1256', '#980043', '#67001f'],\n Blues: ['#f7fbff', '#deebf7', '#c6dbef', '#9ecae1', '#6baed6', '#4292c6', '#2171b5', '#08519c', '#08306b'],\n PuBuGn: ['#fff7fb', '#ece2f0', '#d0d1e6', '#a6bddb', '#67a9cf', '#3690c0', '#02818a', '#016c59', '#014636'],\n Viridis: ['#440154', '#482777', '#3f4a8a', '#31678e', '#26838f', '#1f9d8a', '#6cce5a', '#b6de2b', '#fee825'],\n\n // diverging\n\n Spectral: ['#9e0142', '#d53e4f', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2'],\n RdYlGn: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837'],\n RdBu: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#f7f7f7', '#d1e5f0', '#92c5de', '#4393c3', '#2166ac', '#053061'],\n PiYG: ['#8e0152', '#c51b7d', '#de77ae', '#f1b6da', '#fde0ef', '#f7f7f7', '#e6f5d0', '#b8e186', '#7fbc41', '#4d9221', '#276419'],\n PRGn: ['#40004b', '#762a83', '#9970ab', '#c2a5cf', '#e7d4e8', '#f7f7f7', '#d9f0d3', '#a6dba0', '#5aae61', '#1b7837', '#00441b'],\n RdYlBu: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee090', '#ffffbf', '#e0f3f8', '#abd9e9', '#74add1', '#4575b4', '#313695'],\n BrBG: ['#543005', '#8c510a', '#bf812d', '#dfc27d', '#f6e8c3', '#f5f5f5', '#c7eae5', '#80cdc1', '#35978f', '#01665e', '#003c30'],\n RdGy: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#ffffff', '#e0e0e0', '#bababa', '#878787', '#4d4d4d', '#1a1a1a'],\n PuOr: ['#7f3b08', '#b35806', '#e08214', '#fdb863', '#fee0b6', '#f7f7f7', '#d8daeb', '#b2abd2', '#8073ac', '#542788', '#2d004b'],\n\n // qualitative\n\n Set2: ['#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3'],\n Accent: ['#7fc97f', '#beaed4', '#fdc086', '#ffff99', '#386cb0', '#f0027f', '#bf5b17', '#666666'],\n Set1: ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999'],\n Set3: ['#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f'],\n Dark2: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666'],\n Paired: ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', '#e31a1c', '#fdbf6f', '#ff7f00', '#cab2d6', '#6a3d9a', '#ffff99', '#b15928'],\n Pastel2: ['#b3e2cd', '#fdcdac', '#cbd5e8', '#f4cae4', '#e6f5c9', '#fff2ae', '#f1e2cc', '#cccccc'],\n Pastel1: ['#fbb4ae', '#b3cde3', '#ccebc5', '#decbe4', '#fed9a6', '#ffffcc', '#e5d8bd', '#fddaec', '#f2f2f2'],\n };\n\n // add lowercase aliases for case-insensitive matches\n for (var i = 0, list = Object.keys(colorbrewer); i < list.length; i += 1) {\n var key = list[i];\n\n colorbrewer[key.toLowerCase()] = colorbrewer[key];\n }\n\n var colorbrewer_1 = colorbrewer;\n\n var chroma = chroma_1;\n\n // feel free to comment out anything to rollup\n // a smaller chroma.js built\n\n // io --> convert colors\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // operators --> modify existing Colors\n\n\n\n\n\n\n\n\n\n\n // interpolators\n\n\n\n\n\n\n\n\n\n\n\n\n // generators -- > create new colors\n chroma.average = average;\n chroma.bezier = bezier_1;\n chroma.blend = blend_1;\n chroma.cubehelix = cubehelix;\n chroma.mix = chroma.interpolate = mix$1;\n chroma.random = random_1;\n chroma.scale = scale$2;\n\n // other utility methods\n chroma.analyze = analyze_1.analyze;\n chroma.contrast = contrast;\n chroma.deltaE = deltaE;\n chroma.distance = distance;\n chroma.limits = analyze_1.limits;\n chroma.valid = valid;\n\n // scale\n chroma.scales = scales;\n\n // colors\n chroma.colors = w3cx11_1;\n chroma.brewer = colorbrewer_1;\n\n var chroma_js = chroma;\n\n return chroma_js;\n\n}));\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\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 && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\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 * @typedef Options\n * Configuration for `stringify`.\n * @property {boolean} [padLeft=true]\n * Whether to pad a space before a token.\n * @property {boolean} [padRight=false]\n * Whether to pad a space after a token.\n */\n\n/**\n * @typedef {Options} StringifyOptions\n * Please use `StringifyOptions` instead.\n */\n\n/**\n * Parse comma-separated tokens to an array.\n *\n * @param {string} value\n * Comma-separated tokens.\n * @returns {Array}\n * List of tokens.\n */\nexport function parse(value) {\n /** @type {Array} */\n const tokens = []\n const input = String(value || '')\n let index = input.indexOf(',')\n let start = 0\n /** @type {boolean} */\n let end = false\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n const token = input.slice(start, index).trim()\n\n if (token || !end) {\n tokens.push(token)\n }\n\n start = index + 1\n index = input.indexOf(',', start)\n }\n\n return tokens\n}\n\n/**\n * Serialize an array of strings or numbers to comma-separated tokens.\n *\n * @param {Array} values\n * List of tokens.\n * @param {Options} [options]\n * Configuration for `stringify` (optional).\n * @returns {string}\n * Comma-separated tokens.\n */\nexport function stringify(values, options) {\n const settings = options || {}\n\n // Ensure the last empty entry is seen.\n const input = values[values.length - 1] === '' ? [...values, ''] : values\n\n return input\n .join(\n (settings.padRight ? ' ' : '') +\n ',' +\n (settings.padLeft === false ? '' : ' ')\n )\n .trim()\n}\n","require('../../modules/es7.array.flat-map');\nmodule.exports = require('../../modules/_core').Array.flatMap;\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\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","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\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","// 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","// 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","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\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 target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\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","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","'use strict';\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar isArray = require('./_is-array');\nvar isObject = require('./_is-object');\nvar toLength = require('./_to-length');\nvar ctx = require('./_ctx');\nvar IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable');\n\nfunction flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;\n var element, spreadable;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n spreadable = false;\n if (isObject(element)) {\n spreadable = element[IS_CONCAT_SPREADABLE];\n spreadable = spreadable !== undefined ? !!spreadable : isArray(element);\n }\n\n if (spreadable && depth > 0) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1fffffffffffff) throw TypeError();\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n}\n\nmodule.exports = flattenIntoArray;\n","module.exports = require('./_shared')('native-function-to-string', Function.toString);\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 hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\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","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.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","module.exports = false;\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 global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar $toString = require('./_function-to-string');\nvar TO_STRING = 'toString';\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\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: '© 2020 Denis Pushkarev (zloirock.ru)'\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","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\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 id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\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","'use strict';\n// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap\nvar $export = require('./_export');\nvar flattenIntoArray = require('./_flatten-into-array');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar aFunction = require('./_a-function');\nvar arraySpeciesCreate = require('./_array-species-create');\n\n$export($export.P, 'Array', {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen, A;\n aFunction(callbackfn);\n sourceLen = toLength(O.length);\n A = arraySpeciesCreate(O, 0);\n flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);\n return A;\n }\n});\n\nrequire('./_add-to-unscopables')('flatMap');\n","'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\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\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) {\n value = newValue;\n handlers.forEach(function (handler) {\n return handler(value);\n });\n }\n };\n}\n\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\n\nvar uniqueId = 0;\n\nfunction createReactContext(defaultValue) {\n var _Provider$childContex, _Consumer$contextType;\n\n var contextProp = '__create-react-context-' + uniqueId++ + '__';\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 this.emitter.set(nextProps.value);\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 () {\n _this2.setState({\n value: _this2.getValue()\n });\n }, _temp2), _possibleConstructorReturn(_this2, _ret2);\n }\n\n Consumer.prototype.componentDidMount = function componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\n }\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'];","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".rdw-option-wrapper {\\n border: 1px solid #F1F1F1;\\n padding: 5px;\\n min-width: 25px;\\n height: 20px;\\n border-radius: 2px;\\n margin: 0 4px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-option-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-option-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n.rdw-dropdown-wrapper {\\n height: 30px;\\n background: white;\\n cursor: pointer;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n margin: 0 3px;\\n text-transform: capitalize;\\n background: white;\\n}\\n.rdw-dropdown-wrapper:focus {\\n outline: none;\\n}\\n.rdw-dropdown-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n.rdw-dropdown-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-dropdown-carettoopen {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-top: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-carettoclose {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-bottom: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-selectedtext {\\n display: flex;\\n position: relative;\\n height: 100%;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdown-optionwrapper {\\n z-index: 100;\\n position: relative;\\n border: 1px solid #F1F1F1;\\n width: 98%;\\n background: white;\\n border-radius: 2px;\\n margin: 0;\\n padding: 0;\\n max-height: 250px;\\n overflow-y: scroll;\\n}\\n.rdw-dropdown-optionwrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n.rdw-dropdownoption-default {\\n min-height: 25px;\\n display: flex;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdownoption-highlighted {\\n background: #F1F1F1;\\n}\\n.rdw-dropdownoption-active {\\n background: #f5f5f5;\\n}\\n.rdw-dropdownoption-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n.rdw-inline-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-inline-dropdown {\\n width: 50px;\\n}\\n.rdw-inline-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-block-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-block-dropdown {\\n width: 110px;\\n}\\n.rdw-fontsize-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontsize-dropdown {\\n min-width: 40px;\\n}\\n.rdw-fontsize-option {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-fontfamily-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontfamily-dropdown {\\n width: 115px;\\n}\\n.rdw-fontfamily-placeholder {\\n white-space: nowrap;\\n max-width: 90px;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.rdw-fontfamily-optionwrapper {\\n width: 140px;\\n}\\n.rdw-list-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-list-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-list-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-text-align-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-text-align-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-text-align-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-right-aligned-block {\\n text-align: right;\\n}\\n.rdw-left-aligned-block {\\n text-align: left !important;\\n}\\n.rdw-center-aligned-block {\\n text-align: center !important;\\n}\\n.rdw-justify-aligned-block {\\n text-align: justify !important;\\n}\\n.rdw-right-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-left-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-center-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-justify-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-colorpicker-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-colorpicker-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 175px;\\n height: 175px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-colorpicker-modal-header {\\n display: flex;\\n padding-bottom: 5px;\\n}\\n.rdw-colorpicker-modal-style-label {\\n font-size: 15px;\\n width: 50%;\\n text-align: center;\\n cursor: pointer;\\n padding: 0 10px 5px;\\n}\\n.rdw-colorpicker-modal-style-label-active {\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-colorpicker-modal-options {\\n margin: 5px auto;\\n display: flex;\\n width: 100%;\\n height: 100%;\\n flex-wrap: wrap;\\n overflow: scroll;\\n}\\n.rdw-colorpicker-cube {\\n width: 22px;\\n height: 22px;\\n border: 1px solid #F1F1F1;\\n}\\n.rdw-colorpicker-option {\\n margin: 3px;\\n padding: 0;\\n min-height: 20px;\\n border: none;\\n width: 22px;\\n height: 22px;\\n min-width: 22px;\\n box-shadow: 1px 2px 1px #BFBDBD inset;\\n}\\n.rdw-colorpicker-option:hover {\\n box-shadow: 1px 2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option:active {\\n box-shadow: -1px -2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option-active {\\n box-shadow: 0px 0px 2px 2px #BFBDBD;\\n}\\n.rdw-link-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-link-dropdown {\\n width: 50px;\\n}\\n.rdw-link-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-link-dropdownPlaceholder {\\n margin-left: 8px;\\n}\\n.rdw-link-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 205px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-link-modal-label {\\n font-size: 15px;\\n}\\n.rdw-link-modal-input {\\n margin-top: 5px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n height: 25px;\\n margin-bottom: 15px;\\n padding: 0 5px;\\n}\\n.rdw-link-modal-input:focus {\\n outline: none;\\n}\\n.rdw-link-modal-buttonsection {\\n margin: 0 auto;\\n}\\n.rdw-link-modal-target-option {\\n margin-bottom: 20px;\\n}\\n.rdw-link-modal-target-option > span {\\n margin-left: 5px;\\n}\\n.rdw-link-modal-btn {\\n margin-left: 10px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-link-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-link-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-link-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-link-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-link-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n.rdw-embedded-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-embedded-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n justify-content: space-between;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-embedded-modal-header {\\n font-size: 15px;\\n display: flex;\\n}\\n.rdw-embedded-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-header-label {\\n width: 95px;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-embedded-modal-link-section {\\n display: flex;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-link-input {\\n width: 88%;\\n height: 35px;\\n margin: 10px 0;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-embedded-modal-link-input-wrapper {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-embedded-modal-link-input:focus {\\n outline: none;\\n}\\n.rdw-embedded-modal-btn-section {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-embedded-modal-btn {\\n margin: 0 3px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-embedded-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-embedded-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-embedded-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-embedded-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-embedded-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-embedded-modal-size-input {\\n width: 80%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-embedded-modal-size-input:focus {\\n outline: none;\\n}\\n.rdw-emoji-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-emoji-modal {\\n overflow: auto;\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-wrap: wrap;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-emoji-icon {\\n margin: 2.5px;\\n height: 24px;\\n width: 24px;\\n cursor: pointer;\\n font-size: 22px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n.rdw-spinner {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 100%;\\n width: 100%;\\n}\\n.rdw-spinner > div {\\n width: 12px;\\n height: 12px;\\n background-color: #333;\\n\\n border-radius: 100%;\\n display: inline-block;\\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n}\\n.rdw-spinner .rdw-bounce1 {\\n animation-delay: -0.32s;\\n}\\n.rdw-spinner .rdw-bounce2 {\\n animation-delay: -0.16s;\\n}\\n@keyframes sk-bouncedelay {\\n 0%, 80%, 100% {\\n transform: scale(0);\\n } 40% {\\n transform: scale(1.0);\\n }\\n}\\n.rdw-image-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-image-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-image-modal-header {\\n font-size: 15px;\\n margin: 10px 0;\\n display: flex;\\n}\\n.rdw-image-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-image-modal-header-label {\\n width: 80px;\\n background: #f1f1f1;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n}\\n.rdw-image-modal-header-label-highlighted {\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-image-modal-upload-option {\\n width: 100%;\\n color: gray;\\n cursor: pointer;\\n display: flex;\\n border: none;\\n font-size: 15px;\\n align-items: center;\\n justify-content: center;\\n background-color: #f1f1f1;\\n outline: 2px dashed gray;\\n outline-offset: -10px;\\n margin: 10px 0;\\n padding: 9px 0;\\n}\\n.rdw-image-modal-upload-option-highlighted {\\n outline: 2px dashed #0a66b7;\\n}\\n.rdw-image-modal-upload-option-label {\\n cursor: pointer;\\n height: 100%;\\n width: 100%;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n padding: 15px;\\n}\\n.rdw-image-modal-upload-option-label span{\\n padding: 0 20px;\\n}\\n.rdw-image-modal-upload-option-image-preview {\\n max-width: 100%;\\n max-height: 200px;\\n}\\n.rdw-image-modal-upload-option-input {\\n\\twidth: 0.1px;\\n\\theight: 0.1px;\\n\\topacity: 0;\\n\\toverflow: hidden;\\n\\tposition: absolute;\\n\\tz-index: -1;\\n}\\n.rdw-image-modal-url-section {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-image-modal-url-input {\\n width: 90%;\\n height: 35px;\\n margin: 15px 0 12px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-image-modal-btn-section {\\n margin: 10px auto 0;\\n}\\n.rdw-image-modal-url-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-btn {\\n margin: 0 5px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-image-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-image-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-image-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-image-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-image-modal-spinner {\\n position: absolute;\\n top: -3px;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n opacity: 0.5;\\n}\\n.rdw-image-modal-alt-input {\\n width: 70%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n margin-left: 5px;\\n}\\n.rdw-image-modal-alt-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-alt-lbl {\\n font-size: 12px;\\n}\\n.rdw-image-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-image-modal-size-input {\\n width: 40%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-image-modal-size-input:focus {\\n outline: none;\\n}\\n.rdw-image-mandatory-sign {\\n color: red;\\n margin-left: 3px;\\n margin-right: 3px;\\n}\\n.rdw-remove-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-history-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-history-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n.rdw-link-decorator-wrapper {\\n position: relative;\\n}\\n.rdw-link-decorator-icon {\\n position: absolute;\\n left: 40%;\\n top: 0;\\n cursor: pointer;\\n background-color: white;\\n}\\n.rdw-mention-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n.rdw-suggestion-wrapper {\\n position: relative;\\n}\\n.rdw-suggestion-dropdown {\\n position: absolute;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid #F1F1F1;\\n min-width: 100px;\\n max-height: 150px;\\n overflow: auto;\\n background: white;\\n z-index: 100;\\n}\\n.rdw-suggestion-option {\\n padding: 7px 5px;\\n border-bottom: 1px solid #f1f1f1;\\n}\\n.rdw-suggestion-option-active {\\n background-color: #F1F1F1;\\n}\\n.rdw-hashtag-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n.rdw-image-alignment-options-popup {\\n position: absolute;\\n background: white;\\n display: flex;\\n padding: 5px 2px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n width: 105px;\\n cursor: pointer;\\n z-index: 100;\\n}\\n.rdw-alignment-option-left {\\n justify-content: flex-start;\\n}\\n.rdw-image-alignment-option {\\n height: 15px;\\n width: 15px;\\n min-width: 15px;\\n}\\n.rdw-image-alignment {\\n position: relative;\\n}\\n.rdw-image-imagewrapper {\\n position: relative;\\n}\\n.rdw-image-center {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-image-left {\\n display: flex;\\n}\\n.rdw-image-right {\\n display: flex;\\n justify-content: flex-end;\\n}\\n.rdw-image-alignment-options-popup-right {\\n right: 0;\\n}\\n.rdw-editor-main {\\n height: 100%;\\n overflow: auto;\\n box-sizing: border-box;\\n}\\n.rdw-editor-toolbar {\\n padding: 6px 5px 0;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n display: flex;\\n justify-content: flex-start;\\n background: white;\\n flex-wrap: wrap;\\n font-size: 15px;\\n margin-bottom: 5px;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n user-select: none;\\n}\\n.public-DraftStyleDefault-block {\\n margin: 1em 0;\\n}\\n.rdw-editor-wrapper:focus {\\n outline: none;\\n}\\n.rdw-editor-wrapper {\\n box-sizing: content-box;\\n}\\n.rdw-editor-main blockquote {\\n border-left: 5px solid #f1f1f1;\\n padding-left: 5px;\\n}\\n.rdw-editor-main pre {\\n background: #f1f1f1;\\n border-radius: 3px;\\n padding: 1px 10px;\\n}\\n/**\\n * Draft v0.9.1\\n *\\n * Copyright (c) 2013-present, 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.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:left;text-align:initial}\\n.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}\\n.DraftEditor-root{position:relative}\\n.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}\\n.public-DraftEditor-block{position:relative}\\n.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}\\n.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}\\n.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}\\n.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}\\n.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}\\n.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}\\n.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:0}\\n.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}\\n.DraftEditorPlaceholder-hidden{display:none}\\n.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}\\n.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}\\n.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}\\n.public-DraftStyleDefault-listLTR{direction:ltr}\\n.public-DraftStyleDefault-listRTL{direction:rtl}\\n.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}\\n.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}\\n.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}\\n.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}\\n.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}\\n.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}\\n.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}\\n.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}\\n.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}\\n.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}\\n.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}\\n.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}\\n.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}\\n.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}\\n.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}\\n.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}\\n.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}\\n.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) \\\". \\\";counter-increment:ol0}\\n.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) \\\". \\\";counter-increment:ol1}\\n.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) \\\". \\\";counter-increment:ol2}\\n.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) \\\". \\\";counter-increment:ol3}\\n.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) \\\". \\\";counter-increment:ol4}\\n.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}\\n.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}\\n.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}\\n.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}\\n.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4}\\n/*# sourceMappingURL=react-draft-wysiwyg.css.map*/\", \"\",{\"version\":3,\"sources\":[\"webpack://reactDraftWysiwyg/src/components/Option/styles.css\",\"webpack://reactDraftWysiwyg/src/components/Dropdown/Dropdown/styles.css\",\"webpack://reactDraftWysiwyg/src/components/Dropdown/DropdownOption/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/Inline/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/BlockType/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/FontSize/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/FontFamily/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/List/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/TextAlign/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/ColorPicker/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/Link/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/Embedded/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/Emoji/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/components/Spinner/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/Image/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/Remove/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/controls/History/Component/styles.css\",\"webpack://reactDraftWysiwyg/src/decorators/Link/styles.css\",\"webpack://reactDraftWysiwyg/src/decorators/Mention/Mention/styles.css\",\"webpack://reactDraftWysiwyg/src/decorators/Mention/Suggestion/styles.css\",\"webpack://reactDraftWysiwyg/src/decorators/HashTag/styles.css\",\"webpack://reactDraftWysiwyg/src/renderer/Image/styles.css\",\"webpack://reactDraftWysiwyg/src/Editor/styles.css\",\"webpack://reactDraftWysiwyg/css/Draft.css\",\"react-draft-wysiwyg.css\"],\"names\":[],\"mappings\":\"AAAA;EACA,yBAAA;EACA,YAAA;EACA,eAAA;EACA,YAAA;EACA,kBAAA;EACA,aAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,iBAAA;EACA,0BAAA;AACA;AACA;EACA,+BAAA;AACA;AACA;EACA,qCAAA;AACA;AACA;EACA,qCAAA;AACA;AACA;EACA,YAAA;EACA,eAAA;AACA;AC1BA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,yBAAA;EACA,kBAAA;EACA,aAAA;EACA,0BAAA;EACA,iBAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,+BAAA;EACA,yBAAA;AACA;AACA;EACA,qCAAA;AACA;AACA;EACA,WAAA;EACA,UAAA;EACA,kBAAA;EACA,QAAA;EACA,UAAA;EACA,2BAAA;EACA,kCAAA;EACA,mCAAA;AACA;AACA;EACA,WAAA;EACA,UAAA;EACA,kBAAA;EACA,QAAA;EACA,UAAA;EACA,8BAAA;EACA,kCAAA;EACA,mCAAA;AACA;AACA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,mBAAA;EACA,cAAA;AACA;AACA;EACA,YAAA;EACA,kBAAA;EACA,yBAAA;EACA,UAAA;EACA,iBAAA;EACA,kBAAA;EACA,SAAA;EACA,UAAA;EACA,iBAAA;EACA,kBAAA;AACA;AACA;EACA,+BAAA;EACA,yBAAA;AACA;AC9DA;EACA,gBAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,YAAA;EACA,eAAA;AACA;ACfA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,WAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;AACA;ACbA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,YAAA;AACA;ACRA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,eAAA;AACA;AACA;EACA,aAAA;EACA,uBAAA;AACA;ACZA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,YAAA;AACA;AACA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,uBAAA;AACA;AACA;EACA,YAAA;AACA;ACjBA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,WAAA;EACA,WAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;AACA;ACdA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,WAAA;EACA,WAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;AACA;AACA;EACA,iBAAA;AACA;AACA;EACA,2BAAA;AACA;AACA;EACA,6BAAA;AACA;AACA;EACA,8BAAA;AACA;AACA;EACA,qBAAA;AACA;AACA;EACA,qBAAA;AACA;AACA;EACA,qBAAA;AACA;AACA;EACA,qBAAA;AACA;ACtCA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,aAAA;EACA,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,iBAAA;EACA,+BAAA;AACA;AACA;EACA,aAAA;EACA,mBAAA;AACA;AACA;EACA,eAAA;EACA,UAAA;EACA,kBAAA;EACA,eAAA;EACA,mBAAA;AACA;AACA;EACA,gCAAA;AACA;AACA;EACA,gBAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,gBAAA;AACA;AACA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;AACA;AACA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,qCAAA;AACA;AACA;EACA,+BAAA;AACA;AACA;EACA,iCAAA;AACA;AACA;EACA,mCAAA;AACA;ACnEA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,WAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;AACA;AACA;EACA,gBAAA;AACA;AACA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,aAAA;EACA,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,iBAAA;EACA,+BAAA;AACA;AACA;EACA,eAAA;AACA;AACA;EACA,eAAA;EACA,kBAAA;EACA,yBAAA;EACA,YAAA;EACA,mBAAA;EACA,cAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,cAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,gBAAA;AACA;AACA;EACA,iBAAA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;EACA,iBAAA;EACA,0BAAA;AACA;AACA;EACA,+BAAA;AACA;AACA;EACA,qCAAA;AACA;AACA;EACA,wBAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;AACA;AACA;EACA,WAAA;AACA;ACrFA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,aAAA;EACA,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,iBAAA;EACA,8BAAA;EACA,+BAAA;AACA;AACA;EACA,eAAA;EACA,aAAA;AACA;AACA;EACA,UAAA;EACA,eAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,sBAAA;AACA;AACA;EACA,WAAA;EACA,yBAAA;EACA,eAAA;EACA,mBAAA;EACA,gCAAA;AACA;AACA;EACA,aAAA;EACA,sBAAA;AACA;AACA;EACA,UAAA;EACA,YAAA;EACA,cAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;EACA,cAAA;AACA;AACA;EACA,aAAA;EACA,mBAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,aAAA;EACA,uBAAA;AACA;AACA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;EACA,iBAAA;EACA,0BAAA;AACA;AACA;EACA,+BAAA;AACA;AACA;EACA,qCAAA;AACA;AACA;EACA,wBAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,mBAAA;EACA,aAAA;EACA,aAAA;EACA,8BAAA;AACA;AACA;EACA,UAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;AACA;AACA;EACA,aAAA;AACA;ACvGA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,cAAA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,iBAAA;EACA,+BAAA;AACA;AACA;EACA,aAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;EACA,eAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;AACA;AChCA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,YAAA;EACA,WAAA;AACA;AACA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;;EAEA,mBAAA;EACA,qBAAA;EAEA,wDAAA;AACA;AACA;EAEA,uBAAA;AACA;AACA;EAEA,uBAAA;AACA;AAKA;EACA;IAEA,mBAAA;EACA,EAAG;IAEH,qBAAA;EACA;AACA;ACrCA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,iBAAA;EACA,+BAAA;AACA;AACA;EACA,eAAA;EACA,cAAA;EACA,aAAA;AACA;AACA;EACA,UAAA;EACA,eAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,sBAAA;AACA;AACA;EACA,WAAA;EACA,mBAAA;EACA,yBAAA;EACA,eAAA;AACA;AACA;EACA,mBAAA;EACA,gCAAA;AACA;AACA;EACA,WAAA;EACA,WAAA;EACA,eAAA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,mBAAA;EACA,uBAAA;EACA,yBAAA;EACA,wBAAA;EACA,qBAAA;EACA,cAAA;EACA,cAAA;AACA;AACA;EACA,2BAAA;AACA;AACA;EACA,eAAA;EACA,YAAA;EACA,WAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,aAAA;AACA;AACA;EACA,eAAA;AACA;AACA;EACA,eAAA;EACA,iBAAA;AACA;AACA;CACA,YAAA;CACA,aAAA;CACA,UAAA;CACA,gBAAA;CACA,kBAAA;CACA,WAAA;AACA;AACA;EACA,aAAA;EACA,mBAAA;AACA;AACA;EACA,UAAA;EACA,YAAA;EACA,mBAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;EACA,cAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;EACA,iBAAA;EACA,0BAAA;AACA;AACA;EACA,+BAAA;AACA;AACA;EACA,qCAAA;AACA;AACA;EACA,wBAAA;AACA;AACA;EACA,mBAAA;AACA;AACA;EACA,kBAAA;EACA,SAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;AACA;AACA;EACA,UAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,eAAA;AACA;AACA;EACA,mBAAA;EACA,aAAA;EACA,aAAA;EACA,8BAAA;AACA;AACA;EACA,UAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,eAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,UAAA;EACA,gBAAA;EACA,iBAAA;AACA;ACzKA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,kBAAA;EACA;AACA;ACNA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA;AACA;AACA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;AACA;AACA;EACA,WAAA;AACA;ACbA;EACA,kBAAA;AACA;AACA;EACA,kBAAA;EACA,SAAA;EACA,MAAA;EACA,eAAA;EACA,uBAAA;AACA;ACTA;EACA,qBAAA;EACA,cAAA;EACA,yBAAA;EACA,gBAAA;EACA,kBAAA;AACA;ACNA;EACA,kBAAA;AACA;AACA;EACA,kBAAA;EACA,aAAA;EACA,sBAAA;EACA,yBAAA;EACA,gBAAA;EACA,iBAAA;EACA,cAAA;EACA,iBAAA;EACA,YAAA;AACA;AACA;EACA,gBAAA;EACA,gCAAA;AACA;AACA;EACA,yBAAA;AACA;ACpBA;EACA,qBAAA;EACA,cAAA;EACA,yBAAA;EACA,gBAAA;EACA,kBAAA;AACA;ACNA;EACA,kBAAA;EACA,iBAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,yBAAA;EACA,YAAA;EACA,eAAA;EACA,YAAA;AACA;AACA;EACA,2BAAA;AACA;AACA;EACA,YAAA;EACA,WAAA;EACA,eAAA;AACA;AACA;EACA,kBAAA;AACA;AACA;EACA,kBAAA;AACA;AACA;EACA,aAAA;EACA,uBAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,aAAA;EACA,yBAAA;AACA;AACA;EACA,QAAA;AACA;ACtCA;EACA,YAAA;EACA,cAAA;EACA,sBAAA;AACA;AACA;EACA,kBAAA;EACA,kBAAA;EACA,yBAAA;EACA,aAAA;EACA,2BAAA;EACA,iBAAA;EACA,eAAA;EACA,eAAA;EACA,kBAAA;EACA,yBAAA;KAAA,sBAAA;UAAA,iBAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,aAAA;AACA;AACA;EACA,uBAAA;AACA;AACA;EACA,8BAAA;EACA,iBAAA;AACA;AACA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;AACA;AClCA;;;;;;;;;EASA;AACA,2EAA2E,cAAA,CAAe,eAAA,CAAA,kBAAA;AAAmB,kDAAkD,6CAAA;AAA8C,kBAAkB,iBAAA;AAAkB,6BAA6B,oCAAA,CAAqC,kCAAA,CAAmC,iBAAA,CAAkB,SAAA;AAAU,0BAA0B,iBAAA;AAAkB,uDAAuD,eAAA;AAAgB,2DAA2D,MAAA,CAAO,eAAA;AAAgB,yDAAyD,iBAAA;AAAkB,6DAA6D,aAAA,CAAc,iBAAA,CAAkB,UAAA;AAAW,wDAAwD,gBAAA;AAAiB,4DAA4D,OAAA,CAAQ,gBAAA;AAAiB,oCAAoC,aAAA,CAAc,iBAAA,CAAkB,SAAA;AAAU,wCAAwC,aAAA;AAAc,+BAA+B,YAAA;AAAa,gCAAgC,iBAAA,CAAkB,oBAAA;AAAqB,8BAA8B,aAAA,CAAc,eAAA;AAAgB,8BAA8B,aAAA,CAAc,gBAAA;AAAiB,kCAAkC,aAAA;AAAc,kCAAkC,aAAA;AAAc,0DAA0D,aAAA,CAAc,SAAA;AAAU,kEAAkE,iBAAA;AAAkB,kEAAkE,kBAAA;AAAmB,kEAAkE,eAAA;AAAgB,kEAAkE,gBAAA;AAAiB,kEAAkE,iBAAA;AAAkB,kEAAkE,kBAAA;AAAmB,kEAAkE,eAAA;AAAgB,kEAAkE,gBAAA;AAAiB,kEAAkE,iBAAA;AAAkB,kEAAkE,kBAAA;AAAmB,4CAA4C,sBAAA,CAAuB,iBAAA;AAAkB,4EAA4E,oBAAA;AAAqB,4EAA4E,sBAAA;AAAuB,0CAA0C,oBAAA,CAAqB,iBAAA;AAAkB,kFAAkF,UAAA,CAAW,iBAAA,CAAkB,gBAAA,CAAiB,UAAA;AAAW,kFAAkF,iBAAA,CAAkB,WAAA,CAAY,eAAA,CAAgB,UAAA;AAAW,iDAAiD,yBAAA,CAA0B,qBAAA;AAAsB,iFAAiF,yBAAA,CAA0B,qBAAA;AAAsB,iFAAiF,yBAAA,CAA0B,qBAAA;AAAsB,iFAAiF,yBAAA,CAA0B,qBAAA;AAAsB,iFAAiF,yBAAA,CAA0B,qBAAA;AAAsB,gEAAgE,iBAAA;AAAkB,gEAAgE,iBAAA;AAAkB,gEAAgE,iBAAA;AAAkB,gEAAgE,iBAAA;AAAkB,gEAAgE,iBAAA;AC82B51H,iDAAiD\",\"file\":\"react-draft-wysiwyg.css\",\"sourcesContent\":[\".rdw-option-wrapper {\\n border: 1px solid #F1F1F1;\\n padding: 5px;\\n min-width: 25px;\\n height: 20px;\\n border-radius: 2px;\\n margin: 0 4px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-option-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-option-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n\",\".rdw-dropdown-wrapper {\\n height: 30px;\\n background: white;\\n cursor: pointer;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n margin: 0 3px;\\n text-transform: capitalize;\\n background: white;\\n}\\n.rdw-dropdown-wrapper:focus {\\n outline: none;\\n}\\n.rdw-dropdown-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n.rdw-dropdown-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-dropdown-carettoopen {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-top: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-carettoclose {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-bottom: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-selectedtext {\\n display: flex;\\n position: relative;\\n height: 100%;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdown-optionwrapper {\\n z-index: 100;\\n position: relative;\\n border: 1px solid #F1F1F1;\\n width: 98%;\\n background: white;\\n border-radius: 2px;\\n margin: 0;\\n padding: 0;\\n max-height: 250px;\\n overflow-y: scroll;\\n}\\n.rdw-dropdown-optionwrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n\",\".rdw-dropdownoption-default {\\n min-height: 25px;\\n display: flex;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdownoption-highlighted {\\n background: #F1F1F1;\\n}\\n.rdw-dropdownoption-active {\\n background: #f5f5f5;\\n}\\n.rdw-dropdownoption-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n\",\".rdw-inline-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-inline-dropdown {\\n width: 50px;\\n}\\n.rdw-inline-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n\",\".rdw-block-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-block-dropdown {\\n width: 110px;\\n}\\n\",\".rdw-fontsize-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontsize-dropdown {\\n min-width: 40px;\\n}\\n.rdw-fontsize-option {\\n display: flex;\\n justify-content: center;\\n}\\n\",\".rdw-fontfamily-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontfamily-dropdown {\\n width: 115px;\\n}\\n.rdw-fontfamily-placeholder {\\n white-space: nowrap;\\n max-width: 90px;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.rdw-fontfamily-optionwrapper {\\n width: 140px;\\n}\\n\",\".rdw-list-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-list-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-list-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n\",\".rdw-text-align-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-text-align-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-text-align-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-right-aligned-block {\\n text-align: right;\\n}\\n.rdw-left-aligned-block {\\n text-align: left !important;\\n}\\n.rdw-center-aligned-block {\\n text-align: center !important;\\n}\\n.rdw-justify-aligned-block {\\n text-align: justify !important;\\n}\\n.rdw-right-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-left-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-center-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-justify-aligned-block > div {\\n display: inline-block;\\n}\\n\",\".rdw-colorpicker-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-colorpicker-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 175px;\\n height: 175px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-colorpicker-modal-header {\\n display: flex;\\n padding-bottom: 5px;\\n}\\n.rdw-colorpicker-modal-style-label {\\n font-size: 15px;\\n width: 50%;\\n text-align: center;\\n cursor: pointer;\\n padding: 0 10px 5px;\\n}\\n.rdw-colorpicker-modal-style-label-active {\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-colorpicker-modal-options {\\n margin: 5px auto;\\n display: flex;\\n width: 100%;\\n height: 100%;\\n flex-wrap: wrap;\\n overflow: scroll;\\n}\\n.rdw-colorpicker-cube {\\n width: 22px;\\n height: 22px;\\n border: 1px solid #F1F1F1;\\n}\\n.rdw-colorpicker-option {\\n margin: 3px;\\n padding: 0;\\n min-height: 20px;\\n border: none;\\n width: 22px;\\n height: 22px;\\n min-width: 22px;\\n box-shadow: 1px 2px 1px #BFBDBD inset;\\n}\\n.rdw-colorpicker-option:hover {\\n box-shadow: 1px 2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option:active {\\n box-shadow: -1px -2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option-active {\\n box-shadow: 0px 0px 2px 2px #BFBDBD;\\n}\\n\",\".rdw-link-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-link-dropdown {\\n width: 50px;\\n}\\n.rdw-link-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-link-dropdownPlaceholder {\\n margin-left: 8px;\\n}\\n.rdw-link-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 205px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-link-modal-label {\\n font-size: 15px;\\n}\\n.rdw-link-modal-input {\\n margin-top: 5px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n height: 25px;\\n margin-bottom: 15px;\\n padding: 0 5px;\\n}\\n.rdw-link-modal-input:focus {\\n outline: none;\\n}\\n.rdw-link-modal-buttonsection {\\n margin: 0 auto;\\n}\\n.rdw-link-modal-target-option {\\n margin-bottom: 20px;\\n}\\n.rdw-link-modal-target-option > span {\\n margin-left: 5px;\\n}\\n.rdw-link-modal-btn {\\n margin-left: 10px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-link-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-link-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-link-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-link-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-link-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n\",\".rdw-embedded-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-embedded-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n justify-content: space-between;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-embedded-modal-header {\\n font-size: 15px;\\n display: flex;\\n}\\n.rdw-embedded-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-header-label {\\n width: 95px;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-embedded-modal-link-section {\\n display: flex;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-link-input {\\n width: 88%;\\n height: 35px;\\n margin: 10px 0;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-embedded-modal-link-input-wrapper {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-embedded-modal-link-input:focus {\\n outline: none;\\n}\\n.rdw-embedded-modal-btn-section {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-embedded-modal-btn {\\n margin: 0 3px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-embedded-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-embedded-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-embedded-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-embedded-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-embedded-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-embedded-modal-size-input {\\n width: 80%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-embedded-modal-size-input:focus {\\n outline: none;\\n}\\n\",\".rdw-emoji-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-emoji-modal {\\n overflow: auto;\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-wrap: wrap;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-emoji-icon {\\n margin: 2.5px;\\n height: 24px;\\n width: 24px;\\n cursor: pointer;\\n font-size: 22px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\",\".rdw-spinner {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 100%;\\n width: 100%;\\n}\\n.rdw-spinner > div {\\n width: 12px;\\n height: 12px;\\n background-color: #333;\\n\\n border-radius: 100%;\\n display: inline-block;\\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n}\\n.rdw-spinner .rdw-bounce1 {\\n -webkit-animation-delay: -0.32s;\\n animation-delay: -0.32s;\\n}\\n.rdw-spinner .rdw-bounce2 {\\n -webkit-animation-delay: -0.16s;\\n animation-delay: -0.16s;\\n}\\n@-webkit-keyframes sk-bouncedelay {\\n 0%, 80%, 100% { -webkit-transform: scale(0) }\\n 40% { -webkit-transform: scale(1.0) }\\n}\\n@keyframes sk-bouncedelay {\\n 0%, 80%, 100% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n } 40% {\\n -webkit-transform: scale(1.0);\\n transform: scale(1.0);\\n }\\n}\\n\",\".rdw-image-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-image-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-image-modal-header {\\n font-size: 15px;\\n margin: 10px 0;\\n display: flex;\\n}\\n.rdw-image-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-image-modal-header-label {\\n width: 80px;\\n background: #f1f1f1;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n}\\n.rdw-image-modal-header-label-highlighted {\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-image-modal-upload-option {\\n width: 100%;\\n color: gray;\\n cursor: pointer;\\n display: flex;\\n border: none;\\n font-size: 15px;\\n align-items: center;\\n justify-content: center;\\n background-color: #f1f1f1;\\n outline: 2px dashed gray;\\n outline-offset: -10px;\\n margin: 10px 0;\\n padding: 9px 0;\\n}\\n.rdw-image-modal-upload-option-highlighted {\\n outline: 2px dashed #0a66b7;\\n}\\n.rdw-image-modal-upload-option-label {\\n cursor: pointer;\\n height: 100%;\\n width: 100%;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n padding: 15px;\\n}\\n.rdw-image-modal-upload-option-label span{\\n padding: 0 20px;\\n}\\n.rdw-image-modal-upload-option-image-preview {\\n max-width: 100%;\\n max-height: 200px;\\n}\\n.rdw-image-modal-upload-option-input {\\n\\twidth: 0.1px;\\n\\theight: 0.1px;\\n\\topacity: 0;\\n\\toverflow: hidden;\\n\\tposition: absolute;\\n\\tz-index: -1;\\n}\\n.rdw-image-modal-url-section {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-image-modal-url-input {\\n width: 90%;\\n height: 35px;\\n margin: 15px 0 12px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-image-modal-btn-section {\\n margin: 10px auto 0;\\n}\\n.rdw-image-modal-url-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-btn {\\n margin: 0 5px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-image-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-image-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-image-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-image-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-image-modal-spinner {\\n position: absolute;\\n top: -3px;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n opacity: 0.5;\\n}\\n.rdw-image-modal-alt-input {\\n width: 70%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n margin-left: 5px;\\n}\\n.rdw-image-modal-alt-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-alt-lbl {\\n font-size: 12px;\\n}\\n.rdw-image-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-image-modal-size-input {\\n width: 40%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-image-modal-size-input:focus {\\n outline: none;\\n}\\n.rdw-image-mandatory-sign {\\n color: red;\\n margin-left: 3px;\\n margin-right: 3px;\\n}\\n\",\".rdw-remove-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n\",\".rdw-history-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-history-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n\",\".rdw-link-decorator-wrapper {\\n position: relative;\\n}\\n.rdw-link-decorator-icon {\\n position: absolute;\\n left: 40%;\\n top: 0;\\n cursor: pointer;\\n background-color: white;\\n}\\n\",\".rdw-mention-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n\",\".rdw-suggestion-wrapper {\\n position: relative;\\n}\\n.rdw-suggestion-dropdown {\\n position: absolute;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid #F1F1F1;\\n min-width: 100px;\\n max-height: 150px;\\n overflow: auto;\\n background: white;\\n z-index: 100;\\n}\\n.rdw-suggestion-option {\\n padding: 7px 5px;\\n border-bottom: 1px solid #f1f1f1;\\n}\\n.rdw-suggestion-option-active {\\n background-color: #F1F1F1;\\n}\\n\",\".rdw-hashtag-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n\",\".rdw-image-alignment-options-popup {\\n position: absolute;\\n background: white;\\n display: flex;\\n padding: 5px 2px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n width: 105px;\\n cursor: pointer;\\n z-index: 100;\\n}\\n.rdw-alignment-option-left {\\n justify-content: flex-start;\\n}\\n.rdw-image-alignment-option {\\n height: 15px;\\n width: 15px;\\n min-width: 15px;\\n}\\n.rdw-image-alignment {\\n position: relative;\\n}\\n.rdw-image-imagewrapper {\\n position: relative;\\n}\\n.rdw-image-center {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-image-left {\\n display: flex;\\n}\\n.rdw-image-right {\\n display: flex;\\n justify-content: flex-end;\\n}\\n.rdw-image-alignment-options-popup-right {\\n right: 0;\\n}\\n\",\".rdw-editor-main {\\n height: 100%;\\n overflow: auto;\\n box-sizing: border-box;\\n}\\n.rdw-editor-toolbar {\\n padding: 6px 5px 0;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n display: flex;\\n justify-content: flex-start;\\n background: white;\\n flex-wrap: wrap;\\n font-size: 15px;\\n margin-bottom: 5px;\\n user-select: none;\\n}\\n.public-DraftStyleDefault-block {\\n margin: 1em 0;\\n}\\n.rdw-editor-wrapper:focus {\\n outline: none;\\n}\\n.rdw-editor-wrapper {\\n box-sizing: content-box;\\n}\\n.rdw-editor-main blockquote {\\n border-left: 5px solid #f1f1f1;\\n padding-left: 5px;\\n}\\n.rdw-editor-main pre {\\n background: #f1f1f1;\\n border-radius: 3px;\\n padding: 1px 10px;\\n}\",\"/**\\n * Draft v0.9.1\\n *\\n * Copyright (c) 2013-present, 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.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:0}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) \\\". \\\";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) \\\". \\\";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) \\\". \\\";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) \\\". \\\";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) \\\". \\\";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4}\\n\",\".rdw-option-wrapper {\\n border: 1px solid #F1F1F1;\\n padding: 5px;\\n min-width: 25px;\\n height: 20px;\\n border-radius: 2px;\\n margin: 0 4px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-option-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-option-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-option-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n\\n.rdw-dropdown-wrapper {\\n height: 30px;\\n background: white;\\n cursor: pointer;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n margin: 0 3px;\\n text-transform: capitalize;\\n background: white;\\n}\\n.rdw-dropdown-wrapper:focus {\\n outline: none;\\n}\\n.rdw-dropdown-wrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n.rdw-dropdown-wrapper:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-dropdown-carettoopen {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-top: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-carettoclose {\\n height: 0px;\\n width: 0px;\\n position: absolute;\\n top: 35%;\\n right: 10%;\\n border-bottom: 6px solid black;\\n border-left: 5px solid transparent;\\n border-right: 5px solid transparent;\\n}\\n.rdw-dropdown-selectedtext {\\n display: flex;\\n position: relative;\\n height: 100%;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdown-optionwrapper {\\n z-index: 100;\\n position: relative;\\n border: 1px solid #F1F1F1;\\n width: 98%;\\n background: white;\\n border-radius: 2px;\\n margin: 0;\\n padding: 0;\\n max-height: 250px;\\n overflow-y: scroll;\\n}\\n.rdw-dropdown-optionwrapper:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n background-color: #FFFFFF;\\n}\\n\\n.rdw-dropdownoption-default {\\n min-height: 25px;\\n display: flex;\\n align-items: center;\\n padding: 0 5px;\\n}\\n.rdw-dropdownoption-highlighted {\\n background: #F1F1F1;\\n}\\n.rdw-dropdownoption-active {\\n background: #f5f5f5;\\n}\\n.rdw-dropdownoption-disabled {\\n opacity: 0.3;\\n cursor: default;\\n}\\n\\n.rdw-inline-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-inline-dropdown {\\n width: 50px;\\n}\\n.rdw-inline-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.rdw-block-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-block-dropdown {\\n width: 110px;\\n}\\n\\n.rdw-fontsize-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontsize-dropdown {\\n min-width: 40px;\\n}\\n.rdw-fontsize-option {\\n display: flex;\\n justify-content: center;\\n}\\n\\n.rdw-fontfamily-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-fontfamily-dropdown {\\n width: 115px;\\n}\\n.rdw-fontfamily-placeholder {\\n white-space: nowrap;\\n max-width: 90px;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.rdw-fontfamily-optionwrapper {\\n width: 140px;\\n}\\n\\n.rdw-list-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-list-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-list-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.rdw-text-align-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-text-align-dropdown {\\n width: 50px;\\n z-index: 90;\\n}\\n.rdw-text-align-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-right-aligned-block {\\n text-align: right;\\n}\\n.rdw-left-aligned-block {\\n text-align: left !important;\\n}\\n.rdw-center-aligned-block {\\n text-align: center !important;\\n}\\n.rdw-justify-aligned-block {\\n text-align: justify !important;\\n}\\n.rdw-right-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-left-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-center-aligned-block > div {\\n display: inline-block;\\n}\\n.rdw-justify-aligned-block > div {\\n display: inline-block;\\n}\\n\\n.rdw-colorpicker-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-colorpicker-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 175px;\\n height: 175px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-colorpicker-modal-header {\\n display: flex;\\n padding-bottom: 5px;\\n}\\n.rdw-colorpicker-modal-style-label {\\n font-size: 15px;\\n width: 50%;\\n text-align: center;\\n cursor: pointer;\\n padding: 0 10px 5px;\\n}\\n.rdw-colorpicker-modal-style-label-active {\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-colorpicker-modal-options {\\n margin: 5px auto;\\n display: flex;\\n width: 100%;\\n height: 100%;\\n flex-wrap: wrap;\\n overflow: scroll;\\n}\\n.rdw-colorpicker-cube {\\n width: 22px;\\n height: 22px;\\n border: 1px solid #F1F1F1;\\n}\\n.rdw-colorpicker-option {\\n margin: 3px;\\n padding: 0;\\n min-height: 20px;\\n border: none;\\n width: 22px;\\n height: 22px;\\n min-width: 22px;\\n box-shadow: 1px 2px 1px #BFBDBD inset;\\n}\\n.rdw-colorpicker-option:hover {\\n box-shadow: 1px 2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option:active {\\n box-shadow: -1px -2px 1px #BFBDBD;\\n}\\n.rdw-colorpicker-option-active {\\n box-shadow: 0px 0px 2px 2px #BFBDBD;\\n}\\n\\n.rdw-link-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-link-dropdown {\\n width: 50px;\\n}\\n.rdw-link-dropdownOption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-link-dropdownPlaceholder {\\n margin-left: 8px;\\n}\\n.rdw-link-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 205px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-link-modal-label {\\n font-size: 15px;\\n}\\n.rdw-link-modal-input {\\n margin-top: 5px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n height: 25px;\\n margin-bottom: 15px;\\n padding: 0 5px;\\n}\\n.rdw-link-modal-input:focus {\\n outline: none;\\n}\\n.rdw-link-modal-buttonsection {\\n margin: 0 auto;\\n}\\n.rdw-link-modal-target-option {\\n margin-bottom: 20px;\\n}\\n.rdw-link-modal-target-option > span {\\n margin-left: 5px;\\n}\\n.rdw-link-modal-btn {\\n margin-left: 10px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-link-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-link-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-link-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-link-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-link-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n\\n.rdw-embedded-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-embedded-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n justify-content: space-between;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-embedded-modal-header {\\n font-size: 15px;\\n display: flex;\\n}\\n.rdw-embedded-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-header-label {\\n width: 95px;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-embedded-modal-link-section {\\n display: flex;\\n flex-direction: column;\\n}\\n.rdw-embedded-modal-link-input {\\n width: 88%;\\n height: 35px;\\n margin: 10px 0;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-embedded-modal-link-input-wrapper {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-embedded-modal-link-input:focus {\\n outline: none;\\n}\\n.rdw-embedded-modal-btn-section {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-embedded-modal-btn {\\n margin: 0 3px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-embedded-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-embedded-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-embedded-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-embedded-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-embedded-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-embedded-modal-size-input {\\n width: 80%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-embedded-modal-size-input:focus {\\n outline: none;\\n}\\n\\n.rdw-emoji-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-emoji-modal {\\n overflow: auto;\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-wrap: wrap;\\n width: 235px;\\n height: 180px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-emoji-icon {\\n margin: 2.5px;\\n height: 24px;\\n width: 24px;\\n cursor: pointer;\\n font-size: 22px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.rdw-spinner {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 100%;\\n width: 100%;\\n}\\n.rdw-spinner > div {\\n width: 12px;\\n height: 12px;\\n background-color: #333;\\n\\n border-radius: 100%;\\n display: inline-block;\\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\\n}\\n.rdw-spinner .rdw-bounce1 {\\n -webkit-animation-delay: -0.32s;\\n animation-delay: -0.32s;\\n}\\n.rdw-spinner .rdw-bounce2 {\\n -webkit-animation-delay: -0.16s;\\n animation-delay: -0.16s;\\n}\\n@-webkit-keyframes sk-bouncedelay {\\n 0%, 80%, 100% { -webkit-transform: scale(0) }\\n 40% { -webkit-transform: scale(1.0) }\\n}\\n@keyframes sk-bouncedelay {\\n 0%, 80%, 100% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n } 40% {\\n -webkit-transform: scale(1.0);\\n transform: scale(1.0);\\n }\\n}\\n\\n.rdw-image-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n.rdw-image-modal {\\n position: absolute;\\n top: 35px;\\n left: 5px;\\n display: flex;\\n flex-direction: column;\\n width: 235px;\\n border: 1px solid #F1F1F1;\\n padding: 15px;\\n border-radius: 2px;\\n z-index: 100;\\n background: white;\\n box-shadow: 3px 3px 5px #BFBDBD;\\n}\\n.rdw-image-modal-header {\\n font-size: 15px;\\n margin: 10px 0;\\n display: flex;\\n}\\n.rdw-image-modal-header-option {\\n width: 50%;\\n cursor: pointer;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n flex-direction: column;\\n}\\n.rdw-image-modal-header-label {\\n width: 80px;\\n background: #f1f1f1;\\n border: 1px solid #f1f1f1;\\n margin-top: 5px;\\n}\\n.rdw-image-modal-header-label-highlighted {\\n background: #6EB8D4;\\n border-bottom: 2px solid #0a66b7;\\n}\\n.rdw-image-modal-upload-option {\\n width: 100%;\\n color: gray;\\n cursor: pointer;\\n display: flex;\\n border: none;\\n font-size: 15px;\\n align-items: center;\\n justify-content: center;\\n background-color: #f1f1f1;\\n outline: 2px dashed gray;\\n outline-offset: -10px;\\n margin: 10px 0;\\n padding: 9px 0;\\n}\\n.rdw-image-modal-upload-option-highlighted {\\n outline: 2px dashed #0a66b7;\\n}\\n.rdw-image-modal-upload-option-label {\\n cursor: pointer;\\n height: 100%;\\n width: 100%;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n padding: 15px;\\n}\\n.rdw-image-modal-upload-option-label span{\\n padding: 0 20px;\\n}\\n.rdw-image-modal-upload-option-image-preview {\\n max-width: 100%;\\n max-height: 200px;\\n}\\n.rdw-image-modal-upload-option-input {\\n\\twidth: 0.1px;\\n\\theight: 0.1px;\\n\\topacity: 0;\\n\\toverflow: hidden;\\n\\tposition: absolute;\\n\\tz-index: -1;\\n}\\n.rdw-image-modal-url-section {\\n display: flex;\\n align-items: center;\\n}\\n.rdw-image-modal-url-input {\\n width: 90%;\\n height: 35px;\\n margin: 15px 0 12px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 15px;\\n padding: 0 5px;\\n}\\n.rdw-image-modal-btn-section {\\n margin: 10px auto 0;\\n}\\n.rdw-image-modal-url-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-btn {\\n margin: 0 5px;\\n width: 75px;\\n height: 30px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n cursor: pointer;\\n background: white;\\n text-transform: capitalize;\\n}\\n.rdw-image-modal-btn:hover {\\n box-shadow: 1px 1px 0px #BFBDBD;\\n}\\n.rdw-image-modal-btn:active {\\n box-shadow: 1px 1px 0px #BFBDBD inset;\\n}\\n.rdw-image-modal-btn:focus {\\n outline: none !important;\\n}\\n.rdw-image-modal-btn:disabled {\\n background: #ece9e9;\\n}\\n.rdw-image-modal-spinner {\\n position: absolute;\\n top: -3px;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n opacity: 0.5;\\n}\\n.rdw-image-modal-alt-input {\\n width: 70%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n margin-left: 5px;\\n}\\n.rdw-image-modal-alt-input:focus {\\n outline: none;\\n}\\n.rdw-image-modal-alt-lbl {\\n font-size: 12px;\\n}\\n.rdw-image-modal-size {\\n align-items: center;\\n display: flex;\\n margin: 8px 0;\\n justify-content: space-between;\\n}\\n.rdw-image-modal-size-input {\\n width: 40%;\\n height: 20px;\\n border: 1px solid #F1F1F1;\\n border-radius: 2px;\\n font-size: 12px;\\n}\\n.rdw-image-modal-size-input:focus {\\n outline: none;\\n}\\n.rdw-image-mandatory-sign {\\n color: red;\\n margin-left: 3px;\\n margin-right: 3px;\\n}\\n\\n.rdw-remove-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n position: relative;\\n flex-wrap: wrap\\n}\\n\\n.rdw-history-wrapper {\\n display: flex;\\n align-items: center;\\n margin-bottom: 6px;\\n flex-wrap: wrap\\n}\\n.rdw-history-dropdownoption {\\n height: 40px;\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-history-dropdown {\\n width: 50px;\\n}\\n\\n.rdw-link-decorator-wrapper {\\n position: relative;\\n}\\n.rdw-link-decorator-icon {\\n position: absolute;\\n left: 40%;\\n top: 0;\\n cursor: pointer;\\n background-color: white;\\n}\\n\\n.rdw-mention-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n\\n.rdw-suggestion-wrapper {\\n position: relative;\\n}\\n.rdw-suggestion-dropdown {\\n position: absolute;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid #F1F1F1;\\n min-width: 100px;\\n max-height: 150px;\\n overflow: auto;\\n background: white;\\n z-index: 100;\\n}\\n.rdw-suggestion-option {\\n padding: 7px 5px;\\n border-bottom: 1px solid #f1f1f1;\\n}\\n.rdw-suggestion-option-active {\\n background-color: #F1F1F1;\\n}\\n\\n.rdw-hashtag-link {\\n text-decoration: none;\\n color: #1236ff;\\n background-color: #f0fbff;\\n padding: 1px 2px;\\n border-radius: 2px;\\n}\\n\\n.rdw-image-alignment-options-popup {\\n position: absolute;\\n background: white;\\n display: flex;\\n padding: 5px 2px;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n width: 105px;\\n cursor: pointer;\\n z-index: 100;\\n}\\n.rdw-alignment-option-left {\\n justify-content: flex-start;\\n}\\n.rdw-image-alignment-option {\\n height: 15px;\\n width: 15px;\\n min-width: 15px;\\n}\\n.rdw-image-alignment {\\n position: relative;\\n}\\n.rdw-image-imagewrapper {\\n position: relative;\\n}\\n.rdw-image-center {\\n display: flex;\\n justify-content: center;\\n}\\n.rdw-image-left {\\n display: flex;\\n}\\n.rdw-image-right {\\n display: flex;\\n justify-content: flex-end;\\n}\\n.rdw-image-alignment-options-popup-right {\\n right: 0;\\n}\\n\\n.rdw-editor-main {\\n height: 100%;\\n overflow: auto;\\n box-sizing: border-box;\\n}\\n.rdw-editor-toolbar {\\n padding: 6px 5px 0;\\n border-radius: 2px;\\n border: 1px solid #F1F1F1;\\n display: flex;\\n justify-content: flex-start;\\n background: white;\\n flex-wrap: wrap;\\n font-size: 15px;\\n margin-bottom: 5px;\\n user-select: none;\\n}\\n.public-DraftStyleDefault-block {\\n margin: 1em 0;\\n}\\n.rdw-editor-wrapper:focus {\\n outline: none;\\n}\\n.rdw-editor-wrapper {\\n box-sizing: content-box;\\n}\\n.rdw-editor-main blockquote {\\n border-left: 5px solid #f1f1f1;\\n padding-left: 5px;\\n}\\n.rdw-editor-main pre {\\n background: #f1f1f1;\\n border-radius: 3px;\\n padding: 1px 10px;\\n}\\n/**\\n * Draft v0.9.1\\n *\\n * Copyright (c) 2013-present, 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.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:0}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) \\\". \\\";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) \\\". \\\";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) \\\". \\\";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) \\\". \\\";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) \\\". \\\";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4}\\n\\n\\n/*# sourceMappingURL=react-draft-wysiwyg.css.map*/\"]}]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_GET_URL_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/getUrl.js\");\nvar ___CSS_LOADER_URL_IMPORT_0___ = require(\"../src/assets/fonts/AlbertSans-Roman[wdth,wght].woff2\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\nexports.push([module.id, \"@-o-viewport {\\n width: device-width;\\n}\\n@viewport {\\n width: device-width;\\n}\\n/*\\n Resets annoying things */\\n* {\\n margin: 0;\\n padding: 0;\\n background: none;\\n border: none;\\n font: inherit;\\n color: inherit;\\n vertical-align: baseline;\\n box-sizing: border-box;\\n border-radius: 0;\\n}\\nhtml {\\n -webkit-text-decoration-skip: ink;\\n text-decoration-skip-ink: auto;\\n word-wrap: break-word;\\n overflow-wrap: break-word;\\n -webkit-text-size-adjust: 100%;\\n -moz-text-size-adjust: 100%;\\n text-size-adjust: 100%;\\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Helvetica, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\";\\n}\\nstrong,\\nb {\\n font-weight: bold;\\n}\\nem,\\ni {\\n font-style: italic;\\n}\\n/*\\n Misc element fixes */\\na {\\n background-color: transparent;\\n}\\nimg {\\n max-width: 100%;\\n}\\n/*\\n Buttons and forms */\\nbutton,\\n[type=button],\\n[type=submit],\\n[type=reset] {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n cursor: pointer;\\n white-space: normal;\\n}\\n::-moz-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n::placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n:disabled {\\n opacity: 0.618;\\n cursor: not-allowed;\\n}\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\ninput[type=search] {\\n -webkit-appearance: textfield;\\n}\\ninput[type=search]::-webkit-search-cancel-button,\\ninput[type=search]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\ntextarea {\\n resize: vertical;\\n display: block;\\n}\\n/*\\n Removes touch input lag from tappable things */\\na,\\nbutton,\\ninput,\\ntextarea,\\nselect,\\nlabel,\\ncanvas {\\n touch-action: manipulation;\\n}\\n@font-face {\\n font-family: \\\"Albert Sans\\\";\\n font-style: normal;\\n font-display: swap;\\n font-stretch: 80% 100%;\\n font-weight: 100 900;\\n src: url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"woff2 supports variations\\\"), url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"woff2-variations\\\");\\n}\\nhtml {\\n font-size: 1.368em; /* Used if browser doesn't support calc() */\\n font-size: calc(\\n 1.14em + (0.2 * 1vw) + (\\n 0.2 * 1vh\\n ) + (0.2 / 2 * 1vmin)\\n );\\n}\\ninput[type=date],\\ninput[type=datetime],\\ninput[type=datetime-local],\\ninput[type=email],\\ninput[type=month],\\ninput[type=number],\\ninput[type=password],\\ninput[type=search],\\ninput[type=tel],\\ninput[type=text],\\ninput[type=time],\\ninput[type=url],\\ninput[type=week],\\nselect,\\ntextarea {\\n padding: 0.5rem;\\n border: 1px solid;\\n}\\nbutton,\\ninput[type=submit],\\n.button {\\n padding: 0.5rem 0.75rem;\\n border-radius: 0.25rem;\\n border: 1px solid;\\n}\\n.full-width {\\n width: 100%;\\n}\\n.stripped-button {\\n padding: none;\\n border-radius: none;\\n border: none;\\n text-decoration: underline;\\n}\\nhtml,\\nbody {\\n height: 100%;\\n}\\nhtml {\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\nbody {\\n position: relative;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n font-weight: normal;\\n font-family: \\\"Albert Sans\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif;\\n color: #1c1f28;\\n background-color: #f3f7fb;\\n overflow-x: hidden;\\n}\\n#root {\\n height: 100%;\\n}\\nimg {\\n width: 100%;\\n height: auto;\\n}\\ntable,\\n.table {\\n width: 100%;\\n border-collapse: collapse;\\n text-align: left;\\n}\\ntable thead tr,\\n.table thead tr {\\n border-bottom: 1px solid #e0e2e9;\\n}\\ntable tbody tr,\\n.table tbody tr {\\n border-bottom: 1px solid #e0e2e9;\\n}\\ntable th:first-child,\\ntable td:first-child,\\n.table th:first-child,\\n.table td:first-child {\\n padding-left: 0.25rem;\\n}\\ntable th:last-child,\\ntable td:last-child,\\n.table th:last-child,\\n.table td:last-child {\\n padding-right: 0.25rem;\\n}\\ntable th,\\n.table th {\\n padding: 0.25rem 0.5rem;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n font-weight: 500;\\n letter-spacing: 0.05em;\\n text-transform: uppercase;\\n}\\ntable td,\\n.table td {\\n padding: 0.5rem;\\n}\\ntable.table--fixed,\\n.table.table--fixed {\\n table-layout: fixed;\\n}\\ntable--microbiome tbody tr:last-child,\\n.table--microbiome tbody tr:last-child {\\n border-bottom: none;\\n}\\ntable--microbiome th:first-child,\\ntable--microbiome td:first-child,\\n.table--microbiome th:first-child,\\n.table--microbiome td:first-child {\\n padding-left: 1rem;\\n}\\ntable--microbiome th:last-child,\\ntable--microbiome td:last-child,\\n.table--microbiome th:last-child,\\n.table--microbiome td:last-child {\\n padding-right: 1rem;\\n}\\n.tr--inactive {\\n background-color: #e0e2e9;\\n}\\n.table-container {\\n width: 100%;\\n overflow-x: auto;\\n}\\n.borders {\\n border-style: solid;\\n border-width: 1px;\\n}\\n.borders-dashed {\\n border-style: dashed;\\n border-width: 2px;\\n}\\n.borders-dotted {\\n border-style: dotted;\\n border-width: 1px;\\n}\\n.borders-y {\\n border-style: solid;\\n border-width: 1px 0;\\n}\\n.borders-x {\\n border-style: solid;\\n border-width: 0 1px;\\n}\\n.border-left {\\n border-width: 0 0 0 1px;\\n border-style: solid;\\n}\\n.border-top {\\n border-width: 1px 0 0 0;\\n border-style: solid;\\n}\\n.border-right {\\n border-width: 0 1px 0 0;\\n border-style: solid;\\n}\\n.border-bottom {\\n border-width: 0 0 1px 0;\\n border-style: solid;\\n}\\n.child-borders > *,\\n.child-borders-x > *,\\n.child-borders-y > * {\\n border-style: solid;\\n border-width: 0;\\n}\\n.child-borders {\\n border: 0 solid;\\n border-width: 1px 0 0 1px;\\n}\\n.child-borders > * + * {\\n border-width: 0 1px 1px 0;\\n}\\n.child-borders-x > * + * {\\n border-left-width: 1px;\\n}\\n.child-borders-y > * + * {\\n border-top-width: 1px;\\n}\\n.border-radius,\\n.border-radius-0-125 {\\n border-radius: 0.125rem;\\n}\\n.border-radius-0-25 {\\n border-radius: 0.25rem;\\n}\\n.border-radius-0-5 {\\n border-radius: 0.5rem;\\n}\\n.border-radius-rounded {\\n border-radius: 200px;\\n}\\n.border-radius-50 {\\n border-radius: 50%;\\n}\\n.color-purple-light {\\n color: #67318e;\\n}\\n.color-purple {\\n color: #39235d;\\n}\\n.color-blue-lightest {\\n color: #f3f7fb;\\n}\\n.color-blue-lighter {\\n color: #e2ecf6;\\n}\\n.color-blue-light {\\n color: #8ab4db;\\n}\\n.color-blue {\\n color: #6e9fd5;\\n}\\n.color-blue-dark {\\n color: #3e7cb2;\\n}\\n.color-gray-lightest {\\n color: #e0e2e9;\\n}\\n.color-gray-light {\\n color: #a1a7bb;\\n}\\n.color-gray {\\n color: #626e8e;\\n}\\n.color-gray-dark {\\n color: #1c1f28;\\n}\\n.color-dark {\\n color: #646464;\\n}\\n.color-orange {\\n color: #fc8020;\\n}\\n.color-green {\\n color: #43c45f;\\n}\\n.color-red {\\n color: #ef686f;\\n}\\n.color-yellow {\\n color: #ffd44f;\\n}\\n.color-black {\\n color: hsl(0, 0%, 0%);\\n}\\n.color-white {\\n color: hsl(100, 100%, 100%);\\n}\\n.color-transparent {\\n color: transparent;\\n}\\n.color-none {\\n color: none;\\n}\\n.color-inherit {\\n color: inherit;\\n}\\n.color-currentcolor {\\n color: currentcolor;\\n}\\n.bg-purple-light {\\n background-color: #67318e;\\n}\\n.bg-purple {\\n background-color: #39235d;\\n}\\n.bg-blue-lightest {\\n background-color: #f3f7fb;\\n}\\n.bg-blue-lighter {\\n background-color: #e2ecf6;\\n}\\n.bg-blue-light {\\n background-color: #8ab4db;\\n}\\n.bg-blue {\\n background-color: #6e9fd5;\\n}\\n.bg-blue-dark {\\n background-color: #3e7cb2;\\n}\\n.bg-gray-lightest {\\n background-color: #e0e2e9;\\n}\\n.bg-gray-light {\\n background-color: #a1a7bb;\\n}\\n.bg-gray {\\n background-color: #626e8e;\\n}\\n.bg-gray-dark {\\n background-color: #1c1f28;\\n}\\n.bg-dark {\\n background-color: #646464;\\n}\\n.bg-orange {\\n background-color: #fc8020;\\n}\\n.bg-green {\\n background-color: #43c45f;\\n}\\n.bg-red {\\n background-color: #ef686f;\\n}\\n.bg-yellow {\\n background-color: #ffd44f;\\n}\\n.bg-black {\\n background-color: hsl(0, 0%, 0%);\\n}\\n.bg-white {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.bg-transparent {\\n background-color: transparent;\\n}\\n.bg-none {\\n background-color: none;\\n}\\n.bg-inherit {\\n background-color: inherit;\\n}\\n.bg-currentcolor {\\n background-color: currentcolor;\\n}\\n.border-color-purple-light {\\n border-color: #67318e;\\n}\\n.border-color-purple {\\n border-color: #39235d;\\n}\\n.border-color-blue-lightest {\\n border-color: #f3f7fb;\\n}\\n.border-color-blue-lighter {\\n border-color: #e2ecf6;\\n}\\n.border-color-blue-light {\\n border-color: #8ab4db;\\n}\\n.border-color-blue {\\n border-color: #6e9fd5;\\n}\\n.border-color-blue-dark {\\n border-color: #3e7cb2;\\n}\\n.border-color-gray-lightest {\\n border-color: #e0e2e9;\\n}\\n.border-color-gray-light {\\n border-color: #a1a7bb;\\n}\\n.border-color-gray {\\n border-color: #626e8e;\\n}\\n.border-color-gray-dark {\\n border-color: #1c1f28;\\n}\\n.border-color-dark {\\n border-color: #646464;\\n}\\n.border-color-orange {\\n border-color: #fc8020;\\n}\\n.border-color-green {\\n border-color: #43c45f;\\n}\\n.border-color-red {\\n border-color: #ef686f;\\n}\\n.border-color-yellow {\\n border-color: #ffd44f;\\n}\\n.border-color-black {\\n border-color: hsl(0, 0%, 0%);\\n}\\n.border-color-white {\\n border-color: hsl(100, 100%, 100%);\\n}\\n.border-color-transparent {\\n border-color: transparent;\\n}\\n.border-color-none {\\n border-color: none;\\n}\\n.border-color-inherit {\\n border-color: inherit;\\n}\\n.border-color-currentcolor {\\n border-color: currentcolor;\\n}\\n.stroke-purple-light {\\n stroke: #67318e;\\n}\\n.stroke-purple {\\n stroke: #39235d;\\n}\\n.stroke-blue-lightest {\\n stroke: #f3f7fb;\\n}\\n.stroke-blue-lighter {\\n stroke: #e2ecf6;\\n}\\n.stroke-blue-light {\\n stroke: #8ab4db;\\n}\\n.stroke-blue {\\n stroke: #6e9fd5;\\n}\\n.stroke-blue-dark {\\n stroke: #3e7cb2;\\n}\\n.stroke-gray-lightest {\\n stroke: #e0e2e9;\\n}\\n.stroke-gray-light {\\n stroke: #a1a7bb;\\n}\\n.stroke-gray {\\n stroke: #626e8e;\\n}\\n.stroke-gray-dark {\\n stroke: #1c1f28;\\n}\\n.stroke-dark {\\n stroke: #646464;\\n}\\n.stroke-orange {\\n stroke: #fc8020;\\n}\\n.stroke-green {\\n stroke: #43c45f;\\n}\\n.stroke-red {\\n stroke: #ef686f;\\n}\\n.stroke-yellow {\\n stroke: #ffd44f;\\n}\\n.stroke-black {\\n stroke: hsl(0, 0%, 0%);\\n}\\n.stroke-white {\\n stroke: hsl(100, 100%, 100%);\\n}\\n.stroke-transparent {\\n stroke: transparent;\\n}\\n.stroke-none {\\n stroke: none;\\n}\\n.stroke-inherit {\\n stroke: inherit;\\n}\\n.stroke-currentcolor {\\n stroke: currentcolor;\\n}\\n.fill-purple-light {\\n fill: #67318e;\\n}\\n.fill-purple {\\n fill: #39235d;\\n}\\n.fill-blue-lightest {\\n fill: #f3f7fb;\\n}\\n.fill-blue-lighter {\\n fill: #e2ecf6;\\n}\\n.fill-blue-light {\\n fill: #8ab4db;\\n}\\n.fill-blue {\\n fill: #6e9fd5;\\n}\\n.fill-blue-dark {\\n fill: #3e7cb2;\\n}\\n.fill-gray-lightest {\\n fill: #e0e2e9;\\n}\\n.fill-gray-light {\\n fill: #a1a7bb;\\n}\\n.fill-gray {\\n fill: #626e8e;\\n}\\n.fill-gray-dark {\\n fill: #1c1f28;\\n}\\n.fill-dark {\\n fill: #646464;\\n}\\n.fill-orange {\\n fill: #fc8020;\\n}\\n.fill-green {\\n fill: #43c45f;\\n}\\n.fill-red {\\n fill: #ef686f;\\n}\\n.fill-yellow {\\n fill: #ffd44f;\\n}\\n.fill-black {\\n fill: hsl(0, 0%, 0%);\\n}\\n.fill-white {\\n fill: hsl(100, 100%, 100%);\\n}\\n.fill-transparent {\\n fill: transparent;\\n}\\n.fill-none {\\n fill: none;\\n}\\n.fill-inherit {\\n fill: inherit;\\n}\\n.fill-currentcolor {\\n fill: currentcolor;\\n}\\n.outline-purple-light {\\n outline: #67318e;\\n}\\n.outline-purple {\\n outline: #39235d;\\n}\\n.outline-blue-lightest {\\n outline: #f3f7fb;\\n}\\n.outline-blue-lighter {\\n outline: #e2ecf6;\\n}\\n.outline-blue-light {\\n outline: #8ab4db;\\n}\\n.outline-blue {\\n outline: #6e9fd5;\\n}\\n.outline-blue-dark {\\n outline: #3e7cb2;\\n}\\n.outline-gray-lightest {\\n outline: #e0e2e9;\\n}\\n.outline-gray-light {\\n outline: #a1a7bb;\\n}\\n.outline-gray {\\n outline: #626e8e;\\n}\\n.outline-gray-dark {\\n outline: #1c1f28;\\n}\\n.outline-dark {\\n outline: #646464;\\n}\\n.outline-orange {\\n outline: #fc8020;\\n}\\n.outline-green {\\n outline: #43c45f;\\n}\\n.outline-red {\\n outline: #ef686f;\\n}\\n.outline-yellow {\\n outline: #ffd44f;\\n}\\n.outline-black {\\n outline: hsl(0, 0%, 0%);\\n}\\n.outline-white {\\n outline: hsl(100, 100%, 100%);\\n}\\n.outline-transparent {\\n outline: transparent;\\n}\\n.outline-none {\\n outline: none;\\n}\\n.outline-inherit {\\n outline: inherit;\\n}\\n.outline-currentcolor {\\n outline: currentcolor;\\n}\\n.flex,\\n.flex-x {\\n display: flex;\\n}\\n.flex-y {\\n display: flex;\\n flex-direction: column;\\n}\\n.align-start {\\n align-items: flex-start;\\n}\\n.align-center {\\n align-items: center;\\n}\\n.align-end {\\n align-items: flex-end;\\n}\\n.justify-center {\\n justify-content: center;\\n}\\n.justify-end {\\n justify-content: flex-end;\\n}\\n.justify {\\n justify-content: space-between;\\n}\\n.even > * {\\n flex-basis: 0;\\n flex-grow: 1;\\n}\\n.grow,\\n.grow-children > * {\\n flex-basis: auto;\\n flex-grow: 1;\\n}\\n.no-shrink {\\n flex-shrink: 0;\\n}\\n.wrap {\\n flex-wrap: wrap;\\n}\\n.responsive-columns > * {\\n flex-basis: 33.3%;\\n}\\n@media screen and (max-width: 991px) {\\n .responsive-columns > * {\\n flex-basis: 50%;\\n }\\n}\\n@media screen and (max-width: 575px) {\\n .responsive-columns > * {\\n flex-basis: 100%;\\n }\\n}\\n.container {\\n padding-right: 0.5rem;\\n padding-left: 0.5rem;\\n width: 100%;\\n max-width: 1200px;\\n margin-left: auto;\\n margin-right: auto;\\n}\\n@media screen and (max-width: 575px) {\\n .container--collapse-xs {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-xs .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n .container--collapse-xs *[class^=col-]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .container--collapse-s {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-s .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n .container--collapse-s *[class^=col-]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .container--collapse-m {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-m .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n .container--collapse-m *[class^=col-]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n}\\n@media screen and (max-width: 1199px) {\\n .container--collapse-l {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-l .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n}\\n.container--collapse {\\n padding-right: 0;\\n padding-left: 0;\\n}\\n.container--collapse .row {\\n margin-left: 0;\\n margin-right: 0;\\n}\\n.container--collapse *[class^=col-] {\\n padding-left: 0;\\n padding-right: 0;\\n}\\n.row {\\n box-sizing: border-box;\\n display: flex;\\n flex: 0 1 auto;\\n flex-direction: row;\\n flex-wrap: wrap;\\n margin-right: -0.25rem;\\n margin-left: -0.25rem;\\n}\\n.row.reverse {\\n flex-direction: row-reverse;\\n}\\n.col.reverse {\\n flex-direction: column-reverse;\\n}\\n.col-xs,\\n.col-xs-1,\\n.col-xs-2,\\n.col-xs-3,\\n.col-xs-4,\\n.col-xs-5,\\n.col-xs-6,\\n.col-xs-7,\\n.col-xs-8,\\n.col-xs-9,\\n.col-xs-10,\\n.col-xs-11,\\n.col-xs-12,\\n.col-xs-offset-0,\\n.col-xs-offset-1,\\n.col-xs-offset-2,\\n.col-xs-offset-3,\\n.col-xs-offset-4,\\n.col-xs-offset-5,\\n.col-xs-offset-6,\\n.col-xs-offset-7,\\n.col-xs-offset-8,\\n.col-xs-offset-9,\\n.col-xs-offset-10,\\n.col-xs-offset-11,\\n.col-xs-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n}\\n.col-xs {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n}\\n.col-xs-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n}\\n.col-xs-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n}\\n.col-xs-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n}\\n.col-xs-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n}\\n.col-xs-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n}\\n.col-xs-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n}\\n.col-xs-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n}\\n.col-xs-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n}\\n.col-xs-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n}\\n.col-xs-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n}\\n.col-xs-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n}\\n.col-xs-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n.col-xs-offset-0 {\\n margin-left: 0;\\n}\\n.col-xs-offset-1 {\\n margin-left: 8.33333333%;\\n}\\n.col-xs-offset-2 {\\n margin-left: 16.66666667%;\\n}\\n.col-xs-offset-3 {\\n margin-left: 25%;\\n}\\n.col-xs-offset-4 {\\n margin-left: 33.33333333%;\\n}\\n.col-xs-offset-5 {\\n margin-left: 41.66666667%;\\n}\\n.col-xs-offset-6 {\\n margin-left: 50%;\\n}\\n.col-xs-offset-7 {\\n margin-left: 58.33333333%;\\n}\\n.col-xs-offset-8 {\\n margin-left: 66.66666667%;\\n}\\n.col-xs-offset-9 {\\n margin-left: 75%;\\n}\\n.col-xs-offset-10 {\\n margin-left: 83.33333333%;\\n}\\n.col-xs-offset-11 {\\n margin-left: 91.66666667%;\\n}\\n.start-xs {\\n justify-content: flex-start;\\n text-align: start;\\n}\\n.center-xs {\\n justify-content: center;\\n text-align: center;\\n}\\n.end-xs {\\n justify-content: flex-end;\\n text-align: end;\\n}\\n.top-xs {\\n align-items: flex-start;\\n}\\n.middle-xs {\\n align-items: center;\\n}\\n.bottom-xs {\\n align-items: flex-end;\\n}\\n.around-xs {\\n justify-content: space-around;\\n}\\n.between-xs {\\n justify-content: space-between;\\n}\\n.first-xs {\\n order: -1;\\n}\\n.last-xs {\\n order: 1;\\n}\\n@media screen and (min-width: 576px) {\\n .col-s,\\n .col-s-1,\\n .col-s-2,\\n .col-s-3,\\n .col-s-4,\\n .col-s-5,\\n .col-s-6,\\n .col-s-7,\\n .col-s-8,\\n .col-s-9,\\n .col-s-10,\\n .col-s-11,\\n .col-s-12,\\n .col-s-offset-0,\\n .col-s-offset-1,\\n .col-s-offset-2,\\n .col-s-offset-3,\\n .col-s-offset-4,\\n .col-s-offset-5,\\n .col-s-offset-6,\\n .col-s-offset-7,\\n .col-s-offset-8,\\n .col-s-offset-9,\\n .col-s-offset-10,\\n .col-s-offset-11,\\n .col-s-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-s {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-s-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-s-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-s-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-s-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-s-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-s-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-s-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-s-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-s-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-s-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-s-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-s-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-s-offset-0 {\\n margin-left: 0;\\n }\\n .col-s-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-s-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-s-offset-3 {\\n margin-left: 25%;\\n }\\n .col-s-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-s-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-s-offset-6 {\\n margin-left: 50%;\\n }\\n .col-s-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-s-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-s-offset-9 {\\n margin-left: 75%;\\n }\\n .col-s-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-s-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-s {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-s {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-s {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-s {\\n align-items: flex-start;\\n }\\n .middle-s {\\n align-items: center;\\n }\\n .bottom-s {\\n align-items: flex-end;\\n }\\n .around-s {\\n justify-content: space-around;\\n }\\n .between-s {\\n justify-content: space-between;\\n }\\n .first-s {\\n order: -1;\\n }\\n .last-s {\\n order: 1;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .col-m,\\n .col-m-1,\\n .col-m-2,\\n .col-m-3,\\n .col-m-4,\\n .col-m-5,\\n .col-m-6,\\n .col-m-7,\\n .col-m-8,\\n .col-m-9,\\n .col-m-10,\\n .col-m-11,\\n .col-m-12,\\n .col-m-offset-0,\\n .col-m-offset-1,\\n .col-m-offset-2,\\n .col-m-offset-3,\\n .col-m-offset-4,\\n .col-m-offset-5,\\n .col-m-offset-6,\\n .col-m-offset-7,\\n .col-m-offset-8,\\n .col-m-offset-9,\\n .col-m-offset-10,\\n .col-m-offset-11,\\n .col-m-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-m {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-m-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-m-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-m-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-m-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-m-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-m-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-m-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-m-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-m-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-m-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-m-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-m-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-m-offset-0 {\\n margin-left: 0;\\n }\\n .col-m-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-m-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-m-offset-3 {\\n margin-left: 25%;\\n }\\n .col-m-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-m-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-m-offset-6 {\\n margin-left: 50%;\\n }\\n .col-m-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-m-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-m-offset-9 {\\n margin-left: 75%;\\n }\\n .col-m-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-m-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-m {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-m {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-m {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-m {\\n align-items: flex-start;\\n }\\n .middle-m {\\n align-items: center;\\n }\\n .bottom-m {\\n align-items: flex-end;\\n }\\n .around-m {\\n justify-content: space-around;\\n }\\n .between-m {\\n justify-content: space-between;\\n }\\n .first-m {\\n order: -1;\\n }\\n .last-m {\\n order: 1;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .col-l,\\n .col-l-1,\\n .col-l-2,\\n .col-l-3,\\n .col-l-4,\\n .col-l-5,\\n .col-l-6,\\n .col-l-7,\\n .col-l-8,\\n .col-l-9,\\n .col-l-10,\\n .col-l-11,\\n .col-l-12,\\n .col-l-offset-0,\\n .col-l-offset-1,\\n .col-l-offset-2,\\n .col-l-offset-3,\\n .col-l-offset-4,\\n .col-l-offset-5,\\n .col-l-offset-6,\\n .col-l-offset-7,\\n .col-l-offset-8,\\n .col-l-offset-9,\\n .col-l-offset-10,\\n .col-l-offset-11,\\n .col-l-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-l {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-l-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-l-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-l-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-l-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-l-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-l-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-l-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-l-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-l-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-l-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-l-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-l-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-l-offset-0 {\\n margin-left: 0;\\n }\\n .col-l-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-l-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-l-offset-3 {\\n margin-left: 25%;\\n }\\n .col-l-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-l-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-l-offset-6 {\\n margin-left: 50%;\\n }\\n .col-l-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-l-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-l-offset-9 {\\n margin-left: 75%;\\n }\\n .col-l-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-l-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-l {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-l {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-l {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-l {\\n align-items: flex-start;\\n }\\n .middle-l {\\n align-items: center;\\n }\\n .bottom-l {\\n align-items: flex-end;\\n }\\n .around-l {\\n justify-content: space-around;\\n }\\n .between-l {\\n justify-content: space-between;\\n }\\n .first-l {\\n order: -1;\\n }\\n .last-l {\\n order: 1;\\n }\\n}\\n@media screen and (min-width: 1200px) {\\n .col-xl,\\n .col-xl-1,\\n .col-xl-2,\\n .col-xl-3,\\n .col-xl-4,\\n .col-xl-5,\\n .col-xl-6,\\n .col-xl-7,\\n .col-xl-8,\\n .col-xl-9,\\n .col-xl-10,\\n .col-xl-11,\\n .col-xl-12,\\n .col-xl-offset-0,\\n .col-xl-offset-1,\\n .col-xl-offset-2,\\n .col-xl-offset-3,\\n .col-xl-offset-4,\\n .col-xl-offset-5,\\n .col-xl-offset-6,\\n .col-xl-offset-7,\\n .col-xl-offset-8,\\n .col-xl-offset-9,\\n .col-xl-offset-10,\\n .col-xl-offset-11,\\n .col-xl-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-xl {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-xl-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-xl-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-xl-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-xl-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-xl-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-xl-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-xl-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-xl-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-xl-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-xl-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-xl-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-xl-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-xl-offset-0 {\\n margin-left: 0;\\n }\\n .col-xl-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-xl-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-xl-offset-3 {\\n margin-left: 25%;\\n }\\n .col-xl-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-xl-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-xl-offset-6 {\\n margin-left: 50%;\\n }\\n .col-xl-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-xl-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-xl-offset-9 {\\n margin-left: 75%;\\n }\\n .col-xl-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-xl-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-xl {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-xl {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-xl {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-xl {\\n align-items: flex-start;\\n }\\n .middle-xl {\\n align-items: center;\\n }\\n .bottom-xl {\\n align-items: flex-end;\\n }\\n .around-xl {\\n justify-content: space-around;\\n }\\n .between-xl {\\n justify-content: space-between;\\n }\\n .first-xl {\\n order: -1;\\n }\\n .last-xl {\\n order: 1;\\n }\\n}\\n.inline {\\n display: inline;\\n}\\n.block {\\n display: block;\\n}\\n.inline-block {\\n display: inline-block;\\n}\\n.relative {\\n position: relative;\\n}\\n.width-1-percent {\\n width: 1%;\\n}\\n.width-100 {\\n width: 100%;\\n}\\n.min-width-100 {\\n min-width: 100%;\\n}\\n.width-auto {\\n width: auto;\\n}\\n.width-100vw {\\n width: 100vw;\\n}\\n.min-width-100vw {\\n min-width: 100vw;\\n}\\n.width-hairline {\\n width: 1px;\\n}\\n.width-0-125 {\\n width: 0.125rem;\\n}\\n.width-0-25 {\\n width: 0.25rem;\\n}\\n.width-0-5 {\\n width: 0.5rem;\\n}\\n.width-0-75 {\\n width: 0.75rem;\\n}\\n.width-1 {\\n width: 1rem;\\n}\\n.width-1-25 {\\n width: 1.25rem;\\n}\\n.width-1-5 {\\n width: 1.5rem;\\n}\\n.width-2 {\\n width: 2rem;\\n}\\n.width-3 {\\n width: 3rem;\\n}\\n.width-4 {\\n width: 4rem;\\n}\\n.width-5 {\\n width: 5rem;\\n}\\n.height-100 {\\n height: 100%;\\n}\\n.min-height-100 {\\n min-height: 100%;\\n}\\n.height-auto {\\n height: auto;\\n}\\n.height-100vh {\\n height: 100vh;\\n}\\n.min-height-100vh {\\n min-height: 100vh;\\n}\\n.height-hairline {\\n height: 1px;\\n}\\n.height-0-125 {\\n height: 0.125rem;\\n}\\n.height-0-25 {\\n height: 0.25rem;\\n}\\n.height-0-5 {\\n height: 0.5rem;\\n}\\n.height-0-75 {\\n height: 0.75rem;\\n}\\n.height-1 {\\n height: 1rem;\\n}\\n.height-1-25 {\\n height: 1.25rem;\\n}\\n.height-1-5 {\\n height: 1.5rem;\\n}\\n.height-2 {\\n height: 2rem;\\n}\\n.height-3 {\\n height: 3rem;\\n}\\n.height-4 {\\n height: 4rem;\\n}\\n.height-5 {\\n height: 5rem;\\n}\\n.display-none {\\n display: none;\\n}\\n.top-1 {\\n position: relative;\\n top: -1px;\\n}\\n@media screen and (max-width: 575px) {\\n .unflex-s > * + * {\\n margin-top: 1rem;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .unflex-m > * + * {\\n margin-top: 1rem;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .unflex-l > * + * {\\n margin-top: 1rem;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .hide-l {\\n display: none;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .hide-l-max {\\n display: none;\\n }\\n}\\n.overflow-hidden {\\n overflow: hidden;\\n}\\n.child-margins-x-0-125 > * + * {\\n margin-left: 0.125rem;\\n}\\n.child-margins-x-0-25 > * + * {\\n margin-left: 0.25rem;\\n}\\n.child-margins-x-0-5 > * + * {\\n margin-left: 0.5rem;\\n}\\n.child-margins-x-0-75 > * + * {\\n margin-left: 0.75rem;\\n}\\n.child-margins-x-1 > * + * {\\n margin-left: 1rem;\\n}\\n.child-margins-x-1-25 > * + * {\\n margin-left: 1.25rem;\\n}\\n.child-margins-x-1-5 > * + * {\\n margin-left: 1.5rem;\\n}\\n.child-margins-x-2 > * + * {\\n margin-left: 2rem;\\n}\\n.child-margins-x-3 > * + * {\\n margin-left: 3rem;\\n}\\n.child-margins-x-4 > * + * {\\n margin-left: 4rem;\\n}\\n.child-margins-x-5 > * + * {\\n margin-left: 5rem;\\n}\\n.child-margins-y-0-125 > * + * {\\n margin-top: 0.125rem;\\n}\\n.child-margins-y-0-25 > * + * {\\n margin-top: 0.25rem;\\n}\\n.child-margins-y-0-5 > * + * {\\n margin-top: 0.5rem;\\n}\\n.child-margins-y-0-75 > * + * {\\n margin-top: 0.75rem;\\n}\\n.child-margins-y-1 > * + * {\\n margin-top: 1rem;\\n}\\n.child-margins-y-1-25 > * + * {\\n margin-top: 1.25rem;\\n}\\n.child-margins-y-1-5 > * + * {\\n margin-top: 1.5rem;\\n}\\n.child-margins-y-2 > * + * {\\n margin-top: 2rem;\\n}\\n.child-margins-y-3 > * + * {\\n margin-top: 3rem;\\n}\\n.child-margins-y-4 > * + * {\\n margin-top: 4rem;\\n}\\n.child-margins-y-5 > * + * {\\n margin-top: 5rem;\\n}\\n.child-margins-x-hairline > * + * {\\n margin-left: 1px;\\n}\\n.child-margins-y-hairline > * + * {\\n margin-top: 1px;\\n}\\n.padding-hairline {\\n padding: 1px;\\n}\\n.padding-0-125 {\\n padding: 0.125rem;\\n}\\n.padding-0-25 {\\n padding: 0.25rem;\\n}\\n.padding-0-5 {\\n padding: 0.5rem;\\n}\\n.padding-0-75 {\\n padding: 0.75rem;\\n}\\n.padding-1 {\\n padding: 1rem;\\n}\\n.padding-1-25 {\\n padding: 1.25rem;\\n}\\n.padding-1-5 {\\n padding: 1.5rem;\\n}\\n.padding-2 {\\n padding: 2rem;\\n}\\n.padding-3 {\\n padding: 3rem;\\n}\\n.padding-4 {\\n padding: 4rem;\\n}\\n.padding-5 {\\n padding: 5rem;\\n}\\n.padding-top {\\n padding-right: 0;\\n padding-bottom: 0;\\n padding-left: 0;\\n}\\n.padding-right {\\n padding-top: 0;\\n padding-bottom: 0;\\n padding-left: 0;\\n}\\n.padding-bottom {\\n padding-top: 0;\\n padding-right: 0;\\n padding-left: 0;\\n}\\n.padding-left {\\n padding-top: 0;\\n padding-right: 0;\\n padding-bottom: 0;\\n}\\n.padding-x {\\n padding-top: 0;\\n padding-bottom: 0;\\n}\\n.padding-y {\\n padding-left: 0;\\n padding-right: 0;\\n}\\n.padding-top-0 {\\n padding-top: 0;\\n}\\n.padding-right-0 {\\n padding-right: 0;\\n}\\n.padding-bottom-0 {\\n padding-bottom: 0;\\n}\\n.padding-left-0 {\\n padding-left: 0;\\n}\\n.margin-auto {\\n margin: auto;\\n}\\n.margin-auto-x {\\n margin-left: auto;\\n margin-right: auto;\\n}\\n.margin-auto-y {\\n margin-top: auto;\\n margin-bottom: auto;\\n}\\n.margin-hairline {\\n margin: 1px;\\n}\\n.margin-0-125 {\\n margin: 0.125rem;\\n}\\n.margin-0-25 {\\n margin: 0.25rem;\\n}\\n.margin-0-5 {\\n margin: 0.5rem;\\n}\\n.margin-0-75 {\\n margin: 0.75rem;\\n}\\n.margin-1 {\\n margin: 1rem;\\n}\\n.margin-1-25 {\\n margin: 1.25rem;\\n}\\n.margin-1-5 {\\n margin: 1.5rem;\\n}\\n.margin-2 {\\n margin: 2rem;\\n}\\n.margin-3 {\\n margin: 3rem;\\n}\\n.margin-4 {\\n margin: 4rem;\\n}\\n.margin-5 {\\n margin: 5rem;\\n}\\n.negative-margin-0-125 {\\n margin: -0.125rem;\\n}\\n.negative-margin-0-25 {\\n margin: -0.25rem;\\n}\\n.negative-margin-0-5 {\\n margin: -0.5rem;\\n}\\n.negative-margin-0-75 {\\n margin: -0.75rem;\\n}\\n.negative-margin-1 {\\n margin: -1rem;\\n}\\n.negative-margin-1-25 {\\n margin: -1.25rem;\\n}\\n.negative-margin-1-5 {\\n margin: -1.5rem;\\n}\\n.negative-margin-2 {\\n margin: -2rem;\\n}\\n.negative-margin-3 {\\n margin: -3rem;\\n}\\n.negative-margin-4 {\\n margin: -4rem;\\n}\\n.negative-margin-5 {\\n margin: -5rem;\\n}\\n.margin-top {\\n margin-right: 0;\\n margin-bottom: 0;\\n margin-left: 0;\\n}\\n.margin-right {\\n margin-top: 0;\\n margin-bottom: 0;\\n margin-left: 0;\\n}\\n.margin-bottom {\\n margin-top: 0;\\n margin-right: 0;\\n margin-left: 0;\\n}\\n.margin-left {\\n margin-top: 0;\\n margin-right: 0;\\n margin-bottom: 0;\\n}\\n.margin-x {\\n margin-top: 0;\\n margin-bottom: 0;\\n}\\n.margin-y {\\n margin-left: 0;\\n margin-right: 0;\\n}\\n.margin-top-0 {\\n margin-top: 0;\\n}\\n.margin-top-0-5 {\\n margin-top: 0.5rem;\\n}\\n.margin-right-0 {\\n margin-right: 0;\\n}\\n.margin-bottom-0 {\\n margin-bottom: 0;\\n}\\n.margin-left-0 {\\n margin-left: 0;\\n}\\n.size-small {\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n}\\n.size-normal {\\n font-size: 0.67rem;\\n line-height: 1rem;\\n}\\n.size-medium {\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n}\\n.size-large {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n}\\n.size-huge {\\n font-size: 1.9rem;\\n line-height: 2.25rem;\\n}\\n.line-0-75 {\\n line-height: 0.75rem;\\n}\\n.line-1 {\\n line-height: 1rem;\\n}\\n.line-1-25 {\\n line-height: 1.25rem;\\n}\\n.line-1-5 {\\n line-height: 1.5rem;\\n}\\n.line-1-75 {\\n line-height: 1.75rem;\\n}\\n.compact {\\n font-family: \\\"Albert Sans\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif;\\n}\\n.stencil {\\n font-family: \\\"Ablert Sans Black\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif;\\n font-weight: 700;\\n}\\n.weight-400,\\n.normal {\\n font-weight: 400;\\n}\\n.weight-500,\\n.semibold {\\n font-weight: 500;\\n font-stretch: 95%;\\n}\\n.weight-600,\\n.semibold {\\n font-weight: 600;\\n}\\n.weight-700,\\n.bold,\\nstrong,\\nb {\\n font-weight: 700;\\n}\\n.text-align-left {\\n text-align: left;\\n}\\n.text-align-center {\\n text-align: center;\\n}\\n.text-align-right {\\n text-align: right;\\n}\\n.uppercase {\\n text-transform: uppercase;\\n}\\n.italic {\\n font-style: italic;\\n}\\n.underlined {\\n text-decoration: underline;\\n}\\n.nowrap {\\n white-space: nowrap;\\n}\\n.ellipsis {\\n text-overflow: ellipsis;\\n}\\n.overflow-x-hidden {\\n overflow-x: hidden;\\n}\\n.animation-fade-top {\\n animation: fadeTop 0.3s ease-out backwards;\\n}\\n@keyframes fadeTop {\\n from {\\n transform: translateY(-1rem);\\n opacity: 0;\\n }\\n to {\\n transform: translate(0);\\n opacity: 1;\\n }\\n}\\n.arrow-link {\\n position: relative;\\n padding-right: 2rem;\\n color: #3e7cb2;\\n text-decoration: none;\\n}\\n.arrow-link:before, .arrow-link:after {\\n transition: right 100ms cubic-bezier(0.236, 0, 0.236, 1), left 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.arrow-link::before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n height: 2px;\\n right: 0;\\n top: 50%;\\n transform: translateY(-50%);\\n width: 1.5rem;\\n background-color: #6e9fd5;\\n}\\n.arrow-link::after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n transform: translateY(-50%) rotate(135deg);\\n right: 0;\\n width: 0.25rem;\\n height: 0.25rem;\\n border-top: 2px solid #6e9fd5;\\n border-left: 2px solid #6e9fd5;\\n}\\n.arrow-link:hover:after, .arrow-link:hover:before {\\n right: -0.25rem;\\n}\\n.arrow-link--reverse {\\n padding-right: 0;\\n padding-left: 2rem;\\n}\\n.arrow-link--reverse::before {\\n right: auto;\\n left: 0;\\n}\\n.arrow-link--reverse::after {\\n transform: translateY(-50%) rotate(-45deg);\\n right: auto;\\n left: 0;\\n}\\n.arrow-link--reverse:hover:after, .arrow-link--reverse:hover:before {\\n right: auto;\\n left: -0.25rem;\\n}\\n.bottom-section {\\n position: relative;\\n padding: 2.75rem 0 2rem;\\n}\\n.bottom-section:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n height: 50%;\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.bottom-section:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 100%;\\n transform: skewY(-4deg);\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.bullet-point {\\n display: flex;\\n}\\n.bullet-point__number {\\n flex-shrink: 0;\\n width: 1.25rem;\\n height: 1.25rem;\\n margin-right: 0.25rem;\\n border-radius: 50%;\\n text-align: center;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n line-height: 1.25rem;\\n font-weight: 700;\\n color: #3e7cb2;\\n background-color: #e2ecf6;\\n}\\n.bullet-point__bullet {\\n flex-shrink: 0;\\n width: 0.25rem;\\n height: 0.25rem;\\n align-self: flex-start;\\n margin-right: 0.25rem;\\n margin-top: 0.5rem;\\n border-radius: 50%;\\n background-color: #39235d;\\n}\\n.bullet-point__text {\\n flex-grow: 1;\\n margin-top: 0.125rem;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n}\\n.button {\\n display: inline-block;\\n height: 2rem;\\n padding: 0 1rem;\\n width: auto;\\n min-width: 7rem;\\n border: none;\\n border-radius: 10rem;\\n color: hsl(100, 100%, 100%);\\n white-space: nowrap;\\n font-weight: 600;\\n letter-spacing: 0.005rem;\\n line-height: 2rem;\\n text-decoration: none;\\n text-align: center;\\n background-color: #6e9fd5;\\n transition: background-color 100ms cubic-bezier(0.236, 0, 0.236, 1), box-shadow 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.button:hover {\\n background-color: #8ab4db;\\n}\\n.button:disabled, .button--disabled {\\n opacity: 1;\\n color: #a1a7bb;\\n background-color: #e0e2e9;\\n}\\n.button:disabled:hover, .button--disabled:hover {\\n box-shadow: none;\\n background-color: #e0e2e9;\\n}\\n.button:focus {\\n outline: none;\\n box-shadow: 0 0 0 3px #3e7cb2;\\n}\\n.button.ball, .button--ball {\\n height: 2rem;\\n width: 2rem !important;\\n}\\n.button.small, .button--small {\\n height: 1.5rem;\\n padding: 0 0.75rem;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n line-height: 1.5rem;\\n}\\n.button--large {\\n height: 2.5rem;\\n min-width: 10rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n line-height: 2.5rem;\\n}\\n.button--icon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n.button--suffix {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.25rem;\\n border-bottom-right-radius: 0.25rem;\\n}\\n.button--tab {\\n font-weight: 500;\\n color: hsl(100, 100%, 100%);\\n text-decoration: none;\\n text-align: center;\\n width: auto;\\n min-width: 4rem;\\n line-height: 2rem;\\n background-color: #8ab4db;\\n border-top-left-radius: 0.25rem;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.25rem;\\n border-bottom-right-radius: 0;\\n border: 1px solid #f3f7fb;\\n}\\n.button--tab:hover {\\n background-color: #3e7cb2;\\n}\\n.button--tab_active {\\n background-color: #3e7cb2;\\n}\\n.button--green {\\n background-color: #43c45f;\\n}\\n.button--green:hover {\\n background-color: #56ca70;\\n}\\n.button--white {\\n background-color: hsl(100, 100%, 100%);\\n color: #39235d;\\n transition: opacity 100ms cubic-bezier(0.236, 0, 0.236, 1), box-shadow 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.button--white:hover {\\n opacity: 0.8;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.button--white_outlined {\\n color: #fc8020;\\n box-shadow: 0px 2px 4px rgba(50, 32, 83, 0.07), 0px 4px 24px rgba(97, 148, 205, 0.13);\\n}\\n.button--red {\\n background-color: #ef686f;\\n}\\n.button--red:hover {\\n background-color: #f17f85;\\n}\\n.button--orange {\\n background-color: #fc8020;\\n}\\n.button--orange:hover {\\n background-color: #fc8e39;\\n}\\n.button--grey {\\n background-color: #888888;\\n}\\n.button--grey:hover {\\n background-color: #959595;\\n}\\n.button--block {\\n display: flex;\\n justify-content: center;\\n width: 100%;\\n}\\n.button--suffix {\\n min-width: 0;\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n.card {\\n position: relative;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 0.75rem #e2ecf6, 0 1px 1px 1px #e2ecf6;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.card--purple {\\n background-color: #39235d;\\n color: hsl(100, 100%, 100%);\\n}\\n.card--yellow {\\n background-color: #ffd44f;\\n box-shadow: 0 0 0 0;\\n}\\n.card--noshadow {\\n box-shadow: 0 0 0 0;\\n}\\n.category-score {\\n display: flex;\\n}\\n.category-score__heading {\\n font-weight: 500;\\n}\\n.category-score__first-column {\\n flex-grow: 1;\\n padding-right: 2rem;\\n}\\n.category-score__bar-with-labels {\\n display: flex;\\n align-items: center;\\n width: 100%;\\n margin: 0.4rem 0;\\n}\\n.category-score__bar {\\n position: relative;\\n width: 100%;\\n height: 1rem;\\n background: linear-gradient(90deg, #d9d562, #64be78);\\n border-radius: 256px;\\n margin: 0 0.5rem;\\n}\\n.category-score__indicator {\\n position: absolute;\\n width: 4px;\\n height: calc(100% + 0.4rem);\\n top: -0.2rem;\\n left: 0;\\n transform: translateX(-50%);\\n background: #707070;\\n}\\n.category-score__score-value {\\n font-size: 3em;\\n margin-top: 0.5rem;\\n margin-left: -0.1rem;\\n}\\n.checkbox {\\n position: relative;\\n}\\n.checkbox input {\\n position: absolute;\\n left: 0;\\n margin: 0;\\n width: 0;\\n height: 0;\\n opacity: 0;\\n overflow: hidden;\\n pointer-events: none;\\n z-index: -1;\\n}\\n.checkbox--no-top .checkbox__inner::before, .checkbox--no-top .checkbox__inner::after {\\n top: 0;\\n}\\n.checkbox label,\\n.checkbox .checkbox__inner {\\n position: relative;\\n display: block;\\n overflow: hidden;\\n min-width: 1.2em;\\n min-height: 1.2em;\\n padding-left: 1.575em;\\n color: #1c1f28;\\n cursor: pointer;\\n}\\n.checkbox label:before,\\n.checkbox .checkbox__inner:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n box-sizing: border-box;\\n border-radius: 0.125rem;\\n border-width: 2px;\\n border-style: solid;\\n border-color: #626e8e;\\n background-color: hsl(100, 100%, 100%);\\n transition: border-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 100ms, border-width 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms, background-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s;\\n}\\n.checkbox label:after,\\n.checkbox .checkbox__inner:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n opacity: 0;\\n text-align: center;\\n color: #fff;\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTkgMTljLS41IDAtMS0uMi0xLjQtLjZsLTUtNWMtLjgtLjgtLjgtMiAwLTIuOC44LS44IDItLjggMi44IDBMOSAxNC4ybDkuNi05LjZjLjgtLjggMi0uOCAyLjggMCAuOC44LjggMiAwIDIuOGwtMTEgMTFjLS40LjQtLjkuNi0xLjQuNnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=\\\");\\n background-size: 0.8em;\\n background-repeat: no-repeat;\\n background-position: center;\\n transform: scale(0);\\n transition: transform 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms;\\n}\\n.checkbox input:focus + label {\\n color: #6e9fd5;\\n}\\n.checkbox input:focus + label:before {\\n background-color: hsl(100, 100%, 100%);\\n border-color: #6e9fd5;\\n}\\n.checkbox input:checked + label, .checkbox--checked > .checkbox__inner {\\n font-weight: 500;\\n color: #6e9fd5;\\n}\\n.checkbox input:checked + label:before, .checkbox--checked > .checkbox__inner:before {\\n border-width: 0.5em;\\n border-color: #6e9fd5;\\n background-color: #6e9fd5;\\n transition: border-width 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s, background-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms;\\n}\\n.checkbox input:checked + label:after, .checkbox--checked > .checkbox__inner:after {\\n opacity: 1;\\n transform: scale(1);\\n}\\n.checkbox input:disabled + label {\\n color: #626e8e;\\n}\\n.checkbox input:disabled + label:before {\\n border-color: #626e8e;\\n background-color: #626e8e;\\n}\\n.checkbox--no-top .checkbox__inner::before, .checkbox--no-top .checkbox__inner::after {\\n top: 0;\\n}\\n.checkbox--transparent .checkbox__inner::before {\\n background: transparent;\\n}\\n.checkbox--checked .checkbox__inner::before {\\n background-color: #6e9fd5;\\n}\\n.circle-image {\\n width: 4rem;\\n height: 4rem;\\n border-radius: 10rem;\\n background-size: cover;\\n background-repeat: no-repeat;\\n background-position: center center;\\n}\\n.code {\\n font-family: Consolas, \\\"Andale Mono WT\\\", \\\"Andale Mono\\\", \\\"Lucida Console\\\", \\\"Lucida Sans Typewriter\\\", \\\"DejaVu Sans Mono\\\", \\\"Bitstream Vera Sans Mono\\\", \\\"Liberation Mono\\\", \\\"Nimbus Mono L\\\", Monaco, \\\"Courier New\\\", Courier, monospace;\\n letter-spacing: 0.1em;\\n color: #39235d;\\n}\\n.digit-inputs {\\n display: flex;\\n justify-content: center;\\n}\\n.digit-inputs > * + * {\\n margin-left: 0.25rem;\\n}\\n.digit-inputs__item[type=tel] {\\n width: 2rem;\\n height: 2rem;\\n border-radius: 20rem;\\n border: 2px solid #e2ecf6;\\n font-size: 20px;\\n text-align: center;\\n font-weight: 500;\\n background-color: #f3f7fb;\\n -webkit-appearance: none;\\n}\\n.digit-inputs__item[type=tel]:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n box-shadow: 0 0.25rem 1rem -0.25rem rgba(110, 159, 213, 0.4) inset, 0 0 0 1px #6e9fd5 inset;\\n}\\n.error-message {\\n text-align: center;\\n}\\n.error-message svg {\\n display: block;\\n margin: 0 auto;\\n width: 3rem;\\n height: 3rem;\\n stroke: #ef686f;\\n}\\n.error-message__text {\\n margin-top: 1rem;\\n margin-bottom: 1rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n color: #ef686f;\\n}\\n.header {\\n position: relative;\\n padding: 3rem 0 1rem;\\n margin-bottom: 1rem;\\n}\\n.header:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 50%;\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.header:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 100%;\\n transform: skewY(-4deg);\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.header--purple:before {\\n background-color: #39235d;\\n}\\n.header--purple:after {\\n background-color: #39235d;\\n}\\n.icon-badge {\\n padding: 0.75rem;\\n width: 3rem;\\n height: 3rem;\\n border-radius: 10rem;\\n}\\n.icon-badge svg {\\n width: 100%;\\n height: 100%;\\n stroke: hsl(100, 100%, 100%);\\n}\\n.icon-badge-title .icon-badge {\\n display: inline-block;\\n width: 1.25rem;\\n height: 1.25rem;\\n line-height: 0.75rem;\\n padding: 0.25rem;\\n margin-right: 0.25rem;\\n}\\n.icon-badge-title {\\n display: block;\\n}\\n.inline-icon-text {\\n display: flex;\\n align-items: flex-start;\\n justify-content: flex-end;\\n}\\n@media screen and (max-width: 767px) {\\n .inline-icon-text {\\n justify-content: center;\\n }\\n}\\n.inline-icon-text--start {\\n justify-content: flex-start;\\n}\\n@media screen and (max-width: 767px) {\\n .inline-icon-text--start {\\n justify-content: flex-start;\\n }\\n}\\n.inline-icon-text__icon {\\n width: 1rem;\\n height: 1rem;\\n flex-shrink: 0;\\n}\\n.inline-icon-text__text {\\n margin-left: 0.25rem;\\n}\\n.input {\\n display: block;\\n position: relative;\\n}\\n.input label {\\n font-weight: 500;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n cursor: pointer;\\n}\\n.input label + input {\\n margin-top: 0.25rem;\\n}\\n.input .select-chevron-down:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n width: 0.25rem;\\n height: 0.25rem;\\n right: 1rem;\\n top: 65%;\\n margin-top: -0.125rem;\\n border-right: 2px solid #1c1f28;\\n border-bottom: 2px solid #1c1f28;\\n transform: rotate(45deg);\\n transform-origin: top;\\n pointer-events: none;\\n transition: border-color 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.input input,\\n.input textarea,\\n.input select {\\n width: 100%;\\n padding-top: 0.5rem;\\n padding-bottom: 0.5rem;\\n padding-left: 0.5rem;\\n padding-right: 0.5rem;\\n border-radius: 0.25rem;\\n border-width: 2px;\\n border-style: solid;\\n border-color: #e2ecf6;\\n box-shadow: none;\\n font-size: 16px;\\n font-weight: 400;\\n color: #1c1f28;\\n line-height: 1;\\n background: #f3f7fb;\\n box-sizing: border-box;\\n -webkit-appearance: none;\\n}\\n.input input::-moz-placeholder, .input textarea::-moz-placeholder, .input select::-moz-placeholder {\\n opacity: 1;\\n color: #626e8e;\\n transition-duration: 100ms;\\n transition-easing: linear;\\n -moz-transition-property: opacity;\\n transition-property: opacity;\\n}\\n.input input::placeholder,\\n.input textarea::placeholder,\\n.input select::placeholder {\\n opacity: 1;\\n color: #626e8e;\\n transition-duration: 100ms;\\n transition-easing: linear;\\n transition-property: opacity;\\n}\\n.input input.editing-border,\\n.input textarea.editing-border,\\n.input select.editing-border {\\n border-color: #ffd44f;\\n border-width: 2px;\\n}\\n.input input.editing-border:focus,\\n.input textarea.editing-border:focus,\\n.input select.editing-border:focus {\\n border-color: #ffd44f;\\n border-width: 2px;\\n}\\n.input input:focus,\\n.input textarea:focus,\\n.input select:focus {\\n border-color: #6e9fd5;\\n outline: none;\\n box-shadow: none, 0 0 0 1px #6e9fd5 inset;\\n background: #f3f7fb;\\n}\\n.input input:not(select):-moz-read-only, .input textarea:not(select):-moz-read-only, .input select:not(select):-moz-read-only {\\n color: #626e8e;\\n border-color: #e0e2e9;\\n background-color: #e0e2e9;\\n cursor: not-allowed;\\n}\\n.input input:not(select):read-only, .input input:disabled,\\n.input textarea:not(select):read-only,\\n.input textarea:disabled,\\n.input select:not(select):read-only,\\n.input select:disabled {\\n color: #626e8e;\\n border-color: #e0e2e9;\\n background-color: #e0e2e9;\\n cursor: not-allowed;\\n}\\n.input input.has-suffix,\\n.input textarea.has-suffix,\\n.input select.has-suffix {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: none;\\n}\\n.input--white input {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.input--white input:focus {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.input--has-suffix {\\n display: flex;\\n flex-direction: column;\\n flex-grow: 1;\\n}\\n.input--has-suffix input {\\n height: 100%;\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: none;\\n}\\n.input--has-clear input {\\n padding-right: 2rem;\\n}\\n.input--has-icon input {\\n padding-left: 2rem;\\n}\\n.input__clear {\\n position: absolute;\\n top: 50%;\\n right: 0.5rem;\\n width: 1rem;\\n height: 1rem;\\n color: transparent;\\n transform: translateY(-50%);\\n}\\n.input__clear:before, .input__clear:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n margin-top: -2px;\\n width: 100%;\\n height: 3px;\\n border-radius: 10px;\\n background-color: #626e8e;\\n}\\n.input__clear:after {\\n transform: rotate(45deg);\\n}\\n.input__clear:before {\\n transform: rotate(-45deg);\\n}\\n.input__clear:hover:before, .input__clear:hover:after {\\n background-color: #ef686f;\\n}\\n.input__icon {\\n position: absolute;\\n left: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n width: 1rem;\\n height: 1rem;\\n opacity: 0.3;\\n pointer-events: none;\\n}\\n.field_with_errors input,\\n.field_with_errors textarea {\\n border-color: #ef686f;\\n}\\n@media screen and (min-width: 576px) {\\n .input-button {\\n display: flex;\\n }\\n}\\n.input-button__left {\\n flex-grow: 1;\\n}\\n@media screen and (max-width: 575px) {\\n .input-button__left {\\n margin-bottom: 1rem;\\n }\\n}\\n@media screen and (min-width: 576px) {\\n .input-button__left {\\n margin-right: 0.5rem;\\n }\\n}\\n.input-button__right {\\n flex-shrink: 0;\\n}\\n@media screen and (max-width: 575px) {\\n .input-button__right {\\n width: 100%;\\n }\\n}\\n.linechart-container {\\n position: relative; /* If you want text inside of it */\\n width: 100%;\\n padding-top: 40%;\\n}\\n@media screen and (max-width: 767px) {\\n .linechart-container {\\n padding-top: 56.25%;\\n }\\n}\\n.linechart-container--small {\\n width: 20rem;\\n height: 5rem;\\n padding-top: 0;\\n}\\n.linechart-container__inner {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n}\\n.link {\\n padding: 0;\\n border: none;\\n border-radius: 0;\\n text-decoration: underline;\\n color: #3e7cb2;\\n}\\n.link:hover {\\n color: #6e9fd5;\\n}\\n.link:focus {\\n outline: none;\\n color: #6e9fd5;\\n text-decoration: underline;\\n}\\n.link--blue-light {\\n color: #8ab4db;\\n}\\n.link--blue-light:hover {\\n color: #e2ecf6;\\n}\\n.link--white {\\n color: hsl(100, 100%, 100%);\\n}\\n.link--white:hover {\\n color: #e2ecf6;\\n}\\n.link--red {\\n color: #ef686f;\\n}\\n.link--red:hover {\\n color: #f6adb1;\\n}\\n.loading-spinner {\\n text-align: center;\\n}\\n.loading-spinner__logo {\\n display: block;\\n margin: 0 auto;\\n width: 3rem;\\n height: 3rem;\\n animation-name: spin;\\n animation-duration: 3000ms;\\n animation-iteration-count: infinite;\\n animation-timing-function: linear;\\n}\\n.loading-spinner__logo--small {\\n width: 1.5rem;\\n height: 1.5rem;\\n}\\n@keyframes spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n.loading-spinner__text {\\n margin-top: 1rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n color: #626e8e;\\n}\\n.logo svg {\\n width: auto;\\n height: 2rem;\\n}\\n.logo--small svg {\\n height: 1rem;\\n}\\n.markdown-content > * + * {\\n margin-top: 0.75rem;\\n}\\n.markdown-content h1,\\n.markdown-content h2,\\n.markdown-content h3,\\n.markdown-content h4,\\n.markdown-content h5,\\n.markdown-content h6 {\\n font-weight: 500;\\n}\\n.microbiome-pie-chart__pie {\\n height: 10rem;\\n}\\n.microbiome-pie-chart__legend {\\n display: flex;\\n margin-bottom: 0.3rem;\\n}\\n.microbiome-pie-chart__legend-color {\\n width: 0.7rem;\\n height: 0.7rem;\\n border-radius: 50%;\\n margin-top: 0.15rem;\\n margin-right: 0.5rem;\\n}\\n.microbiome-pie-chart__legend-text {\\n flex-grow: 1;\\n display: flex;\\n justify-content: space-between;\\n}\\n.microbiome-pie-chart__legend-value {\\n margin-left: 3rem;\\n font-weight: 500;\\n}\\n.microbiome-pie-chart__legends-container {\\n display: flex;\\n justify-content: center;\\n}\\n.microbiome-suggestion-section > p {\\n margin: 1rem 0;\\n}\\n.microbiome-suggestion-section > ul {\\n margin: 1rem 0;\\n}\\n.microbiome-suggestion-section > ul > li {\\n margin: 0.25rem 0 0 1.5rem;\\n}\\n.number-input {\\n margin-top: auto;\\n position: relative;\\n max-width: 7rem;\\n}\\n.number-input__label {\\n display: block;\\n margin-bottom: 0.25rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n font-weight: 500;\\n}\\n.number-input__field[type=text] {\\n display: inline-block;\\n padding: 0.5rem 0.5rem;\\n height: 2.5rem;\\n width: 100%;\\n min-width: 0;\\n border: 2px solid #e2ecf6;\\n border-radius: 0.25rem;\\n font-size: 22px;\\n line-height: 1rem;\\n background-color: #f3f7fb;\\n transition: border-color 100ms cubic-bezier(0.236, 0, 0.236, 1), background-color 100ms cubic-bezier(0.236, 0, 0.236, 1), padding-left 100ms cubic-bezier(0.236, 0, 0.236, 1), padding-right 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n -webkit-appearance: none;\\n}\\n.number-input--active .number-input__field[type=text] {\\n padding-left: 1.5rem;\\n padding-right: 1.5rem;\\n}\\n.number-input__field[type=text]:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n}\\n.number-input__field[type=text]:hover {\\n border-color: #6e9fd5;\\n}\\n.react-numeric-input {\\n display: block;\\n position: relative;\\n}\\n.react-numeric-input b {\\n display: block;\\n position: absolute;\\n right: 0rem;\\n top: 50%;\\n width: 1.5rem;\\n height: 2rem;\\n margin-top: -1rem;\\n opacity: 0;\\n cursor: pointer;\\n transform: scale(0);\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.number-input--active .react-numeric-input b {\\n opacity: 1;\\n transform: scale(1);\\n}\\n.react-numeric-input b:last-child {\\n left: 0rem;\\n right: auto;\\n}\\n.react-numeric-input b:hover i {\\n background-color: #8ab4db;\\n}\\n.react-numeric-input b i {\\n display: block;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n height: 3px;\\n width: 0.625rem;\\n margin-left: -0.3125rem;\\n margin-top: -1.5px;\\n border-radius: 3px;\\n background-color: #6e9fd5;\\n}\\n.react-numeric-input b i:nth-child(2) {\\n transform: rotate(90deg);\\n}\\n.note {\\n padding: 0.5rem;\\n border-radius: 0.25rem;\\n border: 2px dashed #ffd44f;\\n color: #4f3c00;\\n background-color: #fff9e8;\\n}\\n.overall-score-indicator {\\n position: relative;\\n width: 100px;\\n height: 100px;\\n}\\n.overall-score-indicator__background {\\n position: absolute;\\n z-index: -1;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n border: 10px solid;\\n border-radius: 50%;\\n opacity: 0.15;\\n}\\n.overall-score-indicator__texts {\\n position: absolute;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, calc(-50% + 3px));\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n font-weight: 500;\\n}\\n.overall-score-indicator__score {\\n font-size: 38px;\\n line-height: 28px;\\n}\\n.pagy-nav {\\n display: flex;\\n}\\n.pagy-nav span {\\n padding: 0.25rem;\\n margin-left: -1px;\\n min-width: 1.5rem;\\n border: 1px solid #e0e2e9;\\n text-align: center;\\n}\\n.pagy-nav span:first-child {\\n padding-left: 0.5rem;\\n border-top-left-radius: 10rem;\\n border-bottom-left-radius: 10rem;\\n}\\n.pagy-nav span:last-child {\\n padding-right: 0.5rem;\\n border-top-right-radius: 10rem;\\n border-bottom-right-radius: 10rem;\\n}\\n.pagy-nav span {\\n color: #a1a7bb;\\n}\\n.pagy-nav span.active {\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n border-color: #6e9fd5;\\n background-color: #6e9fd5;\\n}\\n.pagy-nav a {\\n color: #6e9fd5;\\n}\\n.radio {\\n position: relative;\\n}\\n.radio input {\\n position: absolute;\\n left: 0;\\n margin: 0;\\n width: 0;\\n height: 0;\\n opacity: 0;\\n overflow: hidden;\\n pointer-events: none;\\n z-index: -1;\\n}\\n.radio label {\\n display: block;\\n position: relative;\\n overflow: hidden;\\n min-width: 1.2em;\\n min-height: 1.2em;\\n padding-left: 1.575em;\\n color: #1c1f28;\\n cursor: pointer;\\n}\\n.radio label:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n box-sizing: border-box;\\n border-radius: 10em;\\n border-width: 2px;\\n border-style: solid;\\n border-color: #626e8e;\\n box-shadow: 0 0 0 0.6em hsl(100, 100%, 100%) inset;\\n background-color: hsl(100, 100%, 100%);\\n transition: box-shadow 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms, border-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s, background-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 100ms;\\n}\\n.radio input:focus + label {\\n color: #6e9fd5;\\n}\\n.radio input:focus + label:before {\\n background-color: hsl(100, 100%, 100%);\\n border-color: #6e9fd5;\\n box-shadow: none;\\n}\\n.radio input:checked + label {\\n font-weight: 500;\\n color: #6e9fd5;\\n}\\n.radio input:checked + label:before {\\n border-color: #6e9fd5;\\n background-color: #6e9fd5;\\n box-shadow: 0 0 0 0.1875em hsl(100, 100%, 100%) inset;\\n transition: box-shadow 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s, border-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms;\\n}\\n.radio input:disabled + label {\\n color: #626e8e;\\n}\\n.radio input:disabled + label:before {\\n background-color: #626e8e;\\n border-color: #626e8e;\\n box-shadow: none;\\n}\\n.segmented-control {\\n display: flex;\\n}\\n.segmented-control__item {\\n flex-basis: 0;\\n flex-grow: 1;\\n min-width: 128px;\\n padding: 0.5rem;\\n border: 2px solid #6e9fd5;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n text-decoration: none;\\n text-align: center;\\n overflow: hidden;\\n font-weight: 500;\\n color: #3e7cb2;\\n background-color: #fff;\\n}\\n.segmented-control__item--active {\\n color: #fff;\\n background-color: #6e9fd5;\\n cursor: default;\\n}\\n.segmented-control__item--active:focus {\\n outline: none;\\n}\\n.segmented-control__item:hover:not(.segmented-control__item--active) {\\n background-color: #f3f7fb;\\n}\\n.segmented-control__item:first-child {\\n padding-left: 1rem;\\n border-top-left-radius: 5rem;\\n border-bottom-left-radius: 5rem;\\n}\\n.segmented-control__item:last-child {\\n padding-right: 1rem;\\n border-top-right-radius: 5rem;\\n border-bottom-right-radius: 5rem;\\n}\\n.segmented-control__item:not(:first-child) {\\n margin-left: -2px;\\n}\\n.select {\\n position: relative;\\n}\\n.select:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n width: 0.375rem;\\n height: 0.375rem;\\n right: 0.75rem;\\n top: 50%;\\n margin-top: -0.2rem;\\n border-right: 3px solid #6e9fd5;\\n border-bottom: 3px solid #6e9fd5;\\n transform: rotate(45deg);\\n transform-origin: top;\\n pointer-events: none;\\n}\\n.select select {\\n width: 100%;\\n padding: 0.5rem;\\n padding-right: 2rem;\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n border: 2px solid #e2ecf6;\\n border-radius: 0.25rem;\\n font-size: 16px;\\n white-space: nowrap;\\n background-color: #f3f7fb;\\n}\\n.select select:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n}\\n.select select:-moz-focusring {\\n color: transparent;\\n text-shadow: 0 0 0 #000;\\n}\\n.select select::-ms-expand {\\n display: none;\\n}\\n@media all and (min-width: 0\\\\0 ) and (min-resolution: 0.001dpcm) {\\n .select select:after, .select select:before {\\n display: none;\\n }\\n}\\n.select__icon {\\n display: inline-flex;\\n width: 30px;\\n height: 20px;\\n}\\n.select__icon > * {\\n transform: translateY(4px);\\n}\\n.stats {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n margin: -0.25rem -1rem;\\n}\\n.stats__item {\\n position: relative;\\n padding: 0.25rem 1rem;\\n white-space: nowrap;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n}\\n.stats__item:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n left: 0;\\n top: 0.25rem;\\n bottom: 0.25rem;\\n width: 1px;\\n background-color: #a1a7bb;\\n}\\n.stats__item:first-child:before {\\n display: none;\\n}\\n@media screen and (max-width: 767px) {\\n .stats__item {\\n font-size: 0.67rem;\\n line-height: 1rem;\\n }\\n .stats__item:before {\\n display: none;\\n }\\n}\\n.tooltip-text {\\n display: none;\\n width: -moz-max-content;\\n width: max-content;\\n max-width: 400px;\\n position: absolute;\\n z-index: 1;\\n top: 0;\\n left: 0;\\n background: purple;\\n color: white;\\n font-weight: normal;\\n font-size: 14px;\\n padding: 8px;\\n border-radius: 4px;\\n}\\n.tooltip-arrow {\\n position: absolute;\\n background: purple;\\n width: 8px;\\n height: 8px;\\n transform: rotate(45deg);\\n}\\n.activate__info {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 1rem;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__info {\\n flex-direction: row;\\n }\\n}\\n.activate__info-icon {\\n position: relative;\\n flex: 0 0 120px;\\n width: 120px;\\n height: 120px;\\n background: #dae7f6;\\n border-radius: 50%;\\n margin-bottom: 1rem;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__info-icon {\\n flex-direction: row;\\n margin-right: 1rem;\\n margin-bottom: 0;\\n }\\n}\\n.activate__info-icon svg {\\n transform: scale(0.6) translateY(10px);\\n}\\n.activate__form {\\n padding: 1rem;\\n max-width: 30rem;\\n}\\n.activate__bottom {\\n display: flex;\\n justify-content: flex-end;\\n align-items: center;\\n padding: 1rem;\\n background: #f2f7fb;\\n border-top: 2px solid #e2e6f2;\\n border-radius: 0 0 0.5rem 0.5rem;\\n}\\n.activate__bottom--center {\\n justify-content: center;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__name {\\n max-width: 20rem;\\n }\\n}\\n.activate__contact-info {\\n display: flex;\\n flex-direction: column;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__contact-info {\\n flex-direction: row;\\n }\\n}\\n.activate__contact-info-input {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n}\\n.activate__contact-info-input:last-of-type {\\n margin-bottom: 0;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__contact-info-input {\\n margin-bottom: 0;\\n padding-right: 1rem;\\n }\\n .activate__contact-info-input:last-of-type {\\n padding-left: 1rem;\\n padding-right: 0;\\n }\\n}\\n.admin-header {\\n display: flex;\\n align-items: flex-end;\\n flex-wrap: wrap;\\n}\\n.admin-header__title {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n font-size: 1.9rem;\\n line-height: 2.25rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n@media screen and (max-width: 575px) {\\n .admin-header__title {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n }\\n}\\n.admin-header__small-title {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n.admin-header__button {\\n flex-shrink: 0;\\n margin-bottom: 1rem;\\n}\\n.admin-nav-wrapper {\\n background-color: #39235d;\\n}\\n@media screen and (min-width: 992px) {\\n .admin-nav-wrapper__inner {\\n display: flex;\\n }\\n}\\n.admin-nav-logo {\\n display: flex;\\n justify-content: center;\\n margin-right: 0.5rem;\\n padding: 0.5rem;\\n}\\n.admin-nav-logo__image {\\n display: block;\\n height: 1rem;\\n width: auto;\\n}\\n.admin-nav-logo__text {\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n text-align: right;\\n color: hsl(100, 100%, 100%);\\n}\\n@media screen and (min-width: 992px) {\\n .admin-nav {\\n display: flex;\\n }\\n}\\n.admin-nav--left {\\n flex-grow: 1;\\n}\\n.admin-nav__link {\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n padding: 0.5rem 0.375rem;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n text-align: center;\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n text-decoration: none;\\n transition: background-color 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.admin-nav__link--active {\\n background-color: rgba(103, 49, 142, 0.75);\\n}\\n.admin-nav__link:hover:not(.admin-nav__link--active) {\\n background-color: rgba(103, 49, 142, 0.3);\\n}\\n.admin-nav-locale-wrapper {\\n display: flex;\\n flex-direction: column;\\n padding-left: 0.5rem;\\n padding-right: 0.5rem;\\n}\\n.admin-nav__locale {\\n padding: 0rem 0rem;\\n color: hsl(100, 100%, 100%);\\n font-size: 0.4rem;\\n text-decoration: none;\\n}\\n.admin-nav__locale--active {\\n background-color: rgba(103, 49, 142, 0.75);\\n}\\n.admin-nav__locale:hover:not(.admin-nav__link--active) {\\n background-color: rgba(103, 49, 142, 0.3);\\n}\\n.auth-card {\\n max-width: 34rem;\\n margin: 0 auto;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05), 0 0.125rem 0.125rem rgba(0, 0, 0, 0.025);\\n}\\n.auth-card__top {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 2.5rem 1.5rem;\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n}\\n@media screen and (max-width: 575px) {\\n .auth-card__top {\\n padding: 1.25rem;\\n }\\n}\\n.auth-card__content {\\n padding: 2rem 1.5rem;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: hsl(100, 100%, 100%);\\n}\\n@media screen and (max-width: 575px) {\\n .auth-card__content {\\n padding: 1.5rem 1.5rem;\\n }\\n}\\n.auth-card__logo {\\n display: flex;\\n}\\n.auth-card__logo svg,\\n.auth-card__logo img {\\n height: 1.5rem;\\n}\\n@media screen and (max-width: 575px) {\\n .auth-card__logo svg,\\n .auth-card__logo img {\\n height: 1rem;\\n }\\n}\\n.auth-card__vital_logo {\\n height: 2rem;\\n width: auto;\\n}\\n.auth-methods {\\n display: flex;\\n flex-wrap: wrap;\\n}\\n.auth-methods__item {\\n display: block;\\n flex-basis: 33.333334%;\\n padding: 0.25rem;\\n}\\n@media screen and (max-width: 575px) {\\n .auth-methods__item {\\n flex-basis: 50%;\\n }\\n}\\n.auth-method-link {\\n display: block;\\n box-shadow: 0 1px 0 0 #e2ecf6;\\n border: 1px solid #e2ecf6;\\n border-radius: 0.25rem;\\n text-align: center;\\n text-decoration: none;\\n transition: box-shadow 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.auth-method-link:hover {\\n box-shadow: 0 0.25rem 0.75rem #e2ecf6, 0 1px 1px 1px #e2ecf6;\\n}\\n.auth-method-logo {\\n display: block;\\n padding: 0.25rem;\\n}\\n.auth-method-logo svg {\\n max-height: 80px;\\n}\\n.auth-method-title {\\n padding: 0.25rem;\\n border-top: 1px solid #e2ecf6;\\n text-decoration: none;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n font-weight: 500;\\n}\\n.auth-method-link:hover .auth-method-title {\\n color: #3e7cb2;\\n}\\n.nav-container {\\n position: relative;\\n z-index: 9998;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.nav-container--invert {\\n background-color: #39235d;\\n}\\n.nav-container__inner {\\n display: flex;\\n margin: 0 auto;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-container__inner {\\n flex-direction: column;\\n }\\n}\\n.nav-container__left {\\n display: flex;\\n align-items: stretch;\\n justify-content: space-between;\\n flex-shrink: 1;\\n margin-right: 1rem;\\n height: 81px;\\n}\\n@media screen and (min-width: 768px) {\\n .nav-container__left {\\n margin-right: 2rem;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .nav-container__left {\\n margin-right: 1rem;\\n }\\n}\\n.nav-container__right {\\n flex-grow: 1;\\n flex-basis: auto;\\n}\\n.nav-container-logo {\\n display: flex;\\n align-items: stretch;\\n flex-basis: auto;\\n}\\n.nav-container-logo__symbol {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-basis: auto;\\n width: 81px;\\n background-color: #39235d;\\n}\\n.nav-container-logo__symbol svg {\\n height: 1.5rem;\\n}\\n.nav-container-logo__type {\\n display: flex;\\n align-items: center;\\n flex-basis: auto;\\n padding-left: 1rem;\\n}\\n.nav-container-logo__type svg {\\n height: 1rem;\\n width: auto;\\n}\\n.nav-container-logo__full {\\n display: flex;\\n align-items: center;\\n flex-basis: auto;\\n padding-left: 1rem;\\n}\\n.nav-container-logo__full span {\\n display: flex;\\n}\\n.nav-container-logo__full svg {\\n height: 1.25rem;\\n}\\n.nav-container-toggle {\\n display: none;\\n flex-shrink: 0;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-container-toggle {\\n display: flex;\\n align-items: center;\\n padding: 0 1rem;\\n margin-right: -1rem;\\n cursor: pointer;\\n }\\n}\\n.nav-toggle {\\n position: relative;\\n width: 36px;\\n height: 24px;\\n cursor: pointer;\\n}\\n.nav-toggle > * {\\n pointer-events: none;\\n}\\n.nav-toggle:before, .nav-toggle:after {\\n content: \\\"\\\";\\n position: absolute;\\n display: block;\\n width: 100%;\\n height: 4px;\\n border-radius: 0;\\n background-color: hsl(0, 0%, 0%);\\n transition-property: top, bottom, transform;\\n transition-duration: 200ms;\\n transition-timing-function: cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.nav-toggle:before {\\n top: 0;\\n}\\n.nav-toggle:after {\\n bottom: 0;\\n}\\n.nav-toggle--collapse:before {\\n top: 50%;\\n transform: translateY(-50%);\\n}\\n.nav-toggle--collapse:after {\\n bottom: 50%;\\n transform: translateY(50%);\\n}\\n.nav-toggle--rotate:before {\\n transform: translateY(-50%) rotateZ(45deg);\\n}\\n.nav-toggle--rotate:after {\\n transform: translateY(50%) rotateZ(45deg);\\n}\\n.nav-container--invert .nav-toggle:before, .nav-container--invert .nav-toggle:after {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.nav-toggle__inner {\\n position: absolute;\\n top: 50%;\\n width: 100%;\\n height: 4px;\\n transform: translateY(-50%);\\n border-radius: 0;\\n background-color: hsl(0, 0%, 0%);\\n transition-property: transform;\\n transition-duration: 200ms;\\n transition-timing-function: cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.nav-toggle--rotate .nav-toggle__inner {\\n transform: translateY(-50%) rotateZ(-45deg);\\n}\\n.nav-container--invert .nav-toggle__inner {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.nav-list {\\n transition: height 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.nav-list > div {\\n display: flex;\\n justify-content: space-between;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-list > div {\\n display: block;\\n overflow-y: auto;\\n max-height: 500px;\\n max-height: calc(100vh - 81px);\\n -webkit-overflow-scrolling: touch;\\n }\\n}\\n.nav-list__inner {\\n display: flex;\\n height: 81px;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-list__inner {\\n display: block;\\n height: auto;\\n }\\n}\\n.nav-link {\\n position: relative;\\n display: flex;\\n align-items: center;\\n white-space: nowrap;\\n padding-left: 0.75rem;\\n padding-right: 0.75rem;\\n color: #39235d;\\n font-size: 18px;\\n text-decoration: none;\\n font-weight: 500;\\n line-height: 1;\\n cursor: pointer;\\n}\\n.nav-link--menuitem {\\n margin-bottom: 0.2rem;\\n}\\n.nav-link--menuitem:hover {\\n text-decoration: underline;\\n}\\n.nav-link--external {\\n flex-grow: 1;\\n background: #f3f7fb;\\n}\\n.nav-container--invert .nav-link {\\n color: hsl(100, 100%, 100%);\\n}\\n@media screen and (min-width: 992px) {\\n .nav-link {\\n flex-grow: 1;\\n border-left: none;\\n }\\n .nav-link:last-child {\\n border-right: none;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .nav-link {\\n padding-left: 0.75rem;\\n padding-right: 0.75rem;\\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\\n line-height: 3.5rem;\\n }\\n .nav-link:first-child {\\n border-top: 1px solid rgba(0, 0, 0, 0.1);\\n }\\n .nav-link:last-child {\\n border-bottom: none;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .nav-link {\\n padding-left: 2rem;\\n padding-right: 2rem;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .nav-link {\\n padding-left: 0.75rem;\\n padding-right: 0.75rem;\\n }\\n}\\n.nav-link__icon {\\n display: flex;\\n align-items: center;\\n margin-right: 0.25rem;\\n}\\n.nav-link__icon svg {\\n width: 1.25rem;\\n height: 1.25rem;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-link__icon {\\n margin-right: 0.5rem;\\n }\\n}\\n.nav-link__label {\\n display: flex;\\n align-items: center;\\n}\\n.nav-link__arrow {\\n margin-inline-start: 0.4em;\\n transition: rotate 0.5s;\\n height: 24px;\\n display: block;\\n}\\n.nav-link__arrow svg {\\n display: block;\\n}\\n.nav-link:has(.navigation-list__submenu--active) .nav-link__arrow {\\n rotate: 180deg;\\n}\\n@media (min-width: 992px) {\\n .navigation-list__submenu {\\n position: absolute;\\n top: 80%;\\n right: 0;\\n background-color: white;\\n border-radius: 0.5em;\\n box-shadow: 0px 4px 24px 0px rgba(97, 148, 205, 0.13), 0px 2px 4px 0px rgba(50, 32, 83, 0.07);\\n }\\n}\\n.navigation-list__submenu a.nav-link {\\n margin-block: 0.8em;\\n}\\n@media (max-width: 991px) {\\n .navigation-list__submenu a.nav-link {\\n border: none;\\n line-height: 1;\\n padding-left: 0;\\n }\\n .navigation-list__link--dropdown {\\n flex-wrap: wrap;\\n }\\n .navigation-list__submenu {\\n width: 100%;\\n margin-top: -1em;\\n margin-bottom: 0.5em;\\n }\\n}\\n.nav-list__filler-icon {\\n color: transparent;\\n}\\n.login-input[type=tel],\\n.login-input[type=num],\\n.login-input[type=text] {\\n width: 100%;\\n padding: 0.5rem 1rem;\\n border: 2px solid #e2ecf6;\\n border-radius: 20rem;\\n font-size: 16px;\\n line-height: 1rem;\\n background-color: #f3f7fb;\\n -webkit-appearance: none;\\n}\\n.login-input[type=tel]:focus,\\n.login-input[type=num]:focus,\\n.login-input[type=text]:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n}\\n.login-container {\\n position: relative;\\n}\\n.login-content-left-enter {\\n opacity: 0.01;\\n transform: translateX(-100%);\\n}\\n.login-content-left-enter-active {\\n opacity: 1;\\n transition: transform 400ms cubic-bezier(0.236, 0, 0.236, 1), opacity 400ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(0%);\\n}\\n.login-content-left-exit {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n.login-content-left-exit-active {\\n opacity: 0.01;\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1), opacity 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(-100%);\\n}\\n.login-content-right-enter {\\n opacity: 0.01;\\n transform: translateX(100%);\\n}\\n.login-content-right-enter-active {\\n opacity: 1;\\n transition: transform 400ms cubic-bezier(0.236, 0, 0.236, 1), opacity 400ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(0%);\\n}\\n.login-content-right-exit {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n.login-content-right-exit-active {\\n opacity: 0.01;\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1), opacity 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(100%);\\n}\\n.login-container__back {\\n display: block;\\n position: absolute;\\n left: 0;\\n top: 0;\\n width: 1.5rem;\\n height: 1.5rem;\\n padding: 0;\\n border: none;\\n}\\n.login-container__back svg {\\n width: 100%;\\n height: 100%;\\n stroke: #39235d;\\n}\\n.login-container__back:hover svg {\\n stroke: #663fa7;\\n}\\n.login-container__back:focus {\\n outline: none;\\n border: 2px solid #39235d;\\n}\\n.login-logo {\\n width: 5rem;\\n height: 5rem;\\n}\\n.login-logo--loading {\\n animation-name: spin;\\n animation-duration: 3000ms;\\n animation-iteration-count: infinite;\\n animation-timing-function: linear;\\n}\\n@media screen and (max-width: 575px) {\\n .login-logo {\\n width: 3rem;\\n height: 3rem;\\n }\\n}\\n.login-logo--vital {\\n height: 2.25rem;\\n width: auto;\\n}\\n.login-language-selector-icon {\\n width: 1rem;\\n height: 1rem;\\n padding-top: 0.25rem;\\n margin-left: 0.5rem;\\n}\\n.login-language-selector-icon svg {\\n width: 100%;\\n height: 100%;\\n stroke: #39235d;\\n}\\n.login-language-selector {\\n right: 0;\\n top: 0;\\n padding: 0;\\n border: none;\\n color: #39235d;\\n}\\n.login-language-selector:hover {\\n outline: none;\\n}\\n.login-language-selector:focus {\\n outline: none;\\n}\\n@keyframes spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n.notice {\\n display: flex;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 0.75rem #e2ecf6, 0 1px 1px 1px #e2ecf6;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.notice__icon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 0.75rem;\\n border-top-left-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n background-color: #6e9fd5;\\n}\\n.notice__icon svg {\\n width: 1rem;\\n height: 1rem;\\n stroke: hsl(100, 100%, 100%);\\n}\\n.notice__content {\\n padding: 0.75rem;\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n}\\n.onboarding-wrapper {\\n position: relative;\\n min-height: 100%;\\n width: 100%;\\n overflow-x: hidden;\\n}\\n.onboarding-wrapper__inner {\\n position: absolute;\\n width: 100%;\\n min-height: 100%;\\n top: 0;\\n left: 0;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n}\\n.onboarding-enter {\\n transform: translateX(100%);\\n}\\n.onboarding-enter .onboarding-animate__left {\\n opacity: 0;\\n transform: translateX(100%);\\n}\\n.onboarding-enter .onboarding-animate__appear {\\n opacity: 0;\\n transform: translateX(100%);\\n}\\n.onboarding-enter-active {\\n opacity: 1;\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms;\\n transform: translateX(0%);\\n}\\n.onboarding-enter-active .onboarding-animate__left {\\n opacity: 1;\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 1000ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 1000ms;\\n transform: translateX(0%);\\n}\\n.onboarding-enter-active .onboarding-animate__appear {\\n opacity: 1;\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 1500ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 1500ms;\\n transform: translateX(0%);\\n}\\n.onboarding-exit {\\n transform: translateX(0%);\\n}\\n.onboarding-exit .onboarding-animate__left {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n.onboarding-exit .onboarding-animate__appear {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n.onboarding-exit-active {\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms;\\n transform: translateX(-100%);\\n}\\n.onboarding-exit-active .onboarding-animate__left {\\n opacity: 0.01;\\n transition: transform 250ms cubic-bezier(0.236, 0, 0.236, 1), opacity 250ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(-100%);\\n}\\n.onboarding-exit-active .onboarding-animate__appear {\\n opacity: 0.01;\\n transition: transform 250ms cubic-bezier(0.236, 0, 0.236, 1) 250ms, opacity 250ms cubic-bezier(0.236, 0, 0.236, 1) 250ms;\\n transform: translateX(-100%);\\n}\\n.onboarding-input input {\\n height: 2.5rem;\\n padding: 0.75rem;\\n border: 2px solid #e2ecf6;\\n border-radius: 0.25rem;\\n font-size: 22px;\\n min-width: 5rem;\\n max-width: 7rem;\\n background-color: #f3f7fb;\\n}\\n.pdf-preview {\\n display: flex;\\n flex-direction: column;\\n height: 100%;\\n}\\n.pdf-preview__iframe {\\n flex-grow: 1;\\n}\\n.pdf-preview__footer {\\n flex-shrink: 0;\\n padding: 0.5rem 1rem;\\n text-align: center;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.pdf-preview-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.pdf-preview-header__left,\\n.pdf-preview-header__middle,\\n.pdf-preview-header__right {\\n flex: 1 1;\\n display: flex;\\n justify-content: center;\\n}\\n.pdf-preview-header__left {\\n padding-left: 0.5rem;\\n}\\n.pdf-preview-header__left > * {\\n margin-right: auto;\\n}\\n.pdf-preview-header__middle {\\n padding: 0.5rem 0;\\n text-align: center;\\n}\\n.pdf-preview-header__right > * {\\n margin-left: auto;\\n}\\n.pdf-preview__close {\\n display: flex;\\n align-items: center;\\n padding: 0.5rem;\\n border-radius: 0;\\n border: none;\\n color: #3e7cb2;\\n}\\n.pdf-preview__close svg {\\n width: 1rem;\\n height: 1rem;\\n fill: #3e7cb2;\\n}\\n.pdf-preview__close:hover {\\n color: #6e9fd5;\\n}\\n.pdf-preview__close:hover svg {\\n fill: #6e9fd5;\\n}\\n.profile-footer {\\n position: fixed;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n padding-bottom: env(safe-area-inset-bottom);\\n box-shadow: 0 -0.25rem 0.75rem #e2ecf6, 0 -1px 1px 1px #e2ecf6;\\n background-color: #39235d;\\n}\\n.profile-footer-error {\\n background-color: #ef686f;\\n}\\n.profile-footer-enter {\\n opacity: 0.01;\\n transform: translateY(100%);\\n}\\n.profile-footer-enter-active {\\n opacity: 1;\\n transition: transform 400ms cubic-bezier(0.236, 0, 0.236, 1), opacity 400ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateY(0%);\\n}\\n.profile-footer-exit {\\n opacity: 1;\\n transform: translateY(0%);\\n}\\n.profile-footer-exit-active {\\n opacity: 0.01;\\n background-color: #43c45f;\\n transform: translateY(100%);\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1) 2000ms, opacity 200ms cubic-bezier(0.236, 0, 0.236, 1) 2000ms, background-color 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.profile-card__notice {\\n display: flex;\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n}\\n.profile-card__notice > * + * {\\n margin-left: 0.25rem;\\n}\\n.profile-card__notice svg {\\n width: 1rem;\\n height: 1rem;\\n stroke: hsl(100, 100%, 100%);\\n}\\n.range-slider {\\n position: relative;\\n display: flex;\\n padding-top: 1.25rem;\\n padding-bottom: 0.25rem;\\n}\\n.range-slider__unit {\\n display: block;\\n position: absolute;\\n top: 0;\\n z-index: 2;\\n transform: translateX(-50%);\\n color: #1c1f28;\\n font-weight: 400;\\n white-space: nowrap;\\n}\\n.range-slider__indicator {\\n display: block;\\n position: absolute;\\n top: 1rem;\\n bottom: 0;\\n width: 2px;\\n z-index: 1;\\n transform: translateX(-50%);\\n border-radius: 10px;\\n background-color: hsl(0, 0%, 0%);\\n}\\n.range-slider__bar {\\n position: relative;\\n height: 0.5rem;\\n width: attr(data-width);\\n border-radius: 2rem;\\n color: #626e8e;\\n}\\n.range-slider__value {\\n position: absolute;\\n left: 50%;\\n bottom: -1.25rem;\\n transform: translateX(-50%);\\n}\\n.range-slider__min {\\n font-weight: 500;\\n position: absolute;\\n bottom: -1.25rem;\\n left: 0;\\n transform: translateX(-100%);\\n color: #ef686f;\\n}\\n.range-slider__max {\\n font-weight: 500;\\n position: absolute;\\n bottom: -1.25rem;\\n right: 0;\\n transform: translateX(100%);\\n color: #ef686f;\\n}\\n.range-slider__recommendation {\\n position: absolute;\\n height: 0.5rem;\\n width: 100px;\\n background-color: #ffd44f;\\n}\\n.range-slider__recommendation:after {\\n content: attr(data-value);\\n position: absolute;\\n bottom: -1.25rem;\\n}\\n.range-slider__recommendation--low {\\n left: 0;\\n border-top-left-radius: 10px;\\n border-bottom-left-radius: 10px;\\n}\\n.range-slider__recommendation--low:after {\\n right: 0;\\n transform: translateX(100%);\\n color: #43c45f;\\n}\\n.range-slider__recommendation--high {\\n right: 0;\\n border-top-right-radius: 10px;\\n border-bottom-right-radius: 10px;\\n}\\n.range-slider__recommendation--high:after {\\n left: 0;\\n transform: translateX(-100%);\\n color: #43c45f;\\n}\\n.range-slider__microbiome-color {\\n background: #d3e3b2;\\n}\\n.result-box {\\n display: flex;\\n flex-direction: column;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box {\\n flex-direction: row;\\n }\\n}\\n.result-box__left {\\n display: flex;\\n flex-direction: column;\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__left {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .result-box__left {\\n flex-basis: 55%;\\n max-width: 55%;\\n }\\n}\\n.result-box__left--grey {\\n background-color: #f3f7fb;\\n}\\n.result-box__main {\\n padding: 0.75rem;\\n flex-grow: 1;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__main {\\n padding: 1rem;\\n }\\n}\\n.result-box__right {\\n padding: 0.75rem;\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right {\\n padding: 1rem;\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .result-box__right {\\n flex-basis: 45%;\\n max-width: 45%;\\n }\\n}\\n.result-box__right--text {\\n background-color: #fbfcfe;\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__right--text {\\n border-top: 2px solid #e2ecf6;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--text {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n border-left: 2px solid #e2ecf6;\\n }\\n}\\n.result-box__right--grey {\\n background-color: #f3f7fb;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--grey {\\n border-left: 2px solid #e2ecf6;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__right--white-bg {\\n border-top: 2px solid #e2ecf6;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--white-bg {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n border-left: 2px solid #e2ecf6;\\n }\\n}\\n.result-box__right--pending {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n background-color: #e2ecf6;\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__right--pending {\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--pending {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n }\\n}\\n.result-box__footer-desktop {\\n border-top: 1px solid #e2ecf6;\\n padding: 0.5rem 1rem;\\n background-color: #f3f7fb;\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__footer-desktop {\\n display: none;\\n }\\n}\\n.result-box__footer {\\n display: block;\\n padding: 0.5rem 0.75rem;\\n border-top: 1px solid #e2ecf6;\\n border-bottom-right-radius: 0.5rem;\\n text-align: center;\\n background-color: #f3f7fb;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__footer {\\n display: none;\\n }\\n}\\n.result-box__footer--microbiome {\\n display: flex;\\n padding: 0;\\n border-top: 2px solid #e2ecf6;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__footer--microbiome {\\n display: flex;\\n }\\n}\\n.result-box__footer:hover .arrow-link::after, .result-box__footer:hover .arrow-link::before {\\n right: -0.25rem;\\n}\\n.result-box__chart {\\n margin: 0 1.25rem;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__chart {\\n margin: 0 1rem;\\n }\\n}\\n.result-box__label {\\n margin-bottom: 0.125rem;\\n border-radius: 20rem;\\n color: #39235d;\\n font-weight: 500;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n}\\n.result-box__value {\\n flex-grow: 1;\\n text-align: left;\\n color: #626e8e;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__value {\\n margin-left: 0;\\n }\\n}\\n.result-box__pending {\\n text-align: center;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n color: #626e8e;\\n}\\n.result-box__statement {\\n color: #626e8e;\\n}\\n.result-box__statement p + p {\\n margin-top: 0.5rem;\\n}\\n.result-box__statement p:last-of-type {\\n margin-bottom: 0.5rem;\\n}\\n.result-box__readmore,\\n.result-box__comparison {\\n display: flex;\\n align-items: center;\\n font-weight: 600;\\n color: #39235d;\\n cursor: pointer;\\n}\\n.result-box__readmore svg,\\n.result-box__comparison svg {\\n margin-left: 0.25rem;\\n stroke: #39235d;\\n transition: transform 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.result-box__readmore:hover,\\n.result-box__comparison:hover {\\n text-decoration: underline;\\n}\\n.result-box__readmore:hover svg,\\n.result-box__comparison:hover svg {\\n text-decoration: none;\\n}\\n.result-box__readmore--open svg,\\n.result-box__comparison--open svg {\\n transform: rotate(180deg);\\n}\\n.result-box__readmore--microbiome {\\n flex-basis: 55%;\\n padding: 0.5rem 1rem;\\n}\\n.result-box__comparison--microbiome {\\n flex-basis: 45%;\\n border-left: 2px solid #e2ecf6;\\n padding: 0.5rem 1rem;\\n}\\n.result-box__more {\\n border-top: 1px solid #e2ecf6;\\n}\\n.result-box__more-top {\\n padding: 0.75rem;\\n flex-grow: 1;\\n border-bottom: 1px solid #e2ecf6;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__more-top {\\n padding: 1rem;\\n }\\n}\\n.result-box__more-notice {\\n text-align: center;\\n color: #39235d;\\n font-weight: 500;\\n}\\n.result-box__more-bottom {\\n padding: 0.75rem;\\n flex-grow: 1;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__more-bottom {\\n padding: 1rem;\\n }\\n}\\n.result-box__microbiome-info {\\n display: flex;\\n}\\n.result-box__microbiome-info-number {\\n flex: 0 0 auto;\\n width: 20px;\\n height: 20px;\\n background: #e0ecf7;\\n color: #6e9fd5;\\n text-align: center;\\n font-weight: 500;\\n line-height: 20px;\\n border-radius: 50%;\\n}\\n.result-box__microbiome-info-text {\\n flex: 1 1 auto;\\n padding-left: 0.5rem;\\n}\\n.result-box__microbiome-info-text > h2 {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.result-box__microbiome-info-text > p {\\n color: #404040;\\n}\\n.result-box__microbiome-more-info {\\n border-top: 2px solid #e2ecf6;\\n}\\n.result-box__microbiome-long-description {\\n border-top: 2px solid #e2ecf6;\\n background-color: #f3f7fb;\\n padding: 0.75rem;\\n}\\n.result-box__microbiome-long-description > h2 {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.result-box__microbiome-long-description > p {\\n color: #404040;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__microbiome-long-description {\\n padding: 1rem;\\n }\\n}\\n.select-order__main {\\n padding: 1rem;\\n}\\n.select-order__footer {\\n display: flex;\\n align-items: center;\\n padding: 1rem;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n}\\n@media screen and (min-width: 768px) {\\n .select-order__footer > * + * {\\n margin-left: 1rem;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .select-order__footer {\\n flex-direction: column;\\n align-items: center;\\n }\\n .select-order__footer > * {\\n width: 100%;\\n max-width: 13rem;\\n }\\n .select-order__footer > * + * {\\n margin-top: 0.5rem;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .select-order__footer-info {\\n flex-grow: 1;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .select-order__footer-info {\\n text-align: center;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .select-order__footer-button {\\n justify-self: flex-end;\\n flex-grow: 1;\\n max-width: 25%;\\n }\\n}\\n.mobile-hide {\\n display: none;\\n}\\n@media screen and (min-width: 576px) {\\n .mobile-hide {\\n display: inline;\\n }\\n}\\n.site-wrapper {\\n display: flex;\\n flex-direction: column;\\n align-items: stretch;\\n min-height: 100%;\\n}\\n.site-wrapper__main {\\n flex-grow: 1;\\n flex-shrink: 0;\\n}\\n.site-wrapper__footer {\\n flex-shrink: 0;\\n}\\n.split-card {\\n max-width: 34rem;\\n margin: 0 auto;\\n display: flex;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05), 0 0.125rem 0.125rem rgba(0, 0, 0, 0.025);\\n overflow: hidden;\\n}\\n@media screen and (max-width: 575px) {\\n .split-card {\\n display: block;\\n }\\n}\\n.split-card__half {\\n max-width: 17rem;\\n}\\n.split-card__right,\\n.split-card__left {\\n position: relative;\\n flex-shrink: 0;\\n flex-basis: 0;\\n}\\n.split-card__left {\\n flex-grow: 1;\\n padding: 1.5rem;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n z-index: 2;\\n border-top-left-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n@media screen and (min-width: 768px) {\\n .split-card__left {\\n min-height: 15rem;\\n }\\n}\\n@media screen and (max-width: 575px) {\\n .split-card__left {\\n padding: 1.5rem 1.5rem;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.5rem;\\n }\\n}\\n.split-card__right {\\n flex-grow: 1;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n padding: 2rem 1.5rem;\\n min-height: 23rem;\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: hsl(100, 100%, 100%);\\n}\\n@media screen and (max-width: 575px) {\\n .split-card__right {\\n padding: 1.5rem 1.5rem;\\n min-height: 0rem;\\n border-top-right-radius: 0;\\n border-bottom-left-radius: 0.5rem;\\n }\\n}\\n.suggestion-item {\\n flex-grow: 1;\\n position: relative;\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 1rem;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 0.75rem rgba(138, 180, 219, 0.2), 0 1px 1px 1px rgba(138, 180, 219, 0.2);\\n background-color: hsl(100, 100%, 100%);\\n}\\n.suggestion-item__main {\\n padding: 1rem 1.5rem;\\n flex-grow: 1;\\n}\\n@media screen and (max-width: 767px) {\\n .suggestion-item__main {\\n padding: 0.75rem 1rem;\\n }\\n}\\n.suggestion-item__footer {\\n position: relative;\\n padding: 0.75rem;\\n flex-shrink: 0;\\n display: flex;\\n justify-content: center;\\n text-align: center;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n}\\n.suggestion-item__footer .button {\\n max-width: 12rem;\\n}\\n.new-suggestion-item__background {\\n background-color: #e2ecf6;\\n}\\n.new-suggestion-item__editor-buttons {\\n flex: 1 1 auto;\\n display: flex;\\n margin: -8px;\\n}\\n.new-suggestion-item__editor-buttons > * {\\n flex: 1 1;\\n max-width: 2000px !important;\\n margin: 8px;\\n}\\n.new-suggestion-item__header {\\n position: relative;\\n padding: 1rem 1.5rem;\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n min-height: 220px;\\n display: flex;\\n align-items: flex-end;\\n background-size: cover;\\n background-position: center center;\\n}\\n@media screen and (max-width: 767px) {\\n .new-suggestion-item__header {\\n padding: 1rem;\\n }\\n}\\n.new-suggestion-item__header-gradient {\\n position: absolute;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n height: 70%;\\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));\\n}\\n.new-suggestion-item__header-fields {\\n position: relative;\\n z-index: 2;\\n width: 100%;\\n}\\n.new-suggestion-item__field input[type=text], .new-suggestion-item__field-with-margin input[type=text] {\\n border: 1px solid #a1a7bb;\\n border-radius: 5px;\\n width: 100%;\\n padding: 10px;\\n background: hsl(100, 100%, 100%);\\n}\\n.new-suggestion-item__field label, .new-suggestion-item__field-with-margin label {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.new-suggestion-item__hidden-field {\\n position: absolute;\\n width: 0px;\\n height: 0px;\\n opacity: 0;\\n visibility: hidden;\\n}\\n.new-suggestion-item__field-with-margin {\\n margin-top: 1rem;\\n}\\n.new-suggestion-item__field-white label {\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n}\\n.new-suggestion-item__new-item {\\n align-self: stretch;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n padding: 1rem;\\n width: 100%;\\n margin-bottom: 1rem;\\n border: none;\\n background: #f3f7fb;\\n}\\n.new-suggestion-item__item-link-container {\\n padding: 0 1.5rem 1rem 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .new-suggestion-item__item-link-container {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n.new-suggestion-item__item-link {\\n display: block;\\n position: relative;\\n background: #f3f7fb;\\n color: #fc8020;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n}\\n.new-suggestion-item__item-link > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n}\\n.new-suggestion-item__title {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n.new-suggestion-item__title-white {\\n position: relative;\\n z-index: 2;\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #ffffff;\\n}\\n.new-suggestion-item__order-number {\\n position: absolute;\\n top: 10px;\\n left: 1.5rem;\\n z-index: 2;\\n color: #39235d;\\n}\\n.new-suggestion-item__order-number-white {\\n position: absolute;\\n top: 10px;\\n left: 1.5rem;\\n z-index: 2;\\n color: #ffffff;\\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);\\n}\\n.new-suggestion-item__input-context {\\n margin-top: 0.5rem;\\n color: #626e8e;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n}\\n.selectize-control.plugin-drag_drop.multi > .selectize-input.dragging {\\n overflow: visible;\\n}\\n.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {\\n visibility: visible !important;\\n background: #f2f2f2 !important;\\n background: rgba(0, 0, 0, 0.06) !important;\\n border: 0 none !important;\\n box-shadow: inset 0 0 12px 4px #fff;\\n}\\n.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {\\n content: \\\"!\\\";\\n visibility: hidden;\\n}\\n.selectize-control.plugin-drag_drop .ui-sortable-helper {\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\\n}\\n.selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header {\\n position: relative;\\n padding: 10px 8px;\\n border-bottom: 1px solid #d0d0d0;\\n background: #f8f8f8;\\n border-radius: 3px 3px 0 0;\\n}\\n.selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header-close {\\n position: absolute;\\n right: 8px;\\n top: 50%;\\n color: #303030;\\n opacity: 0.4;\\n margin-top: -12px;\\n line-height: 20px;\\n font-size: 20px !important;\\n text-decoration: none;\\n}\\n.selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header-close:hover {\\n color: black;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .selectize-dropdown-content {\\n display: flex;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup {\\n border-right: 1px solid #f2f2f2;\\n border-top: 0 none;\\n flex-grow: 1;\\n flex-basis: 0;\\n min-width: 0;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {\\n border-right: 0 none;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup:before {\\n display: none;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup-header {\\n border-top: 0 none;\\n}\\n.selectize-control.plugin-remove_button .item {\\n display: inline-flex;\\n align-items: center;\\n padding-right: 0 !important;\\n}\\n.selectize-control.plugin-remove_button .item .remove {\\n color: inherit;\\n text-decoration: none;\\n vertical-align: middle;\\n display: inline-block;\\n padding: 2px 6px;\\n border-left: 1px solid #0073bb;\\n border-radius: 0 2px 2px 0;\\n box-sizing: border-box;\\n margin-left: 6px;\\n}\\n.selectize-control.plugin-remove_button .item .remove:hover {\\n background: rgba(0, 0, 0, 0.05);\\n}\\n.selectize-control.plugin-remove_button .item.active .remove {\\n border-left-color: #00578d;\\n}\\n.selectize-control.plugin-remove_button .disabled .item .remove:hover {\\n background: none;\\n}\\n.selectize-control.plugin-remove_button .disabled .item .remove {\\n border-left-color: #aaaaaa;\\n}\\n.selectize-control.plugin-clear_button .clear {\\n text-decoration: none;\\n display: flex;\\n position: absolute;\\n height: 100%;\\n width: 25px;\\n top: 0;\\n right: calc(8px - 6px);\\n color: rgb(0, 0, 0);\\n opacity: 0.4;\\n font-weight: bold;\\n border: none;\\n cursor: pointer;\\n z-index: 1;\\n font-size: 21px;\\n justify-content: center;\\n align-items: center;\\n}\\n.selectize-control.plugin-clear_button .clear:hover {\\n opacity: 1;\\n}\\n.selectize-control.plugin-clear_button.single .clear {\\n right: calc(8px - 6px + 1.5rem);\\n}\\n.selectize-dropdown.plugin-auto_position.selectize-position-top {\\n border-top: 1px solid #d0d0d0;\\n border-bottom: 0 none;\\n border-radius: 3px 3px 0 0;\\n box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.18);\\n}\\n.selectize-control.plugin-auto_position .selectize-input.selectize-position-top.dropdown-active {\\n border-radius: 0 0 3px 3px;\\n border-top: 0 none;\\n}\\n.selectize-control.plugin-auto_position .selectize-input.selectize-position-top.dropdown-active::before {\\n top: 0;\\n bottom: unset;\\n}\\n.selectize-control {\\n position: relative;\\n}\\n.selectize-dropdown,\\n.selectize-input,\\n.selectize-input input {\\n color: #303030;\\n font-family: inherit;\\n font-size: 13px;\\n line-height: 18px;\\n font-smoothing: inherit;\\n}\\n.selectize-input,\\n.selectize-control.single .selectize-input.input-active {\\n background: #fff;\\n cursor: text;\\n display: inline-block;\\n}\\n.selectize-input {\\n border: 1px solid #d0d0d0;\\n padding: 8px 8px;\\n display: inline-block;\\n width: 100%;\\n position: relative;\\n z-index: 1;\\n box-sizing: border-box;\\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\\n border-radius: 3px;\\n}\\n.selectize-control.multi .selectize-input.has-items {\\n padding: calc(\\n 8px - 2px - 1px\\n ) 8px calc(\\n 8px - 2px - 3px -\\n 1px\\n );\\n}\\n.selectize-input.full {\\n background-color: #fff;\\n}\\n.selectize-input.disabled, .selectize-input.disabled * {\\n cursor: default !important;\\n}\\n.selectize-input.focus {\\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\\n}\\n.selectize-input.dropdown-active {\\n border-radius: 3px 3px 0 0;\\n}\\n.selectize-input > * {\\n vertical-align: baseline;\\n display: inline-block;\\n zoom: 1;\\n}\\n.selectize-control.multi .selectize-input > div {\\n cursor: pointer;\\n margin: 0 3px 3px 0;\\n padding: 2px 6px;\\n background: #1da7ee;\\n color: #fff;\\n border: 1px solid #0073bb;\\n}\\n.selectize-control.multi .selectize-input > div.active {\\n background: #92c836;\\n color: #fff;\\n border: 1px solid #00578d;\\n}\\n.selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active {\\n color: white;\\n background: #d2d2d2;\\n border: 1px solid #aaaaaa;\\n}\\n.selectize-input > input {\\n display: inline-block !important;\\n padding: 0 !important;\\n min-height: 0 !important;\\n max-height: none !important;\\n max-width: 100% !important;\\n margin: 0 !important;\\n text-indent: 0 !important;\\n border: 0 none !important;\\n background: none !important;\\n line-height: inherit !important;\\n -webkit-user-select: auto !important;\\n -moz-user-select: auto !important;\\n user-select: auto !important;\\n box-shadow: none !important;\\n}\\n.selectize-input > input::-ms-clear {\\n display: none;\\n}\\n.selectize-input > input:focus {\\n outline: none !important;\\n}\\n.selectize-input > input[placeholder] {\\n box-sizing: content-box;\\n box-sizing: initial;\\n}\\n.selectize-input.has-items > input {\\n margin: 0 0px !important;\\n}\\n.selectize-input::after {\\n content: \\\" \\\";\\n display: block;\\n clear: left;\\n}\\n.selectize-input.dropdown-active::before {\\n content: \\\" \\\";\\n display: block;\\n position: absolute;\\n background: #f0f0f0;\\n height: 1px;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n}\\n.selectize-dropdown {\\n position: absolute;\\n top: 100%;\\n left: 0;\\n width: 100%;\\n z-index: 10;\\n border: 1px solid #d0d0d0;\\n background: #fff;\\n margin: -1px 0 0 0;\\n border-top: 0 none;\\n box-sizing: border-box;\\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\\n border-radius: 0 0 3px 3px;\\n}\\n.selectize-dropdown [data-selectable] {\\n cursor: pointer;\\n overflow: hidden;\\n}\\n.selectize-dropdown [data-selectable] .highlight {\\n background: rgba(125, 168, 208, 0.2);\\n border-radius: 1px;\\n}\\n.selectize-dropdown .option,\\n.selectize-dropdown .optgroup-header,\\n.selectize-dropdown .no-results,\\n.selectize-dropdown .create {\\n padding: 5px 8px;\\n}\\n.selectize-dropdown .option,\\n.selectize-dropdown [data-disabled],\\n.selectize-dropdown [data-disabled] [data-selectable].option {\\n cursor: inherit;\\n opacity: 0.5;\\n}\\n.selectize-dropdown [data-selectable].option {\\n opacity: 1;\\n cursor: pointer;\\n}\\n.selectize-dropdown .optgroup:first-child .optgroup-header {\\n border-top: 0 none;\\n}\\n.selectize-dropdown .optgroup-header {\\n color: #303030;\\n background: #fff;\\n cursor: default;\\n}\\n.selectize-dropdown .active {\\n background-color: #92c836;\\n color: #fff;\\n}\\n.selectize-dropdown .active.create {\\n color: #495c68;\\n}\\n.selectize-dropdown .selected {\\n background-color: #92c836;\\n color: #fff;\\n}\\n.selectize-dropdown .create {\\n color: rgba(48, 48, 48, 0.5);\\n}\\n.selectize-dropdown .active:not(.selected) {\\n background: #f5fafd;\\n color: #495c68;\\n}\\n.selectize-dropdown-content {\\n overflow-y: auto;\\n overflow-x: hidden;\\n max-height: 200px;\\n overflow-scrolling: touch;\\n}\\n.selectize-dropdown-emptyoptionlabel {\\n text-align: center;\\n}\\n.selectize-dropdown .spinner {\\n display: inline-block;\\n width: 30px;\\n height: 30px;\\n margin: 5px 8px;\\n}\\n.selectize-dropdown .spinner:after {\\n content: \\\" \\\";\\n display: block;\\n width: 24px;\\n height: 24px;\\n margin: 3px;\\n border-radius: 50%;\\n border: 5px solid #d0d0d0;\\n border-color: #d0d0d0 transparent #d0d0d0 transparent;\\n animation: lds-dual-ring 1.2s linear infinite;\\n}\\n@keyframes lds-dual-ring {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n.selectize-control.single .selectize-input,\\n.selectize-control.single .selectize-input input {\\n cursor: pointer;\\n}\\n.selectize-control.single .selectize-input.input-active input:not(:-moz-read-only) {\\n cursor: text;\\n}\\n.selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input:not(:read-only) {\\n cursor: text;\\n}\\n.selectize-control.single .selectize-input:after {\\n content: \\\" \\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n right: 15px;\\n margin-top: -3px;\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: 5px 5px 0 5px;\\n border-color: #808080 transparent transparent transparent;\\n}\\n.selectize-control.single .selectize-input.dropdown-active:after {\\n margin-top: -4px;\\n border-width: 0 5px 5px 5px;\\n border-color: transparent transparent #808080 transparent;\\n}\\n.selectize-control.rtl {\\n text-align: right;\\n}\\n.selectize-control.rtl.single .selectize-input:after {\\n left: 15px;\\n right: auto;\\n}\\n.selectize-control.rtl .selectize-input > input {\\n margin: 0 4px 0 -2px !important;\\n}\\n.selectize-control .selectize-input.disabled {\\n opacity: 0.5;\\n background-color: #fafafa;\\n}\\n.selectize-control.multi .selectize-input.has-items {\\n padding-left: 5px;\\n padding-right: 5px;\\n}\\n.selectize-control.multi .selectize-input.disabled [data-value] {\\n color: #999;\\n text-shadow: none;\\n background: none;\\n box-shadow: none;\\n}\\n.selectize-control.multi .selectize-input.disabled [data-value],\\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\\n border-color: #e6e6e6;\\n}\\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\\n background: none;\\n}\\n.selectize-control.multi .selectize-input [data-value] {\\n text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);\\n border-radius: 3px;\\n background-color: #1b9dec;\\n background-image: linear-gradient(to bottom, #1da7ee, #178ee9);\\n background-repeat: repeat-x;\\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.03);\\n}\\n.selectize-control.multi .selectize-input [data-value].active {\\n background-color: #0085d4;\\n background-image: linear-gradient(to bottom, #008fd8, #0075cf);\\n background-repeat: repeat-x;\\n}\\n.selectize-control.single .selectize-input {\\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);\\n background-color: #f9f9f9;\\n background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);\\n background-repeat: repeat-x;\\n}\\n.selectize-control.single .selectize-input,\\n.selectize-dropdown.single {\\n border-color: #b8b8b8;\\n}\\n.selectize-dropdown .optgroup-header {\\n padding-top: 7px;\\n font-weight: bold;\\n font-size: 0.85em;\\n}\\n.selectize-dropdown .optgroup {\\n border-top: 1px solid #f0f0f0;\\n}\\n.selectize-dropdown .optgroup:first-child {\\n border-top: 0 none;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/styles/setup/_reset.scss\",\"app.scss\",\"/rails/app/javascript/src/styles/setup/_fonts.scss\",\"/rails/app/javascript/src/styles/setup/_baseline.scss\",\"/rails/app/javascript/src/styles/base/_forms.scss\",\"/rails/app/javascript/src/styles/base/_global.scss\",\"/rails/app/javascript/src/styles/setup/_mixins.scss\",\"/rails/app/javascript/src/styles/setup/_variables.scss\",\"/rails/app/javascript/src/styles/base/_table.scss\",\"/rails/app/javascript/src/styles/tachyons/_borders.scss\",\"/rails/app/javascript/src/styles/tachyons/_flex.scss\",\"/rails/app/javascript/src/styles/tachyons/_grid.scss\",\"/rails/app/javascript/src/styles/tachyons/_layout.scss\",\"/rails/app/javascript/src/styles/tachyons/_spacing.scss\",\"/rails/app/javascript/src/styles/tachyons/_typography.scss\",\"/rails/app/javascript/src/styles/tachyons/_animations.scss\",\"/rails/app/javascript/src/styles/components/_arrow-link.scss\",\"/rails/app/javascript/src/styles/components/_bottom-section.scss\",\"/rails/app/javascript/src/styles/components/_bullet-point.scss\",\"/rails/app/javascript/src/styles/components/_button.scss\",\"/rails/app/javascript/src/styles/components/_card.scss\",\"/rails/app/javascript/src/styles/components/_category-score.scss\",\"/rails/app/javascript/src/styles/components/_checkbox.scss\",\"/rails/app/javascript/src/styles/components/_circle-image.scss\",\"/rails/app/javascript/src/styles/components/_code.scss\",\"/rails/app/javascript/src/styles/components/_digit-inputs.scss\",\"/rails/app/javascript/src/styles/components/_error-message.scss\",\"/rails/app/javascript/src/styles/components/_header.scss\",\"/rails/app/javascript/src/styles/components/_icon-badge.scss\",\"/rails/app/javascript/src/styles/components/_inline-icon-text.scss\",\"/rails/app/javascript/src/styles/components/_input.scss\",\"/rails/app/javascript/src/styles/components/_input-button.scss\",\"/rails/app/javascript/src/styles/components/_linechart-container.scss\",\"/rails/app/javascript/src/styles/components/_link.scss\",\"/rails/app/javascript/src/styles/components/_loader.scss\",\"/rails/app/javascript/src/styles/components/_logo.scss\",\"/rails/app/javascript/src/styles/components/_markdown-content.scss\",\"/rails/app/javascript/src/styles/components/_microbiome-pie-chart.scss\",\"/rails/app/javascript/src/styles/components/_microbiome-suggestion-section.scss\",\"/rails/app/javascript/src/styles/components/_number-input.scss\",\"/rails/app/javascript/src/styles/components/_note.scss\",\"/rails/app/javascript/src/styles/components/_overall-score-indicator.scss\",\"/rails/app/javascript/src/styles/components/_pagination.scss\",\"/rails/app/javascript/src/styles/components/_radio.scss\",\"/rails/app/javascript/src/styles/components/_segmented-control.scss\",\"/rails/app/javascript/src/styles/components/_select.scss\",\"/rails/app/javascript/src/styles/components/_stats.scss\",\"/rails/app/javascript/src/styles/components/_tooltip.scss\",\"/rails/app/javascript/src/styles/modules/_activate.scss\",\"/rails/app/javascript/src/styles/modules/_admin-header.scss\",\"/rails/app/javascript/src/styles/modules/_admin-nav.scss\",\"/rails/app/javascript/src/styles/modules/_auth-methods.scss\",\"/rails/app/javascript/src/styles/modules/_header.scss\",\"/rails/app/javascript/src/styles/modules/_login.scss\",\"/rails/app/javascript/src/styles/modules/_notice.scss\",\"/rails/app/javascript/src/styles/modules/_onboarding.scss\",\"/rails/app/javascript/src/styles/modules/_pdf.scss\",\"/rails/app/javascript/src/styles/modules/_profile.scss\",\"/rails/app/javascript/src/styles/modules/_range-chart.scss\",\"/rails/app/javascript/src/styles/modules/_result-box.scss\",\"/rails/app/javascript/src/styles/modules/_select-order.scss\",\"/rails/app/javascript/src/styles/modules/_site-wrapper.scss\",\"/rails/app/javascript/src/styles/modules/_split-card.scss\",\"/rails/app/javascript/src/styles/modules/_suggestion-item.scss\",\"/rails/app/javascript/src/styles/modules/_new-suggestion-item.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/plugins/drag_drop.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/plugins/dropdown_header.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/selectize.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/plugins/optgroup_columns.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/plugins/remove_button.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/selectize.default.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/plugins/clear_button.scss\",\"/rails/node_modules/@selectize/selectize/dist/scss/plugins/auto_position.scss\"],\"names\":[],\"mappings\":\"AACA;EACE,mBAAA;ACAF;ADDA;EACE,mBAAA;ACAF;ADGA;0BAAA;AAGA;EACE,SAAA;EACA,UAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;EACA,cAAA;EACA,wBAAA;EACA,sBAAA;EACA,gBAAA;ACFF;ADKA;EACE,iCAAA;EACA,8BAAA;EACA,qBAAA;EACA,yBAAA;EACA,8BAAA;EAEA,2BAAA;OAAA,sBAAA;EACA,8JACE;ACHJ;ADeA;;EAEE,iBAAA;ACZF;ADeA;;EAEE,kBAAA;ACZF;ADeA;sBAAA;AAGA;EACE,6BAAA;ACbF;ADgBA;EACE,eAAA;ACbF;ADgBA;qBAAA;AAGA;;;;EAIE,wBAAA;EACA,qBAAA;EACA,gBAAA;EACA,eAAA;EACA,mBAAA;ACdF;ADsBA;EACE,cAAA;EACA,cAAA;ACdF;ADsBA;EACE,cAAA;EACA,cAAA;ACdF;ADiBA;EACE,cAAA;EACA,mBAAA;ACdF;ADiBA;;EAEE,SAAA;EACA,UAAA;ACdF;ADiBA;EACE,6BAAA;ACdF;ADiBA;;EAEE,wBAAA;ACdF;ADiBA;EACE,gBAAA;EACA,cAAA;ACdF;ADiBA;gDAAA;AAGA;;;;;;;EAQE,0BAAA;ACfF;ACnGA;EACE,0BAAA;EACA,kBAAA;EACA,kBAAA;EACA,sBAAA;EACA,oBAAA;EACA,oJACE;ADqGJ;AExHA;EACE,kBAHiB,EAGa,2CAAA;EAC9B;;;;GAAA;AF8HF;AGtIA;;;;;;;;;;;;;;;EAeE,eAAA;EACA,iBAAA;AHyIF;AGtIA;;;EAGE,uBAAA;EACA,sBAAA;EACA,iBAAA;AHyIF;AGtIA;EACE,WAAA;AHyIF;AGtIA;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,0BAAA;AHyIF;AI5KA;;EAEE,YAAA;AJ+KF;AI5KA;EACE,6CAAA;EACA,kCAAA;EACA,mCAAA;EACA,kCAAA;AJ+KF;AI5KA;EACE,kBAAA;ECkDA,kBAAA;EACA,iBAAA;EDhDA,mBAAA;EACA,+IEqBA;EFnBA,cAAA;EAEA,yBAAA;EACA,kBAAA;AJ6KF;AI1KA;EACE,YAAA;AJ6KF;AIzKA;EACE,WAAA;EACA,YAAA;AJ4KF;AO5MA;;EAEE,WAAA;EACA,yBAAA;EACA,gBAAA;AP+MF;AO9ME;;EACE,gCAAA;APiNJ;AO/ME;;EACE,gCAAA;APkNJ;AO5MI;;;;EACE,qBAAA;APiNN;AO/MI;;;;EACE,sBAAA;APoNN;AOjNE;;EACE,uBAAA;EFwCF,kBAAA;EACA,oBAAA;EEvCE,gBAAA;EACA,sBAAA;EACA,yBAAA;APqNJ;AOnNE;;EACE,eAAA;APsNJ;AOpNE;;EACE,mBAAA;APuNJ;AOlNM;;EACE,mBAAA;APqNR;AO/MM;;;;EACE,kBAAA;APoNR;AOlNM;;;;EACE,mBAAA;APuNR;AOjNA;EACE,yBAAA;APoNF;AOjNA;EACE,WAAA;EACA,gBAAA;APoNF;AQ9QA;EACE,mBAAA;EACA,iBAAA;ARiRF;AQ/QA;EACE,oBAAA;EACA,iBAAA;ARkRF;AQhRA;EACE,oBAAA;EACA,iBAAA;ARmRF;AQhRA;EACE,mBAAA;EACA,mBAAA;ARmRF;AQjRA;EACE,mBAAA;EACA,mBAAA;ARoRF;AQjRA;EACE,uBAAA;EACA,mBAAA;ARoRF;AQlRA;EACE,uBAAA;EACA,mBAAA;ARqRF;AQnRA;EACE,uBAAA;EACA,mBAAA;ARsRF;AQpRA;EACE,uBAAA;EACA,mBAAA;ARuRF;AQlRA;;;EAGE,mBAAA;EACA,eAAA;ARqRF;AQlRA;EACE,eAAA;EACA,yBAAA;ARqRF;AQnRA;EACE,yBAAA;ARsRF;AQnRA;EACE,sBAAA;ARsRF;AQpRA;EACE,qBAAA;ARuRF;AQlRA;;EAEE,uBAAA;ARqRF;AQnRA;EACE,sBAAA;ARsRF;AQpRA;EACE,qBAAA;ARuRF;AQrRA;EACE,oBAAA;ARwRF;AQtRA;EACE,kBAAA;ARyRF;AKjVa;EAML,cC5BC;AN2WT;AKrVa;EAML,cC5BC;AN+WT;AKzVa;EAML,cC5BC;ANmXT;AK7Va;EAML,cC5BC;ANuXT;AKjWa;EAML,cC5BC;AN2XT;AKrWa;EAML,cC5BC;AN+XT;AKzWa;EAML,cC5BC;ANmYT;AK7Wa;EAML,cC5BC;ANuYT;AKjXa;EAML,cC5BC;AN2YT;AKrXa;EAML,cC5BC;AN+YT;AKzXa;EAML,cC5BC;ANmZT;AK7Xa;EAML,cC5BC;ANuZT;AKjYa;EAML,cC5BC;AN2ZT;AKrYa;EAML,cC5BC;AN+ZT;AKzYa;EAML,cC5BC;ANmaT;AK7Ya;EAML,cC5BC;ANuaT;AKjZa;EAML,qBC5BC;AN2aT;AKrZa;EAML,2BC5BC;AN+aT;AKzZa;EAML,kBC5BC;ANmbT;AK7Za;EAML,WC5BC;ANubT;AKjaa;EAML,cC5BC;AN2bT;AKraa;EAML,mBC5BC;AN+bT;AKzaa;EAML,yBC5BC;ANmcT;AK7aa;EAML,yBC5BC;ANucT;AKjba;EAML,yBC5BC;AN2cT;AKrba;EAML,yBC5BC;AN+cT;AKzba;EAML,yBC5BC;ANmdT;AK7ba;EAML,yBC5BC;ANudT;AKjca;EAML,yBC5BC;AN2dT;AKrca;EAML,yBC5BC;AN+dT;AKzca;EAML,yBC5BC;ANmeT;AK7ca;EAML,yBC5BC;ANueT;AKjda;EAML,yBC5BC;AN2eT;AKrda;EAML,yBC5BC;AN+eT;AKzda;EAML,yBC5BC;ANmfT;AK7da;EAML,yBC5BC;ANufT;AKjea;EAML,yBC5BC;AN2fT;AKrea;EAML,yBC5BC;AN+fT;AKzea;EAML,gCC5BC;ANmgBT;AK7ea;EAML,sCC5BC;ANugBT;AKjfa;EAML,6BC5BC;AN2gBT;AKrfa;EAML,sBC5BC;AN+gBT;AKzfa;EAML,yBC5BC;ANmhBT;AK7fa;EAML,8BC5BC;ANuhBT;AKjgBa;EAML,qBC5BC;AN2hBT;AKrgBa;EAML,qBC5BC;AN+hBT;AKzgBa;EAML,qBC5BC;ANmiBT;AK7gBa;EAML,qBC5BC;ANuiBT;AKjhBa;EAML,qBC5BC;AN2iBT;AKrhBa;EAML,qBC5BC;AN+iBT;AKzhBa;EAML,qBC5BC;ANmjBT;AK7hBa;EAML,qBC5BC;ANujBT;AKjiBa;EAML,qBC5BC;AN2jBT;AKriBa;EAML,qBC5BC;AN+jBT;AKziBa;EAML,qBC5BC;ANmkBT;AK7iBa;EAML,qBC5BC;ANukBT;AKjjBa;EAML,qBC5BC;AN2kBT;AKrjBa;EAML,qBC5BC;AN+kBT;AKzjBa;EAML,qBC5BC;ANmlBT;AK7jBa;EAML,qBC5BC;ANulBT;AKjkBa;EAML,4BC5BC;AN2lBT;AKrkBa;EAML,kCC5BC;AN+lBT;AKzkBa;EAML,yBC5BC;ANmmBT;AK7kBa;EAML,kBC5BC;ANumBT;AKjlBa;EAML,qBC5BC;AN2mBT;AKrlBa;EAML,0BC5BC;AN+mBT;AKzlBa;EAML,eC5BC;ANmnBT;AK7lBa;EAML,eC5BC;ANunBT;AKjmBa;EAML,eC5BC;AN2nBT;AKrmBa;EAML,eC5BC;AN+nBT;AKzmBa;EAML,eC5BC;ANmoBT;AK7mBa;EAML,eC5BC;ANuoBT;AKjnBa;EAML,eC5BC;AN2oBT;AKrnBa;EAML,eC5BC;AN+oBT;AKznBa;EAML,eC5BC;ANmpBT;AK7nBa;EAML,eC5BC;ANupBT;AKjoBa;EAML,eC5BC;AN2pBT;AKroBa;EAML,eC5BC;AN+pBT;AKzoBa;EAML,eC5BC;ANmqBT;AK7oBa;EAML,eC5BC;ANuqBT;AKjpBa;EAML,eC5BC;AN2qBT;AKrpBa;EAML,eC5BC;AN+qBT;AKzpBa;EAML,sBC5BC;ANmrBT;AK7pBa;EAML,4BC5BC;ANurBT;AKjqBa;EAML,mBC5BC;AN2rBT;AKrqBa;EAML,YC5BC;AN+rBT;AKzqBa;EAML,eC5BC;ANmsBT;AK7qBa;EAML,oBC5BC;ANusBT;AKjrBa;EAML,aC5BC;AN2sBT;AKrrBa;EAML,aC5BC;AN+sBT;AKzrBa;EAML,aC5BC;ANmtBT;AK7rBa;EAML,aC5BC;ANutBT;AKjsBa;EAML,aC5BC;AN2tBT;AKrsBa;EAML,aC5BC;AN+tBT;AKzsBa;EAML,aC5BC;ANmuBT;AK7sBa;EAML,aC5BC;ANuuBT;AKjtBa;EAML,aC5BC;AN2uBT;AKrtBa;EAML,aC5BC;AN+uBT;AKztBa;EAML,aC5BC;ANmvBT;AK7tBa;EAML,aC5BC;ANuvBT;AKjuBa;EAML,aC5BC;AN2vBT;AKruBa;EAML,aC5BC;AN+vBT;AKzuBa;EAML,aC5BC;ANmwBT;AK7uBa;EAML,aC5BC;ANuwBT;AKjvBa;EAML,oBC5BC;AN2wBT;AKrvBa;EAML,0BC5BC;AN+wBT;AKzvBa;EAML,iBC5BC;ANmxBT;AK7vBa;EAML,UC5BC;ANuxBT;AKjwBa;EAML,aC5BC;AN2xBT;AKrwBa;EAML,kBC5BC;AN+xBT;AKzwBa;EAML,gBC5BC;ANmyBT;AK7wBa;EAML,gBC5BC;ANuyBT;AKjxBa;EAML,gBC5BC;AN2yBT;AKrxBa;EAML,gBC5BC;AN+yBT;AKzxBa;EAML,gBC5BC;ANmzBT;AK7xBa;EAML,gBC5BC;ANuzBT;AKjyBa;EAML,gBC5BC;AN2zBT;AKryBa;EAML,gBC5BC;AN+zBT;AKzyBa;EAML,gBC5BC;ANm0BT;AK7yBa;EAML,gBC5BC;ANu0BT;AKjzBa;EAML,gBC5BC;AN20BT;AKrzBa;EAML,gBC5BC;AN+0BT;AKzzBa;EAML,gBC5BC;ANm1BT;AK7zBa;EAML,gBC5BC;ANu1BT;AKj0Ba;EAML,gBC5BC;AN21BT;AKr0Ba;EAML,gBC5BC;AN+1BT;AKz0Ba;EAML,uBC5BC;ANm2BT;AK70Ba;EAML,6BC5BC;ANu2BT;AKj1Ba;EAML,oBC5BC;AN22BT;AKr1Ba;EAML,aC5BC;AN+2BT;AKz1Ba;EAML,gBC5BC;ANm3BT;AK71Ba;EAML,qBC5BC;ANu3BT;ASz3BA;;EAEE,aAAA;AT43BF;ASz3BA;EACE,aAAA;EACA,sBAAA;AT43BF;ASz3BA;EACE,uBAAA;AT43BF;ASz3BA;EACE,mBAAA;AT43BF;ASz3BA;EACE,qBAAA;AT43BF;ASz3BA;EACE,uBAAA;AT43BF;ASz3BA;EACE,yBAAA;AT43BF;ASz3BA;EACE,8BAAA;AT43BF;ASz3BA;EACE,aAAA;EACA,YAAA;AT43BF;ASz3BA;;EAEE,gBAAA;EACA,YAAA;AT43BF;ASz3BA;EACE,cAAA;AT43BF;ASz3BA;EACE,eAAA;AT43BF;ASx3BE;EACE,iBAAA;AT23BJ;AK96BM;EIkDJ;IAII,eAAA;ET43BJ;AACF;AKn7BM;EIkDJ;IAQI,gBAAA;ET63BJ;AACF;AU57BA;EACE,qBJiFa;EIhFb,oBJgFa;EI/Eb,WAAA;EACA,iBJoEU;EInEV,iBAAA;EACA,kBAAA;AV+7BF;AKj8BM;EKIF;IACE,gBAAA;IACA,eAAA;EVg8BJ;EU/7BI;IACE,cAAA;IACA,eAAA;EVi8BN;EU/7BI;IACE,eAAA;IACA,gBAAA;EVi8BN;AACF;AK/8BM;EKkBF;IACE,gBAAA;IACA,eAAA;EVg8BJ;EU/7BI;IACE,cAAA;IACA,eAAA;EVi8BN;EU/7BI;IACE,eAAA;IACA,gBAAA;EVi8BN;AACF;AK79BM;EKgCF;IACE,gBAAA;IACA,eAAA;EVg8BJ;EU/7BI;IACE,cAAA;IACA,eAAA;EVi8BN;EU/7BI;IACE,eAAA;IACA,gBAAA;EVi8BN;AACF;AK3+BM;EK8CF;IACE,gBAAA;IACA,eAAA;EVg8BJ;EU/7BI;IACE,cAAA;IACA,eAAA;EVi8BN;AACF;AU97BE;EACE,gBAAA;EACA,eAAA;AVg8BJ;AU/7BI;EACE,cAAA;EACA,eAAA;AVi8BN;AU/7BI;EACE,eAAA;EACA,gBAAA;AVi8BN;AU57BA;EACE,sBAAA;EACA,aAAA;EACA,cAAA;EACA,mBAAA;EACA,eAAA;EACA,sBAAA;EACA,qBAAA;AV+7BF;AU17BA;EACE,2BAAA;AV47BF;AUz7BA;EACE,8BAAA;AV47BF;AUz7BA;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE,sBAAA;EACA,cAAA;EACA,sBAAA;EACA,qBAAA;AV47BF;AUz7BA;EACE,YAAA;EACA,aAAA;EACA,eAAA;AV47BF;AUz7BA;EACE,uBAAA;EACA,sBAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,eAAA;EACA,cAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,eAAA;EACA,cAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,eAAA;EACA,cAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,wBAAA;EACA,uBAAA;AV47BF;AUz7BA;EACE,gBAAA;EACA,eAAA;AV47BF;AUz7BA;EACE,cAAA;AV47BF;AUz7BA;EACE,wBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,gBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,gBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,gBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,yBAAA;AV47BF;AUz7BA;EACE,2BAAA;EACA,iBAAA;AV47BF;AUz7BA;EACE,uBAAA;EACA,kBAAA;AV47BF;AUz7BA;EACE,yBAAA;EACA,eAAA;AV47BF;AUz7BA;EACE,uBAAA;AV47BF;AUz7BA;EACE,mBAAA;AV47BF;AUz7BA;EACE,qBAAA;AV47BF;AUz7BA;EACE,6BAAA;AV47BF;AUz7BA;EACE,8BAAA;AV47BF;AUz7BA;EACE,SAAA;AV47BF;AUz7BA;EACE,QAAA;AV47BF;AK3sCM;EKmRJ;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BE,sBAAA;IACA,cAAA;IACA,sBAAA;IACA,qBAAA;EV47BF;EUz7BA;IACE,YAAA;IACA,aAAA;IACA,eAAA;EV27BF;EUx7BA;IACE,uBAAA;IACA,sBAAA;EV07BF;EUv7BA;IACE,wBAAA;IACA,uBAAA;EVy7BF;EUt7BA;IACE,eAAA;IACA,cAAA;EVw7BF;EUr7BA;IACE,wBAAA;IACA,uBAAA;EVu7BF;EUp7BA;IACE,wBAAA;IACA,uBAAA;EVs7BF;EUn7BA;IACE,eAAA;IACA,cAAA;EVq7BF;EUl7BA;IACE,wBAAA;IACA,uBAAA;EVo7BF;EUj7BA;IACE,wBAAA;IACA,uBAAA;EVm7BF;EUh7BA;IACE,eAAA;IACA,cAAA;EVk7BF;EU/6BA;IACE,wBAAA;IACA,uBAAA;EVi7BF;EU96BA;IACE,wBAAA;IACA,uBAAA;EVg7BF;EU76BA;IACE,gBAAA;IACA,eAAA;EV+6BF;EU56BA;IACE,cAAA;EV86BF;EU36BA;IACE,wBAAA;EV66BF;EU16BA;IACE,yBAAA;EV46BF;EUz6BA;IACE,gBAAA;EV26BF;EUx6BA;IACE,yBAAA;EV06BF;EUv6BA;IACE,yBAAA;EVy6BF;EUt6BA;IACE,gBAAA;EVw6BF;EUr6BA;IACE,yBAAA;EVu6BF;EUp6BA;IACE,yBAAA;EVs6BF;EUn6BA;IACE,gBAAA;EVq6BF;EUl6BA;IACE,yBAAA;EVo6BF;EUj6BA;IACE,yBAAA;EVm6BF;EUh6BA;IACE,2BAAA;IACA,iBAAA;EVk6BF;EU/5BA;IACE,uBAAA;IACA,kBAAA;EVi6BF;EU95BA;IACE,yBAAA;IACA,eAAA;EVg6BF;EU75BA;IACE,uBAAA;EV+5BF;EU55BA;IACE,mBAAA;EV85BF;EU35BA;IACE,qBAAA;EV65BF;EU15BA;IACE,6BAAA;EV45BF;EUz5BA;IACE,8BAAA;EV25BF;EUx5BA;IACE,SAAA;EV05BF;EUv5BA;IACE,QAAA;EVy5BF;AACF;AKv2CM;EKkdJ;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BE,sBAAA;IACA,cAAA;IACA,sBAAA;IACA,qBAAA;EVw5BF;EUr5BA;IACE,YAAA;IACA,aAAA;IACA,eAAA;EVu5BF;EUp5BA;IACE,uBAAA;IACA,sBAAA;EVs5BF;EUn5BA;IACE,wBAAA;IACA,uBAAA;EVq5BF;EUl5BA;IACE,eAAA;IACA,cAAA;EVo5BF;EUj5BA;IACE,wBAAA;IACA,uBAAA;EVm5BF;EUh5BA;IACE,wBAAA;IACA,uBAAA;EVk5BF;EU/4BA;IACE,eAAA;IACA,cAAA;EVi5BF;EU94BA;IACE,wBAAA;IACA,uBAAA;EVg5BF;EU74BA;IACE,wBAAA;IACA,uBAAA;EV+4BF;EU54BA;IACE,eAAA;IACA,cAAA;EV84BF;EU34BA;IACE,wBAAA;IACA,uBAAA;EV64BF;EU14BA;IACE,wBAAA;IACA,uBAAA;EV44BF;EUz4BA;IACE,gBAAA;IACA,eAAA;EV24BF;EUx4BA;IACE,cAAA;EV04BF;EUv4BA;IACE,wBAAA;EVy4BF;EUt4BA;IACE,yBAAA;EVw4BF;EUr4BA;IACE,gBAAA;EVu4BF;EUp4BA;IACE,yBAAA;EVs4BF;EUn4BA;IACE,yBAAA;EVq4BF;EUl4BA;IACE,gBAAA;EVo4BF;EUj4BA;IACE,yBAAA;EVm4BF;EUh4BA;IACE,yBAAA;EVk4BF;EU/3BA;IACE,gBAAA;EVi4BF;EU93BA;IACE,yBAAA;EVg4BF;EU73BA;IACE,yBAAA;EV+3BF;EU53BA;IACE,2BAAA;IACA,iBAAA;EV83BF;EU33BA;IACE,uBAAA;IACA,kBAAA;EV63BF;EU13BA;IACE,yBAAA;IACA,eAAA;EV43BF;EUz3BA;IACE,uBAAA;EV23BF;EUx3BA;IACE,mBAAA;EV03BF;EUv3BA;IACE,qBAAA;EVy3BF;EUt3BA;IACE,6BAAA;EVw3BF;EUr3BA;IACE,8BAAA;EVu3BF;EUp3BA;IACE,SAAA;EVs3BF;EUn3BA;IACE,QAAA;EVq3BF;AACF;AKlgDM;EKipBJ;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BE,sBAAA;IACA,cAAA;IACA,sBAAA;IACA,qBAAA;EVo3BF;EUj3BA;IACE,YAAA;IACA,aAAA;IACA,eAAA;EVm3BF;EUh3BA;IACE,uBAAA;IACA,sBAAA;EVk3BF;EU/2BA;IACE,wBAAA;IACA,uBAAA;EVi3BF;EU92BA;IACE,eAAA;IACA,cAAA;EVg3BF;EU72BA;IACE,wBAAA;IACA,uBAAA;EV+2BF;EU52BA;IACE,wBAAA;IACA,uBAAA;EV82BF;EU32BA;IACE,eAAA;IACA,cAAA;EV62BF;EU12BA;IACE,wBAAA;IACA,uBAAA;EV42BF;EUz2BA;IACE,wBAAA;IACA,uBAAA;EV22BF;EUx2BA;IACE,eAAA;IACA,cAAA;EV02BF;EUv2BA;IACE,wBAAA;IACA,uBAAA;EVy2BF;EUt2BA;IACE,wBAAA;IACA,uBAAA;EVw2BF;EUr2BA;IACE,gBAAA;IACA,eAAA;EVu2BF;EUp2BA;IACE,cAAA;EVs2BF;EUn2BA;IACE,wBAAA;EVq2BF;EUl2BA;IACE,yBAAA;EVo2BF;EUj2BA;IACE,gBAAA;EVm2BF;EUh2BA;IACE,yBAAA;EVk2BF;EU/1BA;IACE,yBAAA;EVi2BF;EU91BA;IACE,gBAAA;EVg2BF;EU71BA;IACE,yBAAA;EV+1BF;EU51BA;IACE,yBAAA;EV81BF;EU31BA;IACE,gBAAA;EV61BF;EU11BA;IACE,yBAAA;EV41BF;EUz1BA;IACE,yBAAA;EV21BF;EUx1BA;IACE,2BAAA;IACA,iBAAA;EV01BF;EUv1BA;IACE,uBAAA;IACA,kBAAA;EVy1BF;EUt1BA;IACE,yBAAA;IACA,eAAA;EVw1BF;EUr1BA;IACE,uBAAA;EVu1BF;EUp1BA;IACE,mBAAA;EVs1BF;EUn1BA;IACE,qBAAA;EVq1BF;EUl1BA;IACE,6BAAA;EVo1BF;EUj1BA;IACE,8BAAA;EVm1BF;EUh1BA;IACE,SAAA;EVk1BF;EU/0BA;IACE,QAAA;EVi1BF;AACF;AK7pDM;EKg1BJ;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BE,sBAAA;IACA,cAAA;IACA,sBAAA;IACA,qBAAA;EVg1BF;EU70BA;IACE,YAAA;IACA,aAAA;IACA,eAAA;EV+0BF;EU50BA;IACE,uBAAA;IACA,sBAAA;EV80BF;EU30BA;IACE,wBAAA;IACA,uBAAA;EV60BF;EU10BA;IACE,eAAA;IACA,cAAA;EV40BF;EUz0BA;IACE,wBAAA;IACA,uBAAA;EV20BF;EUx0BA;IACE,wBAAA;IACA,uBAAA;EV00BF;EUv0BA;IACE,eAAA;IACA,cAAA;EVy0BF;EUt0BA;IACE,wBAAA;IACA,uBAAA;EVw0BF;EUr0BA;IACE,wBAAA;IACA,uBAAA;EVu0BF;EUp0BA;IACE,eAAA;IACA,cAAA;EVs0BF;EUn0BA;IACE,wBAAA;IACA,uBAAA;EVq0BF;EUl0BA;IACE,wBAAA;IACA,uBAAA;EVo0BF;EUj0BA;IACE,gBAAA;IACA,eAAA;EVm0BF;EUh0BA;IACE,cAAA;EVk0BF;EU/zBA;IACE,wBAAA;EVi0BF;EU9zBA;IACE,yBAAA;EVg0BF;EU7zBA;IACE,gBAAA;EV+zBF;EU5zBA;IACE,yBAAA;EV8zBF;EU3zBA;IACE,yBAAA;EV6zBF;EU1zBA;IACE,gBAAA;EV4zBF;EUzzBA;IACE,yBAAA;EV2zBF;EUxzBA;IACE,yBAAA;EV0zBF;EUvzBA;IACE,gBAAA;EVyzBF;EUtzBA;IACE,yBAAA;EVwzBF;EUrzBA;IACE,yBAAA;EVuzBF;EUpzBA;IACE,2BAAA;IACA,iBAAA;EVszBF;EUnzBA;IACE,uBAAA;IACA,kBAAA;EVqzBF;EUlzBA;IACE,yBAAA;IACA,eAAA;EVozBF;EUjzBA;IACE,uBAAA;EVmzBF;EUhzBA;IACE,mBAAA;EVkzBF;EU/yBA;IACE,qBAAA;EVizBF;EU9yBA;IACE,6BAAA;EVgzBF;EU7yBA;IACE,8BAAA;EV+yBF;EU5yBA;IACE,SAAA;EV8yBF;EU3yBA;IACE,QAAA;EV6yBF;AACF;AWh0DA;EACE,eAAA;AXk0DF;AWh0DA;EACE,cAAA;AXm0DF;AWj0DA;EACE,qBAAA;AXo0DF;AW/zDA;EACE,kBAAA;AXk0DF;AW7zDA;EACE,SAAA;AXg0DF;AW9zDA;EACE,WAAA;AXi0DF;AW/zDA;EACE,eAAA;AXk0DF;AWh0DA;EACE,WAAA;AXm0DF;AWj0DA;EACE,YAAA;AXo0DF;AWl0DA;EACE,gBAAA;AXq0DF;AWn0DA;EACE,UAAA;AXs0DF;AWn0DA;EACE,eAAA;AXs0DF;AWp0DA;EACE,cAAA;AXu0DF;AWr0DA;EACE,aAAA;AXw0DF;AWt0DA;EACE,cAAA;AXy0DF;AWv0DA;EACE,WAAA;AX00DF;AWx0DA;EACE,cAAA;AX20DF;AWz0DA;EACE,aAAA;AX40DF;AW10DA;EACE,WAAA;AX60DF;AW30DA;EACE,WAAA;AX80DF;AW50DA;EACE,WAAA;AX+0DF;AW70DA;EACE,WAAA;AXg1DF;AW70DA;EACE,YAAA;AXg1DF;AW90DA;EACE,gBAAA;AXi1DF;AW/0DA;EACE,YAAA;AXk1DF;AWh1DA;EACE,aAAA;AXm1DF;AWj1DA;EACE,iBAAA;AXo1DF;AWl1DA;EACE,WAAA;AXq1DF;AWl1DA;EACE,gBAAA;AXq1DF;AWn1DA;EACE,eAAA;AXs1DF;AWp1DA;EACE,cAAA;AXu1DF;AWr1DA;EACE,eAAA;AXw1DF;AWt1DA;EACE,YAAA;AXy1DF;AWv1DA;EACE,eAAA;AX01DF;AWx1DA;EACE,cAAA;AX21DF;AWz1DA;EACE,YAAA;AX41DF;AW11DA;EACE,YAAA;AX61DF;AW31DA;EACE,YAAA;AX81DF;AW51DA;EACE,YAAA;AX+1DF;AW51DA;EACE,aAAA;AX+1DF;AW51DA;EACE,kBAAA;EACA,SAAA;AX+1DF;AKh+DM;EMqIJ;IACE,gBAAA;EX+1DF;AACF;AKt+DM;EM2IJ;IACE,gBAAA;EX81DF;AACF;AK3+DM;EMiJJ;IACE,gBAAA;EX61DF;AACF;AK5+DM;EMmJJ;IACE,aAAA;EX41DF;AACF;AKr/DM;EM4JJ;IACE,aAAA;EX41DF;AACF;AWz1DA;EACE,gBAAA;AX21DF;AY//DA;EACE,qBAAA;AZkgEF;AYhgEA;EACE,oBAAA;AZmgEF;AYjgEA;EACE,mBAAA;AZogEF;AYlgEA;EACE,oBAAA;AZqgEF;AYngEA;EACE,iBAAA;AZsgEF;AYpgEA;EACE,oBAAA;AZugEF;AYrgEA;EACE,mBAAA;AZwgEF;AYtgEA;EACE,iBAAA;AZygEF;AYvgEA;EACE,iBAAA;AZ0gEF;AYxgEA;EACE,iBAAA;AZ2gEF;AYzgEA;EACE,iBAAA;AZ4gEF;AYzgEA;EACE,oBAAA;AZ4gEF;AY1gEA;EACE,mBAAA;AZ6gEF;AY3gEA;EACE,kBAAA;AZ8gEF;AY5gEA;EACE,mBAAA;AZ+gEF;AY7gEA;EACE,gBAAA;AZghEF;AY9gEA;EACE,mBAAA;AZihEF;AY/gEA;EACE,kBAAA;AZkhEF;AYhhEA;EACE,gBAAA;AZmhEF;AYjhEA;EACE,gBAAA;AZohEF;AYlhEA;EACE,gBAAA;AZqhEF;AYnhEA;EACE,gBAAA;AZshEF;AYnhEA;EACE,gBAAA;AZshEF;AYphEA;EACE,eAAA;AZuhEF;AYjhEA;EACE,YAAA;AZohEF;AYjhEA;EACE,iBAAA;AZohEF;AYlhEA;EACE,gBAAA;AZqhEF;AYnhEA;EACE,eAAA;AZshEF;AYphEA;EACE,gBAAA;AZuhEF;AYrhEA;EACE,aAAA;AZwhEF;AYthEA;EACE,gBAAA;AZyhEF;AYvhEA;EACE,eAAA;AZ0hEF;AYxhEA;EACE,aAAA;AZ2hEF;AYzhEA;EACE,aAAA;AZ4hEF;AY1hEA;EACE,aAAA;AZ6hEF;AY3hEA;EACE,aAAA;AZ8hEF;AY3hEA;EACE,gBAAA;EACA,iBAAA;EACA,eAAA;AZ8hEF;AY5hEA;EACE,cAAA;EACA,iBAAA;EACA,eAAA;AZ+hEF;AY7hEA;EACE,cAAA;EACA,gBAAA;EACA,eAAA;AZgiEF;AY9hEA;EACE,cAAA;EACA,gBAAA;EACA,iBAAA;AZiiEF;AY9hEA;EACE,cAAA;EACA,iBAAA;AZiiEF;AY/hEA;EACE,eAAA;EACA,gBAAA;AZkiEF;AY/hEA;EACE,cAAA;AZkiEF;AYhiEA;EACE,gBAAA;AZmiEF;AYjiEA;EACE,iBAAA;AZoiEF;AYliEA;EACE,eAAA;AZqiEF;AY/hEA;EACE,YAAA;AZkiEF;AYhiEA;EACE,iBAAA;EACA,kBAAA;AZmiEF;AYjiEA;EACE,gBAAA;EACA,mBAAA;AZoiEF;AYjiEA;EACE,WAAA;AZoiEF;AYjiEA;EACE,gBAAA;AZoiEF;AYliEA;EACE,eAAA;AZqiEF;AYniEA;EACE,cAAA;AZsiEF;AYpiEA;EACE,eAAA;AZuiEF;AYriEA;EACE,YAAA;AZwiEF;AYtiEA;EACE,eAAA;AZyiEF;AYviEA;EACE,cAAA;AZ0iEF;AYxiEA;EACE,YAAA;AZ2iEF;AYziEA;EACE,YAAA;AZ4iEF;AY1iEA;EACE,YAAA;AZ6iEF;AY3iEA;EACE,YAAA;AZ8iEF;AY3iEA;EACE,iBAAA;AZ8iEF;AY5iEA;EACE,gBAAA;AZ+iEF;AY7iEA;EACE,eAAA;AZgjEF;AY9iEA;EACE,gBAAA;AZijEF;AY/iEA;EACE,aAAA;AZkjEF;AYhjEA;EACE,gBAAA;AZmjEF;AYjjEA;EACE,eAAA;AZojEF;AYljEA;EACE,aAAA;AZqjEF;AYnjEA;EACE,aAAA;AZsjEF;AYpjEA;EACE,aAAA;AZujEF;AYrjEA;EACE,aAAA;AZwjEF;AYrjEA;EACE,eAAA;EACA,gBAAA;EACA,cAAA;AZwjEF;AYtjEA;EACE,aAAA;EACA,gBAAA;EACA,cAAA;AZyjEF;AYvjEA;EACE,aAAA;EACA,eAAA;EACA,cAAA;AZ0jEF;AYxjEA;EACE,aAAA;EACA,eAAA;EACA,gBAAA;AZ2jEF;AYxjEA;EACE,aAAA;EACA,gBAAA;AZ2jEF;AYzjEA;EACE,cAAA;EACA,eAAA;AZ4jEF;AYzjEA;EACE,aAAA;AZ4jEF;AY1jEA;EACE,kBAAA;AZ6jEF;AY3jEA;EACE,eAAA;AZ8jEF;AY5jEA;EACE,gBAAA;AZ+jEF;AY7jEA;EACE,cAAA;AZgkEF;Aan2EA;ER6DE,kBAAA;EACA,oBAAA;AL0yEF;Aap2EA;ERyDE,kBAAA;EACA,iBAAA;AL+yEF;Aar2EA;ERqDE,kBAAA;EACA,oBAAA;ALozEF;Aat2EA;ERiDE,iBAAA;EACA,mBAAA;ALyzEF;Aav2EA;ER6CE,iBAAA;EACA,oBAAA;AL8zEF;Aat2EA;EACE,oBAAA;Aby2EF;Aav2EA;EACE,iBAAA;Ab02EF;Aax2EA;EACE,oBAAA;Ab22EF;Aaz2EA;EACE,mBAAA;Ab42EF;Aa12EA;EACE,oBAAA;Ab62EF;Aax2EA;EACE,+IPLA;ANg3EF;Aaz2EA;EACE,qJPGA;EOFA,gBAAA;Ab42EF;Aav2EA;;EAEE,gBAAA;Ab02EF;Aav2EA;;EAEE,gBAAA;EACA,iBAAA;Ab02EF;Aax2EA;;EAEE,gBAAA;Ab22EF;Aax2EA;;;;EAIE,gBAAA;Ab22EF;Aat2EA;EACE,gBAAA;Aby2EF;Aav2EA;EACE,kBAAA;Ab02EF;Aax2EA;EACE,iBAAA;Ab22EF;Aat2EA;EACE,yBAAA;Aby2EF;Aav2EA;EACE,kBAAA;Ab02EF;Aax2EA;EACE,0BAAA;Ab22EF;Aat2EA;EACE,mBAAA;Aby2EF;Aav2EA;EACE,uBAAA;Ab02EF;Aax2EA;EACE,kBAAA;Ab22EF;Act9EA;EACE,0CAAA;Ady9EF;Act9EA;EACE;IACE,4BAAA;IACA,UAAA;Edy9EF;Ecv9EA;IACE,uBAAA;IACA,UAAA;Edy9EF;AACF;Aer+EA;EACE,kBAAA;EACA,mBAAA;EAEA,cAAA;EAEA,qBAAA;Afq+EF;Aen+EE;EAEE,qGACE;Afm+EN;Aeh+EE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;EACA,2BAAA;EAEA,aAAA;EAEA,yBAAA;Afg+EJ;Ae79EE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EAEA,QAAA;EACA,0CAAA;EACA,QAAA;EAEA,cAAA;EACA,eAAA;EAEA,6BAAA;EACA,8BAAA;Af49EJ;Aez9EI;EAEE,eAAA;Af09EN;Aev9EE;EACE,gBAAA;EACA,kBAAA;Afy9EJ;Aex9EI;EACE,WAAA;EACA,OAAA;Af09EN;Aex9EI;EACE,0CAAA;EACA,WAAA;EACA,OAAA;Af09EN;Aev9EM;EAEE,WAAA;EACA,cAAA;Afw9ER;AgBzhFA;EACE,kBAAA;EACA,uBAAA;AhB4hFF;AgB1hFE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EAEA,SAAA;EACA,OAAA;EACA,QAAA;EACA,WAAA;EAEA,yBAAA;EACA,WAAA;AhB0hFJ;AgBxhFE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EAEA,MAAA;EACA,OAAA;EACA,QAAA;EACA,YAAA;EACA,uBAAA;EAEA,yBAAA;EACA,WAAA;AhBwhFJ;AiBrjFA;EACE,aAAA;AjBwjFF;AiBtjFA;EACE,cAAA;EACA,cAAA;EACA,eAAA;EACA,qBAAA;EACA,kBAAA;EACA,kBAAA;EZsDA,kBAAA;EACA,iBAAA;EYpDA,oBAAA;EACA,gBAAA;EACA,cAAA;EACA,yBAAA;AjByjFF;AiBvjFA;EACE,cAAA;EACA,cAAA;EACA,eAAA;EACA,sBAAA;EACA,qBAAA;EACA,kBAAA;EACA,kBAAA;EACA,yBAAA;AjB0jFF;AiBxjFA;EACE,YAAA;EACA,oBAAA;EZkCA,kBAAA;EACA,iBAAA;AL0hFF;AkB1lFA;EACE,qBAAA;EACA,YAAA;EACA,eAAA;EAEA,WAAA;EACA,eAAA;EAEA,YAAA;EACA,oBAAA;EAEA,2BAAA;EACA,mBAAA;EACA,gBAAA;EACA,wBAAA;EACA,iBAAA;EACA,qBAAA;EACA,kBAAA;EAEA,yBAAA;EACA,sHACE;AlBwlFJ;AkBtlFE;EACE,yBAAA;AlBwlFJ;AkBtlFE;EAEE,UAAA;EACA,cAAA;EAEA,yBAAA;AlBslFJ;AkBrlFI;EACE,gBAAA;EAEA,yBAAA;AlBslFN;AkBnlFE;EACE,aAAA;EAEA,6BAAA;AlBolFJ;AkBjlFE;EAEE,YAAA;EACA,sBAAA;AlBklFJ;AkB/kFE;EAEE,cAAA;EACA,kBAAA;EbUF,kBAAA;EACA,oBAAA;EaRE,mBAAA;AlBglFJ;AkB9kFE;EACE,cAAA;EACA,gBAAA;EbGF,kBAAA;EACA,oBAAA;EaDE,mBAAA;AlBglFJ;AkB9kFE;EACE,aAAA;EACA,mBAAA;EACA,uBAAA;AlBglFJ;AkB9kFE;EACE,yBAAA;EACA,4BAAA;EACA,gCAAA;EACA,mCAAA;AlBglFJ;AkB5kFA;EACE,gBAAA;EACA,2BAAA;EACA,qBAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EACA,yBAAA;EACA,+BAAA;EACA,4BAAA;EACA,gCAAA;EACA,6BAAA;EACA,yBAAA;AlB+kFF;AkB9kFE;EACE,yBAAA;AlBglFJ;AkB5kFA;EACE,yBAAA;AlB+kFF;AkB5kFA;EACE,yBAAA;AlB+kFF;AkB9kFE;EACE,yBAAA;AlBglFJ;AkB5kFA;EACE,sCAAA;EAEA,cAAA;EACA,6GACE;AlB6kFJ;AkB3kFE;EACE,YAAA;EACA,sCAAA;AlB6kFJ;AkBzkFA;EACE,cAAA;EACA,qFACE;AlB2kFJ;AkBvkFA;EACE,yBAAA;AlB0kFF;AkBzkFE;EACE,yBAAA;AlB2kFJ;AkBvkFA;EACE,yBAAA;AlB0kFF;AkBzkFE;EACE,yBAAA;AlB2kFJ;AkBvkFA;EACE,yBAAA;AlB0kFF;AkBzkFE;EACE,yBAAA;AlB2kFJ;AkBvkFA;EACE,aAAA;EACA,uBAAA;EACA,WAAA;AlB0kFF;AkBvkFA;EACE,YAAA;EAEA,yBAAA;EACA,4BAAA;AlBykFF;AmBxuFA;EACE,kBAAA;EAEA,qBAAA;EACA,4DACE;EAGF,sCAAA;AnBuuFF;AmBruFE;EACE,yBAAA;EACA,2BAAA;AnBuuFJ;AmBpuFE;EACE,yBAAA;EACA,mBAAA;AnBsuFJ;AmBnuFE;EACE,mBAAA;AnBquFJ;AoB1vFA;EACE,aAAA;ApB6vFF;AoB3vFE;EACE,gBAAA;ApB6vFJ;AoB1vFE;EACE,YAAA;EACA,mBAAA;ApB4vFJ;AoBzvFE;EACE,aAAA;EACA,mBAAA;EACA,WAAA;EACA,gBAAA;ApB2vFJ;AoBxvFE;EACE,kBAAA;EACA,WAAA;EACA,YAAA;EACA,oDAAA;EACA,oBAAA;EACA,gBAAA;ApB0vFJ;AoBvvFE;EACE,kBAAA;EACA,UAAA;EACA,2BAAA;EACA,YAAA;EACA,OAAA;EACA,2BAAA;EACA,mBAAA;ApByvFJ;AoBtvFE;EACE,cAAA;EACA,kBAAA;EACA,oBAAA;ApBwvFJ;AqBtwFA;EACE,kBAAA;ArBywFF;AqBxwFE;EAEE,kBAAA;EACA,OAAA;EACA,SAAA;EACA,QAAA;EACA,SAAA;EAEA,UAAA;EACA,gBAAA;EAEA,oBAAA;EACA,WAAA;ArBuwFJ;AqBpwFE;EAEE,MAAA;ArBqwFJ;AqBnwFE;;EAEE,kBAAA;EACA,cAAA;EACA,gBAAA;EACA,gBAAA;EACA,iBAAA;EACA,qBAAA;EAEA,cAnDkB;EAqDlB,eAAA;ArBmwFJ;AqBlwFI;;EAEE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,YAAA;EACA,OAAA;EACA,YAAA;EACA,aAAA;EACA,sBAAA;EAEA,uBArEY;EAsEZ,iBAvEkB;EAwElB,mBAAA;EACA,qBArEiB;EAuEjB,sCArEa;EAuEb,wLACE;ArBgwFR;AqB3vFI;;EAEE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,YAAA;EACA,OAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;EAEA,kBAAA;EACA,WAAA;EACA,+VAAA;EACA,sBAAA;EACA,4BAAA;EACA,2BAAA;EAEA,mBAAA;EACA,gEAAA;ArB2vFN;AqBrvFE;EACE,cAnGmB;ArB01FvB;AqBtvFI;EACE,sCApGc;EAqGd,qBAvGkB;ArB+1FxB;AqBnvFE;EAEE,gBAAA;EACA,cA1GqB;ArB81FzB;AqBnvFI;EACE,mBAAA;EACA,qBA5GgB;EA8GhB,yBA9GgB;EA+GhB,8HACE;ArBmvFR;AqBhvFI;EACE,UAAA;EACA,mBAAA;ArBkvFN;AqB7uFE;EACE,cAvHsB;ArBs2F1B;AqB9uFI;EACE,qBA1HqB;EA4HrB,yBA1HiB;ArBy2FvB;AqB3uFE;EAEE,MAAA;ArB4uFJ;AqBzuFE;EACE,uBAAA;ArB2uFJ;AqBxuFE;EACE,yBA7IkB;ArBu3FtB;AsBv4FA;EACE,WAAA;EACA,YAAA;EAEA,oBAAA;EAEA,sBAAA;EACA,4BAAA;EACA,kCAAA;AtBw4FF;AuBh5FA;EACE,iOAAA;EAIA,qBAAA;EACA,cAAA;AvBg5FF;AwBt5FA;EACE,aAAA;EACA,uBAAA;AxBy5FF;AwBv5FE;EACE,oBAAA;AxBy5FJ;AwBt5FA;EACE,WAAA;EACA,YAAA;EAEA,oBAAA;EACA,yBAAA;EAEA,eAAA;EACA,kBAAA;EACA,gBAAA;EAEA,yBAAA;EACA,wBAAA;AxBs5FF;AwBr5FE;EACE,aAAA;EAEA,qBAAA;EACA,2FACE;AxBq5FN;AyB/6FA;EACE,kBAAA;AzBk7FF;AyBj7FE;EACE,cAAA;EACA,cAAA;EACA,WAAA;EACA,YAAA;EAEA,eAAA;AzBk7FJ;AyB96FA;EACE,gBAAA;EACA,mBAAA;EpBiDA,kBAAA;EACA,oBAAA;EoB/CA,cAAA;AzBi7FF;A0Bl8FA;EACE,kBAAA;EACA,oBAAA;EACA,mBAAA;A1Bq8FF;A0Bn8FE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EAEA,MAAA;EACA,OAAA;EACA,QAAA;EACA,WAAA;EAEA,yBAAA;EACA,WAAA;A1Bm8FJ;A0Bj8FE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EAEA,MAAA;EACA,OAAA;EACA,QAAA;EACA,YAAA;EACA,uBAAA;EAEA,yBAAA;EACA,WAAA;A1Bi8FJ;A0B97FI;EACE,yBAAA;A1Bg8FN;A0B97FI;EACE,yBAAA;A1Bg8FN;A2Br+FA;EACE,gBAAA;EACA,WAAA;EACA,YAAA;EAEA,oBAAA;A3Bu+FF;A2Bt+FE;EACE,WAAA;EACA,YAAA;EACA,4BAAA;A3Bw+FJ;A2Bt+FE;EACE,qBAAA;EACA,cAAA;EACA,eAAA;EACA,oBAAA;EACA,gBAAA;EAEA,qBAAA;A3Bu+FJ;A2Bj+FA;EACE,cAAA;A3Bm+FF;A4B5/FA;EACE,aAAA;EACA,uBAAA;EACA,yBAAA;A5B+/FF;AK5/FM;EuBNN;IAKI,uBAAA;E5BigGF;AACF;A4B//FA;EACE,2BAAA;A5BkgGF;AKrgGM;EuBEN;IAGI,2BAAA;E5BogGF;AACF;A4BlgGA;EACE,WAAA;EACA,YAAA;EACA,cAAA;A5BqgGF;A4BngGA;EACE,oBAAA;A5BsgGF;A6Bl/FA;EACE,cAAA;EACA,kBAAA;A7Bq/FF;A6Bp/FE;EACE,gBAAA;ExBmBF,kBAAA;EACA,oBAAA;EwBjBE,eAAA;A7Bs/FJ;A6Br/FI;EACE,mBAAA;A7Bu/FN;A6Bn/FE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,cAAA;EACA,eAAA;EACA,WAAA;EACA,QAAA;EACA,qBAAA;EACA,+BAAA;EACA,gCAAA;EAEA,wBAAA;EAEA,qBAAA;EACA,oBAAA;EACA,+DAAA;A7Bq/FJ;A6Bl/FE;;;EAGE,WAAA;EAEA,mBAzEU;EA0EV,sBA1EU;EA2EV,oBA5EU;EA6EV,qBA7EU;EA+EV,sBA1Ec;EA2Ed,iBA1Ea;EA2Eb,mBAAA;EACA,qBA3Ea;EA4Eb,gBA3EW;EA6EX,eA1EU;EA2EV,gBA1EY;EA2EZ,cA1EO;EA2EP,cAAA;EAEA,mBArEY;EAsEZ,sBAAA;EACA,wBAAA;A7Bg/FJ;A6B/+FI;EACE,UAAA;EACA,cA7EgB;EA8EhB,0BA9Da;EA+Db,yBA9De;EA+Df,iCAAA;EAAA,4BAAA;A7Bm/FN;A6Bx/FI;;;EACE,UAAA;EACA,cA7EgB;EA8EhB,0BA9Da;EA+Db,yBA9De;EA+Df,4BAAA;A7Bm/FN;A6Bh/FI;;;EACE,qBAAA;EACA,iBAjGW;A7BqlGjB;A6Bl/FM;;;EACE,qBAAA;EACA,iBArGS;A7B2lGjB;A6Bj/FI;;;EACE,qBAxFgB;EAyFhB,aAvFO;EAwFP,yCAtFJ;EAuFI,mBArFe;A7B0kGrB;A6Bn/FI;EAEE,cAtGgB;EAuGhB,qBAAA;EACA,yBAAA;EAEA,mBAAA;A7Bu/FN;A6B7/FI;;;;;EAEE,cAtGgB;EAuGhB,qBAAA;EACA,yBAAA;EAEA,mBAAA;A7Bu/FN;A6Br/FI;;;EACE,0BAAA;EACA,6BAAA;EACA,kBAAA;A7By/FN;A6Br/FI;EACE,sCAhHgB;A7BumGtB;A6Bt/FM;EACE,sCAlHc;A7B0mGtB;A6Bp/FE;EACE,aAAA;EACA,sBAAA;EACA,YAAA;A7Bs/FJ;A6Br/FI;EACE,YAAA;EACA,0BAAA;EACA,6BAAA;EAEA,kBAAA;A7Bs/FN;A6Bl/FI;EACE,mBAAA;A7Bo/FN;A6Bh/FI;EACE,kBAAA;A7Bk/FN;A6B7+FA;EACE,kBAAA;EACA,QAAA;EACA,aAvKY;EAwKZ,WAAA;EACA,YAAA;EAEA,kBAAA;EAEA,2BAAA;A7B8+FF;A6B5+FE;EAEE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,QAAA;EACA,gBAAA;EACA,WAAA;EACA,WAAA;EAEA,mBAAA;EAEA,yBAAA;A7B2+FJ;A6Bz+FE;EACE,wBAAA;A7B2+FJ;A6Bz+FE;EACE,yBAAA;A7B2+FJ;A6Bx+FI;EAEE,yBAAA;A7By+FN;A6Bp+FA;EACE,kBAAA;EACA,YA7MY;EA8MZ,QAAA;EACA,2BAAA;EACA,WAAA;EACA,YAAA;EAEA,YAAA;EAEA,oBAAA;A7Bq+FF;A6Bj+FE;;EAEE,qBAAA;A7Bo+FJ;AKxrGM;EyBVN;IAEI,aAAA;E9BqsGF;AACF;A8BnsGA;EACE,YAAA;A9BssGF;AKtsGM;EyBDN;IAGI,mBAAA;E9BwsGF;AACF;AKvsGM;EyBLN;IAMI,oBAAA;E9B0sGF;AACF;A8BxsGA;EACE,cAAA;A9B2sGF;AKptGM;EyBQN;IAGI,WAAA;E9B6sGF;AACF;A+B/tGA;EACE,kBAAA,EAAA,kCAAA;EACA,WAAA;EACA,gBAAA;A/BkuGF;AK/tGM;E0BNN;IAKI,mBAAA;E/BouGF;AACF;A+BluGE;EACE,YAAA;EACA,YAAA;EACA,cAAA;A/BouGJ;A+BjuGA;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;A/BouGF;AgCvvGA;EACE,UAAA;EAEA,YAAA;EACA,gBAAA;EAEA,0BAAA;EACA,cAAA;AhCwvGF;AgCvvGE;EACE,cAAA;AhCyvGJ;AgCvvGE;EACE,aAAA;EAEA,cAAA;EACA,0BAAA;AhCwvGJ;AgCtvGE;EACE,cAAA;AhCwvGJ;AgCvvGI;EACE,cAAA;AhCyvGN;AgCtvGE;EACE,2BAAA;AhCwvGJ;AgCvvGI;EACE,cAAA;AhCyvGN;AgCtvGE;EACE,cAAA;AhCwvGJ;AgCvvGI;EACE,cAAA;AhCyvGN;AiCzxGA;EACE,kBAAA;AjC4xGF;AiC1xGA;EACE,cAAA;EACA,cAAA;EACA,WAAA;EACA,YAAA;EAEA,oBAAA;EACA,0BAAA;EACA,mCAAA;EACA,iCAAA;AjC4xGF;AiC1xGE;EACE,aAAA;EACA,cAAA;AjC4xGJ;AiCxxGA;EACE;IACE,uBAAA;EjC2xGF;EiCzxGA;IACE,yBAAA;EjC2xGF;AACF;AiCxxGA;EACE,gBAAA;E5BiCA,kBAAA;EACA,oBAAA;E4B/BA,cAAA;AjC0xGF;AkC1zGE;EACE,WAAA;EACA,YAAA;AlC6zGJ;AkC1zGI;EACE,YAAA;AlC4zGN;AmCl0GE;EACE,mBAAA;AnCq0GJ;AmCn0GE;;;;;;EAME,gBAAA;AnCq0GJ;AoC90GE;EACE,aAAA;ApCi1GJ;AoC90GE;EACE,aAAA;EACA,qBAAA;ApCg1GJ;AoC90GI;EACE,aAAA;EACA,cAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;ApCg1GN;AoC70GI;EACE,YAAA;EACA,aAAA;EACA,8BAAA;ApC+0GN;AoC50GI;EACE,iBAAA;EACA,gBAAA;ApC80GN;AoC10GE;EACE,aAAA;EACA,uBAAA;ApC40GJ;AqC12GE;EACE,cAAA;ArC62GJ;AqC12GE;EACE,cAAA;ArC42GJ;AqC12GI;EACE,0BAAA;ArC42GN;AsCr3GA;EACE,gBAAA;EACA,kBAAA;EACA,eAAA;AtCw3GF;AsCt3GA;EACE,cAAA;EACA,sBAAA;EjCwDA,kBAAA;EACA,oBAAA;EiCrDA,gBAAA;AtCw3GF;AsCt3GA;EACE,qBAAA;EACA,sBAAA;EACA,cAAA;EACA,WAAA;EACA,YAAA;EAEA,yBAAA;EACA,sBAAA;EAEA,eAAA;EACA,iBAAA;EAEA,yBAAA;EAEA,mOACE;EAIF,wBAAA;AtCi3GF;AsCh3GE;EACE,oBAAA;EACA,qBAAA;AtCk3GJ;AsCh3GE;EACE,aAAA;EACA,qBAAA;AtCk3GJ;AsCh3GE;EACE,qBAAA;AtCk3GJ;AsC/2GA;EACE,cAAA;EACA,kBAAA;AtCk3GF;AsCh3GA;EACE,cAAA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,aAAA;EACA,YAAA;EACA,iBAAA;EACA,UAAA;EAEA,eAAA;EAEA,mBAAA;EACA,4DAAA;AtCi3GF;AsC/2GE;EACE,UAAA;EACA,mBAAA;AtCi3GJ;AsC/2GE;EACE,UAAA;EACA,WAAA;AtCi3GJ;AsC/2GE;EACE,yBAAA;AtCi3GJ;AsC/2GE;EACE,cAAA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,uBAAA;EACA,kBAAA;EAEA,kBAAA;EAEA,yBAAA;AtC+2GJ;AsC92GI;EACE,wBAAA;AtCg3GN;AuC18GA;EACE,eAAA;EAEA,sBAAA;EACA,0BAAA;EAEA,cAAA;EAEA,yBAAA;AvC08GF;AwCl9GA;EACE,kBAAA;EACA,YAAA;EACA,aAAA;AxCq9GF;AwCn9GE;EACE,kBAAA;EACA,WAAA;EACA,OAAA;EACA,QAAA;EACA,MAAA;EACA,SAAA;EACA,kBAAA;EACA,kBAAA;EACA,aAAA;AxCq9GJ;AwCl9GE;EACE,kBAAA;EACA,SAAA;EACA,QAAA;EACA,4CAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,uBAAA;EACA,gBAAA;AxCo9GJ;AwCj9GE;EACE,eAAA;EACA,iBAAA;AxCm9GJ;AyCl/GA;EACE,aAAA;AzCq/GF;AyCp/GE;EACE,gBAAA;EACA,iBAAA;EACA,iBAAA;EAEA,yBAAA;EAEA,kBAAA;AzCo/GJ;AyCn/GI;EACE,oBAAA;EAEA,6BAAA;EACA,gCAAA;AzCo/GN;AyCl/GI;EACE,qBAAA;EAEA,8BAAA;EACA,iCAAA;AzCm/GN;AyCh/GE;EACE,cAAA;AzCk/GJ;AyCh/GE;EACE,2BAAA;EACA,gBAAA;EACA,qBAAA;EAEA,yBAAA;AzCi/GJ;AyC/+GE;EACE,cAAA;AzCi/GJ;A0Cz/GA;EACE,kBAAA;A1C4/GF;A0C3/GE;EAEE,kBAAA;EACA,OAAA;EACA,SAAA;EACA,QAAA;EACA,SAAA;EAEA,UAAA;EACA,gBAAA;EAEA,oBAAA;EACA,WAAA;A1C0/GJ;A0Cx/GE;EACE,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,iBAAA;EACA,qBAAA;EAEA,cA5Ce;EA8Cf,eAAA;A1Cw/GJ;A0Cv/GI;EAEE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,YAAA;EACA,OAAA;EACA,YAAA;EACA,aAAA;EACA,sBAAA;EAEA,mBAAA;EACA,iBAhEe;EAiEf,mBAAA;EACA,qBA/Dc;EAiEd,kDAAA;EAEA,sCAlEU;EAoEV,sLACE;A1Cm/GR;A0C5+GE;EACE,cAvEgB;A1CqjHpB;A0C7+GI;EACE,sCA1EW;EA2EX,qBA5Ee;EA8Ef,gBAAA;A1C8+GN;A0Cz+GE;EACE,gBAAA;EACA,cAhFkB;A1C2jHtB;A0C1+GI;EACE,qBAjFa;EAmFb,yBAnFa;EAqFb,qDAAA;EACA,wHACE;A1Cy+GR;A0Cn+GE;EACE,cAzFmB;A1C8jHvB;A0Cp+GI;EACE,yBA5Fc;EA6Fd,qBA9FkB;EAgGlB,gBAAA;A1Cq+GN;A2CvlHA;EACE,aAAA;A3C0lHF;A2CvlHA;EACE,aAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EAEA,yBAAA;EAEA,mBAAA;EACA,uBAAA;EACA,qBAAA;EACA,kBAAA;EACA,gBAAA;EACA,gBAAA;EAEA,cAAA;EAEA,sBAAA;A3CslHF;A2CplHE;EACE,WAAA;EAEA,yBAAA;EAEA,eAAA;A3ColHJ;A2CnlHI;EACE,aAAA;A3CqlHN;A2CllHE;EACE,yBAAA;A3ColHJ;A2CllHE;EACE,kBAAA;EACA,4BAAA;EACA,+BAAA;A3ColHJ;A2CllHE;EACE,mBAAA;EACA,6BAAA;EACA,gCAAA;A3ColHJ;A2CllHE;EACE,iBAAA;A3ColHJ;A4CnoHA;EACE,kBAAA;A5CsoHF;A4CroHE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,cAAA;EACA,QAAA;EACA,mBAAA;EAEA,+BAAA;EACA,gCAAA;EAEA,wBAAA;EACA,qBAAA;EACA,oBAAA;A5CqoHJ;A4CjoHA;EACE,WAAA;EACA,eAAA;EACA,mBAAA;EACA,wBAAA;EACA,qBAAA;EACA,gBAAA;EAEA,yBAAA;EACA,sBAAA;EAEA,eAAA;EACA,mBAAA;EAEA,yBAAA;A5CioHF;A4C/nHE;EACE,aAAA;EACA,qBAAA;A5CioHJ;A4C/nHE;EACE,kBAAA;EACA,uBAAA;A5CioHJ;A4C/nHE;EACE,aAAA;A5CioHJ;A4C/nHE;EACE;IAEE,aAAA;E5CgoHJ;AACF;A4C5nHA;EACE,oBAAA;EACA,WAAA;EACA,YAAA;A5C+nHF;A4C7nHE;EACE,0BAAA;A5C+nHJ;A6C7rHA;EACE,aAAA;EACA,eAAA;EACA,mBAAA;EACA,sBAAA;A7CgsHF;A6C7rHA;EACE,kBAAA;EACA,qBAAA;EACA,mBAAA;ExCqDA,kBAAA;EACA,oBAAA;AL4oHF;A6C/rHE;EACE,WAAA;EACA,cAAA;EACA,kBAAA;EACA,OAAA;EACA,YAAA;EACA,eAAA;EAEA,UAAA;EAEA,yBAAA;A7C+rHJ;A6C5rHI;EACE,aAAA;A7C8rHN;AKntHM;EwCCN;IxCwDE,kBAAA;IACA,iBAAA;EL8pHA;E6C9rHE;IACE,aAAA;E7CgsHJ;AACF;A8CluHA;EACE,aAAA;EACA,uBAAA;EAAA,kBAAA;EACA,gBAAA;EACA,kBAAA;EACA,UAAA;EACA,MAAA;EACA,OAAA;EACA,kBAAA;EACA,YAAA;EACA,mBAAA;EACA,eAAA;EACA,YAAA;EACA,kBAAA;A9CquHF;A8CluHA;EACE,kBAAA;EACA,kBAAA;EACA,UAAA;EACA,WAAA;EACA,wBAAA;A9CquHF;A+CzvHE;EACE,aAAA;EACA,sBAAA;EACA,mBAAA;A/C4vHJ;AKtvHM;E0CTJ;IAKI,mBAAA;E/C8vHJ;AACF;A+C3vHE;EACE,kBAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EACA,mBAAA;EAEA,aAAA;EACA,mBAAA;EACA,uBAAA;A/C4vHJ;AKvwHM;E0CAJ;IAcI,mBAAA;IACA,kBAAA;IACA,gBAAA;E/C6vHJ;AACF;A+C3vHI;EACE,sCAAA;A/C6vHN;A+CzvHE;EACE,aAAA;EACA,gBAAA;A/C2vHJ;A+CxvHE;EACE,aAAA;EACA,yBAAA;EACA,mBAAA;EACA,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,gCAAA;A/C0vHJ;A+CxvHI;EACE,uBAAA;A/C0vHN;AKjyHM;E0C2CJ;IAEI,gBAAA;E/CwvHJ;AACF;A+CrvHE;EACE,aAAA;EACA,sBAAA;A/CuvHJ;AK1yHM;E0CiDJ;IAII,mBAAA;E/CyvHJ;AACF;A+CvvHI;EACE,YAAA;EACA,mBAAA;A/CyvHN;A+CvvHM;EACE,gBAAA;A/CyvHR;AKtzHM;E0CwDF;IASI,gBAAA;IACA,mBAAA;E/CyvHN;E+CvvHM;IACE,kBAAA;IACA,gBAAA;E/CyvHR;AACF;AgD10HA;EACE,aAAA;EACA,qBAAA;EACA,eAAA;AhD60HF;AgD30HA;EACE,YAAA;EACA,mBAAA;E3CwDA,iBAAA;EACA,oBAAA;E2CtDA,gBAAA;EACA,cAAA;AhD80HF;AKn1HM;E2CDN;I3C0DE,iBAAA;IACA,mBAAA;EL8xHA;AACF;AgD90HA;EACE,YAAA;EACA,mBAAA;E3C4CA,iBAAA;EACA,mBAAA;E2C1CA,gBAAA;EACA,cAAA;AhDi1HF;AgD90HA;EACE,cAAA;EACA,mBAAA;AhDi1HF;AiD52HA;EACE,yBAAA;AjD+2HF;AKv2HM;E4CLN;IAEI,aAAA;EjD+2HF;AACF;AiD32HA;EACE,aAAA;EACA,uBAAA;EACA,oBAAA;EACA,eAAA;AjD82HF;AiD52HA;EACE,cAAA;EACA,YAAA;EACA,WAAA;AjD+2HF;AiD72HA;E5CwCE,kBAAA;EACA,oBAAA;E4CvCA,iBAAA;EACA,2BAAA;AjDi3HF;AKj4HM;E4CmBN;IAEI,aAAA;EjDi3HF;AACF;AiDh3HE;EACE,YAAA;AjDk3HJ;AiD92HA;EACE,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,wBAAA;E5CqBA,kBAAA;EACA,oBAAA;E4CnBA,kBAAA;EACA,2BAAA;EACA,gBAAA;EAEA,qBAAA;EAEA,mEAAA;AjD+2HF;AiD92HE;EACE,0CAAA;AjDg3HJ;AiD92HE;EACE,yCAAA;AjDg3HJ;AiD52HA;EACE,aAAA;EACA,sBAAA;EACA,oBAAA;EACA,qBAAA;AjD+2HF;AiD52HA;EAGE,kBAAA;EAEA,2BAAA;EACA,iBAAA;EAEA,qBAAA;AjD22HF;AiDz2HE;EACE,0CAAA;AjD22HJ;AiDz2HE;EACE,yCAAA;AjD22HJ;AkD37HA;EACE,gBAAA;EACA,cAAA;EAEA,qBAAA;EAEA,wFACE;AlD27HJ;AkDv7HA;EACE,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,sBAAA;EAEA,8BAAA;EACA,+BAAA;AlDy7HF;AKt8HM;E6CMN;IASI,gBAAA;ElD27HF;AACF;AkDx7HA;EACE,oBAAA;EAEA,iCAAA;EACA,kCAAA;EAEA,sCAAA;AlDy7HF;AKl9HM;E6CmBN;IAQI,sBAAA;ElD27HF;AACF;AkDx7HA;EACE,aAAA;AlD27HF;AkD17HE;;EAEE,cAAA;AlD47HJ;AK/9HM;E6CiCJ;;IAII,YAAA;ElD+7HJ;AACF;AkD57HA;EACE,YAAA;EACA,WAAA;AlD+7HF;AkD37HA;EACE,aAAA;EACA,eAAA;AlD87HF;AkD37HA;EACE,cAAA;EACA,sBAAA;EACA,gBAAA;AlD87HF;AKr/HM;E6CoDN;IAKI,eAAA;ElDg8HF;AACF;AkD77HA;EACE,cAAA;EAEA,6BAAA;EACA,yBAAA;EACA,sBAAA;EAEA,kBAAA;EACA,qBAAA;EACA,6DAAA;AlD87HF;AkD77HE;EACE,4DACE;AlD87HN;AkDz7HA;EACE,cAAA;EACA,gBAAA;AlD47HF;AkD37HE;EACE,gBAAA;AlD67HJ;AkDz7HA;EACE,gBAAA;EAEA,6BAAA;EAEA,qBAAA;E7ClCA,kBAAA;EACA,oBAAA;E6CmCA,gBAAA;AlD27HF;AkD17HE;EACE,cAAA;AlD47HJ;AmD9gIA;EACE,kBAAA;EACA,aAAA;EACA,sCApBiB;AnDqiInB;AmDhhIE;EACE,yBArBsB;AnDuiI1B;AmD9gIA;EACE,aAAA;EACA,cAAA;AnDihIF;AKziIM;E8CsBN;IAII,sBAAA;EnDmhIF;AACF;AmDjhIA;EACE,aAAA;EACA,oBAAA;EACA,8BAAA;EACA,cAAA;EACA,kBAvCqB;EAwCrB,YAzCqB;AnD6jIvB;AKnjIM;E8CyBN;IAQI,kBAAA;EnDshIF;AACF;AKxjIM;E8CyBN;IAWI,kBA7CmB;EnDqkIrB;AACF;AmDrhIA;EACE,YAAA;EACA,gBAAA;AnDwhIF;AmDnhIA;EACE,aAAA;EACA,oBAAA;EACA,gBAAA;AnDshIF;AmDphIA;EACE,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,gBAAA;EACA,WAnEqB;EAqErB,yBA7DsB;AnDmlIxB;AmDrhIE;EACE,cAjEgB;AnDwlIpB;AmDphIA;EACE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,kBA7EqB;AnDomIvB;AmDthIE;EACE,YA3Ec;EA4Ed,WAAA;AnDwhIJ;AmDrhIA;EACE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,kBAvFqB;AnD+mIvB;AmDvhIE;EACE,aAAA;AnDyhIJ;AmDvhIE;EACE,eAtFc;AnD+mIlB;AmDnhIA;EACE,aAAA;EACA,cAAA;AnDshIF;AKrnIM;E8C6FN;IAII,aAAA;IACA,mBAAA;IACA,eAAA;IACA,mBAAA;IAEA,eAAA;EnDuhIF;AACF;AmDlhIA;EACE,kBAAA;EACA,WAzGgB;EA0GhB,YA3GiB;EA6GjB,eAAA;AnDohIF;AmDnhIE;EACE,oBAAA;AnDqhIJ;AmDnhIE;EAEE,WAAA;EACA,kBAAA;EACA,cAAA;EACA,WAAA;EACA,WArHsB;EAuHtB,gBAtHsB;EAuHtB,gCAtHqB;EAwHrB,2CAAA;EACA,0B7CxDa;E6CyDb,4D7C1De;AN4kInB;AmDhhIE;EACE,MAAA;AnDkhIJ;AmDhhIE;EACE,SAAA;AnDkhIJ;AmD/gII;EACE,QAAA;EACA,2BAAA;AnDihIN;AmD/gII;EACE,WAAA;EACA,0BAAA;AnDihIN;AmD7gII;EACE,0CAAA;AnD+gIN;AmD7gII;EACE,yCAAA;AnD+gIN;AmD3gII;EAEE,sCAtJ0B;AnDkqIhC;AmDvgIA;EACE,kBAAA;EACA,QAAA;EACA,WAAA;EACA,WAlKwB;EAmKxB,2BAAA;EAEA,gBApKwB;EAsKxB,gCArKuB;EAsKvB,8BAAA;EACA,0B7CtGe;E6CuGf,4D7CxGiB;ANgnInB;AmDtgIE;EACE,2CAAA;AnDwgIJ;AmDtgIE;EACE,sCA7K4B;AnDqrIhC;AmDlgIA;EACE,yDAAA;AnDqgIF;AmDpgIE;EACE,aAAA;EACA,8BAAA;AnDsgIJ;AKtsIM;E8C8LJ;IAII,cAAA;IACA,gBAAA;IACA,iBAAA;IACA,8BAAA;IAEA,iCAAA;EnDugIJ;AACF;AmDpgIA;EACE,aAAA;EACA,YAnNqB;AnD0tIvB;AKptIM;E8C2MN;IAII,cAAA;IACA,YAAA;EnDygIF;AACF;AmD7/HA;EACE,kBAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,qBAZkB;EAalB,sBAbkB;EAelB,cAjBe;EAkBf,eAAA;EACA,qBAAA;EACA,gBAAA;EAEA,cAAA;EAEA,eAAA;AnD6/HF;AmD3/HE;EACE,qBAAA;AnD6/HJ;AmD5/HI;EACE,0BAAA;AnD8/HN;AmD1/HE;EACE,YAAA;EACA,mBAAA;AnD4/HJ;AmD1/HE;EACE,2BArCoB;AnDiiIxB;AKlvIM;E8CyNN;IAiCI,YAAA;IACA,iBAvCe;EnDmiIjB;EmD3/HE;IACE,kBAzCa;EnDsiIjB;AACF;AK/vIM;E8C6NN;IAwCI,qBA/CgB;IAgDhB,sBAhDgB;IAkDhB,2CA/Ce;IAiDf,mBA/Ce;EnD2iIjB;EmD1/HE;IACE,wCApDa;EnDgjIjB;EmD1/HE;IACE,mBAAA;EnD4/HJ;AACF;AKzwIM;E8CyNN;IAuDI,kBAAA;IACA,mBAAA;EnD6/HF;AACF;AK/wIM;E8CyNN;IA2DI,qBAlEgB;IAmEhB,sBAnEgB;EnDkkIlB;AACF;AmD5/HA;EACE,aAAA;EACA,mBAAA;EACA,qBAAA;AnD+/HF;AmD9/HE;EACE,cAAA;EACA,eAAA;AnDggIJ;AKnyIM;E8C6RN;IASI,oBAAA;EnDigIF;AACF;AmD9/HA;EACE,aAAA;EACA,mBAAA;AnDigIF;AmD9/HA;EACE,0BAAA;EACA,uBAAA;EACA,YAAA;EACA,cAAA;AnDigIF;AmD9/HA;EACE,cAAA;AnDigIF;AmD9/HA;EACE,cAAA;AnDigIF;AmD9/HA;EACE;IACE,kBAAA;IACA,QAAA;IACA,QAAA;IACA,uBAAA;IACA,oBAAA;IACA,6FACE;EnDggIJ;AACF;AmD5/HA;EACE,mBAAA;AnD8/HF;AmD3/HA;EACE;IACE,YAAA;IACA,cAAA;IACA,eAAA;EnD8/HF;EmD3/HA;IACE,eAAA;EnD6/HF;EmD1/HA;IACE,WAAA;IACA,gBAAA;IACA,oBAAA;EnD4/HF;AACF;AmDz/HA;EACE,kBAAA;AnD2/HF;AoDn2IA;;;EAGE,WAAA;EACA,oBAAA;EAEA,yBAAA;EACA,oBAAA;EAEA,eAAA;EACA,iBAAA;EAEA,yBAAA;EACA,wBAAA;ApDm2IF;AoDl2IE;;;EACE,aAAA;EACA,qBAAA;ApDs2IJ;AoDl2IA;EACE,kBAAA;ApDq2IF;AoDl2IA;EACE,aAAA;EACA,4BAAA;ApDq2IF;AoDn2IA;EACE,UAAA;EACA,4GACE;EAEF,yBAAA;ApDo2IF;AoDl2IA;EACE,UAAA;EAEA,yBAAA;ApDo2IF;AoDl2IA;EACE,aAAA;EACA,4GACE;EAEF,4BAAA;ApDm2IF;AoDh2IA;EACE,aAAA;EACA,2BAAA;ApDm2IF;AoDj2IA;EACE,UAAA;EACA,4GACE;EAEF,yBAAA;ApDk2IF;AoDh2IA;EACE,UAAA;EAEA,yBAAA;ApDk2IF;AoDh2IA;EACE,aAAA;EACA,4GACE;EAEF,2BAAA;ApDi2IF;AoD91IA;EACE,cAAA;EACA,kBAAA;EACA,OAAA;EACA,MAAA;EACA,aAAA;EACA,cAAA;EACA,UAAA;EAEA,YAAA;ApDg2IF;AoD91IE;EACE,WAAA;EACA,YAAA;EACA,eAAA;ApDg2IJ;AoD91IE;EACE,eAAA;ApDg2IJ;AoD91IE;EACE,aAAA;EAEA,yBAAA;ApD+1IJ;AoD31IA;EACE,WAAA;EACA,YAAA;ApD81IF;AoD71IE;EACE,oBAAA;EACA,0BAAA;EACA,mCAAA;EACA,iCAAA;ApD+1IJ;AKl8IM;E+C4FN;IAUI,WAAA;IACA,YAAA;EpDg2IF;AACF;AoD71IA;EACE,eAAA;EACA,WAAA;ApDg2IF;AoD71IA;EACE,WAAA;EACA,YAAA;EACA,oBAAA;EACA,mBAAA;ApDg2IF;AoD/1IE;EACE,WAAA;EACA,YAAA;EACA,eAAA;ApDi2IJ;AoD71IA;EACE,QAAA;EACA,MAAA;EACA,UAAA;EACA,YAAA;EACA,cAAA;ApDg2IF;AoD91IE;EACE,aAAA;ApDg2IJ;AoD71IE;EACE,aAAA;ApD+1IJ;AoD31IA;EACE;IACE,uBAAA;EpD81IF;EoD51IA;IACE,yBAAA;EpD81IF;AACF;AqDt/IA;EACE,aAAA;EAEA,qBAAA;EACA,4DACE;EAGF,sCAAA;ArDo/IF;AqDl/IA;EACE,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,gBAAA;EAEA,8BAAA;EACA,iCAAA;EAEA,yBAAA;ArDm/IF;AqDl/IE;EACE,WAAA;EACA,YAAA;EAEA,4BAAA;ArDm/IJ;AqDh/IA;EACE,gBAAA;EAEA,+BAAA;EACA,kCAAA;ArDk/IF;AsDjhJA;EACE,kBAAA;EACA,gBAAA;EACA,WAAA;EACA,kBAAA;AtDohJF;AsDlhJA;EACE,kBAAA;EACA,WAAA;EACA,gBAAA;EACA,MAAA;EACA,OAAA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;AtDqhJF;AsDlhJA;EACE,2BAAA;AtDqhJF;AsDphJE;EACE,UAAA;EACA,2BAAA;AtDshJJ;AsDphJE;EACE,UAAA;EACA,2BAAA;AtDshJJ;AsDnhJA;EACE,UAAA;EACA,wHACE;EAEF,yBAAA;AtDohJF;AsDnhJE;EACE,UAAA;EACA,0HACE;EAEF,yBAAA;AtDmhJJ;AsDjhJE;EACE,UAAA;EACA,0HACE;EAEF,yBAAA;AtDihJJ;AsD9gJA;EACE,yBAAA;AtDihJF;AsDhhJE;EACE,UAAA;EACA,yBAAA;AtDkhJJ;AsDhhJE;EACE,UAAA;EACA,yBAAA;AtDkhJJ;AsD/gJA;EACE,wHACE;EAEF,4BAAA;AtDghJF;AsD/gJE;EACE,aAAA;EACA,4GACE;EAEF,4BAAA;AtD+gJJ;AsD7gJE;EACE,aAAA;EACA,wHACE;EAEF,4BAAA;AtD6gJJ;AsDzgJA;EACE,cAAA;EACA,gBAAA;EAEA,yBAAA;EACA,sBAAA;EACA,eAAA;EAEA,eAAA;EACA,eAAA;EAEA,yBAAA;AtDygJF;AuDtmJA;EACE,aAAA;EACA,sBAAA;EACA,YAAA;AvDwmJF;AuDtmJA;EACE,YAAA;AvDymJF;AuDvmJA;EACE,cAAA;EACA,oBAAA;EAEA,kBAAA;EAEA,sCAAA;AvDwmJF;AuDtmJA;EACE,aAAA;EACA,mBAAA;EACA,8BAAA;EACA,UAAA;EACA,sCAAA;AvDymJF;AuDvmJA;;;EAGE,SAAA;EACA,aAAA;EACA,uBAAA;AvD0mJF;AuDxmJA;EACE,oBAAA;AvD2mJF;AuD1mJE;EACE,kBAAA;AvD4mJJ;AuDzmJA;EACE,iBAAA;EACA,kBAAA;AvD4mJF;AuDzmJE;EACE,iBAAA;AvD4mJJ;AuDzmJA;EACE,aAAA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EAEA,YAAA;EAEA,cAAA;AvD0mJF;AuDzmJE;EACE,WAAA;EACA,YAAA;EACA,aAAA;AvD2mJJ;AuDzmJE;EACE,cAAA;AvD2mJJ;AuD1mJI;EACE,aAAA;AvD4mJN;AwD1qJA;EACE,eAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EACA,2CAAA;EAEA,8DACE;EAGF,yBAAA;AxDyqJF;AwDvqJE;EACE,yBAAA;AxDyqJJ;AwDtqJE;EACE,aAAA;EACA,2BAAA;AxDwqJJ;AwDtqJE;EACE,UAAA;EACA,4GACE;EAEF,yBAAA;AxDsqJJ;AwDpqJE;EACE,UAAA;EAEA,yBAAA;AxDqqJJ;AwDnqJE;EACE,aAAA;EAEA,yBAAA;EAEA,2BAAA;EACA,mLACE;AxDkqJN;AwD5pJA;EACE,aAAA;EAEA,2BAAA;EACA,gBAAA;AxD8pJF;AwD7pJE;EACE,oBAAA;AxD+pJJ;AwD7pJE;EACE,WAAA;EACA,YAAA;EAEA,4BAAA;AxD8pJJ;AyDxtJA;EACE,kBAAA;EACA,aAAA;EACA,oBAAA;EACA,uBAAA;AzD2tJF;AyDztJA;EACE,cAAA;EACA,kBAAA;EACA,MAAA;EACA,UAAA;EACA,2BAAA;EAEA,cAAA;EACA,gBAAA;EACA,mBAAA;AzD2tJF;AyDztJA;EACE,cAAA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,UAAA;EACA,UAAA;EACA,2BAAA;EACA,mBAAA;EACA,gCAAA;AzD4tJF;AyD1tJA;EACE,kBAAA;EACA,cAAA;EACA,uBAAA;EACA,mBAAA;EAEA,cAAA;AzD4tJF;AyD1tJA;EACE,kBAAA;EACA,SAAA;EACA,gBAAA;EACA,2BAAA;AzD6tJF;AyD3tJA;EACE,gBAAA;EACA,kBAAA;EACA,gBAAA;EACA,OAAA;EACA,4BAAA;EACA,cAAA;AzD8tJF;AyD5tJA;EACE,gBAAA;EACA,kBAAA;EACA,gBAAA;EACA,QAAA;EACA,2BAAA;EACA,cAAA;AzD+tJF;AyD7tJA;EACE,kBAAA;EACA,cAAA;EACA,YAAA;EACA,yBAAA;AzDguJF;AyD9tJE;EACE,yBAAA;EACA,kBAAA;EACA,gBAAA;AzDguJJ;AyD7tJE;EACE,OAAA;EACA,4BAAA;EACA,+BAAA;AzD+tJJ;AyD9tJI;EACE,QAAA;EACA,2BAAA;EACA,cAAA;AzDguJN;AyD7tJE;EACE,QAAA;EACA,6BAAA;EACA,gCAAA;AzD+tJJ;AyD9tJI;EACE,OAAA;EACA,4BAAA;EACA,cAAA;AzDguJN;AyD5tJA;EACE,mBAAA;AzD+tJF;A0D3zJA;EACE,aAAA;EACA,sBAAA;A1D8zJF;AKtzJM;EqDVN;IAII,mBAAA;E1Dg0JF;AACF;A0D7zJA;EACE,aAAA;EACA,sBAAA;EACA,gBAAA;EACA,eAAA;A1Dg0JF;AKl0JM;EqDFN;IAMI,eAAA;IACA,cAAA;E1Dk0JF;AACF;AKx0JM;EqDFN;IAUI,eAAA;IACA,cAAA;E1Do0JF;AACF;A0Dn0JE;EACE,yBAAA;A1Dq0JJ;A0Dl0JA;EACE,gBAAA;EACA,YAAA;A1Dq0JF;AKt1JM;EqDeN;IAII,aAAA;E1Du0JF;AACF;A0Dr0JA;EACE,gBAAA;EACA,gBAAA;EACA,eAAA;A1Dw0JF;AKj2JM;EqDsBN;IAKI,aAAA;IACA,eAAA;IACA,cAAA;E1D00JF;AACF;AKx2JM;EqDsBN;IAUI,eAAA;IACA,cAAA;E1D40JF;AACF;A0D30JE;EACE,yBAAA;A1D60JJ;AKr3JM;EqDuCJ;IAGI,6BAAA;E1D+0JJ;AACF;AKt3JM;EqDmCJ;IAMI,+BAAA;IACA,kCAAA;IACA,8BAAA;E1Di1JJ;AACF;A0D/0JE;EACE,yBAAA;A1Di1JJ;AKh4JM;EqD8CJ;IAGI,8BAAA;E1Dm1JJ;AACF;AKz4JM;EqDwDJ;IAEI,6BAAA;E1Dm1JJ;AACF;AK14JM;EqDoDJ;IAKI,+BAAA;IACA,kCAAA;IACA,8BAAA;E1Dq1JJ;AACF;A0Dn1JE;EACE,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,uBAAA;EACA,yBAAA;A1Dq1JJ;AK55JM;EqDkEJ;IAOI,iCAAA;IACA,kCAAA;E1Du1JJ;AACF;AK95JM;EqD8DJ;IAWI,+BAAA;IACA,kCAAA;E1Dy1JJ;AACF;A0Dt1JA;EACE,6BAAA;EACA,oBAAA;EACA,yBAAA;A1Dy1JF;AK96JM;EqDkFN;IAKI,aAAA;E1D21JF;AACF;A0Dz1JA;EACE,cAAA;EACA,uBAAA;EACA,6BAAA;EACA,kCAAA;EACA,kBAAA;EACA,yBAAA;A1D41JF;AKx7JM;EqDsFN;IAQI,aAAA;E1D81JF;AACF;A0D71JE;EAKE,aAAA;EACA,UAAA;EACA,6BAAA;A1D21JJ;AKl8JM;EqDgGJ;IAEI,aAAA;E1Do2JJ;AACF;A0D51JM;EAEE,eAAA;A1D61JR;A0Dv1JA;EACE,iBAAA;A1D01JF;AK98JM;EqDmHN;IAGI,cAAA;E1D41JF;AACF;A0Dv1JA;EACE,uBAAA;EACA,oBAAA;EACA,cAAA;EACA,gBAAA;ErD3EA,kBAAA;EACA,oBAAA;ALq6JF;A0Dx1JA;EACE,YAAA;EACA,gBAAA;EACA,cAAA;A1D21JF;AKj+JM;EqDmIN;IAKI,cAAA;E1D61JF;AACF;A0D11JA;EACE,kBAAA;ErDxFA,kBAAA;EACA,oBAAA;EqD0FA,cAAA;A1D61JF;A0D11JA;EACE,cAAA;A1D61JF;A0D51JE;EACE,kBAAA;A1D81JJ;A0D51JE;EACE,qBAAA;A1D81JJ;A0D11JA;;EAEE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,cAAA;EACA,eAAA;A1D61JF;A0D51JE;;EACE,oBAAA;EACA,eAAA;EACA,4DAAA;A1D+1JJ;A0D71JE;;EACE,0BAAA;A1Dg2JJ;A0D/1JI;;EACE,qBAAA;A1Dk2JN;A0D91JI;;EACE,yBAAA;A1Di2JN;A0D51JA;EACE,eAAA;EACA,oBAAA;A1D+1JF;A0D51JA;EACE,eAAA;EACA,8BAAA;EACA,oBAAA;A1D+1JF;A0D51JA;EACE,6BAAA;A1D+1JF;A0D71JA;EACE,gBAAA;EACA,YAAA;EACA,gCAAA;A1Dg2JF;AKviKM;EqDoMN;IAKI,aAAA;E1Dk2JF;AACF;A0Dh2JA;EACE,kBAAA;EACA,cAAA;EACA,gBAAA;A1Dm2JF;A0Dj2JA;EACE,gBAAA;EACA,YAAA;A1Do2JF;AKvjKM;EqDiNN;IAII,aAAA;E1Ds2JF;AACF;A0Dl2JE;EACE,aAAA;A1Dq2JJ;A0Dn2JE;EACE,cAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,kBAAA;A1Dq2JJ;A0Dn2JE;EACE,cAAA;EACA,oBAAA;A1Dq2JJ;A0Dn2JI;EACE,cAAA;EACA,gBAAA;A1Dq2JN;A0Dl2JI;EACE,cAAA;A1Do2JN;A0Dj2JE;EACE,6BAAA;A1Dm2JJ;A0Dj2JE;EACE,6BAAA;EACA,yBAAA;EACA,gBAAA;A1Dm2JJ;A0Dj2JI;EACE,cAAA;EACA,gBAAA;A1Dm2JN;A0Dh2JI;EACE,cAAA;A1Dk2JN;AKrmKM;EqDwPJ;IAeI,aAAA;E1Dk2JJ;AACF;A2DpnKA;EACE,aAAA;A3DunKF;A2DrnKA;EACE,aAAA;EACA,mBAAA;EAEA,aAAA;EACA,iCAAA;EACA,kCAAA;EAEA,yBAAA;A3DsnKF;AKvnKM;EsDIF;IACE,iBAAA;E3DsnKJ;AACF;AKhoKM;EsDHN;IAgBI,sBAAA;IACA,mBAAA;E3DunKF;E2DtnKE;IACE,WAAA;IACA,gBAAA;E3DwnKJ;E2DtnKE;IACE,kBAAA;E3DwnKJ;AACF;AKzoKM;EsDqBN;IAEI,YAAA;E3DunKF;AACF;AKnpKM;EsDyBN;IAKI,kBAAA;E3DynKF;AACF;AKppKM;EsD6BN;IAEI,sBAAA;IACA,YAAA;IACA,cAAA;E3D0nKF;AACF;A2DvnKA;EACE,aAAA;A3D0nKF;AKhqKM;EsDqCN;IAGI,eAAA;E3D4nKF;AACF;A4D/qKA;EACE,aAAA;EACA,sBAAA;EACA,oBAAA;EACA,gBAAA;A5DkrKF;A4D/qKA;EACE,YAAA;EACA,cAAA;A5DkrKF;A4DhrKA;EACE,cAAA;A5DmrKF;A6D/rKA;EACE,gBAAA;EACA,cAAA;EACA,aAAA;EAEA,qBAAA;EAEA,wFACE;EAGF,gBAAA;A7D6rKF;AKlsKM;EwDNN;IAaI,cAAA;E7D+rKF;AACF;A6D5rKA;EACE,gBAAA;A7D+rKF;A6D5rKA;;EAEE,kBAAA;EACA,cAAA;EACA,aAAA;A7D+rKF;A6D5rKA;EACE,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,UAAA;EAEA,8BAAA;EACA,iCAAA;A7D8rKF;AKztKM;EwDkBN;IAYI,iBAAA;E7D+rKF;AACF;AKluKM;EwDsBN;IAeI,sBAAA;IACA,4BAAA;IACA,+BAAA;E7DisKF;AACF;A6D/rKA;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,oBAAA;EACA,iBAAA;EAEA,+BAAA;EACA,kCAAA;EAEA,sCAAA;A7DgsKF;AKrvKM;EwD0CN;IAaI,sBAAA;IACA,gBAAA;IAEA,0BAAA;IACA,iCAAA;E7DisKF;AACF;A8DnwKA;EACE,YAAA;EACA,kBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,qBAAA;EACA,8FACE;EAEF,sCAAA;A9DowKF;A8DlwKA;EACE,oBAAA;EACA,YAAA;A9DqwKF;AK7wKM;EyDMN;IAII,qBAAA;E9DuwKF;AACF;A8DpwKA;EACE,kBAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,uBAAA;EACA,kBAAA;EACA,iCAAA;EACA,kCAAA;EACA,yBAAA;A9DuwKF;A8DtwKE;EACE,gBAAA;A9DwwKJ;A+DtyKE;EACE,yBAAA;A/DyyKJ;A+DtyKE;EACE,cAAA;EACA,aAAA;EACA,YAAA;A/DwyKJ;A+DtyKI;EACE,SAAA;EACA,4BAAA;EACA,WAAA;A/DwyKN;A+DpyKE;EACE,kBAAA;EACA,oBAAA;EAEA,8BAAA;EACA,+BAAA;EAEA,yBAAA;EAMA,iBAAA;EACA,aAAA;EACA,qBAAA;EAEA,sBAAA;EACA,kCAAA;A/D8xKJ;AK3zKM;E0DWJ;IAUI,aAAA;E/D0yKJ;AACF;A+DhyKE;EACE,kBAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,iEAAA;A/DkyKJ;A+D/xKE;EACE,kBAAA;EACA,UAAA;EACA,WAAA;A/DiyKJ;A+D5xKI;EACE,yBAAA;EACA,kBAAA;EACA,WAAA;EACA,aAAA;EACA,gCAAA;A/D8xKN;A+D3xKI;EACE,cAAA;EACA,gBAAA;A/D6xKN;A+DzxKE;EACE,kBAAA;EACA,UAAA;EACA,WAAA;EACA,UAAA;EACA,kBAAA;A/D2xKJ;A+DxxKE;EACE,gBAAA;A/D0xKJ;A+DtxKI;EACE,2BAAA;EACA,gBAAA;A/DwxKN;A+DpxKE;EACE,mBAAA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,aAAA;EACA,WAAA;EACA,mBAAA;EACA,YAAA;EACA,mBAAA;A/DsxKJ;A+DnxKE;EACE,6BAAA;A/DqxKJ;AKr3KM;E0D+FJ;IAII,aAAA;IACA,cAAA;E/DsxKJ;AACF;A+DnxKE;EACE,cAAA;EACA,kBAAA;EACA,mBAAA;EACA,cAAA;E1DnDF,kBAAA;EACA,oBAAA;E0DoDE,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;A/DsxKJ;A+DpxKI;EACE,kBAAA;EACA,aAAA;EACA,QAAA;EACA,2BAAA;A/DsxKN;A+DlxKE;E1DlEA,iBAAA;EACA,mBAAA;E0DmEE,gBAAA;EACA,cAAA;A/DqxKJ;A+DlxKE;EACE,kBAAA;EACA,UAAA;E1D1EF,iBAAA;EACA,mBAAA;E0D2EE,gBAAA;EACA,cAAA;A/DqxKJ;A+DlxKE;EACE,kBAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EACA,cAAA;A/DoxKJ;A+DjxKE;EACE,kBAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EACA,cAAA;EACA,2CAAA;A/DmxKJ;A+DhxKE;EACE,kBAAA;EACA,cAAA;E1DnGF,kBAAA;EACA,oBAAA;ALs3KF;AgEr7KE;EACE,iBAAA;AhEw7KJ;AgEt7KE;EACE,8BAAA;EACA,8BAAA;EACA,0CAAA;EACA,yBAAA;EACA,mCAAA;AhEw7KJ;AgEt7KE;EACE,YAAA;EACA,kBAAA;AhEw7KJ;AgEt7KE;EACE,wCAAA;AhEw7KJ;AiEv8KE;EACE,kBAAA;EACA,iBAAA;EAEA,gCAAA;EACA,mBAAA;EACA,0BAAA;AjEy8KJ;AiEv8KE;EACE,kBAAA;EACA,UCsCe;EDrCf,QAAA;EACA,cCJgB;EDKhB,YAAA;EACA,iBAAA;EACA,iBAAA;EACA,0BAAA;EACA,qBAAA;AjEy8KJ;AiEv8KE;EACE,YAAA;AjEy8KJ;AmE79KE;EACE,aAAA;AnEg+KJ;AmE79KE;EACE,+BAAA;EACA,kBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;AnE+9KJ;AmE79KE;EACE,oBAAA;AnE+9KJ;AmE79KE;EACE,aAAA;AnE+9KJ;AmE79KE;EACE,kBAAA;AnE+9KJ;AoEj/KE;EACE,oBAAA;EACA,mBAAA;EACA,2BAAA;ApEo/KJ;AoEj/KE;EACE,cAAA;EACA,qBAAA;EACA,sBAAA;EACA,qBAAA;EACA,gBAAA;EACA,8BAAA;EACA,0BAAA;EACA,sBAAA;EACA,gBFmCoB;AlEg9KxB;AoEh/KE;EACE,+BAAA;ApEk/KJ;AoE/+KE;EACE,0BCnB8B;ArEogLlC;AoE9+KE;EACE,gBAAA;ApEg/KJ;AoE7+KE;EACE,0BAAA;ApE++KJ;AsE9gLI;EACI,qBAAA;EACA,aAAA;EACA,kBAAA;EACA,YAAA;EACA,WAAA;EACA,MAAA;EACA,sBAAA;EACA,mBAAA;EACA,YAAA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,UAAA;EACA,eAAA;EACA,uBAAA;EACA,mBAAA;AtEihLR;AsE9gLI;EACI,UAAA;AtEghLR;AsE7gLI;EACI,+BAAA;AtE+gLR;AuExiLA;EACE,6BAAA;EACA,qBAAA;EACA,0BAAA;EACA,2CAAA;AvE2iLF;AuExiLA;EACE,0BAAA;EACA,kBAAA;AvE2iLF;AuEziLE;EACE,MAAA;EACA,aAAA;AvE2iLJ;AkEt+KA;EACE,kBAAA;AlEy+KF;AkEt+KA;;;EAGE,cAhFkB;EAiFlB,oBAtFmB;EAuFnB,eArFiB;EAsFjB,iBArFmB;EAsFnB,uBAxFsB;AlEikLxB;AkEt+KA;;EAEE,gBAtFmB;EAuFnB,YAAA;EACA,qBAAA;AlEy+KF;AkEt+KA;EACE,yBA9Dc;EA+Dd,gBAAA;EACA,qBAAA;EACA,WAAA;EAEA,kBAAA;EACA,UAAA;EACA,sBAAA;EACA,8CAxEoB;EAyEpB,kBArEqB;AlE6iLvB;AkEt+KE;EASE;;;;;KAAA;AlEq+KJ;AkEl+KE;EACE,sBApHiB;AlEwlLrB;AkEl+KE;EAEE,0BAAA;AlEm+KJ;AkEj+KE;EACE,+CA9FwB;AlEikL5B;AkEj+KE;EACE,0BAAA;AlEm+KJ;AkEh+KE;EACE,wBAAA;EACA,qBAAA;EACA,OAAA;AlEk+KJ;AkEh+KE;EACE,eAAA;EACA,mBAAA;EACA,gBAAA;EACA,mBGtJgB;EHuJhB,WGtJqB;EHuJrB,yBAAA;AlEk+KJ;AkEh+KI;EACE,mBGvJqB;EHwJrB,WG1J0B;EH2J1B,yBAAA;AlEk+KN;AkE99KI;EAEE,YAAA;EAIA,mBAAA;EAIA,yBAAA;AlEy9KN;AkEl9KE;EAIE,gCAAA;EACA,qBAAA;EACA,wBAAA;EACA,2BAAA;EACA,0BAAA;EACA,oBAAA;EACA,yBAAA;EACA,yBAAA;EACA,2BAAA;EACA,+BAAA;EACA,oCAAA;KAAA,iCAAA;UAAA,4BAAA;EACA,2BAAA;AlEi9KJ;AkE/9KI;EACE,aAAA;AlEi+KN;AkEn9KI;EACE,wBAAA;AlEq9KN;AkEl9KI;EACE,uBAAA;EAAA,mBAAA;AlEo9KN;AkEj9KE;EACE,wBAAA;AlEm9KJ;AkE/8KA;EACE,YAAA;EACA,cAAA;EACA,WAAA;AlEk9KF;AkE/8KA;EACE,YAAA;EACA,cAAA;EACA,kBAAA;EACA,mBAlMiC;EAmMjC,WAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;AlEk9KF;AkE/8KA;EACE,kBAAA;EACA,SAAA;EACA,OAAA;EACA,WAAA;EACA,WAAA;EAEA,yBA5LuB;EA6LvB,gBAnNsB;EAoNtB,kBAAA;EACA,kBAAA;EACA,sBAAA;EACA,wCAAA;EACA,0BAAA;AlEi9KF;AkE/8KE;EACE,eAAA;EACA,gBAAA;AlEi9KJ;AkEh9KI;EACE,oCAxOmB;EAyOnB,kBAAA;AlEk9KN;AkE/8KE;;;;EAIE,gBAAA;AlEi9KJ;AkE/8KE;;;EAGE,eAAA;EACA,YAAA;AlEi9KJ;AkE/8KE;EACE,UAAA;EACA,eAAA;AlEi9KJ;AkE/8KE;EACE,kBAAA;AlEi9KJ;AkE/8KE;EACE,cAlQgB;EAmQhB,gBAvPoB;EAwPpB,eAAA;AlEi9KJ;AkE/8KE;EACE,yBG5QuB;EH6QvB,WG/Q4B;ArEguLhC;AkEh9KI;EACE,cA1PmC;AlE4sLzC;AkE98KE;EACE,yBGpRuB;EHqRvB,WGvR4B;ArEuuLhC;AkE98KE;EACE,4BAlQqC;AlEktLzC;AkE78KE;EACE,mBAxQgC;EAyQhC,cAxQqC;AlEutLzC;AkE38KA;EACE,gBAAA;EACA,kBAAA;EACA,iBAzP2B;EA0P3B,yBAAA;AlE88KF;AkE38KA;EACC,kBAAA;AlE88KD;AkE38KA;EACE,qBAAA;EACA,WAjPoB;EAkPpB,YAlPoB;EAmPpB,eAAA;AlE88KF;AkE58KE;EACE,YAAA;EACA,cAAA;EACA,WAAA;EACA,YAAA;EACA,WAAA;EACA,kBAAA;EACA,yBAAA;EACA,qDAAA;EAEA,6CAAA;AlE68KJ;AkE38KE;EACE;IACE,uBAAA;ElE68KJ;EkE38KE;IACE,yBAAA;ElE68KJ;AACF;AkEx8KE;;EAEE,eAAA;AlE28KJ;AkEz8KE;EAEE,YAAA;AlE08KJ;AkE58KE;EAEE,YAAA;AlE08KJ;AkEv8KE;EACE,YAAA;EACA,cAAA;EACA,kBAAA;EACA,QAAA;EACA,WA/RkB;EAgSlB,gBAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,2BAAA;EACA,yDAAA;AlEy8KJ;AkEv8KE;EACE,gBAAA;EACA,2BAAA;EACA,yDAAA;AlEy8KJ;AkEr8KA;EACE,iBAAA;AlEw8KF;AkEv8KE;EACE,UAjTkB;EAkTlB,WAAA;AlEy8KJ;AkEv8KE;EACE,+BAAA;AlEy8KJ;AkEr8KA;EACE,YAhVwB;EAiVxB,yBAzWsB;AlEizLxB;AqElzLM;EAEE,iBADY;EAEZ,kBAFY;ArEszLpB;AqElzLM;EACE,WAAA;EACA,iBAAA;EACA,gBAAA;EACA,gBAAA;ArEozLR;AqElzLQ;;EAEE,qBAAA;ArEozLV;AqElzLQ;EACE,gBAAA;ArEozLV;AqEjzLM;EACE,yCAAA;EACA,kBAAA;EHoCN,yBAAA;EACA,8DAAA;EACA,2BAAA;EGpCM,6EAAA;ArEqzLR;AqEnzLQ;EHgCN,yBAAA;EACA,8DAAA;EACA,2BAAA;AlEsxLF;AqEjzLI;EACE,+EAAA;EHwBJ,yBAAA;EACA,8DAAA;EACA,2BAAA;AlE4xLF;AqE/yLA;;EAEE,qBAAA;ArEkzLF;AqE9yLE;EACE,gBAAA;EACA,iBAAA;EACA,iBAAA;ArEizLJ;AqE/yLE;EACE,6BAAA;ArEizLJ;AqEhzLI;EACE,kBAAA;ArEkzLN\",\"file\":\"app.scss\",\"sourcesContent\":[\"@charset \\\"utf-8\\\";\\n@viewport {\\n width: device-width;\\n}\\n\\n/*\\n Resets annoying things */\\n\\n* {\\n margin: 0;\\n padding: 0;\\n background: none;\\n border: none;\\n font: inherit;\\n color: inherit;\\n vertical-align: baseline;\\n box-sizing: border-box;\\n border-radius: 0;\\n}\\n\\nhtml {\\n -webkit-text-decoration-skip: ink;\\n text-decoration-skip-ink: auto;\\n word-wrap: break-word;\\n overflow-wrap: break-word;\\n -webkit-text-size-adjust: 100%;\\n -ms-text-size-adjust: 100%;\\n text-size-adjust: 100%;\\n font-family:\\n system-ui,\\n -apple-system,\\n BlinkMacSystemFont,\\n \\\"Segoe UI\\\",\\n Roboto,\\n Helvetica,\\n sans-serif,\\n \\\"Apple Color Emoji\\\",\\n \\\"Segoe UI Emoji\\\",\\n \\\"Segoe UI Symbol\\\";\\n}\\n\\nstrong,\\nb {\\n font-weight: bold;\\n}\\n\\nem,\\ni {\\n font-style: italic;\\n}\\n\\n/*\\n Misc element fixes */\\n\\na {\\n background-color: transparent;\\n}\\n\\nimg {\\n max-width: 100%;\\n}\\n\\n/*\\n Buttons and forms */\\n\\nbutton,\\n[type=\\\"button\\\"],\\n[type=\\\"submit\\\"],\\n[type=\\\"reset\\\"] {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n cursor: pointer;\\n white-space: normal;\\n}\\n\\n::-webkit-input-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n::-moz-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n:-ms-input-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n::placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n:disabled {\\n opacity: 0.618;\\n cursor: not-allowed;\\n}\\n\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\ninput[type=\\\"search\\\"] {\\n -webkit-appearance: textfield;\\n}\\n\\ninput[type=\\\"search\\\"]::-webkit-search-cancel-button,\\ninput[type=\\\"search\\\"]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\ntextarea {\\n resize: vertical;\\n display: block;\\n}\\n\\n/*\\n Removes touch input lag from tappable things */\\n\\na,\\nbutton,\\ninput,\\ntextarea,\\nselect,\\nlabel,\\ncanvas {\\n -ms-touch-action: manipulation;\\n touch-action: manipulation;\\n}\\n\",\"@viewport {\\n width: device-width;\\n}\\n/*\\n Resets annoying things */\\n* {\\n margin: 0;\\n padding: 0;\\n background: none;\\n border: none;\\n font: inherit;\\n color: inherit;\\n vertical-align: baseline;\\n box-sizing: border-box;\\n border-radius: 0;\\n}\\n\\nhtml {\\n -webkit-text-decoration-skip: ink;\\n text-decoration-skip-ink: auto;\\n word-wrap: break-word;\\n overflow-wrap: break-word;\\n -webkit-text-size-adjust: 100%;\\n -ms-text-size-adjust: 100%;\\n text-size-adjust: 100%;\\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Helvetica, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\";\\n}\\n\\nstrong,\\nb {\\n font-weight: bold;\\n}\\n\\nem,\\ni {\\n font-style: italic;\\n}\\n\\n/*\\n Misc element fixes */\\na {\\n background-color: transparent;\\n}\\n\\nimg {\\n max-width: 100%;\\n}\\n\\n/*\\n Buttons and forms */\\nbutton,\\n[type=button],\\n[type=submit],\\n[type=reset] {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n cursor: pointer;\\n white-space: normal;\\n}\\n\\n::-webkit-input-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n::-moz-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n:-ms-input-placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n::placeholder {\\n opacity: 0.618;\\n color: inherit;\\n}\\n\\n:disabled {\\n opacity: 0.618;\\n cursor: not-allowed;\\n}\\n\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\ninput[type=search] {\\n -webkit-appearance: textfield;\\n}\\n\\ninput[type=search]::-webkit-search-cancel-button,\\ninput[type=search]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\ntextarea {\\n resize: vertical;\\n display: block;\\n}\\n\\n/*\\n Removes touch input lag from tappable things */\\na,\\nbutton,\\ninput,\\ntextarea,\\nselect,\\nlabel,\\ncanvas {\\n -ms-touch-action: manipulation;\\n touch-action: manipulation;\\n}\\n\\n@font-face {\\n font-family: \\\"Albert Sans\\\";\\n font-style: normal;\\n font-display: swap;\\n font-stretch: 80% 100%;\\n font-weight: 100 900;\\n src: url(\\\"../src/assets/fonts/AlbertSans-Roman[wdth,wght].woff2\\\") format(\\\"woff2 supports variations\\\"), url(\\\"../src/assets/fonts/AlbertSans-Roman[wdth,wght].woff2\\\") format(\\\"woff2-variations\\\");\\n}\\nhtml {\\n font-size: 1.368em; /* Used if browser doesn't support calc() */\\n font-size: calc(\\n 1.14em + (0.2 * 1vw) + (\\n 0.2 * 1vh\\n ) + (0.2 / 2 * 1vmin)\\n );\\n}\\n\\ninput[type=date],\\ninput[type=datetime],\\ninput[type=datetime-local],\\ninput[type=email],\\ninput[type=month],\\ninput[type=number],\\ninput[type=password],\\ninput[type=search],\\ninput[type=tel],\\ninput[type=text],\\ninput[type=time],\\ninput[type=url],\\ninput[type=week],\\nselect,\\ntextarea {\\n padding: 0.5rem;\\n border: 1px solid;\\n}\\n\\nbutton,\\ninput[type=submit],\\n.button {\\n padding: 0.5rem 0.75rem;\\n border-radius: 0.25rem;\\n border: 1px solid;\\n}\\n\\n.full-width {\\n width: 100%;\\n}\\n\\n.stripped-button {\\n padding: none;\\n border-radius: none;\\n border: none;\\n text-decoration: underline;\\n}\\n\\nhtml,\\nbody {\\n height: 100%;\\n}\\n\\nhtml {\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\nbody {\\n position: relative;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n font-weight: normal;\\n font-family: \\\"Albert Sans\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif;\\n color: #1c1f28;\\n background-color: #f3f7fb;\\n overflow-x: hidden;\\n}\\n\\n#root {\\n height: 100%;\\n}\\n\\nimg {\\n width: 100%;\\n height: auto;\\n}\\n\\ntable,\\n.table {\\n width: 100%;\\n border-collapse: collapse;\\n text-align: left;\\n}\\ntable thead tr,\\n.table thead tr {\\n border-bottom: 1px solid #e0e2e9;\\n}\\ntable tbody tr,\\n.table tbody tr {\\n border-bottom: 1px solid #e0e2e9;\\n}\\ntable th:first-child,\\ntable td:first-child,\\n.table th:first-child,\\n.table td:first-child {\\n padding-left: 0.25rem;\\n}\\ntable th:last-child,\\ntable td:last-child,\\n.table th:last-child,\\n.table td:last-child {\\n padding-right: 0.25rem;\\n}\\ntable th,\\n.table th {\\n padding: 0.25rem 0.5rem;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n font-weight: 500;\\n letter-spacing: 0.05em;\\n text-transform: uppercase;\\n}\\ntable td,\\n.table td {\\n padding: 0.5rem;\\n}\\ntable.table--fixed,\\n.table.table--fixed {\\n table-layout: fixed;\\n}\\ntable--microbiome tbody tr:last-child,\\n.table--microbiome tbody tr:last-child {\\n border-bottom: none;\\n}\\ntable--microbiome th:first-child,\\ntable--microbiome td:first-child,\\n.table--microbiome th:first-child,\\n.table--microbiome td:first-child {\\n padding-left: 1rem;\\n}\\ntable--microbiome th:last-child,\\ntable--microbiome td:last-child,\\n.table--microbiome th:last-child,\\n.table--microbiome td:last-child {\\n padding-right: 1rem;\\n}\\n\\n.tr--inactive {\\n background-color: #e0e2e9;\\n}\\n\\n.table-container {\\n width: 100%;\\n overflow-x: auto;\\n}\\n\\n.borders {\\n border-style: solid;\\n border-width: 1px;\\n}\\n\\n.borders-dashed {\\n border-style: dashed;\\n border-width: 2px;\\n}\\n\\n.borders-dotted {\\n border-style: dotted;\\n border-width: 1px;\\n}\\n\\n.borders-y {\\n border-style: solid;\\n border-width: 1px 0;\\n}\\n\\n.borders-x {\\n border-style: solid;\\n border-width: 0 1px;\\n}\\n\\n.border-left {\\n border-width: 0 0 0 1px;\\n border-style: solid;\\n}\\n\\n.border-top {\\n border-width: 1px 0 0 0;\\n border-style: solid;\\n}\\n\\n.border-right {\\n border-width: 0 1px 0 0;\\n border-style: solid;\\n}\\n\\n.border-bottom {\\n border-width: 0 0 1px 0;\\n border-style: solid;\\n}\\n\\n.child-borders > *,\\n.child-borders-x > *,\\n.child-borders-y > * {\\n border-style: solid;\\n border-width: 0;\\n}\\n\\n.child-borders {\\n border: 0 solid;\\n border-width: 1px 0 0 1px;\\n}\\n\\n.child-borders > * + * {\\n border-width: 0 1px 1px 0;\\n}\\n\\n.child-borders-x > * + * {\\n border-left-width: 1px;\\n}\\n\\n.child-borders-y > * + * {\\n border-top-width: 1px;\\n}\\n\\n.border-radius,\\n.border-radius-0-125 {\\n border-radius: 0.125rem;\\n}\\n\\n.border-radius-0-25 {\\n border-radius: 0.25rem;\\n}\\n\\n.border-radius-0-5 {\\n border-radius: 0.5rem;\\n}\\n\\n.border-radius-rounded {\\n border-radius: 200px;\\n}\\n\\n.border-radius-50 {\\n border-radius: 50%;\\n}\\n\\n.color-purple-light {\\n color: #67318e;\\n}\\n\\n.color-purple {\\n color: #39235d;\\n}\\n\\n.color-blue-lightest {\\n color: #f3f7fb;\\n}\\n\\n.color-blue-lighter {\\n color: #e2ecf6;\\n}\\n\\n.color-blue-light {\\n color: #8ab4db;\\n}\\n\\n.color-blue {\\n color: #6e9fd5;\\n}\\n\\n.color-blue-dark {\\n color: #3e7cb2;\\n}\\n\\n.color-gray-lightest {\\n color: #e0e2e9;\\n}\\n\\n.color-gray-light {\\n color: #a1a7bb;\\n}\\n\\n.color-gray {\\n color: #626e8e;\\n}\\n\\n.color-gray-dark {\\n color: #1c1f28;\\n}\\n\\n.color-dark {\\n color: #646464;\\n}\\n\\n.color-orange {\\n color: #fc8020;\\n}\\n\\n.color-green {\\n color: #43c45f;\\n}\\n\\n.color-red {\\n color: #ef686f;\\n}\\n\\n.color-yellow {\\n color: #ffd44f;\\n}\\n\\n.color-black {\\n color: hsl(0, 0%, 0%);\\n}\\n\\n.color-white {\\n color: hsl(100, 100%, 100%);\\n}\\n\\n.color-transparent {\\n color: transparent;\\n}\\n\\n.color-none {\\n color: none;\\n}\\n\\n.color-inherit {\\n color: inherit;\\n}\\n\\n.color-currentcolor {\\n color: currentcolor;\\n}\\n\\n.bg-purple-light {\\n background-color: #67318e;\\n}\\n\\n.bg-purple {\\n background-color: #39235d;\\n}\\n\\n.bg-blue-lightest {\\n background-color: #f3f7fb;\\n}\\n\\n.bg-blue-lighter {\\n background-color: #e2ecf6;\\n}\\n\\n.bg-blue-light {\\n background-color: #8ab4db;\\n}\\n\\n.bg-blue {\\n background-color: #6e9fd5;\\n}\\n\\n.bg-blue-dark {\\n background-color: #3e7cb2;\\n}\\n\\n.bg-gray-lightest {\\n background-color: #e0e2e9;\\n}\\n\\n.bg-gray-light {\\n background-color: #a1a7bb;\\n}\\n\\n.bg-gray {\\n background-color: #626e8e;\\n}\\n\\n.bg-gray-dark {\\n background-color: #1c1f28;\\n}\\n\\n.bg-dark {\\n background-color: #646464;\\n}\\n\\n.bg-orange {\\n background-color: #fc8020;\\n}\\n\\n.bg-green {\\n background-color: #43c45f;\\n}\\n\\n.bg-red {\\n background-color: #ef686f;\\n}\\n\\n.bg-yellow {\\n background-color: #ffd44f;\\n}\\n\\n.bg-black {\\n background-color: hsl(0, 0%, 0%);\\n}\\n\\n.bg-white {\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.bg-transparent {\\n background-color: transparent;\\n}\\n\\n.bg-none {\\n background-color: none;\\n}\\n\\n.bg-inherit {\\n background-color: inherit;\\n}\\n\\n.bg-currentcolor {\\n background-color: currentcolor;\\n}\\n\\n.border-color-purple-light {\\n border-color: #67318e;\\n}\\n\\n.border-color-purple {\\n border-color: #39235d;\\n}\\n\\n.border-color-blue-lightest {\\n border-color: #f3f7fb;\\n}\\n\\n.border-color-blue-lighter {\\n border-color: #e2ecf6;\\n}\\n\\n.border-color-blue-light {\\n border-color: #8ab4db;\\n}\\n\\n.border-color-blue {\\n border-color: #6e9fd5;\\n}\\n\\n.border-color-blue-dark {\\n border-color: #3e7cb2;\\n}\\n\\n.border-color-gray-lightest {\\n border-color: #e0e2e9;\\n}\\n\\n.border-color-gray-light {\\n border-color: #a1a7bb;\\n}\\n\\n.border-color-gray {\\n border-color: #626e8e;\\n}\\n\\n.border-color-gray-dark {\\n border-color: #1c1f28;\\n}\\n\\n.border-color-dark {\\n border-color: #646464;\\n}\\n\\n.border-color-orange {\\n border-color: #fc8020;\\n}\\n\\n.border-color-green {\\n border-color: #43c45f;\\n}\\n\\n.border-color-red {\\n border-color: #ef686f;\\n}\\n\\n.border-color-yellow {\\n border-color: #ffd44f;\\n}\\n\\n.border-color-black {\\n border-color: hsl(0, 0%, 0%);\\n}\\n\\n.border-color-white {\\n border-color: hsl(100, 100%, 100%);\\n}\\n\\n.border-color-transparent {\\n border-color: transparent;\\n}\\n\\n.border-color-none {\\n border-color: none;\\n}\\n\\n.border-color-inherit {\\n border-color: inherit;\\n}\\n\\n.border-color-currentcolor {\\n border-color: currentcolor;\\n}\\n\\n.stroke-purple-light {\\n stroke: #67318e;\\n}\\n\\n.stroke-purple {\\n stroke: #39235d;\\n}\\n\\n.stroke-blue-lightest {\\n stroke: #f3f7fb;\\n}\\n\\n.stroke-blue-lighter {\\n stroke: #e2ecf6;\\n}\\n\\n.stroke-blue-light {\\n stroke: #8ab4db;\\n}\\n\\n.stroke-blue {\\n stroke: #6e9fd5;\\n}\\n\\n.stroke-blue-dark {\\n stroke: #3e7cb2;\\n}\\n\\n.stroke-gray-lightest {\\n stroke: #e0e2e9;\\n}\\n\\n.stroke-gray-light {\\n stroke: #a1a7bb;\\n}\\n\\n.stroke-gray {\\n stroke: #626e8e;\\n}\\n\\n.stroke-gray-dark {\\n stroke: #1c1f28;\\n}\\n\\n.stroke-dark {\\n stroke: #646464;\\n}\\n\\n.stroke-orange {\\n stroke: #fc8020;\\n}\\n\\n.stroke-green {\\n stroke: #43c45f;\\n}\\n\\n.stroke-red {\\n stroke: #ef686f;\\n}\\n\\n.stroke-yellow {\\n stroke: #ffd44f;\\n}\\n\\n.stroke-black {\\n stroke: hsl(0, 0%, 0%);\\n}\\n\\n.stroke-white {\\n stroke: hsl(100, 100%, 100%);\\n}\\n\\n.stroke-transparent {\\n stroke: transparent;\\n}\\n\\n.stroke-none {\\n stroke: none;\\n}\\n\\n.stroke-inherit {\\n stroke: inherit;\\n}\\n\\n.stroke-currentcolor {\\n stroke: currentcolor;\\n}\\n\\n.fill-purple-light {\\n fill: #67318e;\\n}\\n\\n.fill-purple {\\n fill: #39235d;\\n}\\n\\n.fill-blue-lightest {\\n fill: #f3f7fb;\\n}\\n\\n.fill-blue-lighter {\\n fill: #e2ecf6;\\n}\\n\\n.fill-blue-light {\\n fill: #8ab4db;\\n}\\n\\n.fill-blue {\\n fill: #6e9fd5;\\n}\\n\\n.fill-blue-dark {\\n fill: #3e7cb2;\\n}\\n\\n.fill-gray-lightest {\\n fill: #e0e2e9;\\n}\\n\\n.fill-gray-light {\\n fill: #a1a7bb;\\n}\\n\\n.fill-gray {\\n fill: #626e8e;\\n}\\n\\n.fill-gray-dark {\\n fill: #1c1f28;\\n}\\n\\n.fill-dark {\\n fill: #646464;\\n}\\n\\n.fill-orange {\\n fill: #fc8020;\\n}\\n\\n.fill-green {\\n fill: #43c45f;\\n}\\n\\n.fill-red {\\n fill: #ef686f;\\n}\\n\\n.fill-yellow {\\n fill: #ffd44f;\\n}\\n\\n.fill-black {\\n fill: hsl(0, 0%, 0%);\\n}\\n\\n.fill-white {\\n fill: hsl(100, 100%, 100%);\\n}\\n\\n.fill-transparent {\\n fill: transparent;\\n}\\n\\n.fill-none {\\n fill: none;\\n}\\n\\n.fill-inherit {\\n fill: inherit;\\n}\\n\\n.fill-currentcolor {\\n fill: currentcolor;\\n}\\n\\n.outline-purple-light {\\n outline: #67318e;\\n}\\n\\n.outline-purple {\\n outline: #39235d;\\n}\\n\\n.outline-blue-lightest {\\n outline: #f3f7fb;\\n}\\n\\n.outline-blue-lighter {\\n outline: #e2ecf6;\\n}\\n\\n.outline-blue-light {\\n outline: #8ab4db;\\n}\\n\\n.outline-blue {\\n outline: #6e9fd5;\\n}\\n\\n.outline-blue-dark {\\n outline: #3e7cb2;\\n}\\n\\n.outline-gray-lightest {\\n outline: #e0e2e9;\\n}\\n\\n.outline-gray-light {\\n outline: #a1a7bb;\\n}\\n\\n.outline-gray {\\n outline: #626e8e;\\n}\\n\\n.outline-gray-dark {\\n outline: #1c1f28;\\n}\\n\\n.outline-dark {\\n outline: #646464;\\n}\\n\\n.outline-orange {\\n outline: #fc8020;\\n}\\n\\n.outline-green {\\n outline: #43c45f;\\n}\\n\\n.outline-red {\\n outline: #ef686f;\\n}\\n\\n.outline-yellow {\\n outline: #ffd44f;\\n}\\n\\n.outline-black {\\n outline: hsl(0, 0%, 0%);\\n}\\n\\n.outline-white {\\n outline: hsl(100, 100%, 100%);\\n}\\n\\n.outline-transparent {\\n outline: transparent;\\n}\\n\\n.outline-none {\\n outline: none;\\n}\\n\\n.outline-inherit {\\n outline: inherit;\\n}\\n\\n.outline-currentcolor {\\n outline: currentcolor;\\n}\\n\\n.flex,\\n.flex-x {\\n display: flex;\\n}\\n\\n.flex-y {\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.align-start {\\n align-items: flex-start;\\n}\\n\\n.align-center {\\n align-items: center;\\n}\\n\\n.align-end {\\n align-items: flex-end;\\n}\\n\\n.justify-center {\\n justify-content: center;\\n}\\n\\n.justify-end {\\n justify-content: flex-end;\\n}\\n\\n.justify {\\n justify-content: space-between;\\n}\\n\\n.even > * {\\n flex-basis: 0;\\n flex-grow: 1;\\n}\\n\\n.grow,\\n.grow-children > * {\\n flex-basis: auto;\\n flex-grow: 1;\\n}\\n\\n.no-shrink {\\n flex-shrink: 0;\\n}\\n\\n.wrap {\\n flex-wrap: wrap;\\n}\\n\\n.responsive-columns > * {\\n flex-basis: 33.3%;\\n}\\n@media screen and (max-width: 991px) {\\n .responsive-columns > * {\\n flex-basis: 50%;\\n }\\n}\\n@media screen and (max-width: 575px) {\\n .responsive-columns > * {\\n flex-basis: 100%;\\n }\\n}\\n\\n.container {\\n padding-right: 0.5rem;\\n padding-left: 0.5rem;\\n width: 100%;\\n max-width: 1200px;\\n margin-left: auto;\\n margin-right: auto;\\n}\\n@media screen and (max-width: 575px) {\\n .container--collapse-xs {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-xs .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n .container--collapse-xs *[class^=col-]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .container--collapse-s {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-s .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n .container--collapse-s *[class^=col-]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .container--collapse-m {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-m .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n .container--collapse-m *[class^=col-]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n}\\n@media screen and (max-width: 1199px) {\\n .container--collapse-l {\\n padding-right: 0;\\n padding-left: 0;\\n }\\n .container--collapse-l .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n}\\n.container--collapse {\\n padding-right: 0;\\n padding-left: 0;\\n}\\n.container--collapse .row {\\n margin-left: 0;\\n margin-right: 0;\\n}\\n.container--collapse *[class^=col-] {\\n padding-left: 0;\\n padding-right: 0;\\n}\\n\\n.row {\\n box-sizing: border-box;\\n display: flex;\\n flex: 0 1 auto;\\n flex-direction: row;\\n flex-wrap: wrap;\\n margin-right: -0.25rem;\\n margin-left: -0.25rem;\\n}\\n.row.reverse {\\n flex-direction: row-reverse;\\n}\\n\\n.col.reverse {\\n flex-direction: column-reverse;\\n}\\n\\n.col-xs,\\n.col-xs-1,\\n.col-xs-2,\\n.col-xs-3,\\n.col-xs-4,\\n.col-xs-5,\\n.col-xs-6,\\n.col-xs-7,\\n.col-xs-8,\\n.col-xs-9,\\n.col-xs-10,\\n.col-xs-11,\\n.col-xs-12,\\n.col-xs-offset-0,\\n.col-xs-offset-1,\\n.col-xs-offset-2,\\n.col-xs-offset-3,\\n.col-xs-offset-4,\\n.col-xs-offset-5,\\n.col-xs-offset-6,\\n.col-xs-offset-7,\\n.col-xs-offset-8,\\n.col-xs-offset-9,\\n.col-xs-offset-10,\\n.col-xs-offset-11,\\n.col-xs-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n}\\n\\n.col-xs {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n}\\n\\n.col-xs-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n}\\n\\n.col-xs-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n}\\n\\n.col-xs-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n}\\n\\n.col-xs-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n}\\n\\n.col-xs-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n}\\n\\n.col-xs-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n}\\n\\n.col-xs-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n}\\n\\n.col-xs-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n}\\n\\n.col-xs-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n}\\n\\n.col-xs-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n}\\n\\n.col-xs-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n}\\n\\n.col-xs-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n\\n.col-xs-offset-0 {\\n margin-left: 0;\\n}\\n\\n.col-xs-offset-1 {\\n margin-left: 8.33333333%;\\n}\\n\\n.col-xs-offset-2 {\\n margin-left: 16.66666667%;\\n}\\n\\n.col-xs-offset-3 {\\n margin-left: 25%;\\n}\\n\\n.col-xs-offset-4 {\\n margin-left: 33.33333333%;\\n}\\n\\n.col-xs-offset-5 {\\n margin-left: 41.66666667%;\\n}\\n\\n.col-xs-offset-6 {\\n margin-left: 50%;\\n}\\n\\n.col-xs-offset-7 {\\n margin-left: 58.33333333%;\\n}\\n\\n.col-xs-offset-8 {\\n margin-left: 66.66666667%;\\n}\\n\\n.col-xs-offset-9 {\\n margin-left: 75%;\\n}\\n\\n.col-xs-offset-10 {\\n margin-left: 83.33333333%;\\n}\\n\\n.col-xs-offset-11 {\\n margin-left: 91.66666667%;\\n}\\n\\n.start-xs {\\n justify-content: flex-start;\\n text-align: start;\\n}\\n\\n.center-xs {\\n justify-content: center;\\n text-align: center;\\n}\\n\\n.end-xs {\\n justify-content: flex-end;\\n text-align: end;\\n}\\n\\n.top-xs {\\n align-items: flex-start;\\n}\\n\\n.middle-xs {\\n align-items: center;\\n}\\n\\n.bottom-xs {\\n align-items: flex-end;\\n}\\n\\n.around-xs {\\n justify-content: space-around;\\n}\\n\\n.between-xs {\\n justify-content: space-between;\\n}\\n\\n.first-xs {\\n order: -1;\\n}\\n\\n.last-xs {\\n order: 1;\\n}\\n\\n@media screen and (min-width: 576px) {\\n .col-s,\\n .col-s-1,\\n .col-s-2,\\n .col-s-3,\\n .col-s-4,\\n .col-s-5,\\n .col-s-6,\\n .col-s-7,\\n .col-s-8,\\n .col-s-9,\\n .col-s-10,\\n .col-s-11,\\n .col-s-12,\\n .col-s-offset-0,\\n .col-s-offset-1,\\n .col-s-offset-2,\\n .col-s-offset-3,\\n .col-s-offset-4,\\n .col-s-offset-5,\\n .col-s-offset-6,\\n .col-s-offset-7,\\n .col-s-offset-8,\\n .col-s-offset-9,\\n .col-s-offset-10,\\n .col-s-offset-11,\\n .col-s-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-s {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-s-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-s-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-s-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-s-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-s-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-s-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-s-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-s-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-s-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-s-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-s-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-s-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-s-offset-0 {\\n margin-left: 0;\\n }\\n .col-s-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-s-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-s-offset-3 {\\n margin-left: 25%;\\n }\\n .col-s-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-s-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-s-offset-6 {\\n margin-left: 50%;\\n }\\n .col-s-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-s-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-s-offset-9 {\\n margin-left: 75%;\\n }\\n .col-s-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-s-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-s {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-s {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-s {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-s {\\n align-items: flex-start;\\n }\\n .middle-s {\\n align-items: center;\\n }\\n .bottom-s {\\n align-items: flex-end;\\n }\\n .around-s {\\n justify-content: space-around;\\n }\\n .between-s {\\n justify-content: space-between;\\n }\\n .first-s {\\n order: -1;\\n }\\n .last-s {\\n order: 1;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .col-m,\\n .col-m-1,\\n .col-m-2,\\n .col-m-3,\\n .col-m-4,\\n .col-m-5,\\n .col-m-6,\\n .col-m-7,\\n .col-m-8,\\n .col-m-9,\\n .col-m-10,\\n .col-m-11,\\n .col-m-12,\\n .col-m-offset-0,\\n .col-m-offset-1,\\n .col-m-offset-2,\\n .col-m-offset-3,\\n .col-m-offset-4,\\n .col-m-offset-5,\\n .col-m-offset-6,\\n .col-m-offset-7,\\n .col-m-offset-8,\\n .col-m-offset-9,\\n .col-m-offset-10,\\n .col-m-offset-11,\\n .col-m-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-m {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-m-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-m-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-m-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-m-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-m-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-m-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-m-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-m-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-m-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-m-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-m-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-m-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-m-offset-0 {\\n margin-left: 0;\\n }\\n .col-m-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-m-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-m-offset-3 {\\n margin-left: 25%;\\n }\\n .col-m-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-m-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-m-offset-6 {\\n margin-left: 50%;\\n }\\n .col-m-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-m-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-m-offset-9 {\\n margin-left: 75%;\\n }\\n .col-m-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-m-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-m {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-m {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-m {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-m {\\n align-items: flex-start;\\n }\\n .middle-m {\\n align-items: center;\\n }\\n .bottom-m {\\n align-items: flex-end;\\n }\\n .around-m {\\n justify-content: space-around;\\n }\\n .between-m {\\n justify-content: space-between;\\n }\\n .first-m {\\n order: -1;\\n }\\n .last-m {\\n order: 1;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .col-l,\\n .col-l-1,\\n .col-l-2,\\n .col-l-3,\\n .col-l-4,\\n .col-l-5,\\n .col-l-6,\\n .col-l-7,\\n .col-l-8,\\n .col-l-9,\\n .col-l-10,\\n .col-l-11,\\n .col-l-12,\\n .col-l-offset-0,\\n .col-l-offset-1,\\n .col-l-offset-2,\\n .col-l-offset-3,\\n .col-l-offset-4,\\n .col-l-offset-5,\\n .col-l-offset-6,\\n .col-l-offset-7,\\n .col-l-offset-8,\\n .col-l-offset-9,\\n .col-l-offset-10,\\n .col-l-offset-11,\\n .col-l-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-l {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-l-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-l-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-l-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-l-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-l-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-l-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-l-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-l-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-l-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-l-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-l-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-l-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-l-offset-0 {\\n margin-left: 0;\\n }\\n .col-l-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-l-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-l-offset-3 {\\n margin-left: 25%;\\n }\\n .col-l-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-l-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-l-offset-6 {\\n margin-left: 50%;\\n }\\n .col-l-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-l-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-l-offset-9 {\\n margin-left: 75%;\\n }\\n .col-l-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-l-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-l {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-l {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-l {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-l {\\n align-items: flex-start;\\n }\\n .middle-l {\\n align-items: center;\\n }\\n .bottom-l {\\n align-items: flex-end;\\n }\\n .around-l {\\n justify-content: space-around;\\n }\\n .between-l {\\n justify-content: space-between;\\n }\\n .first-l {\\n order: -1;\\n }\\n .last-l {\\n order: 1;\\n }\\n}\\n@media screen and (min-width: 1200px) {\\n .col-xl,\\n .col-xl-1,\\n .col-xl-2,\\n .col-xl-3,\\n .col-xl-4,\\n .col-xl-5,\\n .col-xl-6,\\n .col-xl-7,\\n .col-xl-8,\\n .col-xl-9,\\n .col-xl-10,\\n .col-xl-11,\\n .col-xl-12,\\n .col-xl-offset-0,\\n .col-xl-offset-1,\\n .col-xl-offset-2,\\n .col-xl-offset-3,\\n .col-xl-offset-4,\\n .col-xl-offset-5,\\n .col-xl-offset-6,\\n .col-xl-offset-7,\\n .col-xl-offset-8,\\n .col-xl-offset-9,\\n .col-xl-offset-10,\\n .col-xl-offset-11,\\n .col-xl-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: 0.25rem;\\n padding-left: 0.25rem;\\n }\\n .col-xl {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n .col-xl-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n .col-xl-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n .col-xl-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n .col-xl-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n .col-xl-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n .col-xl-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n .col-xl-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n .col-xl-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n .col-xl-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n .col-xl-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n .col-xl-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n .col-xl-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n .col-xl-offset-0 {\\n margin-left: 0;\\n }\\n .col-xl-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n .col-xl-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n .col-xl-offset-3 {\\n margin-left: 25%;\\n }\\n .col-xl-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n .col-xl-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n .col-xl-offset-6 {\\n margin-left: 50%;\\n }\\n .col-xl-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n .col-xl-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n .col-xl-offset-9 {\\n margin-left: 75%;\\n }\\n .col-xl-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n .col-xl-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n .start-xl {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n .center-xl {\\n justify-content: center;\\n text-align: center;\\n }\\n .end-xl {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n .top-xl {\\n align-items: flex-start;\\n }\\n .middle-xl {\\n align-items: center;\\n }\\n .bottom-xl {\\n align-items: flex-end;\\n }\\n .around-xl {\\n justify-content: space-around;\\n }\\n .between-xl {\\n justify-content: space-between;\\n }\\n .first-xl {\\n order: -1;\\n }\\n .last-xl {\\n order: 1;\\n }\\n}\\n.inline {\\n display: inline;\\n}\\n\\n.block {\\n display: block;\\n}\\n\\n.inline-block {\\n display: inline-block;\\n}\\n\\n.relative {\\n position: relative;\\n}\\n\\n.width-1-percent {\\n width: 1%;\\n}\\n\\n.width-100 {\\n width: 100%;\\n}\\n\\n.min-width-100 {\\n min-width: 100%;\\n}\\n\\n.width-auto {\\n width: auto;\\n}\\n\\n.width-100vw {\\n width: 100vw;\\n}\\n\\n.min-width-100vw {\\n min-width: 100vw;\\n}\\n\\n.width-hairline {\\n width: 1px;\\n}\\n\\n.width-0-125 {\\n width: 0.125rem;\\n}\\n\\n.width-0-25 {\\n width: 0.25rem;\\n}\\n\\n.width-0-5 {\\n width: 0.5rem;\\n}\\n\\n.width-0-75 {\\n width: 0.75rem;\\n}\\n\\n.width-1 {\\n width: 1rem;\\n}\\n\\n.width-1-25 {\\n width: 1.25rem;\\n}\\n\\n.width-1-5 {\\n width: 1.5rem;\\n}\\n\\n.width-2 {\\n width: 2rem;\\n}\\n\\n.width-3 {\\n width: 3rem;\\n}\\n\\n.width-4 {\\n width: 4rem;\\n}\\n\\n.width-5 {\\n width: 5rem;\\n}\\n\\n.height-100 {\\n height: 100%;\\n}\\n\\n.min-height-100 {\\n min-height: 100%;\\n}\\n\\n.height-auto {\\n height: auto;\\n}\\n\\n.height-100vh {\\n height: 100vh;\\n}\\n\\n.min-height-100vh {\\n min-height: 100vh;\\n}\\n\\n.height-hairline {\\n height: 1px;\\n}\\n\\n.height-0-125 {\\n height: 0.125rem;\\n}\\n\\n.height-0-25 {\\n height: 0.25rem;\\n}\\n\\n.height-0-5 {\\n height: 0.5rem;\\n}\\n\\n.height-0-75 {\\n height: 0.75rem;\\n}\\n\\n.height-1 {\\n height: 1rem;\\n}\\n\\n.height-1-25 {\\n height: 1.25rem;\\n}\\n\\n.height-1-5 {\\n height: 1.5rem;\\n}\\n\\n.height-2 {\\n height: 2rem;\\n}\\n\\n.height-3 {\\n height: 3rem;\\n}\\n\\n.height-4 {\\n height: 4rem;\\n}\\n\\n.height-5 {\\n height: 5rem;\\n}\\n\\n.display-none {\\n display: none;\\n}\\n\\n.top-1 {\\n position: relative;\\n top: -1px;\\n}\\n\\n@media screen and (max-width: 575px) {\\n .unflex-s > * + * {\\n margin-top: 1rem;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .unflex-m > * + * {\\n margin-top: 1rem;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .unflex-l > * + * {\\n margin-top: 1rem;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .hide-l {\\n display: none;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .hide-l-max {\\n display: none;\\n }\\n}\\n.overflow-hidden {\\n overflow: hidden;\\n}\\n\\n.child-margins-x-0-125 > * + * {\\n margin-left: 0.125rem;\\n}\\n\\n.child-margins-x-0-25 > * + * {\\n margin-left: 0.25rem;\\n}\\n\\n.child-margins-x-0-5 > * + * {\\n margin-left: 0.5rem;\\n}\\n\\n.child-margins-x-0-75 > * + * {\\n margin-left: 0.75rem;\\n}\\n\\n.child-margins-x-1 > * + * {\\n margin-left: 1rem;\\n}\\n\\n.child-margins-x-1-25 > * + * {\\n margin-left: 1.25rem;\\n}\\n\\n.child-margins-x-1-5 > * + * {\\n margin-left: 1.5rem;\\n}\\n\\n.child-margins-x-2 > * + * {\\n margin-left: 2rem;\\n}\\n\\n.child-margins-x-3 > * + * {\\n margin-left: 3rem;\\n}\\n\\n.child-margins-x-4 > * + * {\\n margin-left: 4rem;\\n}\\n\\n.child-margins-x-5 > * + * {\\n margin-left: 5rem;\\n}\\n\\n.child-margins-y-0-125 > * + * {\\n margin-top: 0.125rem;\\n}\\n\\n.child-margins-y-0-25 > * + * {\\n margin-top: 0.25rem;\\n}\\n\\n.child-margins-y-0-5 > * + * {\\n margin-top: 0.5rem;\\n}\\n\\n.child-margins-y-0-75 > * + * {\\n margin-top: 0.75rem;\\n}\\n\\n.child-margins-y-1 > * + * {\\n margin-top: 1rem;\\n}\\n\\n.child-margins-y-1-25 > * + * {\\n margin-top: 1.25rem;\\n}\\n\\n.child-margins-y-1-5 > * + * {\\n margin-top: 1.5rem;\\n}\\n\\n.child-margins-y-2 > * + * {\\n margin-top: 2rem;\\n}\\n\\n.child-margins-y-3 > * + * {\\n margin-top: 3rem;\\n}\\n\\n.child-margins-y-4 > * + * {\\n margin-top: 4rem;\\n}\\n\\n.child-margins-y-5 > * + * {\\n margin-top: 5rem;\\n}\\n\\n.child-margins-x-hairline > * + * {\\n margin-left: 1px;\\n}\\n\\n.child-margins-y-hairline > * + * {\\n margin-top: 1px;\\n}\\n\\n.padding-hairline {\\n padding: 1px;\\n}\\n\\n.padding-0-125 {\\n padding: 0.125rem;\\n}\\n\\n.padding-0-25 {\\n padding: 0.25rem;\\n}\\n\\n.padding-0-5 {\\n padding: 0.5rem;\\n}\\n\\n.padding-0-75 {\\n padding: 0.75rem;\\n}\\n\\n.padding-1 {\\n padding: 1rem;\\n}\\n\\n.padding-1-25 {\\n padding: 1.25rem;\\n}\\n\\n.padding-1-5 {\\n padding: 1.5rem;\\n}\\n\\n.padding-2 {\\n padding: 2rem;\\n}\\n\\n.padding-3 {\\n padding: 3rem;\\n}\\n\\n.padding-4 {\\n padding: 4rem;\\n}\\n\\n.padding-5 {\\n padding: 5rem;\\n}\\n\\n.padding-top {\\n padding-right: 0;\\n padding-bottom: 0;\\n padding-left: 0;\\n}\\n\\n.padding-right {\\n padding-top: 0;\\n padding-bottom: 0;\\n padding-left: 0;\\n}\\n\\n.padding-bottom {\\n padding-top: 0;\\n padding-right: 0;\\n padding-left: 0;\\n}\\n\\n.padding-left {\\n padding-top: 0;\\n padding-right: 0;\\n padding-bottom: 0;\\n}\\n\\n.padding-x {\\n padding-top: 0;\\n padding-bottom: 0;\\n}\\n\\n.padding-y {\\n padding-left: 0;\\n padding-right: 0;\\n}\\n\\n.padding-top-0 {\\n padding-top: 0;\\n}\\n\\n.padding-right-0 {\\n padding-right: 0;\\n}\\n\\n.padding-bottom-0 {\\n padding-bottom: 0;\\n}\\n\\n.padding-left-0 {\\n padding-left: 0;\\n}\\n\\n.margin-auto {\\n margin: auto;\\n}\\n\\n.margin-auto-x {\\n margin-left: auto;\\n margin-right: auto;\\n}\\n\\n.margin-auto-y {\\n margin-top: auto;\\n margin-bottom: auto;\\n}\\n\\n.margin-hairline {\\n margin: 1px;\\n}\\n\\n.margin-0-125 {\\n margin: 0.125rem;\\n}\\n\\n.margin-0-25 {\\n margin: 0.25rem;\\n}\\n\\n.margin-0-5 {\\n margin: 0.5rem;\\n}\\n\\n.margin-0-75 {\\n margin: 0.75rem;\\n}\\n\\n.margin-1 {\\n margin: 1rem;\\n}\\n\\n.margin-1-25 {\\n margin: 1.25rem;\\n}\\n\\n.margin-1-5 {\\n margin: 1.5rem;\\n}\\n\\n.margin-2 {\\n margin: 2rem;\\n}\\n\\n.margin-3 {\\n margin: 3rem;\\n}\\n\\n.margin-4 {\\n margin: 4rem;\\n}\\n\\n.margin-5 {\\n margin: 5rem;\\n}\\n\\n.negative-margin-0-125 {\\n margin: -0.125rem;\\n}\\n\\n.negative-margin-0-25 {\\n margin: -0.25rem;\\n}\\n\\n.negative-margin-0-5 {\\n margin: -0.5rem;\\n}\\n\\n.negative-margin-0-75 {\\n margin: -0.75rem;\\n}\\n\\n.negative-margin-1 {\\n margin: -1rem;\\n}\\n\\n.negative-margin-1-25 {\\n margin: -1.25rem;\\n}\\n\\n.negative-margin-1-5 {\\n margin: -1.5rem;\\n}\\n\\n.negative-margin-2 {\\n margin: -2rem;\\n}\\n\\n.negative-margin-3 {\\n margin: -3rem;\\n}\\n\\n.negative-margin-4 {\\n margin: -4rem;\\n}\\n\\n.negative-margin-5 {\\n margin: -5rem;\\n}\\n\\n.margin-top {\\n margin-right: 0;\\n margin-bottom: 0;\\n margin-left: 0;\\n}\\n\\n.margin-right {\\n margin-top: 0;\\n margin-bottom: 0;\\n margin-left: 0;\\n}\\n\\n.margin-bottom {\\n margin-top: 0;\\n margin-right: 0;\\n margin-left: 0;\\n}\\n\\n.margin-left {\\n margin-top: 0;\\n margin-right: 0;\\n margin-bottom: 0;\\n}\\n\\n.margin-x {\\n margin-top: 0;\\n margin-bottom: 0;\\n}\\n\\n.margin-y {\\n margin-left: 0;\\n margin-right: 0;\\n}\\n\\n.margin-top-0 {\\n margin-top: 0;\\n}\\n\\n.margin-top-0-5 {\\n margin-top: 0.5rem;\\n}\\n\\n.margin-right-0 {\\n margin-right: 0;\\n}\\n\\n.margin-bottom-0 {\\n margin-bottom: 0;\\n}\\n\\n.margin-left-0 {\\n margin-left: 0;\\n}\\n\\n.size-small {\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n}\\n\\n.size-normal {\\n font-size: 0.67rem;\\n line-height: 1rem;\\n}\\n\\n.size-medium {\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n}\\n\\n.size-large {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n}\\n\\n.size-huge {\\n font-size: 1.9rem;\\n line-height: 2.25rem;\\n}\\n\\n.line-0-75 {\\n line-height: 0.75rem;\\n}\\n\\n.line-1 {\\n line-height: 1rem;\\n}\\n\\n.line-1-25 {\\n line-height: 1.25rem;\\n}\\n\\n.line-1-5 {\\n line-height: 1.5rem;\\n}\\n\\n.line-1-75 {\\n line-height: 1.75rem;\\n}\\n\\n.compact {\\n font-family: \\\"Albert Sans\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif;\\n}\\n\\n.stencil {\\n font-family: \\\"Ablert Sans Black\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \\\"Helvetica Neue\\\", sans-serif;\\n font-weight: 700;\\n}\\n\\n.weight-400,\\n.normal {\\n font-weight: 400;\\n}\\n\\n.weight-500,\\n.semibold {\\n font-weight: 500;\\n font-stretch: 95%;\\n}\\n\\n.weight-600,\\n.semibold {\\n font-weight: 600;\\n}\\n\\n.weight-700,\\n.bold,\\nstrong,\\nb {\\n font-weight: 700;\\n}\\n\\n.text-align-left {\\n text-align: left;\\n}\\n\\n.text-align-center {\\n text-align: center;\\n}\\n\\n.text-align-right {\\n text-align: right;\\n}\\n\\n.uppercase {\\n text-transform: uppercase;\\n}\\n\\n.italic {\\n font-style: italic;\\n}\\n\\n.underlined {\\n text-decoration: underline;\\n}\\n\\n.nowrap {\\n white-space: nowrap;\\n}\\n\\n.ellipsis {\\n text-overflow: ellipsis;\\n}\\n\\n.overflow-x-hidden {\\n overflow-x: hidden;\\n}\\n\\n.animation-fade-top {\\n animation: fadeTop 0.3s ease-out backwards;\\n}\\n\\n@keyframes fadeTop {\\n from {\\n transform: translateY(-1rem);\\n opacity: 0;\\n }\\n to {\\n transform: translate(0);\\n opacity: 1;\\n }\\n}\\n.arrow-link {\\n position: relative;\\n padding-right: 2rem;\\n color: #3e7cb2;\\n text-decoration: none;\\n}\\n.arrow-link:before, .arrow-link:after {\\n transition: right 100ms cubic-bezier(0.236, 0, 0.236, 1), left 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.arrow-link::before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n height: 2px;\\n right: 0;\\n top: 50%;\\n transform: translateY(-50%);\\n width: 1.5rem;\\n background-color: #6e9fd5;\\n}\\n.arrow-link::after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n transform: translateY(-50%) rotate(135deg);\\n right: 0;\\n width: 0.25rem;\\n height: 0.25rem;\\n border-top: 2px solid #6e9fd5;\\n border-left: 2px solid #6e9fd5;\\n}\\n.arrow-link:hover:after, .arrow-link:hover:before {\\n right: -0.25rem;\\n}\\n.arrow-link--reverse {\\n padding-right: 0;\\n padding-left: 2rem;\\n}\\n.arrow-link--reverse::before {\\n right: auto;\\n left: 0;\\n}\\n.arrow-link--reverse::after {\\n transform: translateY(-50%) rotate(-45deg);\\n right: auto;\\n left: 0;\\n}\\n.arrow-link--reverse:hover:after, .arrow-link--reverse:hover:before {\\n right: auto;\\n left: -0.25rem;\\n}\\n\\n.bottom-section {\\n position: relative;\\n padding: 2.75rem 0 2rem;\\n}\\n.bottom-section:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n height: 50%;\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.bottom-section:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 100%;\\n transform: skewY(-4deg);\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n\\n.bullet-point {\\n display: flex;\\n}\\n\\n.bullet-point__number {\\n flex-shrink: 0;\\n width: 1.25rem;\\n height: 1.25rem;\\n margin-right: 0.25rem;\\n border-radius: 50%;\\n text-align: center;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n line-height: 1.25rem;\\n font-weight: 700;\\n color: #3e7cb2;\\n background-color: #e2ecf6;\\n}\\n\\n.bullet-point__bullet {\\n flex-shrink: 0;\\n width: 0.25rem;\\n height: 0.25rem;\\n align-self: flex-start;\\n margin-right: 0.25rem;\\n margin-top: 0.5rem;\\n border-radius: 50%;\\n background-color: #39235d;\\n}\\n\\n.bullet-point__text {\\n flex-grow: 1;\\n margin-top: 0.125rem;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n}\\n\\n.button {\\n display: inline-block;\\n height: 2rem;\\n padding: 0 1rem;\\n width: auto;\\n min-width: 7rem;\\n border: none;\\n border-radius: 10rem;\\n color: hsl(100, 100%, 100%);\\n white-space: nowrap;\\n font-weight: 600;\\n letter-spacing: 0.005rem;\\n line-height: 2rem;\\n text-decoration: none;\\n text-align: center;\\n background-color: #6e9fd5;\\n transition: background-color 100ms cubic-bezier(0.236, 0, 0.236, 1), box-shadow 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.button:hover {\\n background-color: #8ab4db;\\n}\\n.button:disabled, .button--disabled {\\n opacity: 1;\\n color: #a1a7bb;\\n background-color: #e0e2e9;\\n}\\n.button:disabled:hover, .button--disabled:hover {\\n box-shadow: none;\\n background-color: #e0e2e9;\\n}\\n.button:focus {\\n outline: none;\\n box-shadow: 0 0 0 3px #3e7cb2;\\n}\\n.button.ball, .button--ball {\\n height: 2rem;\\n width: 2rem !important;\\n}\\n.button.small, .button--small {\\n height: 1.5rem;\\n padding: 0 0.75rem;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n line-height: 1.5rem;\\n}\\n.button--large {\\n height: 2.5rem;\\n min-width: 10rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n line-height: 2.5rem;\\n}\\n.button--icon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n.button--suffix {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.25rem;\\n border-bottom-right-radius: 0.25rem;\\n}\\n\\n.button--tab {\\n font-weight: 500;\\n color: hsl(100, 100%, 100%);\\n text-decoration: none;\\n text-align: center;\\n width: auto;\\n min-width: 4rem;\\n line-height: 2rem;\\n background-color: #8ab4db;\\n border-top-left-radius: 0.25rem;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.25rem;\\n border-bottom-right-radius: 0;\\n border: 1px solid #f3f7fb;\\n}\\n.button--tab:hover {\\n background-color: #3e7cb2;\\n}\\n\\n.button--tab_active {\\n background-color: #3e7cb2;\\n}\\n\\n.button--green {\\n background-color: #43c45f;\\n}\\n.button--green:hover {\\n background-color: #56ca70;\\n}\\n\\n.button--white {\\n background-color: hsl(100, 100%, 100%);\\n color: #39235d;\\n transition: opacity 100ms cubic-bezier(0.236, 0, 0.236, 1), box-shadow 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.button--white:hover {\\n opacity: 0.8;\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.button--white_outlined {\\n color: #fc8020;\\n box-shadow: 0px 2px 4px rgba(50, 32, 83, 0.07), 0px 4px 24px rgba(97, 148, 205, 0.13);\\n}\\n\\n.button--red {\\n background-color: #ef686f;\\n}\\n.button--red:hover {\\n background-color: #f17f85;\\n}\\n\\n.button--orange {\\n background-color: #fc8020;\\n}\\n.button--orange:hover {\\n background-color: #fc8e39;\\n}\\n\\n.button--grey {\\n background-color: #888888;\\n}\\n.button--grey:hover {\\n background-color: #959595;\\n}\\n\\n.button--block {\\n display: flex;\\n justify-content: center;\\n width: 100%;\\n}\\n\\n.button--suffix {\\n min-width: 0;\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n.card {\\n position: relative;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 0.75rem #e2ecf6, 0 1px 1px 1px #e2ecf6;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.card--purple {\\n background-color: #39235d;\\n color: hsl(100, 100%, 100%);\\n}\\n.card--yellow {\\n background-color: #ffd44f;\\n box-shadow: 0 0 0 0;\\n}\\n.card--noshadow {\\n box-shadow: 0 0 0 0;\\n}\\n\\n.category-score {\\n display: flex;\\n}\\n.category-score__heading {\\n font-weight: 500;\\n}\\n.category-score__first-column {\\n flex-grow: 1;\\n padding-right: 2rem;\\n}\\n.category-score__bar-with-labels {\\n display: flex;\\n align-items: center;\\n width: 100%;\\n margin: 0.4rem 0;\\n}\\n.category-score__bar {\\n position: relative;\\n width: 100%;\\n height: 1rem;\\n background: linear-gradient(90deg, #d9d562, #64be78);\\n border-radius: 256px;\\n margin: 0 0.5rem;\\n}\\n.category-score__indicator {\\n position: absolute;\\n width: 4px;\\n height: calc(100% + 0.4rem);\\n top: -0.2rem;\\n left: 0;\\n transform: translateX(-50%);\\n background: #707070;\\n}\\n.category-score__score-value {\\n font-size: 3em;\\n margin-top: 0.5rem;\\n margin-left: -0.1rem;\\n}\\n\\n.checkbox {\\n position: relative;\\n}\\n.checkbox input {\\n position: absolute;\\n left: 0;\\n margin: 0;\\n width: 0;\\n height: 0;\\n opacity: 0;\\n overflow: hidden;\\n pointer-events: none;\\n z-index: -1;\\n}\\n.checkbox--no-top .checkbox__inner::before, .checkbox--no-top .checkbox__inner::after {\\n top: 0;\\n}\\n.checkbox label,\\n.checkbox .checkbox__inner {\\n position: relative;\\n display: block;\\n overflow: hidden;\\n min-width: 1.2em;\\n min-height: 1.2em;\\n padding-left: 1.575em;\\n color: #1c1f28;\\n cursor: pointer;\\n}\\n.checkbox label:before,\\n.checkbox .checkbox__inner:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n box-sizing: border-box;\\n border-radius: 0.125rem;\\n border-width: 2px;\\n border-style: solid;\\n border-color: #626e8e;\\n background-color: hsl(100, 100%, 100%);\\n transition: border-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 100ms, border-width 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms, background-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s;\\n}\\n.checkbox label:after,\\n.checkbox .checkbox__inner:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n opacity: 0;\\n text-align: center;\\n color: #fff;\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTkgMTljLS41IDAtMS0uMi0xLjQtLjZsLTUtNWMtLjgtLjgtLjgtMiAwLTIuOC44LS44IDItLjggMi44IDBMOSAxNC4ybDkuNi05LjZjLjgtLjggMi0uOCAyLjggMCAuOC44LjggMiAwIDIuOGwtMTEgMTFjLS40LjQtLjkuNi0xLjQuNnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=\\\");\\n background-size: 0.8em;\\n background-repeat: no-repeat;\\n background-position: center;\\n transform: scale(0);\\n transition: transform 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms;\\n}\\n.checkbox input:focus + label {\\n color: #6e9fd5;\\n}\\n.checkbox input:focus + label:before {\\n background-color: hsl(100, 100%, 100%);\\n border-color: #6e9fd5;\\n}\\n.checkbox input:checked + label, .checkbox--checked > .checkbox__inner {\\n font-weight: 500;\\n color: #6e9fd5;\\n}\\n.checkbox input:checked + label:before, .checkbox--checked > .checkbox__inner:before {\\n border-width: 0.5em;\\n border-color: #6e9fd5;\\n background-color: #6e9fd5;\\n transition: border-width 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s, background-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms;\\n}\\n.checkbox input:checked + label:after, .checkbox--checked > .checkbox__inner:after {\\n opacity: 1;\\n transform: scale(1);\\n}\\n.checkbox input:disabled + label {\\n color: #626e8e;\\n}\\n.checkbox input:disabled + label:before {\\n border-color: #626e8e;\\n background-color: #626e8e;\\n}\\n.checkbox--no-top .checkbox__inner::before, .checkbox--no-top .checkbox__inner::after {\\n top: 0;\\n}\\n.checkbox--transparent .checkbox__inner::before {\\n background: transparent;\\n}\\n.checkbox--checked .checkbox__inner::before {\\n background-color: #6e9fd5;\\n}\\n\\n.circle-image {\\n width: 4rem;\\n height: 4rem;\\n border-radius: 10rem;\\n background-size: cover;\\n background-repeat: no-repeat;\\n background-position: center center;\\n}\\n\\n.code {\\n font-family: Consolas, \\\"Andale Mono WT\\\", \\\"Andale Mono\\\", \\\"Lucida Console\\\", \\\"Lucida Sans Typewriter\\\", \\\"DejaVu Sans Mono\\\", \\\"Bitstream Vera Sans Mono\\\", \\\"Liberation Mono\\\", \\\"Nimbus Mono L\\\", Monaco, \\\"Courier New\\\", Courier, monospace;\\n letter-spacing: 0.1em;\\n color: #39235d;\\n}\\n\\n.digit-inputs {\\n display: flex;\\n justify-content: center;\\n}\\n.digit-inputs > * + * {\\n margin-left: 0.25rem;\\n}\\n\\n.digit-inputs__item[type=tel] {\\n width: 2rem;\\n height: 2rem;\\n border-radius: 20rem;\\n border: 2px solid #e2ecf6;\\n font-size: 20px;\\n text-align: center;\\n font-weight: 500;\\n background-color: #f3f7fb;\\n -webkit-appearance: none;\\n}\\n.digit-inputs__item[type=tel]:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n box-shadow: 0 0.25rem 1rem -0.25rem rgba(110, 159, 213, 0.4) inset, 0 0 0 1px #6e9fd5 inset;\\n}\\n\\n.error-message {\\n text-align: center;\\n}\\n.error-message svg {\\n display: block;\\n margin: 0 auto;\\n width: 3rem;\\n height: 3rem;\\n stroke: #ef686f;\\n}\\n\\n.error-message__text {\\n margin-top: 1rem;\\n margin-bottom: 1rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n color: #ef686f;\\n}\\n\\n.header {\\n position: relative;\\n padding: 3rem 0 1rem;\\n margin-bottom: 1rem;\\n}\\n.header:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 50%;\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.header:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 100%;\\n transform: skewY(-4deg);\\n background-color: #e2ecf6;\\n z-index: -1;\\n}\\n.header--purple:before {\\n background-color: #39235d;\\n}\\n.header--purple:after {\\n background-color: #39235d;\\n}\\n\\n.icon-badge {\\n padding: 0.75rem;\\n width: 3rem;\\n height: 3rem;\\n border-radius: 10rem;\\n}\\n.icon-badge svg {\\n width: 100%;\\n height: 100%;\\n stroke: hsl(100, 100%, 100%);\\n}\\n.icon-badge-title .icon-badge {\\n display: inline-block;\\n width: 1.25rem;\\n height: 1.25rem;\\n line-height: 0.75rem;\\n padding: 0.25rem;\\n margin-right: 0.25rem;\\n}\\n.icon-badge-title {\\n display: block;\\n}\\n\\n.inline-icon-text {\\n display: flex;\\n align-items: flex-start;\\n justify-content: flex-end;\\n}\\n@media screen and (max-width: 767px) {\\n .inline-icon-text {\\n justify-content: center;\\n }\\n}\\n\\n.inline-icon-text--start {\\n justify-content: flex-start;\\n}\\n@media screen and (max-width: 767px) {\\n .inline-icon-text--start {\\n justify-content: flex-start;\\n }\\n}\\n\\n.inline-icon-text__icon {\\n width: 1rem;\\n height: 1rem;\\n flex-shrink: 0;\\n}\\n\\n.inline-icon-text__text {\\n margin-left: 0.25rem;\\n}\\n\\n.input {\\n display: block;\\n position: relative;\\n}\\n.input label {\\n font-weight: 500;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n cursor: pointer;\\n}\\n.input label + input {\\n margin-top: 0.25rem;\\n}\\n.input .select-chevron-down:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n width: 0.25rem;\\n height: 0.25rem;\\n right: 1rem;\\n top: 65%;\\n margin-top: -0.125rem;\\n border-right: 2px solid #1c1f28;\\n border-bottom: 2px solid #1c1f28;\\n -webkit-transform: rotate(45deg);\\n transform: rotate(45deg);\\n -webkit-transform-origin: top;\\n transform-origin: top;\\n pointer-events: none;\\n transition: border-color 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.input input,\\n.input textarea,\\n.input select {\\n width: 100%;\\n padding-top: 0.5rem;\\n padding-bottom: 0.5rem;\\n padding-left: 0.5rem;\\n padding-right: 0.5rem;\\n border-radius: 0.25rem;\\n border-width: 2px;\\n border-style: solid;\\n border-color: #e2ecf6;\\n box-shadow: none;\\n font-size: 16px;\\n font-weight: 400;\\n color: #1c1f28;\\n line-height: 1;\\n background: #f3f7fb;\\n box-sizing: border-box;\\n -webkit-appearance: none;\\n}\\n.input input::placeholder,\\n.input textarea::placeholder,\\n.input select::placeholder {\\n opacity: 1;\\n color: #626e8e;\\n transition-duration: 100ms;\\n transition-easing: linear;\\n transition-property: opacity;\\n}\\n.input input.editing-border,\\n.input textarea.editing-border,\\n.input select.editing-border {\\n border-color: #ffd44f;\\n border-width: 2px;\\n}\\n.input input.editing-border:focus,\\n.input textarea.editing-border:focus,\\n.input select.editing-border:focus {\\n border-color: #ffd44f;\\n border-width: 2px;\\n}\\n.input input:focus,\\n.input textarea:focus,\\n.input select:focus {\\n border-color: #6e9fd5;\\n outline: none;\\n box-shadow: none, 0 0 0 1px #6e9fd5 inset;\\n background: #f3f7fb;\\n}\\n.input input:not(select):read-only, .input input:disabled,\\n.input textarea:not(select):read-only,\\n.input textarea:disabled,\\n.input select:not(select):read-only,\\n.input select:disabled {\\n color: #626e8e;\\n border-color: #e0e2e9;\\n background-color: #e0e2e9;\\n cursor: not-allowed;\\n}\\n.input input.has-suffix,\\n.input textarea.has-suffix,\\n.input select.has-suffix {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: none;\\n}\\n.input--white input {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.input--white input:focus {\\n background-color: hsl(100, 100%, 100%);\\n}\\n.input--has-suffix {\\n display: flex;\\n flex-direction: column;\\n flex-grow: 1;\\n}\\n.input--has-suffix input {\\n height: 100%;\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: none;\\n}\\n.input--has-clear input {\\n padding-right: 2rem;\\n}\\n.input--has-icon input {\\n padding-left: 2rem;\\n}\\n\\n.input__clear {\\n position: absolute;\\n top: 50%;\\n right: 0.5rem;\\n width: 1rem;\\n height: 1rem;\\n color: transparent;\\n transform: translateY(-50%);\\n}\\n.input__clear:before, .input__clear:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n margin-top: -2px;\\n width: 100%;\\n height: 3px;\\n border-radius: 10px;\\n background-color: #626e8e;\\n}\\n.input__clear:after {\\n transform: rotate(45deg);\\n}\\n.input__clear:before {\\n transform: rotate(-45deg);\\n}\\n.input__clear:hover:before, .input__clear:hover:after {\\n background-color: #ef686f;\\n}\\n\\n.input__icon {\\n position: absolute;\\n left: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n width: 1rem;\\n height: 1rem;\\n opacity: 0.3;\\n pointer-events: none;\\n}\\n\\n.field_with_errors input,\\n.field_with_errors textarea {\\n border-color: #ef686f;\\n}\\n\\n@media screen and (min-width: 576px) {\\n .input-button {\\n display: flex;\\n }\\n}\\n\\n.input-button__left {\\n flex-grow: 1;\\n}\\n@media screen and (max-width: 575px) {\\n .input-button__left {\\n margin-bottom: 1rem;\\n }\\n}\\n@media screen and (min-width: 576px) {\\n .input-button__left {\\n margin-right: 0.5rem;\\n }\\n}\\n\\n.input-button__right {\\n flex-shrink: 0;\\n}\\n@media screen and (max-width: 575px) {\\n .input-button__right {\\n width: 100%;\\n }\\n}\\n\\n.linechart-container {\\n position: relative; /* If you want text inside of it */\\n width: 100%;\\n padding-top: 40%;\\n}\\n@media screen and (max-width: 767px) {\\n .linechart-container {\\n padding-top: 56.25%;\\n }\\n}\\n.linechart-container--small {\\n width: 20rem;\\n height: 5rem;\\n padding-top: 0;\\n}\\n\\n.linechart-container__inner {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n}\\n\\n.link {\\n padding: 0;\\n border: none;\\n border-radius: 0;\\n text-decoration: underline;\\n color: #3e7cb2;\\n}\\n.link:hover {\\n color: #6e9fd5;\\n}\\n.link:focus {\\n outline: none;\\n color: #6e9fd5;\\n text-decoration: underline;\\n}\\n.link--blue-light {\\n color: #8ab4db;\\n}\\n.link--blue-light:hover {\\n color: #e2ecf6;\\n}\\n.link--white {\\n color: hsl(100, 100%, 100%);\\n}\\n.link--white:hover {\\n color: #e2ecf6;\\n}\\n.link--red {\\n color: #ef686f;\\n}\\n.link--red:hover {\\n color: #f6adb1;\\n}\\n\\n.loading-spinner {\\n text-align: center;\\n}\\n\\n.loading-spinner__logo {\\n display: block;\\n margin: 0 auto;\\n width: 3rem;\\n height: 3rem;\\n animation-name: spin;\\n animation-duration: 3000ms;\\n animation-iteration-count: infinite;\\n animation-timing-function: linear;\\n}\\n.loading-spinner__logo--small {\\n width: 1.5rem;\\n height: 1.5rem;\\n}\\n\\n@keyframes spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n.loading-spinner__text {\\n margin-top: 1rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n color: #626e8e;\\n}\\n\\n.logo svg {\\n width: auto;\\n height: 2rem;\\n}\\n.logo--small svg {\\n height: 1rem;\\n}\\n\\n.markdown-content > * + * {\\n margin-top: 0.75rem;\\n}\\n.markdown-content h1,\\n.markdown-content h2,\\n.markdown-content h3,\\n.markdown-content h4,\\n.markdown-content h5,\\n.markdown-content h6 {\\n font-weight: 500;\\n}\\n\\n.microbiome-pie-chart__pie {\\n height: 10rem;\\n}\\n.microbiome-pie-chart__legend {\\n display: flex;\\n margin-bottom: 0.3rem;\\n}\\n.microbiome-pie-chart__legend-color {\\n width: 0.7rem;\\n height: 0.7rem;\\n border-radius: 50%;\\n margin-top: 0.15rem;\\n margin-right: 0.5rem;\\n}\\n.microbiome-pie-chart__legend-text {\\n flex-grow: 1;\\n display: flex;\\n justify-content: space-between;\\n}\\n.microbiome-pie-chart__legend-value {\\n margin-left: 3rem;\\n font-weight: 500;\\n}\\n.microbiome-pie-chart__legends-container {\\n display: flex;\\n justify-content: center;\\n}\\n\\n.microbiome-suggestion-section > p {\\n margin: 1rem 0;\\n}\\n.microbiome-suggestion-section > ul {\\n margin: 1rem 0;\\n}\\n.microbiome-suggestion-section > ul > li {\\n margin: 0.25rem 0 0 1.5rem;\\n}\\n\\n.number-input {\\n margin-top: auto;\\n position: relative;\\n max-width: 7rem;\\n}\\n\\n.number-input__label {\\n display: block;\\n margin-bottom: 0.25rem;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n font-weight: 500;\\n}\\n\\n.number-input__field[type=text] {\\n display: inline-block;\\n padding: 0.5rem 0.5rem;\\n height: 2.5rem;\\n width: 100%;\\n min-width: 0;\\n border: 2px solid #e2ecf6;\\n border-radius: 0.25rem;\\n font-size: 22px;\\n line-height: 1rem;\\n background-color: #f3f7fb;\\n transition: border-color 100ms cubic-bezier(0.236, 0, 0.236, 1), background-color 100ms cubic-bezier(0.236, 0, 0.236, 1), padding-left 100ms cubic-bezier(0.236, 0, 0.236, 1), padding-right 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n -webkit-appearance: none;\\n}\\n.number-input--active .number-input__field[type=text] {\\n padding-left: 1.5rem;\\n padding-right: 1.5rem;\\n}\\n.number-input__field[type=text]:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n}\\n.number-input__field[type=text]:hover {\\n border-color: #6e9fd5;\\n}\\n\\n.react-numeric-input {\\n display: block;\\n position: relative;\\n}\\n\\n.react-numeric-input b {\\n display: block;\\n position: absolute;\\n right: 0rem;\\n top: 50%;\\n width: 1.5rem;\\n height: 2rem;\\n margin-top: -1rem;\\n opacity: 0;\\n cursor: pointer;\\n transform: scale(0);\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.number-input--active .react-numeric-input b {\\n opacity: 1;\\n transform: scale(1);\\n}\\n.react-numeric-input b:last-child {\\n left: 0rem;\\n right: auto;\\n}\\n.react-numeric-input b:hover i {\\n background-color: #8ab4db;\\n}\\n.react-numeric-input b i {\\n display: block;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n height: 3px;\\n width: 0.625rem;\\n margin-left: -0.3125rem;\\n margin-top: -1.5px;\\n border-radius: 3px;\\n background-color: #6e9fd5;\\n}\\n.react-numeric-input b i:nth-child(2) {\\n transform: rotate(90deg);\\n}\\n\\n.note {\\n padding: 0.5rem;\\n border-radius: 0.25rem;\\n border: 2px dashed #ffd44f;\\n color: #4f3c00;\\n background-color: #fff9e8;\\n}\\n\\n.overall-score-indicator {\\n position: relative;\\n width: 100px;\\n height: 100px;\\n}\\n.overall-score-indicator__background {\\n position: absolute;\\n z-index: -1;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n border: 10px solid;\\n border-radius: 50%;\\n opacity: 0.15;\\n}\\n.overall-score-indicator__texts {\\n position: absolute;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, calc(-50% + 3px));\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n font-weight: 500;\\n}\\n.overall-score-indicator__score {\\n font-size: 38px;\\n line-height: 28px;\\n}\\n\\n.pagy-nav {\\n display: flex;\\n}\\n.pagy-nav span {\\n padding: 0.25rem;\\n margin-left: -1px;\\n min-width: 1.5rem;\\n border: 1px solid #e0e2e9;\\n text-align: center;\\n}\\n.pagy-nav span:first-child {\\n padding-left: 0.5rem;\\n border-top-left-radius: 10rem;\\n border-bottom-left-radius: 10rem;\\n}\\n.pagy-nav span:last-child {\\n padding-right: 0.5rem;\\n border-top-right-radius: 10rem;\\n border-bottom-right-radius: 10rem;\\n}\\n.pagy-nav span {\\n color: #a1a7bb;\\n}\\n.pagy-nav span.active {\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n border-color: #6e9fd5;\\n background-color: #6e9fd5;\\n}\\n.pagy-nav a {\\n color: #6e9fd5;\\n}\\n\\n.radio {\\n position: relative;\\n}\\n.radio input {\\n position: absolute;\\n left: 0;\\n margin: 0;\\n width: 0;\\n height: 0;\\n opacity: 0;\\n overflow: hidden;\\n pointer-events: none;\\n z-index: -1;\\n}\\n.radio label {\\n display: block;\\n position: relative;\\n overflow: hidden;\\n min-width: 1.2em;\\n min-height: 1.2em;\\n padding-left: 1.575em;\\n color: #1c1f28;\\n cursor: pointer;\\n}\\n.radio label:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n box-sizing: border-box;\\n border-radius: 10em;\\n border-width: 2px;\\n border-style: solid;\\n border-color: #626e8e;\\n box-shadow: 0 0 0 0.6em hsl(100, 100%, 100%) inset;\\n background-color: hsl(100, 100%, 100%);\\n transition: box-shadow 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms, border-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s, background-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 100ms;\\n}\\n.radio input:focus + label {\\n color: #6e9fd5;\\n}\\n.radio input:focus + label:before {\\n background-color: hsl(100, 100%, 100%);\\n border-color: #6e9fd5;\\n box-shadow: none;\\n}\\n.radio input:checked + label {\\n font-weight: 500;\\n color: #6e9fd5;\\n}\\n.radio input:checked + label:before {\\n border-color: #6e9fd5;\\n background-color: #6e9fd5;\\n box-shadow: 0 0 0 0.1875em hsl(100, 100%, 100%) inset;\\n transition: box-shadow 50ms cubic-bezier(0.236, 0, 0.236, 1) 0s, border-color 50ms cubic-bezier(0.236, 0, 0.236, 1) 50ms;\\n}\\n.radio input:disabled + label {\\n color: #626e8e;\\n}\\n.radio input:disabled + label:before {\\n background-color: #626e8e;\\n border-color: #626e8e;\\n box-shadow: none;\\n}\\n\\n.segmented-control {\\n display: flex;\\n}\\n\\n.segmented-control__item {\\n flex-basis: 0;\\n flex-grow: 1;\\n min-width: 128px;\\n padding: 0.5rem;\\n border: 2px solid #6e9fd5;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n text-decoration: none;\\n text-align: center;\\n overflow: hidden;\\n font-weight: 500;\\n color: #3e7cb2;\\n background-color: #fff;\\n}\\n.segmented-control__item--active {\\n color: #fff;\\n background-color: #6e9fd5;\\n cursor: default;\\n}\\n.segmented-control__item--active:focus {\\n outline: none;\\n}\\n.segmented-control__item:hover:not(.segmented-control__item--active) {\\n background-color: #f3f7fb;\\n}\\n.segmented-control__item:first-child {\\n padding-left: 1rem;\\n border-top-left-radius: 5rem;\\n border-bottom-left-radius: 5rem;\\n}\\n.segmented-control__item:last-child {\\n padding-right: 1rem;\\n border-top-right-radius: 5rem;\\n border-bottom-right-radius: 5rem;\\n}\\n.segmented-control__item:not(:first-child) {\\n margin-left: -2px;\\n}\\n\\n.select {\\n position: relative;\\n}\\n.select:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n width: 0.375rem;\\n height: 0.375rem;\\n right: 0.75rem;\\n top: 50%;\\n margin-top: -0.2rem;\\n border-right: 3px solid #6e9fd5;\\n border-bottom: 3px solid #6e9fd5;\\n transform: rotate(45deg);\\n transform-origin: top;\\n pointer-events: none;\\n}\\n\\n.select select {\\n width: 100%;\\n padding: 0.5rem;\\n padding-right: 2rem;\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n border: 2px solid #e2ecf6;\\n border-radius: 0.25rem;\\n font-size: 16px;\\n white-space: nowrap;\\n background-color: #f3f7fb;\\n}\\n.select select:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n}\\n.select select:-moz-focusring {\\n color: transparent;\\n text-shadow: 0 0 0 #000;\\n}\\n.select select::-ms-expand {\\n display: none;\\n}\\n@media all and (min-width: 0\\\\0 ) and (min-resolution: 0.001dpcm) {\\n .select select:after, .select select:before {\\n display: none;\\n }\\n}\\n\\n.select__icon {\\n display: inline-flex;\\n width: 30px;\\n height: 20px;\\n}\\n.select__icon > * {\\n transform: translateY(4px);\\n}\\n\\n.stats {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n margin: -0.25rem -1rem;\\n}\\n\\n.stats__item {\\n position: relative;\\n padding: 0.25rem 1rem;\\n white-space: nowrap;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n}\\n.stats__item:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n left: 0;\\n top: 0.25rem;\\n bottom: 0.25rem;\\n width: 1px;\\n background-color: #a1a7bb;\\n}\\n.stats__item:first-child:before {\\n display: none;\\n}\\n@media screen and (max-width: 767px) {\\n .stats__item {\\n font-size: 0.67rem;\\n line-height: 1rem;\\n }\\n .stats__item:before {\\n display: none;\\n }\\n}\\n\\n.tooltip-text {\\n display: none;\\n width: max-content;\\n max-width: 400px;\\n position: absolute;\\n z-index: 1;\\n top: 0;\\n left: 0;\\n background: purple;\\n color: white;\\n font-weight: normal;\\n font-size: 14px;\\n padding: 8px;\\n border-radius: 4px;\\n}\\n\\n.tooltip-arrow {\\n position: absolute;\\n background: purple;\\n width: 8px;\\n height: 8px;\\n transform: rotate(45deg);\\n}\\n\\n.activate__info {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 1rem;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__info {\\n flex-direction: row;\\n }\\n}\\n.activate__info-icon {\\n position: relative;\\n flex: 0 0 120px;\\n width: 120px;\\n height: 120px;\\n background: #dae7f6;\\n border-radius: 50%;\\n margin-bottom: 1rem;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__info-icon {\\n flex-direction: row;\\n margin-right: 1rem;\\n margin-bottom: 0;\\n }\\n}\\n.activate__info-icon svg {\\n transform: scale(0.6) translateY(10px);\\n}\\n.activate__form {\\n padding: 1rem;\\n max-width: 30rem;\\n}\\n.activate__bottom {\\n display: flex;\\n justify-content: flex-end;\\n align-items: center;\\n padding: 1rem;\\n background: #f2f7fb;\\n border-top: 2px solid #e2e6f2;\\n border-radius: 0 0 0.5rem 0.5rem;\\n}\\n.activate__bottom--center {\\n justify-content: center;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__name {\\n max-width: 20rem;\\n }\\n}\\n.activate__contact-info {\\n display: flex;\\n flex-direction: column;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__contact-info {\\n flex-direction: row;\\n }\\n}\\n.activate__contact-info-input {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n}\\n.activate__contact-info-input:last-of-type {\\n margin-bottom: 0;\\n}\\n@media screen and (min-width: 768px) {\\n .activate__contact-info-input {\\n margin-bottom: 0;\\n padding-right: 1rem;\\n }\\n .activate__contact-info-input:last-of-type {\\n padding-left: 1rem;\\n padding-right: 0;\\n }\\n}\\n\\n.admin-header {\\n display: flex;\\n align-items: flex-end;\\n flex-wrap: wrap;\\n}\\n\\n.admin-header__title {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n font-size: 1.9rem;\\n line-height: 2.25rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n@media screen and (max-width: 575px) {\\n .admin-header__title {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n }\\n}\\n\\n.admin-header__small-title {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n\\n.admin-header__button {\\n flex-shrink: 0;\\n margin-bottom: 1rem;\\n}\\n\\n.admin-nav-wrapper {\\n background-color: #39235d;\\n}\\n\\n@media screen and (min-width: 992px) {\\n .admin-nav-wrapper__inner {\\n display: flex;\\n }\\n}\\n\\n.admin-nav-logo {\\n display: flex;\\n justify-content: center;\\n margin-right: 0.5rem;\\n padding: 0.5rem;\\n}\\n\\n.admin-nav-logo__image {\\n display: block;\\n height: 1rem;\\n width: auto;\\n}\\n\\n.admin-nav-logo__text {\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n text-align: right;\\n color: hsl(100, 100%, 100%);\\n}\\n\\n@media screen and (min-width: 992px) {\\n .admin-nav {\\n display: flex;\\n }\\n}\\n.admin-nav--left {\\n flex-grow: 1;\\n}\\n\\n.admin-nav__link {\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n padding: 0.5rem 0.375rem;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n text-align: center;\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n text-decoration: none;\\n transition: background-color 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.admin-nav__link--active {\\n background-color: rgba(103, 49, 142, 0.75);\\n}\\n.admin-nav__link:hover:not(.admin-nav__link--active) {\\n background-color: rgba(103, 49, 142, 0.3);\\n}\\n\\n.admin-nav-locale-wrapper {\\n display: flex;\\n flex-direction: column;\\n padding-left: 0.5rem;\\n padding-right: 0.5rem;\\n}\\n\\n.admin-nav__locale {\\n padding: 0rem 0rem;\\n color: hsl(100, 100%, 100%);\\n font-size: 0.4rem;\\n text-decoration: none;\\n}\\n.admin-nav__locale--active {\\n background-color: rgba(103, 49, 142, 0.75);\\n}\\n.admin-nav__locale:hover:not(.admin-nav__link--active) {\\n background-color: rgba(103, 49, 142, 0.3);\\n}\\n\\n.auth-card {\\n max-width: 34rem;\\n margin: 0 auto;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05), 0 0.125rem 0.125rem rgba(0, 0, 0, 0.025);\\n}\\n\\n.auth-card__top {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 2.5rem 1.5rem;\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n}\\n@media screen and (max-width: 575px) {\\n .auth-card__top {\\n padding: 1.25rem;\\n }\\n}\\n\\n.auth-card__content {\\n padding: 2rem 1.5rem;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: hsl(100, 100%, 100%);\\n}\\n@media screen and (max-width: 575px) {\\n .auth-card__content {\\n padding: 1.5rem 1.5rem;\\n }\\n}\\n\\n.auth-card__logo {\\n display: flex;\\n}\\n.auth-card__logo svg,\\n.auth-card__logo img {\\n height: 1.5rem;\\n}\\n@media screen and (max-width: 575px) {\\n .auth-card__logo svg,\\n .auth-card__logo img {\\n height: 1rem;\\n }\\n}\\n\\n.auth-card__vital_logo {\\n height: 2rem;\\n width: auto;\\n}\\n\\n.auth-methods {\\n display: flex;\\n flex-wrap: wrap;\\n}\\n\\n.auth-methods__item {\\n display: block;\\n flex-basis: 33.333334%;\\n padding: 0.25rem;\\n}\\n@media screen and (max-width: 575px) {\\n .auth-methods__item {\\n flex-basis: 50%;\\n }\\n}\\n\\n.auth-method-link {\\n display: block;\\n box-shadow: 0 1px 0 0 #e2ecf6;\\n border: 1px solid #e2ecf6;\\n border-radius: 0.25rem;\\n text-align: center;\\n text-decoration: none;\\n transition: box-shadow 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.auth-method-link:hover {\\n box-shadow: 0 0.25rem 0.75rem #e2ecf6, 0 1px 1px 1px #e2ecf6;\\n}\\n\\n.auth-method-logo {\\n display: block;\\n padding: 0.25rem;\\n}\\n.auth-method-logo svg {\\n max-height: 80px;\\n}\\n\\n.auth-method-title {\\n padding: 0.25rem;\\n border-top: 1px solid #e2ecf6;\\n text-decoration: none;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n font-weight: 500;\\n}\\n.auth-method-link:hover .auth-method-title {\\n color: #3e7cb2;\\n}\\n\\n.nav-container {\\n position: relative;\\n z-index: 9998;\\n background-color: hsl(100, 100%, 100%);\\n}\\n.nav-container--invert {\\n background-color: #39235d;\\n}\\n\\n.nav-container__inner {\\n display: flex;\\n margin: 0 auto;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-container__inner {\\n flex-direction: column;\\n }\\n}\\n\\n.nav-container__left {\\n display: flex;\\n align-items: stretch;\\n justify-content: space-between;\\n flex-shrink: 1;\\n margin-right: 1rem;\\n height: 81px;\\n}\\n@media screen and (min-width: 768px) {\\n .nav-container__left {\\n margin-right: 2rem;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .nav-container__left {\\n margin-right: 1rem;\\n }\\n}\\n\\n.nav-container__right {\\n flex-grow: 1;\\n flex-basis: auto;\\n}\\n\\n.nav-container-logo {\\n display: flex;\\n align-items: stretch;\\n flex-basis: auto;\\n}\\n\\n.nav-container-logo__symbol {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-basis: auto;\\n width: 81px;\\n background-color: #39235d;\\n}\\n.nav-container-logo__symbol svg {\\n height: 1.5rem;\\n}\\n\\n.nav-container-logo__type {\\n display: flex;\\n align-items: center;\\n flex-basis: auto;\\n padding-left: 1rem;\\n}\\n.nav-container-logo__type svg {\\n height: 1rem;\\n width: auto;\\n}\\n\\n.nav-container-logo__full {\\n display: flex;\\n align-items: center;\\n flex-basis: auto;\\n padding-left: 1rem;\\n}\\n.nav-container-logo__full span {\\n display: flex;\\n}\\n.nav-container-logo__full svg {\\n height: 1.25rem;\\n}\\n\\n.nav-container-toggle {\\n display: none;\\n flex-shrink: 0;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-container-toggle {\\n display: flex;\\n align-items: center;\\n padding: 0 1rem;\\n margin-right: -1rem;\\n cursor: pointer;\\n }\\n}\\n\\n.nav-toggle {\\n position: relative;\\n width: 36px;\\n height: 24px;\\n cursor: pointer;\\n}\\n.nav-toggle > * {\\n pointer-events: none;\\n}\\n.nav-toggle:before, .nav-toggle:after {\\n content: \\\"\\\";\\n position: absolute;\\n display: block;\\n width: 100%;\\n height: 4px;\\n border-radius: 0;\\n background-color: hsl(0, 0%, 0%);\\n transition-property: top, bottom, transform;\\n transition-duration: 200ms;\\n transition-timing-function: cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.nav-toggle:before {\\n top: 0;\\n}\\n.nav-toggle:after {\\n bottom: 0;\\n}\\n.nav-toggle--collapse:before {\\n top: 50%;\\n transform: translateY(-50%);\\n}\\n.nav-toggle--collapse:after {\\n bottom: 50%;\\n transform: translateY(50%);\\n}\\n.nav-toggle--rotate:before {\\n transform: translateY(-50%) rotateZ(45deg);\\n}\\n.nav-toggle--rotate:after {\\n transform: translateY(50%) rotateZ(45deg);\\n}\\n.nav-container--invert .nav-toggle:before, .nav-container--invert .nav-toggle:after {\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.nav-toggle__inner {\\n position: absolute;\\n top: 50%;\\n width: 100%;\\n height: 4px;\\n transform: translateY(-50%);\\n border-radius: 0;\\n background-color: hsl(0, 0%, 0%);\\n transition-property: transform;\\n transition-duration: 200ms;\\n transition-timing-function: cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.nav-toggle--rotate .nav-toggle__inner {\\n transform: translateY(-50%) rotateZ(-45deg);\\n}\\n.nav-container--invert .nav-toggle__inner {\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.nav-list {\\n transition: height 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.nav-list > div {\\n display: flex;\\n justify-content: space-between;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-list > div {\\n display: block;\\n overflow-y: auto;\\n max-height: 500px;\\n max-height: calc(100vh - 81px);\\n -webkit-overflow-scrolling: touch;\\n }\\n}\\n\\n.nav-list__inner {\\n display: flex;\\n height: 81px;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-list__inner {\\n display: block;\\n height: auto;\\n }\\n}\\n\\n.nav-link {\\n position: relative;\\n display: flex;\\n align-items: center;\\n white-space: nowrap;\\n padding-left: 0.75rem;\\n padding-right: 0.75rem;\\n color: #39235d;\\n font-size: 18px;\\n text-decoration: none;\\n font-weight: 500;\\n line-height: 1;\\n cursor: pointer;\\n}\\n.nav-link--menuitem {\\n margin-bottom: 0.2rem;\\n}\\n.nav-link--menuitem:hover {\\n text-decoration: underline;\\n}\\n.nav-link--external {\\n flex-grow: 1;\\n background: #f3f7fb;\\n}\\n.nav-container--invert .nav-link {\\n color: hsl(100, 100%, 100%);\\n}\\n@media screen and (min-width: 992px) {\\n .nav-link {\\n flex-grow: 1;\\n border-left: none;\\n }\\n .nav-link:last-child {\\n border-right: none;\\n }\\n}\\n@media screen and (max-width: 991px) {\\n .nav-link {\\n padding-left: 0.75rem;\\n padding-right: 0.75rem;\\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\\n line-height: 3.5rem;\\n }\\n .nav-link:first-child {\\n border-top: 1px solid rgba(0, 0, 0, 0.1);\\n }\\n .nav-link:last-child {\\n border-bottom: none;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .nav-link {\\n padding-left: 2rem;\\n padding-right: 2rem;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .nav-link {\\n padding-left: 0.75rem;\\n padding-right: 0.75rem;\\n }\\n}\\n\\n.nav-link__icon {\\n display: flex;\\n align-items: center;\\n margin-right: 0.25rem;\\n}\\n.nav-link__icon svg {\\n width: 1.25rem;\\n height: 1.25rem;\\n}\\n@media screen and (max-width: 991px) {\\n .nav-link__icon {\\n margin-right: 0.5rem;\\n }\\n}\\n\\n.nav-link__label {\\n display: flex;\\n align-items: center;\\n}\\n\\n.nav-link__arrow {\\n margin-inline-start: 0.4em;\\n transition: rotate 0.5s;\\n height: 24px;\\n display: block;\\n}\\n\\n.nav-link__arrow svg {\\n display: block;\\n}\\n\\n.nav-link:has(.navigation-list__submenu--active) .nav-link__arrow {\\n rotate: 180deg;\\n}\\n\\n@media (min-width: 992px) {\\n .navigation-list__submenu {\\n position: absolute;\\n top: 80%;\\n right: 0;\\n background-color: white;\\n border-radius: 0.5em;\\n box-shadow: 0px 4px 24px 0px rgba(97, 148, 205, 0.13), 0px 2px 4px 0px rgba(50, 32, 83, 0.07);\\n }\\n}\\n.navigation-list__submenu a.nav-link {\\n margin-block: 0.8em;\\n}\\n\\n@media (max-width: 991px) {\\n .navigation-list__submenu a.nav-link {\\n border: none;\\n line-height: 1;\\n padding-left: 0;\\n }\\n .navigation-list__link--dropdown {\\n flex-wrap: wrap;\\n }\\n .navigation-list__submenu {\\n width: 100%;\\n margin-top: -1em;\\n margin-bottom: 0.5em;\\n }\\n}\\n.nav-list__filler-icon {\\n color: transparent;\\n}\\n\\n.login-input[type=tel],\\n.login-input[type=num],\\n.login-input[type=text] {\\n width: 100%;\\n padding: 0.5rem 1rem;\\n border: 2px solid #e2ecf6;\\n border-radius: 20rem;\\n font-size: 16px;\\n line-height: 1rem;\\n background-color: #f3f7fb;\\n -webkit-appearance: none;\\n}\\n.login-input[type=tel]:focus,\\n.login-input[type=num]:focus,\\n.login-input[type=text]:focus {\\n outline: none;\\n border-color: #6e9fd5;\\n}\\n\\n.login-container {\\n position: relative;\\n}\\n\\n.login-content-left-enter {\\n opacity: 0.01;\\n transform: translateX(-100%);\\n}\\n\\n.login-content-left-enter-active {\\n opacity: 1;\\n transition: transform 400ms cubic-bezier(0.236, 0, 0.236, 1), opacity 400ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(0%);\\n}\\n\\n.login-content-left-exit {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n\\n.login-content-left-exit-active {\\n opacity: 0.01;\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1), opacity 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(-100%);\\n}\\n\\n.login-content-right-enter {\\n opacity: 0.01;\\n transform: translateX(100%);\\n}\\n\\n.login-content-right-enter-active {\\n opacity: 1;\\n transition: transform 400ms cubic-bezier(0.236, 0, 0.236, 1), opacity 400ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(0%);\\n}\\n\\n.login-content-right-exit {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n\\n.login-content-right-exit-active {\\n opacity: 0.01;\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1), opacity 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(100%);\\n}\\n\\n.login-container__back {\\n display: block;\\n position: absolute;\\n left: 0;\\n top: 0;\\n width: 1.5rem;\\n height: 1.5rem;\\n padding: 0;\\n border: none;\\n}\\n.login-container__back svg {\\n width: 100%;\\n height: 100%;\\n stroke: #39235d;\\n}\\n.login-container__back:hover svg {\\n stroke: #663fa7;\\n}\\n.login-container__back:focus {\\n outline: none;\\n border: 2px solid #39235d;\\n}\\n\\n.login-logo {\\n width: 5rem;\\n height: 5rem;\\n}\\n.login-logo--loading {\\n animation-name: spin;\\n animation-duration: 3000ms;\\n animation-iteration-count: infinite;\\n animation-timing-function: linear;\\n}\\n@media screen and (max-width: 575px) {\\n .login-logo {\\n width: 3rem;\\n height: 3rem;\\n }\\n}\\n\\n.login-logo--vital {\\n height: 2.25rem;\\n width: auto;\\n}\\n\\n.login-language-selector-icon {\\n width: 1rem;\\n height: 1rem;\\n padding-top: 0.25rem;\\n margin-left: 0.5rem;\\n}\\n.login-language-selector-icon svg {\\n width: 100%;\\n height: 100%;\\n stroke: #39235d;\\n}\\n\\n.login-language-selector {\\n right: 0;\\n top: 0;\\n padding: 0;\\n border: none;\\n color: #39235d;\\n}\\n.login-language-selector:hover {\\n outline: none;\\n}\\n.login-language-selector:focus {\\n outline: none;\\n}\\n\\n@keyframes spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n.notice {\\n display: flex;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 0.75rem #e2ecf6, 0 1px 1px 1px #e2ecf6;\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.notice__icon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 0.75rem;\\n border-top-left-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n background-color: #6e9fd5;\\n}\\n.notice__icon svg {\\n width: 1rem;\\n height: 1rem;\\n stroke: hsl(100, 100%, 100%);\\n}\\n\\n.notice__content {\\n padding: 0.75rem;\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n}\\n\\n.onboarding-wrapper {\\n position: relative;\\n min-height: 100%;\\n width: 100%;\\n overflow-x: hidden;\\n}\\n\\n.onboarding-wrapper__inner {\\n position: absolute;\\n width: 100%;\\n min-height: 100%;\\n top: 0;\\n left: 0;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.onboarding-enter {\\n transform: translateX(100%);\\n}\\n.onboarding-enter .onboarding-animate__left {\\n opacity: 0;\\n transform: translateX(100%);\\n}\\n.onboarding-enter .onboarding-animate__appear {\\n opacity: 0;\\n transform: translateX(100%);\\n}\\n\\n.onboarding-enter-active {\\n opacity: 1;\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms;\\n transform: translateX(0%);\\n}\\n.onboarding-enter-active .onboarding-animate__left {\\n opacity: 1;\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 1000ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 1000ms;\\n transform: translateX(0%);\\n}\\n.onboarding-enter-active .onboarding-animate__appear {\\n opacity: 1;\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 1500ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 1500ms;\\n transform: translateX(0%);\\n}\\n\\n.onboarding-exit {\\n transform: translateX(0%);\\n}\\n.onboarding-exit .onboarding-animate__left {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n.onboarding-exit .onboarding-animate__appear {\\n opacity: 1;\\n transform: translateX(0%);\\n}\\n\\n.onboarding-exit-active {\\n transition: transform 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms, opacity 500ms cubic-bezier(0.236, 0, 0.236, 1) 500ms;\\n transform: translateX(-100%);\\n}\\n.onboarding-exit-active .onboarding-animate__left {\\n opacity: 0.01;\\n transition: transform 250ms cubic-bezier(0.236, 0, 0.236, 1), opacity 250ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateX(-100%);\\n}\\n.onboarding-exit-active .onboarding-animate__appear {\\n opacity: 0.01;\\n transition: transform 250ms cubic-bezier(0.236, 0, 0.236, 1) 250ms, opacity 250ms cubic-bezier(0.236, 0, 0.236, 1) 250ms;\\n transform: translateX(-100%);\\n}\\n\\n.onboarding-input input {\\n height: 2.5rem;\\n padding: 0.75rem;\\n border: 2px solid #e2ecf6;\\n border-radius: 0.25rem;\\n font-size: 22px;\\n min-width: 5rem;\\n max-width: 7rem;\\n background-color: #f3f7fb;\\n}\\n.pdf-preview {\\n display: flex;\\n flex-direction: column;\\n height: 100%;\\n}\\n\\n.pdf-preview__iframe {\\n flex-grow: 1;\\n}\\n\\n.pdf-preview__footer {\\n flex-shrink: 0;\\n padding: 0.5rem 1rem;\\n text-align: center;\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.pdf-preview-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0;\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.pdf-preview-header__left,\\n.pdf-preview-header__middle,\\n.pdf-preview-header__right {\\n flex: 1;\\n display: flex;\\n justify-content: center;\\n}\\n\\n.pdf-preview-header__left {\\n padding-left: 0.5rem;\\n}\\n.pdf-preview-header__left > * {\\n margin-right: auto;\\n}\\n\\n.pdf-preview-header__middle {\\n padding: 0.5rem 0;\\n text-align: center;\\n}\\n\\n.pdf-preview-header__right > * {\\n margin-left: auto;\\n}\\n\\n.pdf-preview__close {\\n display: flex;\\n align-items: center;\\n padding: 0.5rem;\\n border-radius: 0;\\n border: none;\\n color: #3e7cb2;\\n}\\n.pdf-preview__close svg {\\n width: 1rem;\\n height: 1rem;\\n fill: #3e7cb2;\\n}\\n.pdf-preview__close:hover {\\n color: #6e9fd5;\\n}\\n.pdf-preview__close:hover svg {\\n fill: #6e9fd5;\\n}\\n\\n.profile-footer {\\n position: fixed;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n padding-bottom: env(safe-area-inset-bottom);\\n box-shadow: 0 -0.25rem 0.75rem #e2ecf6, 0 -1px 1px 1px #e2ecf6;\\n background-color: #39235d;\\n}\\n.profile-footer-error {\\n background-color: #ef686f;\\n}\\n.profile-footer-enter {\\n opacity: 0.01;\\n transform: translateY(100%);\\n}\\n.profile-footer-enter-active {\\n opacity: 1;\\n transition: transform 400ms cubic-bezier(0.236, 0, 0.236, 1), opacity 400ms cubic-bezier(0.236, 0, 0.236, 1);\\n transform: translateY(0%);\\n}\\n.profile-footer-exit {\\n opacity: 1;\\n transform: translateY(0%);\\n}\\n.profile-footer-exit-active {\\n opacity: 0.01;\\n background-color: #43c45f;\\n transform: translateY(100%);\\n transition: transform 200ms cubic-bezier(0.236, 0, 0.236, 1) 2000ms, opacity 200ms cubic-bezier(0.236, 0, 0.236, 1) 2000ms, background-color 200ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n\\n.profile-card__notice {\\n display: flex;\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n}\\n.profile-card__notice > * + * {\\n margin-left: 0.25rem;\\n}\\n.profile-card__notice svg {\\n width: 1rem;\\n height: 1rem;\\n stroke: hsl(100, 100%, 100%);\\n}\\n\\n.range-slider {\\n position: relative;\\n display: flex;\\n padding-top: 1.25rem;\\n padding-bottom: 0.25rem;\\n}\\n\\n.range-slider__unit {\\n display: block;\\n position: absolute;\\n top: 0;\\n z-index: 2;\\n transform: translateX(-50%);\\n color: #1c1f28;\\n font-weight: 400;\\n white-space: nowrap;\\n}\\n\\n.range-slider__indicator {\\n display: block;\\n position: absolute;\\n top: 1rem;\\n bottom: 0;\\n width: 2px;\\n z-index: 1;\\n transform: translateX(-50%);\\n border-radius: 10px;\\n background-color: hsl(0, 0%, 0%);\\n}\\n\\n.range-slider__bar {\\n position: relative;\\n height: 0.5rem;\\n width: attr(data-width);\\n border-radius: 2rem;\\n color: #626e8e;\\n}\\n\\n.range-slider__value {\\n position: absolute;\\n left: 50%;\\n bottom: -1.25rem;\\n transform: translateX(-50%);\\n}\\n\\n.range-slider__min {\\n font-weight: 500;\\n position: absolute;\\n bottom: -1.25rem;\\n left: 0;\\n transform: translateX(-100%);\\n color: #ef686f;\\n}\\n\\n.range-slider__max {\\n font-weight: 500;\\n position: absolute;\\n bottom: -1.25rem;\\n right: 0;\\n transform: translateX(100%);\\n color: #ef686f;\\n}\\n\\n.range-slider__recommendation {\\n position: absolute;\\n height: 0.5rem;\\n width: 100px;\\n background-color: #ffd44f;\\n}\\n.range-slider__recommendation:after {\\n content: attr(data-value);\\n position: absolute;\\n bottom: -1.25rem;\\n}\\n.range-slider__recommendation--low {\\n left: 0;\\n border-top-left-radius: 10px;\\n border-bottom-left-radius: 10px;\\n}\\n.range-slider__recommendation--low:after {\\n right: 0;\\n transform: translateX(100%);\\n color: #43c45f;\\n}\\n.range-slider__recommendation--high {\\n right: 0;\\n border-top-right-radius: 10px;\\n border-bottom-right-radius: 10px;\\n}\\n.range-slider__recommendation--high:after {\\n left: 0;\\n transform: translateX(-100%);\\n color: #43c45f;\\n}\\n\\n.range-slider__microbiome-color {\\n background: #d3e3b2;\\n}\\n\\n.result-box {\\n display: flex;\\n flex-direction: column;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box {\\n flex-direction: row;\\n }\\n}\\n\\n.result-box__left {\\n display: flex;\\n flex-direction: column;\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__left {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .result-box__left {\\n flex-basis: 55%;\\n max-width: 55%;\\n }\\n}\\n.result-box__left--grey {\\n background-color: #f3f7fb;\\n}\\n\\n.result-box__main {\\n padding: 0.75rem;\\n flex-grow: 1;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__main {\\n padding: 1rem;\\n }\\n}\\n\\n.result-box__right {\\n padding: 0.75rem;\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right {\\n padding: 1rem;\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n}\\n@media screen and (min-width: 992px) {\\n .result-box__right {\\n flex-basis: 45%;\\n max-width: 45%;\\n }\\n}\\n.result-box__right--text {\\n background-color: #fbfcfe;\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__right--text {\\n border-top: 2px solid #e2ecf6;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--text {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n border-left: 2px solid #e2ecf6;\\n }\\n}\\n.result-box__right--grey {\\n background-color: #f3f7fb;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--grey {\\n border-left: 2px solid #e2ecf6;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__right--white-bg {\\n border-top: 2px solid #e2ecf6;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--white-bg {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n border-left: 2px solid #e2ecf6;\\n }\\n}\\n.result-box__right--pending {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n background-color: #e2ecf6;\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__right--pending {\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n }\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__right--pending {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n }\\n}\\n\\n.result-box__footer-desktop {\\n border-top: 1px solid #e2ecf6;\\n padding: 0.5rem 1rem;\\n background-color: #f3f7fb;\\n}\\n@media screen and (max-width: 767px) {\\n .result-box__footer-desktop {\\n display: none;\\n }\\n}\\n\\n.result-box__footer {\\n display: block;\\n padding: 0.5rem 0.75rem;\\n border-top: 1px solid #e2ecf6;\\n border-bottom-right-radius: 0.5rem;\\n text-align: center;\\n background-color: #f3f7fb;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__footer {\\n display: none;\\n }\\n}\\n.result-box__footer--microbiome {\\n display: flex;\\n padding: 0;\\n border-top: 2px solid #e2ecf6;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__footer--microbiome {\\n display: flex;\\n }\\n}\\n.result-box__footer:hover .arrow-link::after, .result-box__footer:hover .arrow-link::before {\\n right: -0.25rem;\\n}\\n\\n.result-box__chart {\\n margin: 0 1.25rem;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__chart {\\n margin: 0 1rem;\\n }\\n}\\n.result-box__label {\\n margin-bottom: 0.125rem;\\n border-radius: 20rem;\\n color: #39235d;\\n font-weight: 500;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n}\\n\\n.result-box__value {\\n flex-grow: 1;\\n text-align: left;\\n color: #626e8e;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__value {\\n margin-left: 0;\\n }\\n}\\n\\n.result-box__pending {\\n text-align: center;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n color: #626e8e;\\n}\\n\\n.result-box__statement {\\n color: #626e8e;\\n}\\n.result-box__statement p + p {\\n margin-top: 0.5rem;\\n}\\n.result-box__statement p:last-of-type {\\n margin-bottom: 0.5rem;\\n}\\n\\n.result-box__readmore,\\n.result-box__comparison {\\n display: flex;\\n align-items: center;\\n font-weight: 600;\\n color: #39235d;\\n cursor: pointer;\\n}\\n.result-box__readmore svg,\\n.result-box__comparison svg {\\n margin-left: 0.25rem;\\n stroke: #39235d;\\n transition: transform 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n}\\n.result-box__readmore:hover,\\n.result-box__comparison:hover {\\n text-decoration: underline;\\n}\\n.result-box__readmore:hover svg,\\n.result-box__comparison:hover svg {\\n text-decoration: none;\\n}\\n.result-box__readmore--open svg,\\n.result-box__comparison--open svg {\\n transform: rotate(180deg);\\n}\\n\\n.result-box__readmore--microbiome {\\n flex-basis: 55%;\\n padding: 0.5rem 1rem;\\n}\\n\\n.result-box__comparison--microbiome {\\n flex-basis: 45%;\\n border-left: 2px solid #e2ecf6;\\n padding: 0.5rem 1rem;\\n}\\n\\n.result-box__more {\\n border-top: 1px solid #e2ecf6;\\n}\\n\\n.result-box__more-top {\\n padding: 0.75rem;\\n flex-grow: 1;\\n border-bottom: 1px solid #e2ecf6;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__more-top {\\n padding: 1rem;\\n }\\n}\\n\\n.result-box__more-notice {\\n text-align: center;\\n color: #39235d;\\n font-weight: 500;\\n}\\n\\n.result-box__more-bottom {\\n padding: 0.75rem;\\n flex-grow: 1;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__more-bottom {\\n padding: 1rem;\\n }\\n}\\n\\n.result-box__microbiome-info {\\n display: flex;\\n}\\n.result-box__microbiome-info-number {\\n flex: 0 0 auto;\\n width: 20px;\\n height: 20px;\\n background: #e0ecf7;\\n color: #6e9fd5;\\n text-align: center;\\n font-weight: 500;\\n line-height: 20px;\\n border-radius: 50%;\\n}\\n.result-box__microbiome-info-text {\\n flex: 1 1 auto;\\n padding-left: 0.5rem;\\n}\\n.result-box__microbiome-info-text > h2 {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.result-box__microbiome-info-text > p {\\n color: #404040;\\n}\\n.result-box__microbiome-more-info {\\n border-top: 2px solid #e2ecf6;\\n}\\n.result-box__microbiome-long-description {\\n border-top: 2px solid #e2ecf6;\\n background-color: #f3f7fb;\\n padding: 0.75rem;\\n}\\n.result-box__microbiome-long-description > h2 {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.result-box__microbiome-long-description > p {\\n color: #404040;\\n}\\n@media screen and (min-width: 768px) {\\n .result-box__microbiome-long-description {\\n padding: 1rem;\\n }\\n}\\n\\n.select-order__main {\\n padding: 1rem;\\n}\\n\\n.select-order__footer {\\n display: flex;\\n align-items: center;\\n padding: 1rem;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n}\\n@media screen and (min-width: 768px) {\\n .select-order__footer > * + * {\\n margin-left: 1rem;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .select-order__footer {\\n flex-direction: column;\\n align-items: center;\\n }\\n .select-order__footer > * {\\n width: 100%;\\n max-width: 13rem;\\n }\\n .select-order__footer > * + * {\\n margin-top: 0.5rem;\\n }\\n}\\n\\n@media screen and (min-width: 768px) {\\n .select-order__footer-info {\\n flex-grow: 1;\\n }\\n}\\n@media screen and (max-width: 767px) {\\n .select-order__footer-info {\\n text-align: center;\\n }\\n}\\n\\n@media screen and (min-width: 768px) {\\n .select-order__footer-button {\\n justify-self: flex-end;\\n flex-grow: 1;\\n max-width: 25%;\\n }\\n}\\n\\n.mobile-hide {\\n display: none;\\n}\\n@media screen and (min-width: 576px) {\\n .mobile-hide {\\n display: inline;\\n }\\n}\\n\\n.site-wrapper {\\n display: flex;\\n flex-direction: column;\\n align-items: stretch;\\n min-height: 100%;\\n}\\n\\n.site-wrapper__main {\\n flex-grow: 1;\\n flex-shrink: 0;\\n}\\n\\n.site-wrapper__footer {\\n flex-shrink: 0;\\n}\\n\\n.split-card {\\n max-width: 34rem;\\n margin: 0 auto;\\n display: flex;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05), 0 0.125rem 0.125rem rgba(0, 0, 0, 0.025);\\n overflow: hidden;\\n}\\n@media screen and (max-width: 575px) {\\n .split-card {\\n display: block;\\n }\\n}\\n\\n.split-card__half {\\n max-width: 17rem;\\n}\\n\\n.split-card__right,\\n.split-card__left {\\n position: relative;\\n flex-shrink: 0;\\n flex-basis: 0;\\n}\\n\\n.split-card__left {\\n flex-grow: 1;\\n padding: 1.5rem;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n z-index: 2;\\n border-top-left-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n@media screen and (min-width: 768px) {\\n .split-card__left {\\n min-height: 15rem;\\n }\\n}\\n@media screen and (max-width: 575px) {\\n .split-card__left {\\n padding: 1.5rem 1.5rem;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.5rem;\\n }\\n}\\n\\n.split-card__right {\\n flex-grow: 1;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n padding: 2rem 1.5rem;\\n min-height: 23rem;\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: hsl(100, 100%, 100%);\\n}\\n@media screen and (max-width: 575px) {\\n .split-card__right {\\n padding: 1.5rem 1.5rem;\\n min-height: 0rem;\\n border-top-right-radius: 0;\\n border-bottom-left-radius: 0.5rem;\\n }\\n}\\n\\n.suggestion-item {\\n flex-grow: 1;\\n position: relative;\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 1rem;\\n border-radius: 0.5rem;\\n box-shadow: 0 0.25rem 0.75rem rgba(138, 180, 219, 0.2), 0 1px 1px 1px rgba(138, 180, 219, 0.2);\\n background-color: hsl(100, 100%, 100%);\\n}\\n\\n.suggestion-item__main {\\n padding: 1rem 1.5rem;\\n flex-grow: 1;\\n}\\n@media screen and (max-width: 767px) {\\n .suggestion-item__main {\\n padding: 0.75rem 1rem;\\n }\\n}\\n\\n.suggestion-item__footer {\\n position: relative;\\n padding: 0.75rem;\\n flex-shrink: 0;\\n display: flex;\\n justify-content: center;\\n text-align: center;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n}\\n.suggestion-item__footer .button {\\n max-width: 12rem;\\n}\\n\\n.new-suggestion-item__background {\\n background-color: #e2ecf6;\\n}\\n.new-suggestion-item__editor-buttons {\\n flex: 1 1 auto;\\n display: flex;\\n margin: -8px;\\n}\\n.new-suggestion-item__editor-buttons > * {\\n flex: 1 1 0%;\\n max-width: 2000px !important;\\n margin: 8px;\\n}\\n.new-suggestion-item__header {\\n position: relative;\\n padding: 1rem 1.5rem;\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n min-height: 220px;\\n display: flex;\\n align-items: flex-end;\\n background-size: cover;\\n background-position: center center;\\n}\\n@media screen and (max-width: 767px) {\\n .new-suggestion-item__header {\\n padding: 1rem;\\n }\\n}\\n.new-suggestion-item__header-gradient {\\n position: absolute;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n height: 70%;\\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));\\n}\\n.new-suggestion-item__header-fields {\\n position: relative;\\n z-index: 2;\\n width: 100%;\\n}\\n.new-suggestion-item__field input[type=text], .new-suggestion-item__field-with-margin input[type=text] {\\n border: 1px solid #a1a7bb;\\n border-radius: 5px;\\n width: 100%;\\n padding: 10px;\\n background: hsl(100, 100%, 100%);\\n}\\n.new-suggestion-item__field label, .new-suggestion-item__field-with-margin label {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.new-suggestion-item__hidden-field {\\n position: absolute;\\n width: 0px;\\n height: 0px;\\n opacity: 0;\\n visibility: hidden;\\n}\\n.new-suggestion-item__field-with-margin {\\n margin-top: 1rem;\\n}\\n.new-suggestion-item__field-white label {\\n color: hsl(100, 100%, 100%);\\n font-weight: 500;\\n}\\n.new-suggestion-item__new-item {\\n align-self: stretch;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n padding: 1rem;\\n width: 100%;\\n margin-bottom: 1rem;\\n border: none;\\n background: #f3f7fb;\\n}\\n.new-suggestion-item__item-link-container {\\n padding: 0 1.5rem 1rem 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .new-suggestion-item__item-link-container {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n.new-suggestion-item__item-link {\\n display: block;\\n position: relative;\\n background: #f3f7fb;\\n color: #fc8020;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n}\\n.new-suggestion-item__item-link > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n}\\n.new-suggestion-item__title {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n.new-suggestion-item__title-white {\\n position: relative;\\n z-index: 2;\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #ffffff;\\n}\\n.new-suggestion-item__order-number {\\n position: absolute;\\n top: 10px;\\n left: 1.5rem;\\n z-index: 2;\\n color: #39235d;\\n}\\n.new-suggestion-item__order-number-white {\\n position: absolute;\\n top: 10px;\\n left: 1.5rem;\\n z-index: 2;\\n color: #ffffff;\\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);\\n}\\n.new-suggestion-item__input-context {\\n margin-top: 0.5rem;\\n color: #626e8e;\\n font-size: 0.57rem;\\n line-height: 0.75rem;\\n}\\n\\n.selectize-control.plugin-drag_drop.multi > .selectize-input.dragging {\\n overflow: visible;\\n}\\n.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {\\n visibility: visible !important;\\n background: #f2f2f2 !important;\\n background: rgba(0, 0, 0, 0.06) !important;\\n border: 0 none !important;\\n box-shadow: inset 0 0 12px 4px #fff;\\n}\\n.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {\\n content: \\\"!\\\";\\n visibility: hidden;\\n}\\n.selectize-control.plugin-drag_drop .ui-sortable-helper {\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\\n}\\n\\n.selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header {\\n position: relative;\\n padding: 10px 8px;\\n border-bottom: 1px solid #d0d0d0;\\n background: #f8f8f8;\\n border-radius: 3px 3px 0 0;\\n}\\n.selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header-close {\\n position: absolute;\\n right: 8px;\\n top: 50%;\\n color: #303030;\\n opacity: 0.4;\\n margin-top: -12px;\\n line-height: 20px;\\n font-size: 20px !important;\\n text-decoration: none;\\n}\\n.selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header-close:hover {\\n color: black;\\n}\\n\\n.selectize-dropdown.plugin-optgroup_columns .selectize-dropdown-content {\\n display: flex;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup {\\n border-right: 1px solid #f2f2f2;\\n border-top: 0 none;\\n flex-grow: 1;\\n flex-basis: 0;\\n min-width: 0;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {\\n border-right: 0 none;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup:before {\\n display: none;\\n}\\n.selectize-dropdown.plugin-optgroup_columns .optgroup-header {\\n border-top: 0 none;\\n}\\n\\n.selectize-control.plugin-remove_button .item {\\n display: inline-flex;\\n align-items: center;\\n padding-right: 0 !important;\\n}\\n.selectize-control.plugin-remove_button .item .remove {\\n color: inherit;\\n text-decoration: none;\\n vertical-align: middle;\\n display: inline-block;\\n padding: 2px 6px;\\n border-left: 1px solid #0073bb;\\n border-radius: 0 2px 2px 0;\\n box-sizing: border-box;\\n margin-left: 6px;\\n}\\n.selectize-control.plugin-remove_button .item .remove:hover {\\n background: rgba(0, 0, 0, 0.05);\\n}\\n.selectize-control.plugin-remove_button .item.active .remove {\\n border-left-color: #00578d;\\n}\\n.selectize-control.plugin-remove_button .disabled .item .remove:hover {\\n background: none;\\n}\\n.selectize-control.plugin-remove_button .disabled .item .remove {\\n border-left-color: #aaaaaa;\\n}\\n\\n.selectize-control.plugin-clear_button .clear {\\n text-decoration: none;\\n display: flex;\\n position: absolute;\\n height: 100%;\\n width: 25px;\\n top: 0;\\n right: calc(8px - 6px);\\n color: rgb(0, 0, 0);\\n opacity: 0.4;\\n font-weight: bold;\\n border: none;\\n cursor: pointer;\\n z-index: 1;\\n font-size: 21px;\\n justify-content: center;\\n align-items: center;\\n}\\n.selectize-control.plugin-clear_button .clear:hover {\\n opacity: 1;\\n}\\n.selectize-control.plugin-clear_button.single .clear {\\n right: calc(8px - 6px + 1.5rem);\\n}\\n\\n.selectize-dropdown.plugin-auto_position.selectize-position-top {\\n border-top: 1px solid #d0d0d0;\\n border-bottom: 0 none;\\n border-radius: 3px 3px 0 0;\\n box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.18);\\n}\\n\\n.selectize-control.plugin-auto_position .selectize-input.selectize-position-top.dropdown-active {\\n border-radius: 0 0 3px 3px;\\n border-top: 0 none;\\n}\\n.selectize-control.plugin-auto_position .selectize-input.selectize-position-top.dropdown-active::before {\\n top: 0;\\n bottom: unset;\\n}\\n\\n.selectize-control {\\n position: relative;\\n}\\n\\n.selectize-dropdown,\\n.selectize-input,\\n.selectize-input input {\\n color: #303030;\\n font-family: inherit;\\n font-size: 13px;\\n line-height: 18px;\\n font-smoothing: inherit;\\n}\\n\\n.selectize-input,\\n.selectize-control.single .selectize-input.input-active {\\n background: #fff;\\n cursor: text;\\n display: inline-block;\\n}\\n\\n.selectize-input {\\n border: 1px solid #d0d0d0;\\n padding: 8px 8px;\\n display: inline-block;\\n width: 100%;\\n position: relative;\\n z-index: 1;\\n box-sizing: border-box;\\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\\n border-radius: 3px;\\n}\\n.selectize-control.multi .selectize-input.has-items {\\n padding: calc(\\n 8px - 2px - 1px\\n ) 8px calc(\\n 8px - 2px - 3px -\\n 1px\\n );\\n}\\n.selectize-input.full {\\n background-color: #fff;\\n}\\n.selectize-input.disabled, .selectize-input.disabled * {\\n cursor: default !important;\\n}\\n.selectize-input.focus {\\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\\n}\\n.selectize-input.dropdown-active {\\n border-radius: 3px 3px 0 0;\\n}\\n.selectize-input > * {\\n vertical-align: baseline;\\n display: inline-block;\\n zoom: 1;\\n}\\n.selectize-control.multi .selectize-input > div {\\n cursor: pointer;\\n margin: 0 3px 3px 0;\\n padding: 2px 6px;\\n background: #1da7ee;\\n color: #fff;\\n border: 1px solid #0073bb;\\n}\\n.selectize-control.multi .selectize-input > div.active {\\n background: #92c836;\\n color: #fff;\\n border: 1px solid #00578d;\\n}\\n.selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active {\\n color: white;\\n background: #d2d2d2;\\n border: 1px solid #aaaaaa;\\n}\\n.selectize-input > input {\\n display: inline-block !important;\\n padding: 0 !important;\\n min-height: 0 !important;\\n max-height: none !important;\\n max-width: 100% !important;\\n margin: 0 !important;\\n text-indent: 0 !important;\\n border: 0 none !important;\\n background: none !important;\\n line-height: inherit !important;\\n user-select: auto !important;\\n box-shadow: none !important;\\n}\\n.selectize-input > input::-ms-clear {\\n display: none;\\n}\\n.selectize-input > input:focus {\\n outline: none !important;\\n}\\n.selectize-input > input[placeholder] {\\n box-sizing: initial;\\n}\\n.selectize-input.has-items > input {\\n margin: 0 0px !important;\\n}\\n\\n.selectize-input::after {\\n content: \\\" \\\";\\n display: block;\\n clear: left;\\n}\\n\\n.selectize-input.dropdown-active::before {\\n content: \\\" \\\";\\n display: block;\\n position: absolute;\\n background: #f0f0f0;\\n height: 1px;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n}\\n\\n.selectize-dropdown {\\n position: absolute;\\n top: 100%;\\n left: 0;\\n width: 100%;\\n z-index: 10;\\n border: 1px solid #d0d0d0;\\n background: #fff;\\n margin: -1px 0 0 0;\\n border-top: 0 none;\\n box-sizing: border-box;\\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\\n border-radius: 0 0 3px 3px;\\n}\\n.selectize-dropdown [data-selectable] {\\n cursor: pointer;\\n overflow: hidden;\\n}\\n.selectize-dropdown [data-selectable] .highlight {\\n background: rgba(125, 168, 208, 0.2);\\n border-radius: 1px;\\n}\\n.selectize-dropdown .option,\\n.selectize-dropdown .optgroup-header,\\n.selectize-dropdown .no-results,\\n.selectize-dropdown .create {\\n padding: 5px 8px;\\n}\\n.selectize-dropdown .option,\\n.selectize-dropdown [data-disabled],\\n.selectize-dropdown [data-disabled] [data-selectable].option {\\n cursor: inherit;\\n opacity: 0.5;\\n}\\n.selectize-dropdown [data-selectable].option {\\n opacity: 1;\\n cursor: pointer;\\n}\\n.selectize-dropdown .optgroup:first-child .optgroup-header {\\n border-top: 0 none;\\n}\\n.selectize-dropdown .optgroup-header {\\n color: #303030;\\n background: #fff;\\n cursor: default;\\n}\\n.selectize-dropdown .active {\\n background-color: #92c836;\\n color: #fff;\\n}\\n.selectize-dropdown .active.create {\\n color: #495c68;\\n}\\n.selectize-dropdown .selected {\\n background-color: #92c836;\\n color: #fff;\\n}\\n.selectize-dropdown .create {\\n color: rgba(48, 48, 48, 0.5);\\n}\\n.selectize-dropdown .active:not(.selected) {\\n background: #f5fafd;\\n color: #495c68;\\n}\\n\\n.selectize-dropdown-content {\\n overflow-y: auto;\\n overflow-x: hidden;\\n max-height: 200px;\\n overflow-scrolling: touch;\\n}\\n\\n.selectize-dropdown-emptyoptionlabel {\\n text-align: center;\\n}\\n\\n.selectize-dropdown .spinner {\\n display: inline-block;\\n width: 30px;\\n height: 30px;\\n margin: 5px 8px;\\n}\\n.selectize-dropdown .spinner:after {\\n content: \\\" \\\";\\n display: block;\\n width: 24px;\\n height: 24px;\\n margin: 3px;\\n border-radius: 50%;\\n border: 5px solid #d0d0d0;\\n border-color: #d0d0d0 transparent #d0d0d0 transparent;\\n animation: lds-dual-ring 1.2s linear infinite;\\n}\\n@keyframes lds-dual-ring {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.selectize-control.single .selectize-input,\\n.selectize-control.single .selectize-input input {\\n cursor: pointer;\\n}\\n.selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input:not(:read-only) {\\n cursor: text;\\n}\\n.selectize-control.single .selectize-input:after {\\n content: \\\" \\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n right: 15px;\\n margin-top: -3px;\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: 5px 5px 0 5px;\\n border-color: #808080 transparent transparent transparent;\\n}\\n.selectize-control.single .selectize-input.dropdown-active:after {\\n margin-top: -4px;\\n border-width: 0 5px 5px 5px;\\n border-color: transparent transparent #808080 transparent;\\n}\\n\\n.selectize-control.rtl {\\n text-align: right;\\n}\\n.selectize-control.rtl.single .selectize-input:after {\\n left: 15px;\\n right: auto;\\n}\\n.selectize-control.rtl .selectize-input > input {\\n margin: 0 4px 0 -2px !important;\\n}\\n\\n.selectize-control .selectize-input.disabled {\\n opacity: 0.5;\\n background-color: #fafafa;\\n}\\n\\n.selectize-control.multi .selectize-input.has-items {\\n padding-left: 5px;\\n padding-right: 5px;\\n}\\n.selectize-control.multi .selectize-input.disabled [data-value] {\\n color: #999;\\n text-shadow: none;\\n background: none;\\n box-shadow: none;\\n}\\n.selectize-control.multi .selectize-input.disabled [data-value],\\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\\n border-color: #e6e6e6;\\n}\\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\\n background: none;\\n}\\n.selectize-control.multi .selectize-input [data-value] {\\n text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);\\n border-radius: 3px;\\n background-color: #1b9dec;\\n background-image: linear-gradient(to bottom, #1da7ee, #178ee9);\\n background-repeat: repeat-x;\\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.03);\\n}\\n.selectize-control.multi .selectize-input [data-value].active {\\n background-color: #0085d4;\\n background-image: linear-gradient(to bottom, #008fd8, #0075cf);\\n background-repeat: repeat-x;\\n}\\n.selectize-control.single .selectize-input {\\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);\\n background-color: #f9f9f9;\\n background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);\\n background-repeat: repeat-x;\\n}\\n\\n.selectize-control.single .selectize-input,\\n.selectize-dropdown.single {\\n border-color: #b8b8b8;\\n}\\n\\n.selectize-dropdown .optgroup-header {\\n padding-top: 7px;\\n font-weight: bold;\\n font-size: 0.85em;\\n}\\n.selectize-dropdown .optgroup {\\n border-top: 1px solid #f0f0f0;\\n}\\n.selectize-dropdown .optgroup:first-child {\\n border-top: 0 none;\\n}\",\"// URLs relative to app/javascript/packs\\n\\n\\n// $albertSansRegularWoff2: \\\"../src/assets/fonts/AlbertSans-Regular.woff2\\\";\\n// $albertSansRegularTtf: \\\"../src/assets/fonts/AlbertSans-Regular.ttf\\\";\\n\\n// $albertSansMediumWoff2: \\\"../src/assets/fonts/AlbertSans-Medium.woff2\\\";\\n// $albertSansMediumTtf: \\\"../src/assets/fonts/AlbertSans-Medium.ttf\\\";\\n\\n// $albertSansBoldWoff2: \\\"../src/assets/fonts/AlbertSans-Bold.woff2\\\";\\n// $albertSansBoldTtf: \\\"../src/assets/fonts/AlbertSans-Bold.ttf\\\";\\n\\n// $albertSansBlackWoff2: \\\"../src/assets/fonts/AlbertSans-Black.woff2\\\";\\n// $albertSansBlackTtf: \\\"../src/assets/fonts/AlbertSans-Black.ttf\\\";\\n\\n$albertSansVarIta: \\\"../src/assets/fonts/AlbertSans-Italic[wdth,wght].woff2\\\";\\n$albertSansVar: \\\"../src/assets/fonts/AlbertSans-Roman[wdth,wght].woff2\\\";\\n\\n@font-face {\\n font-family: \\\"Albert Sans\\\";\\n font-style: normal;\\n font-display: swap;\\n font-stretch: 80% 100%;\\n font-weight: 100 900;\\n src: \\n url(\\\"#{$albertSansVar}\\\") format('woff2 supports variations'),\\n url(\\\"#{$albertSansVar}\\\") format('woff2-variations');\\n}\\n\\n// @font-face {\\n// font-family: \\\"Albert Sans\\\";\\n// font-style: normal;\\n// font-weight: 400;\\n// font-display: fallback;\\n// src:\\n// url(\\\"#{$albertSansRegularWoff2}\\\") format(\\\"woff2 supports variations\\\"),\\n// url(\\\"#{$albertSansRegularWoff2}\\\") format(\\\"woff2-variations\\\"),\\n// url(\\\"#{$albertSansRegularTtf}\\\") format(\\\"truetype\\\");\\n// }\\n\\n// @font-face {\\n// font-family: \\\"Albert Sans\\\";\\n// font-style: normal;\\n// font-weight: 500;\\n// font-display: fallback;\\n// src:\\n// url(\\\"#{$albertSansMediumWoff2}\\\") format(\\\"woff2 supports variations\\\"),\\n// url(\\\"#{$albertSansMediumWoff2}\\\") format(\\\"woff2-variations\\\"),\\n// url(\\\"#{$albertSansMediumTtf}\\\") format(\\\"truetype\\\");\\n// }\\n\\n// @font-face {\\n// font-family: \\\"Albert Sans\\\";\\n// font-style: normal;\\n// font-weight: 700;\\n// font-display: fallback;\\n// src:\\n// url(\\\"#{$albertSansBoldWoff2}\\\") format(\\\"woff2 supports variations\\\"),\\n// url(\\\"#{$albertSansBoldWoff2}\\\") format(\\\"woff2-variations\\\"),\\n// url(\\\"#{$albertSansBoldTtf}\\\") format(\\\"truetype\\\");\\n// }\\n\\n// @font-face {\\n// font-family: \\\"Albert Sans Black\\\";\\n// font-weight: 700;\\n// font-display: fallback;\\n// font-style: normal;\\n// src:\\n// url(\\\"#{$albertSansBlackWoff2}\\\") format(\\\"woff2 supports variations\\\"),\\n// url(\\\"#{$albertSansBlackWoff2}\\\") format(\\\"woff2-variations\\\"),\\n// url(\\\"#{$albertSansBlackTtf}\\\") format(\\\"truetype\\\");\\n// }\\n\",\"//\\n// Font size\\n$baseline-size: 1.14em;\\n$baseline-scaling: 0.2;\\n$baselineFallback: $baseline-size * (1 + $baseline-scaling);\\n\\nhtml {\\n font-size: $baselineFallback; /* Used if browser doesn't support calc() */\\n font-size: calc(\\n #{$baseline-size} + (#{$baseline-scaling} * 1vw) + (\\n #{$baseline-scaling} * 1vh\\n ) + (#{$baseline-scaling} / 2 * 1vmin)\\n );\\n}\\n\",\"input[type=\\\"date\\\"],\\ninput[type=\\\"datetime\\\"],\\ninput[type=\\\"datetime-local\\\"],\\ninput[type=\\\"email\\\"],\\ninput[type=\\\"month\\\"],\\ninput[type=\\\"number\\\"],\\ninput[type=\\\"password\\\"],\\ninput[type=\\\"search\\\"],\\ninput[type=\\\"tel\\\"],\\ninput[type=\\\"text\\\"],\\ninput[type=\\\"time\\\"],\\ninput[type=\\\"url\\\"],\\ninput[type=\\\"week\\\"],\\nselect,\\ntextarea {\\n padding: 0.5rem;\\n border: 1px solid;\\n}\\n\\nbutton,\\ninput[type=\\\"submit\\\"],\\n.button {\\n padding: 0.5rem 0.75rem;\\n border-radius: 0.25rem;\\n border: 1px solid;\\n}\\n\\n.full-width {\\n width: 100%;\\n}\\n\\n.stripped-button {\\n padding: none;\\n border-radius: none;\\n border: none;\\n text-decoration: underline;\\n}\\n\",\"html,\\nbody {\\n height: 100%;\\n}\\n\\nhtml {\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\nbody {\\n position: relative;\\n\\n @include type-setting(1);\\n font-weight: normal;\\n font-family: $albert-sans;\\n\\n color: color(gray, dark);\\n\\n background-color: color(blue, lightest);\\n overflow-x: hidden;\\n}\\n\\n#root {\\n height: 100%;\\n // overflow: scroll;\\n}\\n\\nimg {\\n width: 100%;\\n height: auto;\\n}\\n\",\"//\\n// Media query mixin\\n@mixin mq($point, $max: null) {\\n @if map-has-key($mq-points, $point) {\\n $point: map-get($mq-points, $point);\\n @if $max {\\n @media screen and (max-width: #{$point - 1}px) {\\n @content;\\n }\\n } @else {\\n @media screen and (min-width: #{$point}px) {\\n @content;\\n }\\n }\\n } @else {\\n @error \\\"No such breakpoint: `#{$point}`.\\\";\\n }\\n}\\n\\n//\\n// Map class mixin\\n@mixin map-to-class($map, $property, $selector, $divider: \\\"\\\") {\\n $selector: if($selector == \\\"\\\" and &, &, $selector);\\n\\n @each $key, $value in $map {\\n $suffix: if($key == \\\"base\\\", \\\"\\\", $divider + $key);\\n @at-root #{$selector}#{$suffix} {\\n @if type-of($value) == map {\\n @include map-to-class($value, $property, \\\"\\\", $divider) {\\n @content;\\n }\\n } @else {\\n #{$property}: $value;\\n }\\n }\\n }\\n}\\n\\n//\\n// Get color value from map\\n@function color($color, $tone: \\\"base\\\") {\\n @if map-has-key($colors, \\\"#{$color}\\\") {\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == map {\\n @return map-get(map-get($colors, \\\"#{$color}\\\"), $tone);\\n }\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == color {\\n @return map-get($colors, \\\"#{$color}\\\");\\n }\\n @warn \\\"Color `#{$color}` found without value\\\";\\n }\\n @warn \\\"Unknown `#{$color}` color\\\";\\n @return null;\\n}\\n\\n//\\n// Get font-size from map\\n@function font-size($key) {\\n @return map-get($type, $key);\\n}\\n\\n//\\n// Get font-size from map\\n@mixin type-setting($key) {\\n font-size: map-get($type, $key);\\n line-height: map-get($line, $key);\\n}\\n\",\"@import \\\"@mixins\\\";\\n\\n//\\n// Palette\\n$colors: (\\n \\\"purple\\\": (\\n \\\"light\\\": #67318e,\\n \\\"base\\\": #39235d,\\n ),\\n \\\"blue\\\": (\\n \\\"lightest\\\": #f3f7fb,\\n \\\"lighter\\\": #e2ecf6,\\n \\\"light\\\": #8ab4db,\\n \\\"base\\\": #6e9fd5,\\n \\\"dark\\\": #3e7cb2,\\n ),\\n \\\"gray\\\": (\\n \\\"lightest\\\": #e0e2e9,\\n \\\"light\\\": #a1a7bb,\\n \\\"base\\\": #626e8e,\\n \\\"dark\\\": #1c1f28,\\n ),\\n \\\"dark\\\": #646464,\\n \\\"orange\\\": #fc8020,\\n \\\"green\\\": #43c45f,\\n \\\"red\\\": #ef686f,\\n \\\"yellow\\\": #ffd44f,\\n \\\"black\\\": hsl(0%, 0%, 0%),\\n \\\"white\\\": hsl(100%, 100%, 100%),\\n \\\"transparent\\\": transparent,\\n \\\"none\\\": none,\\n \\\"inherit\\\": inherit,\\n \\\"currentcolor\\\": currentcolor,\\n);\\n\\n//\\n// Type\\n$albert-sans:\\n \\\"Albert Sans\\\",\\n -apple-system,\\n BlinkMacSystemFont,\\n \\\"Segoe UI\\\",\\n Roboto,\\n Oxygen-Sans,\\n Ubuntu,\\n Cantarell,\\n \\\"Helvetica Neue\\\",\\n sans-serif;\\n$albert-sans-black:\\n \\\"Ablert Sans Black\\\",\\n -apple-system,\\n BlinkMacSystemFont,\\n \\\"Segoe UI\\\",\\n Roboto,\\n Oxygen-Sans,\\n Ubuntu,\\n Cantarell,\\n \\\"Helvetica Neue\\\",\\n sans-serif;\\n\\n$type: (0-75: 0.57rem, 1: 0.67rem, 1-25: 0.86rem, 1-5: 1.2rem, 2-25: 1.9rem);\\n\\n$line: (0-75: 0.75rem, 1: 1rem, 1-25: 1.25rem, 1-5: 1.5rem, 2-25: 2.25rem);\\n//\\n// Media query\\n$mq-points: (\\n xs: 0,\\n s: 576,\\n m: 768,\\n l: 992,\\n xl: 1200,\\n xl2: 1400,\\n);\\n\\n$max-width: 1200px;\\n\\n//\\n// Animation\\n$animation-easing: cubic-bezier(0.236, 0, 0.236, 1);\\n$animation-time: 200ms;\\n$animation-short-time: 100ms;\\n\\n//\\n// Fixed values\\n$side-padding: 0.5rem;\\n\",\"table,\\n.table {\\n width: 100%;\\n border-collapse: collapse;\\n text-align: left;\\n thead tr {\\n border-bottom: 1px solid color(gray, lightest);\\n }\\n tbody tr {\\n border-bottom: 1px solid color(gray, lightest);\\n &:last-child {\\n }\\n }\\n th,\\n td {\\n &:first-child {\\n padding-left: 0.25rem;\\n }\\n &:last-child {\\n padding-right: 0.25rem;\\n }\\n }\\n th {\\n padding: 0.25rem 0.5rem;\\n @include type-setting(0-75);\\n font-weight: 500;\\n letter-spacing: 0.05em;\\n text-transform: uppercase;\\n }\\n td {\\n padding: 0.5rem;\\n }\\n &.table--fixed {\\n table-layout: fixed;\\n }\\n\\n &--microbiome {\\n tbody tr {\\n &:last-child {\\n border-bottom: none;\\n }\\n }\\n\\n th,\\n td {\\n &:first-child {\\n padding-left: 1rem;\\n }\\n &:last-child {\\n padding-right: 1rem;\\n }\\n }\\n }\\n}\\n\\n.tr--inactive {\\n background-color: color(gray, lightest);\\n}\\n\\n.table-container {\\n width: 100%;\\n overflow-x: auto;\\n}\\n\",\"//\\n// Borders\\n\\n.borders {\\n border-style: solid;\\n border-width: 1px;\\n}\\n.borders-dashed {\\n border-style: dashed;\\n border-width: 2px;\\n}\\n.borders-dotted {\\n border-style: dotted;\\n border-width: 1px;\\n}\\n\\n.borders-y {\\n border-style: solid;\\n border-width: 1px 0;\\n}\\n.borders-x {\\n border-style: solid;\\n border-width: 0 1px;\\n}\\n\\n.border-left {\\n border-width: 0 0 0 1px;\\n border-style: solid;\\n}\\n.border-top {\\n border-width: 1px 0 0 0;\\n border-style: solid;\\n}\\n.border-right {\\n border-width: 0 1px 0 0;\\n border-style: solid;\\n}\\n.border-bottom {\\n border-width: 0 0 1px 0;\\n border-style: solid;\\n}\\n\\n//\\n// Automatical borders around child elements\\n.child-borders > *,\\n.child-borders-x > *,\\n.child-borders-y > * {\\n border-style: solid;\\n border-width: 0;\\n}\\n\\n.child-borders {\\n border: 0 solid;\\n border-width: 1px 0 0 1px;\\n}\\n.child-borders > * + * {\\n border-width: 0 1px 1px 0;\\n}\\n\\n.child-borders-x > * + * {\\n border-left-width: 1px;\\n}\\n.child-borders-y > * + * {\\n border-top-width: 1px;\\n}\\n\\n//\\n// Radius\\n.border-radius,\\n.border-radius-0-125 {\\n border-radius: 0.125rem;\\n}\\n.border-radius-0-25 {\\n border-radius: 0.25rem;\\n}\\n.border-radius-0-5 {\\n border-radius: 0.5rem;\\n}\\n.border-radius-rounded {\\n border-radius: 200px;\\n}\\n.border-radius-50 {\\n border-radius: 50%;\\n}\\n\",\"//\\n// Flexbox\\n.flex,\\n.flex-x {\\n display: flex;\\n}\\n\\n.flex-y {\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.align-start {\\n align-items: flex-start;\\n}\\n\\n.align-center {\\n align-items: center;\\n}\\n\\n.align-end {\\n align-items: flex-end;\\n}\\n\\n.justify-center {\\n justify-content: center;\\n}\\n\\n.justify-end {\\n justify-content: flex-end;\\n}\\n\\n.justify {\\n justify-content: space-between;\\n}\\n\\n.even > * {\\n flex-basis: 0;\\n flex-grow: 1;\\n}\\n\\n.grow,\\n.grow-children > * {\\n flex-basis: auto;\\n flex-grow: 1;\\n}\\n\\n.no-shrink {\\n flex-shrink: 0;\\n}\\n\\n.wrap {\\n flex-wrap: wrap;\\n}\\n\\n.responsive-columns {\\n & > * {\\n flex-basis: 33.3%;\\n\\n @include mq(l, max) {\\n flex-basis: 50%;\\n }\\n\\n @include mq(s, max) {\\n flex-basis: 100%;\\n }\\n }\\n}\\n\",\"$gutter: $side-padding;\\n\\n.container {\\n padding-right: $gutter;\\n padding-left: $gutter;\\n width: 100%;\\n max-width: $max-width;\\n margin-left: auto;\\n margin-right: auto;\\n @include mq(s, max) {\\n &--collapse-xs {\\n padding-right: 0;\\n padding-left: 0;\\n .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n *[class^=\\\"col-\\\"]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n }\\n }\\n @include mq(m, max) {\\n &--collapse-s {\\n padding-right: 0;\\n padding-left: 0;\\n .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n *[class^=\\\"col-\\\"]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n }\\n }\\n @include mq(l, max) {\\n &--collapse-m {\\n padding-right: 0;\\n padding-left: 0;\\n .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n *[class^=\\\"col-\\\"]:not(.gutter) {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n }\\n }\\n @include mq(xl, max) {\\n &--collapse-l {\\n padding-right: 0;\\n padding-left: 0;\\n .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n }\\n }\\n &--collapse {\\n padding-right: 0;\\n padding-left: 0;\\n .row {\\n margin-left: 0;\\n margin-right: 0;\\n }\\n *[class^=\\\"col-\\\"] {\\n padding-left: 0;\\n padding-right: 0;\\n }\\n }\\n}\\n\\n.row {\\n box-sizing: border-box;\\n display: flex;\\n flex: 0 1 auto;\\n flex-direction: row;\\n flex-wrap: wrap;\\n margin-right: ($gutter * 0.5) * -1;\\n margin-left: ($gutter * 0.5) * -1;\\n &--collapse {\\n }\\n}\\n\\n.row.reverse {\\n flex-direction: row-reverse;\\n}\\n\\n.col.reverse {\\n flex-direction: column-reverse;\\n}\\n\\n.col-xs,\\n.col-xs-1,\\n.col-xs-2,\\n.col-xs-3,\\n.col-xs-4,\\n.col-xs-5,\\n.col-xs-6,\\n.col-xs-7,\\n.col-xs-8,\\n.col-xs-9,\\n.col-xs-10,\\n.col-xs-11,\\n.col-xs-12,\\n.col-xs-offset-0,\\n.col-xs-offset-1,\\n.col-xs-offset-2,\\n.col-xs-offset-3,\\n.col-xs-offset-4,\\n.col-xs-offset-5,\\n.col-xs-offset-6,\\n.col-xs-offset-7,\\n.col-xs-offset-8,\\n.col-xs-offset-9,\\n.col-xs-offset-10,\\n.col-xs-offset-11,\\n.col-xs-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: $gutter * 0.5;\\n padding-left: $gutter * 0.5;\\n}\\n\\n.col-xs {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n}\\n\\n.col-xs-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n}\\n\\n.col-xs-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n}\\n\\n.col-xs-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n}\\n\\n.col-xs-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n}\\n\\n.col-xs-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n}\\n\\n.col-xs-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n}\\n\\n.col-xs-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n}\\n\\n.col-xs-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n}\\n\\n.col-xs-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n}\\n\\n.col-xs-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n}\\n\\n.col-xs-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n}\\n\\n.col-xs-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n}\\n\\n.col-xs-offset-0 {\\n margin-left: 0;\\n}\\n\\n.col-xs-offset-1 {\\n margin-left: 8.33333333%;\\n}\\n\\n.col-xs-offset-2 {\\n margin-left: 16.66666667%;\\n}\\n\\n.col-xs-offset-3 {\\n margin-left: 25%;\\n}\\n\\n.col-xs-offset-4 {\\n margin-left: 33.33333333%;\\n}\\n\\n.col-xs-offset-5 {\\n margin-left: 41.66666667%;\\n}\\n\\n.col-xs-offset-6 {\\n margin-left: 50%;\\n}\\n\\n.col-xs-offset-7 {\\n margin-left: 58.33333333%;\\n}\\n\\n.col-xs-offset-8 {\\n margin-left: 66.66666667%;\\n}\\n\\n.col-xs-offset-9 {\\n margin-left: 75%;\\n}\\n\\n.col-xs-offset-10 {\\n margin-left: 83.33333333%;\\n}\\n\\n.col-xs-offset-11 {\\n margin-left: 91.66666667%;\\n}\\n\\n.start-xs {\\n justify-content: flex-start;\\n text-align: start;\\n}\\n\\n.center-xs {\\n justify-content: center;\\n text-align: center;\\n}\\n\\n.end-xs {\\n justify-content: flex-end;\\n text-align: end;\\n}\\n\\n.top-xs {\\n align-items: flex-start;\\n}\\n\\n.middle-xs {\\n align-items: center;\\n}\\n\\n.bottom-xs {\\n align-items: flex-end;\\n}\\n\\n.around-xs {\\n justify-content: space-around;\\n}\\n\\n.between-xs {\\n justify-content: space-between;\\n}\\n\\n.first-xs {\\n order: -1;\\n}\\n\\n.last-xs {\\n order: 1;\\n}\\n\\n@include mq(s) {\\n .col-s,\\n .col-s-1,\\n .col-s-2,\\n .col-s-3,\\n .col-s-4,\\n .col-s-5,\\n .col-s-6,\\n .col-s-7,\\n .col-s-8,\\n .col-s-9,\\n .col-s-10,\\n .col-s-11,\\n .col-s-12,\\n .col-s-offset-0,\\n .col-s-offset-1,\\n .col-s-offset-2,\\n .col-s-offset-3,\\n .col-s-offset-4,\\n .col-s-offset-5,\\n .col-s-offset-6,\\n .col-s-offset-7,\\n .col-s-offset-8,\\n .col-s-offset-9,\\n .col-s-offset-10,\\n .col-s-offset-11,\\n .col-s-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: $gutter * 0.5;\\n padding-left: $gutter * 0.5;\\n }\\n\\n .col-s {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n\\n .col-s-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n\\n .col-s-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n\\n .col-s-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n\\n .col-s-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n\\n .col-s-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n\\n .col-s-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n\\n .col-s-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n\\n .col-s-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n\\n .col-s-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n\\n .col-s-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n\\n .col-s-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n\\n .col-s-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n\\n .col-s-offset-0 {\\n margin-left: 0;\\n }\\n\\n .col-s-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n\\n .col-s-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n\\n .col-s-offset-3 {\\n margin-left: 25%;\\n }\\n\\n .col-s-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n\\n .col-s-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n\\n .col-s-offset-6 {\\n margin-left: 50%;\\n }\\n\\n .col-s-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n\\n .col-s-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n\\n .col-s-offset-9 {\\n margin-left: 75%;\\n }\\n\\n .col-s-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n\\n .col-s-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n\\n .start-s {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n\\n .center-s {\\n justify-content: center;\\n text-align: center;\\n }\\n\\n .end-s {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n\\n .top-s {\\n align-items: flex-start;\\n }\\n\\n .middle-s {\\n align-items: center;\\n }\\n\\n .bottom-s {\\n align-items: flex-end;\\n }\\n\\n .around-s {\\n justify-content: space-around;\\n }\\n\\n .between-s {\\n justify-content: space-between;\\n }\\n\\n .first-s {\\n order: -1;\\n }\\n\\n .last-s {\\n order: 1;\\n }\\n}\\n\\n@include mq(m) {\\n .col-m,\\n .col-m-1,\\n .col-m-2,\\n .col-m-3,\\n .col-m-4,\\n .col-m-5,\\n .col-m-6,\\n .col-m-7,\\n .col-m-8,\\n .col-m-9,\\n .col-m-10,\\n .col-m-11,\\n .col-m-12,\\n .col-m-offset-0,\\n .col-m-offset-1,\\n .col-m-offset-2,\\n .col-m-offset-3,\\n .col-m-offset-4,\\n .col-m-offset-5,\\n .col-m-offset-6,\\n .col-m-offset-7,\\n .col-m-offset-8,\\n .col-m-offset-9,\\n .col-m-offset-10,\\n .col-m-offset-11,\\n .col-m-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: $gutter * 0.5;\\n padding-left: $gutter * 0.5;\\n }\\n\\n .col-m {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n\\n .col-m-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n\\n .col-m-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n\\n .col-m-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n\\n .col-m-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n\\n .col-m-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n\\n .col-m-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n\\n .col-m-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n\\n .col-m-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n\\n .col-m-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n\\n .col-m-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n\\n .col-m-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n\\n .col-m-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n\\n .col-m-offset-0 {\\n margin-left: 0;\\n }\\n\\n .col-m-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n\\n .col-m-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n\\n .col-m-offset-3 {\\n margin-left: 25%;\\n }\\n\\n .col-m-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n\\n .col-m-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n\\n .col-m-offset-6 {\\n margin-left: 50%;\\n }\\n\\n .col-m-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n\\n .col-m-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n\\n .col-m-offset-9 {\\n margin-left: 75%;\\n }\\n\\n .col-m-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n\\n .col-m-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n\\n .start-m {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n\\n .center-m {\\n justify-content: center;\\n text-align: center;\\n }\\n\\n .end-m {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n\\n .top-m {\\n align-items: flex-start;\\n }\\n\\n .middle-m {\\n align-items: center;\\n }\\n\\n .bottom-m {\\n align-items: flex-end;\\n }\\n\\n .around-m {\\n justify-content: space-around;\\n }\\n\\n .between-m {\\n justify-content: space-between;\\n }\\n\\n .first-m {\\n order: -1;\\n }\\n\\n .last-m {\\n order: 1;\\n }\\n}\\n\\n@include mq(l) {\\n .col-l,\\n .col-l-1,\\n .col-l-2,\\n .col-l-3,\\n .col-l-4,\\n .col-l-5,\\n .col-l-6,\\n .col-l-7,\\n .col-l-8,\\n .col-l-9,\\n .col-l-10,\\n .col-l-11,\\n .col-l-12,\\n .col-l-offset-0,\\n .col-l-offset-1,\\n .col-l-offset-2,\\n .col-l-offset-3,\\n .col-l-offset-4,\\n .col-l-offset-5,\\n .col-l-offset-6,\\n .col-l-offset-7,\\n .col-l-offset-8,\\n .col-l-offset-9,\\n .col-l-offset-10,\\n .col-l-offset-11,\\n .col-l-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: $gutter * 0.5;\\n padding-left: $gutter * 0.5;\\n }\\n\\n .col-l {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n\\n .col-l-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n\\n .col-l-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n\\n .col-l-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n\\n .col-l-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n\\n .col-l-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n\\n .col-l-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n\\n .col-l-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n\\n .col-l-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n\\n .col-l-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n\\n .col-l-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n\\n .col-l-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n\\n .col-l-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n\\n .col-l-offset-0 {\\n margin-left: 0;\\n }\\n\\n .col-l-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n\\n .col-l-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n\\n .col-l-offset-3 {\\n margin-left: 25%;\\n }\\n\\n .col-l-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n\\n .col-l-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n\\n .col-l-offset-6 {\\n margin-left: 50%;\\n }\\n\\n .col-l-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n\\n .col-l-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n\\n .col-l-offset-9 {\\n margin-left: 75%;\\n }\\n\\n .col-l-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n\\n .col-l-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n\\n .start-l {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n\\n .center-l {\\n justify-content: center;\\n text-align: center;\\n }\\n\\n .end-l {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n\\n .top-l {\\n align-items: flex-start;\\n }\\n\\n .middle-l {\\n align-items: center;\\n }\\n\\n .bottom-l {\\n align-items: flex-end;\\n }\\n\\n .around-l {\\n justify-content: space-around;\\n }\\n\\n .between-l {\\n justify-content: space-between;\\n }\\n\\n .first-l {\\n order: -1;\\n }\\n\\n .last-l {\\n order: 1;\\n }\\n}\\n\\n@include mq(xl) {\\n .col-xl,\\n .col-xl-1,\\n .col-xl-2,\\n .col-xl-3,\\n .col-xl-4,\\n .col-xl-5,\\n .col-xl-6,\\n .col-xl-7,\\n .col-xl-8,\\n .col-xl-9,\\n .col-xl-10,\\n .col-xl-11,\\n .col-xl-12,\\n .col-xl-offset-0,\\n .col-xl-offset-1,\\n .col-xl-offset-2,\\n .col-xl-offset-3,\\n .col-xl-offset-4,\\n .col-xl-offset-5,\\n .col-xl-offset-6,\\n .col-xl-offset-7,\\n .col-xl-offset-8,\\n .col-xl-offset-9,\\n .col-xl-offset-10,\\n .col-xl-offset-11,\\n .col-xl-offset-12 {\\n box-sizing: border-box;\\n flex: 0 0 auto;\\n padding-right: $gutter * 0.5;\\n padding-left: $gutter * 0.5;\\n }\\n\\n .col-xl {\\n flex-grow: 1;\\n flex-basis: 0;\\n max-width: 100%;\\n }\\n\\n .col-xl-1 {\\n flex-basis: 8.33333333%;\\n max-width: 8.33333333%;\\n }\\n\\n .col-xl-2 {\\n flex-basis: 16.66666667%;\\n max-width: 16.66666667%;\\n }\\n\\n .col-xl-3 {\\n flex-basis: 25%;\\n max-width: 25%;\\n }\\n\\n .col-xl-4 {\\n flex-basis: 33.33333333%;\\n max-width: 33.33333333%;\\n }\\n\\n .col-xl-5 {\\n flex-basis: 41.66666667%;\\n max-width: 41.66666667%;\\n }\\n\\n .col-xl-6 {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n\\n .col-xl-7 {\\n flex-basis: 58.33333333%;\\n max-width: 58.33333333%;\\n }\\n\\n .col-xl-8 {\\n flex-basis: 66.66666667%;\\n max-width: 66.66666667%;\\n }\\n\\n .col-xl-9 {\\n flex-basis: 75%;\\n max-width: 75%;\\n }\\n\\n .col-xl-10 {\\n flex-basis: 83.33333333%;\\n max-width: 83.33333333%;\\n }\\n\\n .col-xl-11 {\\n flex-basis: 91.66666667%;\\n max-width: 91.66666667%;\\n }\\n\\n .col-xl-12 {\\n flex-basis: 100%;\\n max-width: 100%;\\n }\\n\\n .col-xl-offset-0 {\\n margin-left: 0;\\n }\\n\\n .col-xl-offset-1 {\\n margin-left: 8.33333333%;\\n }\\n\\n .col-xl-offset-2 {\\n margin-left: 16.66666667%;\\n }\\n\\n .col-xl-offset-3 {\\n margin-left: 25%;\\n }\\n\\n .col-xl-offset-4 {\\n margin-left: 33.33333333%;\\n }\\n\\n .col-xl-offset-5 {\\n margin-left: 41.66666667%;\\n }\\n\\n .col-xl-offset-6 {\\n margin-left: 50%;\\n }\\n\\n .col-xl-offset-7 {\\n margin-left: 58.33333333%;\\n }\\n\\n .col-xl-offset-8 {\\n margin-left: 66.66666667%;\\n }\\n\\n .col-xl-offset-9 {\\n margin-left: 75%;\\n }\\n\\n .col-xl-offset-10 {\\n margin-left: 83.33333333%;\\n }\\n\\n .col-xl-offset-11 {\\n margin-left: 91.66666667%;\\n }\\n\\n .start-xl {\\n justify-content: flex-start;\\n text-align: start;\\n }\\n\\n .center-xl {\\n justify-content: center;\\n text-align: center;\\n }\\n\\n .end-xl {\\n justify-content: flex-end;\\n text-align: end;\\n }\\n\\n .top-xl {\\n align-items: flex-start;\\n }\\n\\n .middle-xl {\\n align-items: center;\\n }\\n\\n .bottom-xl {\\n align-items: flex-end;\\n }\\n\\n .around-xl {\\n justify-content: space-around;\\n }\\n\\n .between-xl {\\n justify-content: space-between;\\n }\\n\\n .first-xl {\\n order: -1;\\n }\\n\\n .last-xl {\\n order: 1;\\n }\\n}\\n\",\"//\\n// Display\\n.inline {\\n display: inline;\\n}\\n.block {\\n display: block;\\n}\\n.inline-block {\\n display: inline-block;\\n}\\n\\n//\\n// Position\\n.relative {\\n position: relative;\\n}\\n\\n//\\n// Sizes\\n.width-1-percent {\\n width: 1%;\\n}\\n.width-100 {\\n width: 100%;\\n}\\n.min-width-100 {\\n min-width: 100%;\\n}\\n.width-auto {\\n width: auto;\\n}\\n.width-100vw {\\n width: 100vw;\\n}\\n.min-width-100vw {\\n min-width: 100vw;\\n}\\n.width-hairline {\\n width: 1px;\\n}\\n\\n.width-0-125 {\\n width: 0.125rem;\\n}\\n.width-0-25 {\\n width: 0.25rem;\\n}\\n.width-0-5 {\\n width: 0.5rem;\\n}\\n.width-0-75 {\\n width: 0.75rem;\\n}\\n.width-1 {\\n width: 1rem;\\n}\\n.width-1-25 {\\n width: 1.25rem;\\n}\\n.width-1-5 {\\n width: 1.5rem;\\n}\\n.width-2 {\\n width: 2rem;\\n}\\n.width-3 {\\n width: 3rem;\\n}\\n.width-4 {\\n width: 4rem;\\n}\\n.width-5 {\\n width: 5rem;\\n}\\n\\n.height-100 {\\n height: 100%;\\n}\\n.min-height-100 {\\n min-height: 100%;\\n}\\n.height-auto {\\n height: auto;\\n}\\n.height-100vh {\\n height: 100vh;\\n}\\n.min-height-100vh {\\n min-height: 100vh;\\n}\\n.height-hairline {\\n height: 1px;\\n}\\n\\n.height-0-125 {\\n height: 0.125rem;\\n}\\n.height-0-25 {\\n height: 0.25rem;\\n}\\n.height-0-5 {\\n height: 0.5rem;\\n}\\n.height-0-75 {\\n height: 0.75rem;\\n}\\n.height-1 {\\n height: 1rem;\\n}\\n.height-1-25 {\\n height: 1.25rem;\\n}\\n.height-1-5 {\\n height: 1.5rem;\\n}\\n.height-2 {\\n height: 2rem;\\n}\\n.height-3 {\\n height: 3rem;\\n}\\n.height-4 {\\n height: 4rem;\\n}\\n.height-5 {\\n height: 5rem;\\n}\\n\\n.display-none {\\n display: none;\\n}\\n\\n.top-1 {\\n position: relative;\\n top: -1px;\\n}\\n\\n@include mq(s, max) {\\n .unflex-s > * + * {\\n margin-top: 1rem;\\n }\\n}\\n\\n@include mq(m, max) {\\n .unflex-m > * + * {\\n margin-top: 1rem;\\n }\\n}\\n\\n@include mq(l, max) {\\n .unflex-l > * + * {\\n margin-top: 1rem;\\n }\\n}\\n\\n@include mq(l) {\\n .hide-l {\\n display: none;\\n }\\n}\\n@include mq(l, max) {\\n .hide-l-max {\\n display: none;\\n }\\n}\\n\\n.overflow-hidden {\\n overflow: hidden;\\n}\\n\",\"//\\n// Automatical margins between child elements\\n// (aligned to a 1rem baseline grid)\\n\\n.child-margins-x-0-125 > * + * {\\n margin-left: 0.125rem;\\n}\\n.child-margins-x-0-25 > * + * {\\n margin-left: 0.25rem;\\n}\\n.child-margins-x-0-5 > * + * {\\n margin-left: 0.5rem;\\n}\\n.child-margins-x-0-75 > * + * {\\n margin-left: 0.75rem;\\n}\\n.child-margins-x-1 > * + * {\\n margin-left: 1rem;\\n}\\n.child-margins-x-1-25 > * + * {\\n margin-left: 1.25rem;\\n}\\n.child-margins-x-1-5 > * + * {\\n margin-left: 1.5rem;\\n}\\n.child-margins-x-2 > * + * {\\n margin-left: 2rem;\\n}\\n.child-margins-x-3 > * + * {\\n margin-left: 3rem;\\n}\\n.child-margins-x-4 > * + * {\\n margin-left: 4rem;\\n}\\n.child-margins-x-5 > * + * {\\n margin-left: 5rem;\\n}\\n\\n.child-margins-y-0-125 > * + * {\\n margin-top: 0.125rem;\\n}\\n.child-margins-y-0-25 > * + * {\\n margin-top: 0.25rem;\\n}\\n.child-margins-y-0-5 > * + * {\\n margin-top: 0.5rem;\\n}\\n.child-margins-y-0-75 > * + * {\\n margin-top: 0.75rem;\\n}\\n.child-margins-y-1 > * + * {\\n margin-top: 1rem;\\n}\\n.child-margins-y-1-25 > * + * {\\n margin-top: 1.25rem;\\n}\\n.child-margins-y-1-5 > * + * {\\n margin-top: 1.5rem;\\n}\\n.child-margins-y-2 > * + * {\\n margin-top: 2rem;\\n}\\n.child-margins-y-3 > * + * {\\n margin-top: 3rem;\\n}\\n.child-margins-y-4 > * + * {\\n margin-top: 4rem;\\n}\\n.child-margins-y-5 > * + * {\\n margin-top: 5rem;\\n}\\n\\n.child-margins-x-hairline > * + * {\\n margin-left: 1px;\\n}\\n.child-margins-y-hairline > * + * {\\n margin-top: 1px;\\n}\\n\\n//\\n//Paddings\\n\\n.padding-hairline {\\n padding: 1px;\\n}\\n\\n.padding-0-125 {\\n padding: 0.125rem;\\n}\\n.padding-0-25 {\\n padding: 0.25rem;\\n}\\n.padding-0-5 {\\n padding: 0.5rem;\\n}\\n.padding-0-75 {\\n padding: 0.75rem;\\n}\\n.padding-1 {\\n padding: 1rem;\\n}\\n.padding-1-25 {\\n padding: 1.25rem;\\n}\\n.padding-1-5 {\\n padding: 1.5rem;\\n}\\n.padding-2 {\\n padding: 2rem;\\n}\\n.padding-3 {\\n padding: 3rem;\\n}\\n.padding-4 {\\n padding: 4rem;\\n}\\n.padding-5 {\\n padding: 5rem;\\n}\\n\\n.padding-top {\\n padding-right: 0;\\n padding-bottom: 0;\\n padding-left: 0;\\n}\\n.padding-right {\\n padding-top: 0;\\n padding-bottom: 0;\\n padding-left: 0;\\n}\\n.padding-bottom {\\n padding-top: 0;\\n padding-right: 0;\\n padding-left: 0;\\n}\\n.padding-left {\\n padding-top: 0;\\n padding-right: 0;\\n padding-bottom: 0;\\n}\\n\\n.padding-x {\\n padding-top: 0;\\n padding-bottom: 0;\\n}\\n.padding-y {\\n padding-left: 0;\\n padding-right: 0;\\n}\\n\\n.padding-top-0 {\\n padding-top: 0;\\n}\\n.padding-right-0 {\\n padding-right: 0;\\n}\\n.padding-bottom-0 {\\n padding-bottom: 0;\\n}\\n.padding-left-0 {\\n padding-left: 0;\\n}\\n\\n//\\n// Margins\\n\\n.margin-auto {\\n margin: auto;\\n}\\n.margin-auto-x {\\n margin-left: auto;\\n margin-right: auto;\\n}\\n.margin-auto-y {\\n margin-top: auto;\\n margin-bottom: auto;\\n}\\n\\n.margin-hairline {\\n margin: 1px;\\n}\\n\\n.margin-0-125 {\\n margin: 0.125rem;\\n}\\n.margin-0-25 {\\n margin: 0.25rem;\\n}\\n.margin-0-5 {\\n margin: 0.5rem;\\n}\\n.margin-0-75 {\\n margin: 0.75rem;\\n}\\n.margin-1 {\\n margin: 1rem;\\n}\\n.margin-1-25 {\\n margin: 1.25rem;\\n}\\n.margin-1-5 {\\n margin: 1.5rem;\\n}\\n.margin-2 {\\n margin: 2rem;\\n}\\n.margin-3 {\\n margin: 3rem;\\n}\\n.margin-4 {\\n margin: 4rem;\\n}\\n.margin-5 {\\n margin: 5rem;\\n}\\n\\n.negative-margin-0-125 {\\n margin: -0.125rem;\\n}\\n.negative-margin-0-25 {\\n margin: -0.25rem;\\n}\\n.negative-margin-0-5 {\\n margin: -0.5rem;\\n}\\n.negative-margin-0-75 {\\n margin: -0.75rem;\\n}\\n.negative-margin-1 {\\n margin: -1rem;\\n}\\n.negative-margin-1-25 {\\n margin: -1.25rem;\\n}\\n.negative-margin-1-5 {\\n margin: -1.5rem;\\n}\\n.negative-margin-2 {\\n margin: -2rem;\\n}\\n.negative-margin-3 {\\n margin: -3rem;\\n}\\n.negative-margin-4 {\\n margin: -4rem;\\n}\\n.negative-margin-5 {\\n margin: -5rem;\\n}\\n\\n.margin-top {\\n margin-right: 0;\\n margin-bottom: 0;\\n margin-left: 0;\\n}\\n.margin-right {\\n margin-top: 0;\\n margin-bottom: 0;\\n margin-left: 0;\\n}\\n.margin-bottom {\\n margin-top: 0;\\n margin-right: 0;\\n margin-left: 0;\\n}\\n.margin-left {\\n margin-top: 0;\\n margin-right: 0;\\n margin-bottom: 0;\\n}\\n\\n.margin-x {\\n margin-top: 0;\\n margin-bottom: 0;\\n}\\n.margin-y {\\n margin-left: 0;\\n margin-right: 0;\\n}\\n\\n.margin-top-0 {\\n margin-top: 0;\\n}\\n.margin-top-0-5 {\\n margin-top: 0.5rem;\\n}\\n.margin-right-0 {\\n margin-right: 0;\\n}\\n.margin-bottom-0 {\\n margin-bottom: 0;\\n}\\n.margin-left-0 {\\n margin-left: 0;\\n}\\n\",\"//\\n// Sizes\\n.size-small {\\n @include type-setting(0-75);\\n}\\n\\n.size-normal {\\n @include type-setting(1);\\n}\\n\\n.size-medium {\\n @include type-setting(1-25);\\n}\\n\\n.size-large {\\n @include type-setting(1-5);\\n}\\n\\n.size-huge {\\n @include type-setting(2-25);\\n}\\n\\n//\\n// Line-height overwrites\\n.line-0-75 {\\n line-height: 0.75rem;\\n}\\n.line-1 {\\n line-height: 1rem;\\n}\\n.line-1-25 {\\n line-height: 1.25rem;\\n}\\n.line-1-5 {\\n line-height: 1.5rem;\\n}\\n.line-1-75 {\\n line-height: 1.75rem;\\n}\\n\\n//\\n// Families\\n.compact {\\n font-family: $albert-sans;\\n}\\n.stencil {\\n font-family: $albert-sans-black;\\n font-weight: 700;\\n}\\n\\n//\\n// Weights\\n.weight-400,\\n.normal {\\n font-weight: 400;\\n}\\n\\n.weight-500,\\n.semibold {\\n font-weight: 500;\\n font-stretch: 95%;\\n}\\n.weight-600,\\n.semibold {\\n font-weight: 600;\\n}\\n\\n.weight-700,\\n.bold,\\nstrong,\\nb {\\n font-weight: 700;\\n}\\n\\n//\\n// Alignment\\n.text-align-left {\\n text-align: left;\\n}\\n.text-align-center {\\n text-align: center;\\n}\\n.text-align-right {\\n text-align: right;\\n}\\n\\n//\\n// Styles\\n.uppercase {\\n text-transform: uppercase;\\n}\\n.italic {\\n font-style: italic;\\n}\\n.underlined {\\n text-decoration: underline;\\n}\\n\\n//\\n// Adjustment\\n.nowrap {\\n white-space: nowrap;\\n}\\n.ellipsis {\\n text-overflow: ellipsis;\\n}\\n.overflow-x-hidden {\\n overflow-x: hidden;\\n}\\n\",\".animation-fade-top {\\n animation: fadeTop 0.3s ease-out backwards;\\n}\\n\\n@keyframes fadeTop {\\n from {\\n transform: translateY(-1rem);\\n opacity: 0;\\n }\\n to {\\n transform: translate(0);\\n opacity: 1;\\n }\\n}\\n\",\".arrow-link {\\n position: relative;\\n padding-right: calc(1.5rem + 0.5rem);\\n\\n color: color(blue, dark);\\n\\n text-decoration: none;\\n\\n &:before,\\n &:after {\\n transition:\\n right $animation-short-time $animation-easing,\\n left $animation-short-time $animation-easing;\\n }\\n &::before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n height: 2px;\\n right: 0;\\n top: 50%;\\n transform: translateY(-50%);\\n\\n width: 1.5rem;\\n\\n background-color: color(blue);\\n }\\n\\n &::after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n\\n top: 50%;\\n transform: translateY(-50%) rotate(135deg);\\n right: 0;\\n\\n width: 0.25rem;\\n height: 0.25rem;\\n\\n border-top: 2px solid color(blue);\\n border-left: 2px solid color(blue);\\n }\\n &:hover {\\n &:after,\\n &:before {\\n right: -0.25rem;\\n }\\n }\\n &--reverse {\\n padding-right: 0;\\n padding-left: calc(1.5rem + 0.5rem);\\n &::before {\\n right: auto;\\n left: 0;\\n }\\n &::after {\\n transform: translateY(-50%) rotate(-45deg);\\n right: auto;\\n left: 0;\\n }\\n &:hover {\\n &:after,\\n &:before {\\n right: auto;\\n left: -0.25rem;\\n }\\n }\\n }\\n}\\n\",\".bottom-section {\\n position: relative;\\n padding: 2.75rem 0 2rem;\\n\\n &:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n\\n bottom: 0;\\n left: 0;\\n right: 0;\\n height: 50%;\\n\\n background-color: color(blue, lighter);\\n z-index: -1;\\n }\\n &:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 100%;\\n transform: skewY(-4deg);\\n\\n background-color: color(blue, lighter);\\n z-index: -1;\\n }\\n}\\n\",\".bullet-point {\\n display: flex;\\n}\\n.bullet-point__number {\\n flex-shrink: 0;\\n width: 1.25rem;\\n height: 1.25rem;\\n margin-right: 0.25rem;\\n border-radius: 50%;\\n text-align: center;\\n @include type-setting(1);\\n\\n line-height: 1.25rem;\\n font-weight: 700;\\n color: color(blue, dark);\\n background-color: color(blue, lighter);\\n}\\n.bullet-point__bullet {\\n flex-shrink: 0;\\n width: 0.25rem;\\n height: 0.25rem;\\n align-self: flex-start;\\n margin-right: 0.25rem;\\n margin-top: 0.5rem;\\n border-radius: 50%;\\n background-color: color(purple);\\n}\\n.bullet-point__text {\\n flex-grow: 1;\\n margin-top: 0.125rem;\\n\\n @include type-setting(1);\\n}\\n\",\".button {\\n display: inline-block;\\n height: 2rem;\\n padding: 0 1rem;\\n\\n width: auto;\\n min-width: 7rem;\\n\\n border: none;\\n border-radius: 10rem;\\n\\n color: color(\\\"white\\\");\\n white-space: nowrap;\\n font-weight: 600;\\n letter-spacing: 0.005rem;\\n line-height: 2rem;\\n text-decoration: none;\\n text-align: center;\\n\\n background-color: color(blue);\\n transition:\\n background-color $animation-short-time $animation-easing,\\n box-shadow $animation-short-time $animation-easing;\\n &:hover {\\n background-color: color(blue, light);\\n }\\n &:disabled,\\n &--disabled {\\n opacity: 1;\\n color: color(gray, light);\\n\\n background-color: color(gray, lightest);\\n &:hover {\\n box-shadow: none;\\n\\n background-color: color(gray, lightest);\\n }\\n }\\n &:focus {\\n outline: none;\\n\\n box-shadow: 0 0 0 3px color(blue, dark);\\n }\\n\\n &.ball,\\n &--ball {\\n height: 2rem;\\n width: 2rem !important;\\n }\\n\\n &.small,\\n &--small {\\n height: 1.5rem;\\n padding: 0 0.75rem;\\n\\n @include type-setting(0-75);\\n line-height: 1.5rem;\\n }\\n &--large {\\n height: 2.5rem;\\n min-width: 10rem;\\n\\n @include type-setting(1-25);\\n line-height: 2.5rem;\\n }\\n &--icon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n }\\n &--suffix {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.25rem;\\n border-bottom-right-radius: 0.25rem;\\n }\\n}\\n\\n.button--tab {\\n font-weight: 500;\\n color: color(white);\\n text-decoration: none;\\n text-align: center;\\n width: auto;\\n min-width: 4rem;\\n line-height: 2rem;\\n background-color: color(blue, light);\\n border-top-left-radius: 0.25rem;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.25rem;\\n border-bottom-right-radius: 0;\\n border: 1px solid color(blue, lightest);\\n &:hover {\\n background-color: color(blue, dark);\\n }\\n}\\n\\n.button--tab_active {\\n background-color: color(blue, dark);\\n}\\n\\n.button--green {\\n background-color: color(green);\\n &:hover {\\n background-color: lighten(color(green), 5%);\\n }\\n}\\n\\n.button--white {\\n background-color: color(\\\"white\\\");\\n\\n color: color(purple);\\n transition:\\n opacity $animation-short-time $animation-easing,\\n box-shadow $animation-short-time $animation-easing;\\n &:hover {\\n opacity: 0.8;\\n background-color: color(\\\"white\\\");\\n }\\n}\\n\\n.button--white_outlined {\\n color: color(orange);\\n box-shadow:\\n 0px 2px 4px rgba(50, 32, 83, 0.07),\\n 0px 4px 24px rgba(97, 148, 205, 0.13);\\n}\\n\\n.button--red {\\n background-color: color(red);\\n &:hover {\\n background-color: lighten(color(red), 5%);\\n }\\n}\\n\\n.button--orange {\\n background-color: color(orange);\\n &:hover {\\n background-color: lighten(color(orange), 5%);\\n }\\n}\\n\\n.button--grey {\\n background-color: #888888;\\n &:hover {\\n background-color: lighten(#888888, 5%);\\n }\\n}\\n\\n.button--block {\\n display: flex;\\n justify-content: center;\\n width: 100%;\\n}\\n\\n.button--suffix {\\n min-width: 0;\\n\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\",\".card {\\n position: relative;\\n\\n border-radius: 0.5rem;\\n box-shadow:\\n 0 0.25rem 0.75rem color(blue, lighter),\\n 0 1px 1px 1px color(blue, lighter);\\n\\n background-color: color(\\\"white\\\");\\n\\n &--purple {\\n background-color: color(purple);\\n color: color(\\\"white\\\");\\n }\\n\\n &--yellow {\\n background-color: color(yellow);\\n box-shadow: 0 0 0 0;\\n }\\n\\n &--noshadow {\\n box-shadow: 0 0 0 0;\\n }\\n}\",\".category-score {\\n display: flex;\\n\\n &__heading {\\n font-weight: 500;\\n }\\n\\n &__first-column {\\n flex-grow: 1;\\n padding-right: 2rem;\\n }\\n\\n &__bar-with-labels {\\n display: flex;\\n align-items: center;\\n width: 100%;\\n margin: 0.4rem 0;\\n }\\n\\n &__bar {\\n position: relative;\\n width: 100%;\\n height: 1rem;\\n background: linear-gradient(90deg, #d9d562, #64be78);\\n border-radius: 256px;\\n margin: 0 0.5rem;\\n }\\n\\n &__indicator {\\n position: absolute;\\n width: 4px;\\n height: calc(100% + 0.4rem);\\n top: -0.2rem;\\n left: 0;\\n transform: translateX(-50%);\\n background: #707070;\\n }\\n\\n &__score-value {\\n font-size: 3em;\\n margin-top: 0.5rem;\\n margin-left: -0.1rem;\\n }\\n}\\n\",\"// Border\\n$checkbox-border-width: 2px;\\n$checkbox-radius: 0.125rem;\\n\\n// Base state\\n$checkbox-border-base: color(gray);\\n$checkbox-color-base: color(gray, dark);\\n$checkbox-bg-base: color(\\\"white\\\");\\n\\n// Focus state\\n$checkbox-border-focus: color(blue);\\n$checkbox-color-focus: color(blue);\\n$checkbox-bg-focus: color(\\\"white\\\");\\n\\n// Checked state\\n$checkbox-color-checked: color(blue);\\n$checkbox-bg-checked: color(blue);\\n\\n// Disabled state\\n$checkbox-border-disabled: color(gray);\\n$checkbox-color-disabled: color(gray);\\n$checkbox-bg-disabled: color(gray);\\n\\n// Animation\\n$checkbox-duration: 50ms;\\n$checkbox-easing: $animation-easing;\\n\\n.checkbox {\\n position: relative;\\n input {\\n // Hide the actual input\\n position: absolute;\\n left: 0;\\n margin: 0;\\n width: 0;\\n height: 0;\\n\\n opacity: 0;\\n overflow: hidden;\\n\\n pointer-events: none;\\n z-index: -1;\\n }\\n\\n &--no-top &__inner::before,\\n &--no-top &__inner::after {\\n top: 0;\\n }\\n label,\\n .checkbox__inner {\\n position: relative;\\n display: block;\\n overflow: hidden;\\n min-width: 1.2em;\\n min-height: 1.2em;\\n padding-left: 1.2em + 0.375em;\\n\\n color: $checkbox-color-base;\\n\\n cursor: pointer;\\n &:before {\\n // Pseudo replacement input\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n box-sizing: border-box;\\n\\n border-radius: $checkbox-radius;\\n border-width: $checkbox-border-width;\\n border-style: solid;\\n border-color: $checkbox-border-base;\\n\\n background-color: $checkbox-bg-base;\\n\\n transition:\\n border-color $checkbox-duration $checkbox-easing\\n ($checkbox-duration * 2),\\n border-width $checkbox-duration $checkbox-easing $checkbox-duration,\\n background-color $checkbox-duration $checkbox-easing 0s;\\n }\\n &:after {\\n // Tick icon\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n opacity: 0;\\n\\n text-align: center;\\n color: #fff;\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTkgMTljLS41IDAtMS0uMi0xLjQtLjZsLTUtNWMtLjgtLjgtLjgtMiAwLTIuOC44LS44IDItLjggMi44IDBMOSAxNC4ybDkuNi05LjZjLjgtLjggMi0uOCAyLjggMCAuOC44LjggMiAwIDIuOGwtMTEgMTFjLS40LjQtLjkuNi0xLjQuNnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=\\\");\\n background-size: 0.8em;\\n background-repeat: no-repeat;\\n background-position: center;\\n\\n transform: scale(0);\\n transition: transform $checkbox-duration $checkbox-easing\\n $checkbox-duration;\\n }\\n }\\n //\\n // Focus state\\n input:focus + label {\\n color: $checkbox-color-focus;\\n &:before {\\n background-color: $checkbox-bg-focus;\\n border-color: $checkbox-border-focus;\\n }\\n }\\n //\\n // Checked state\\n input:checked + label,\\n &--checked > .checkbox__inner {\\n font-weight: 500;\\n color: $checkbox-color-checked;\\n &:before {\\n border-width: 0.5em;\\n border-color: $checkbox-bg-checked;\\n\\n background-color: $checkbox-bg-checked;\\n transition:\\n border-width $checkbox-duration $checkbox-easing 0s,\\n background-color $checkbox-duration $checkbox-easing $checkbox-duration;\\n }\\n &:after {\\n opacity: 1;\\n transform: scale(1);\\n }\\n }\\n //\\n // Disabled state\\n input:disabled + label {\\n color: $checkbox-color-disabled;\\n &:before {\\n border-color: $checkbox-border-disabled;\\n\\n background-color: $checkbox-bg-disabled;\\n }\\n }\\n\\n &--no-top &__inner::before,\\n &--no-top &__inner::after {\\n top: 0;\\n }\\n\\n &--transparent &__inner::before {\\n background: transparent;\\n }\\n\\n &--checked &__inner::before {\\n background-color: $checkbox-bg-checked;\\n }\\n}\\n\",\".circle-image {\\n width: 4rem;\\n height: 4rem;\\n\\n border-radius: 10rem;\\n\\n background-size: cover;\\n background-repeat: no-repeat;\\n background-position: center center;\\n}\\n\",\".code {\\n font-family: Consolas, \\\"Andale Mono WT\\\", \\\"Andale Mono\\\", \\\"Lucida Console\\\",\\n \\\"Lucida Sans Typewriter\\\", \\\"DejaVu Sans Mono\\\", \\\"Bitstream Vera Sans Mono\\\",\\n \\\"Liberation Mono\\\", \\\"Nimbus Mono L\\\", Monaco, \\\"Courier New\\\", Courier,\\n monospace;\\n letter-spacing: 0.1em;\\n color: color(purple);\\n}\\n\",\".digit-inputs {\\n display: flex;\\n justify-content: center;\\n\\n > * + * {\\n margin-left: 0.25rem;\\n }\\n}\\n.digit-inputs__item[type=\\\"tel\\\"] {\\n width: 2rem;\\n height: 2rem;\\n\\n border-radius: 20rem;\\n border: 2px solid color(blue, lighter);\\n\\n font-size: 20px;\\n text-align: center;\\n font-weight: 500;\\n\\n background-color: color(blue, lightest);\\n -webkit-appearance: none;\\n &:focus {\\n outline: none;\\n\\n border-color: color(blue);\\n box-shadow:\\n 0 0.25rem 1rem -0.25rem rgba(color(blue), 0.4) inset,\\n 0 0 0 1px color(blue) inset;\\n }\\n}\\n\",\".error-message {\\n text-align: center;\\n svg {\\n display: block;\\n margin: 0 auto;\\n width: 3rem;\\n height: 3rem;\\n\\n stroke: color(red);\\n }\\n}\\n\\n.error-message__text {\\n margin-top: 1rem;\\n margin-bottom: 1rem;\\n\\n @include type-setting(1-25);\\n color: color(red);\\n}\\n\",\".header {\\n position: relative;\\n padding: 3rem 0 1rem;\\n margin-bottom: 1rem;\\n\\n &:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 50%;\\n\\n background-color: color(blue, lighter);\\n z-index: -1;\\n }\\n &:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n\\n top: 0;\\n left: 0;\\n right: 0;\\n height: 100%;\\n transform: skewY(-4deg);\\n\\n background-color: color(blue, lighter);\\n z-index: -1;\\n }\\n &--purple {\\n &:before {\\n background-color: color(purple);\\n }\\n &:after {\\n background-color: color(purple);\\n }\\n }\\n}\\n\",\".icon-badge {\\n padding: 0.75rem;\\n width: 3rem;\\n height: 3rem;\\n\\n border-radius: 10rem;\\n svg {\\n width: 100%;\\n height: 100%;\\n stroke: color(\\\"white\\\");\\n }\\n .icon-badge-title & {\\n display: inline-block;\\n width: 1.25rem;\\n height: 1.25rem;\\n line-height: 1.25rem - 0.25rem * 2;\\n padding: 0.25rem;\\n\\n margin-right: 0.25rem;\\n svg {\\n }\\n }\\n}\\n\\n.icon-badge-title {\\n display: block;\\n}\\n\",\".inline-icon-text {\\n display: flex;\\n align-items: flex-start;\\n justify-content: flex-end;\\n @include mq(m, max) {\\n justify-content: center;\\n }\\n}\\n.inline-icon-text--start {\\n justify-content: flex-start;\\n @include mq(m, max) {\\n justify-content: flex-start;\\n }\\n}\\n.inline-icon-text__icon {\\n width: 1rem;\\n height: 1rem;\\n flex-shrink: 0;\\n}\\n.inline-icon-text__text {\\n margin-left: 0.25rem;\\n}\\n\",\"// Float label css based on https://github.com/tonystar/float-label-css\\n\\n// Sizing\\n$fl-spacingX: 0.5rem;\\n$fl-spacingY: 0.5rem;\\n$fl-spaceBetween: 6px;\\n\\n// Border\\n$fl-borderRadius: 0.25rem;\\n$fl-borderWidth: 2px;\\n$fl-borderColor: color(blue, lighter);\\n$fl-boxShadow: none;\\n\\n// Typography\\n$fl-fontSize: 16px;\\n$fl-fontWeight: 400;\\n$fl-color: color(gray, dark);\\n$fl-labelFontSize: 13px;\\n$fl-labelFontWeight: 500;\\n$fl-labelColorDown: color(gray);\\n$fl-labelColorUp: color(blue);\\n$fl-placeholderColor: color(gray);\\n\\n// Background\\n$fl-background: color(blue, lightest);\\n$fl-background-white: color(\\\"white\\\");\\n\\n// Focus\\n$fl-borderColorFocus: color(blue);\\n$fl-labelColorFocus: color(blue);\\n$fl-outline: none;\\n$fl-boxShadowFocus:\\n none,\\n 0 0 0 1px color(blue) inset;\\n$fl-backgroundFocus: color(blue, lightest);\\n\\n// Animation\\n$fl-animationTime: 100ms;\\n$fl-animationEasing: linear;\\n\\n.input {\\n display: block;\\n position: relative;\\n label {\\n font-weight: 500;\\n @include type-setting(1-25);\\n\\n cursor: pointer;\\n + input {\\n margin-top: 0.25rem;\\n }\\n }\\n\\n .select-chevron-down:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n width: 0.25rem;\\n height: 0.25rem;\\n right: 1rem;\\n top: 65%;\\n margin-top: -0.125rem;\\n border-right: 2px solid color(gray, dark);\\n border-bottom: 2px solid color(gray, dark);\\n -webkit-transform: rotate(45deg);\\n transform: rotate(45deg);\\n -webkit-transform-origin: top;\\n transform-origin: top;\\n pointer-events: none;\\n transition: border-color 100ms cubic-bezier(0.236, 0, 0.236, 1);\\n }\\n\\n input,\\n textarea,\\n select {\\n width: 100%;\\n\\n padding-top: $fl-spacingY;\\n padding-bottom: $fl-spacingY;\\n padding-left: $fl-spacingX;\\n padding-right: $fl-spacingX;\\n\\n border-radius: $fl-borderRadius;\\n border-width: $fl-borderWidth;\\n border-style: solid;\\n border-color: $fl-borderColor;\\n box-shadow: $fl-boxShadow;\\n\\n font-size: $fl-fontSize;\\n font-weight: $fl-fontWeight;\\n color: $fl-color;\\n line-height: 1;\\n\\n background: $fl-background;\\n box-sizing: border-box;\\n -webkit-appearance: none;\\n &::placeholder {\\n opacity: 1;\\n color: $fl-placeholderColor;\\n transition-duration: $fl-animationTime;\\n transition-easing: $fl-animationEasing;\\n transition-property: opacity;\\n }\\n\\n &.editing-border {\\n border-color: color(yellow);\\n border-width: $fl-borderWidth;\\n \\n &:focus {\\n border-color: color(yellow);\\n border-width: $fl-borderWidth;\\n }\\n }\\n\\n // Focus styles\\n &:focus {\\n border-color: $fl-borderColorFocus;\\n outline: $fl-outline;\\n box-shadow: $fl-boxShadowFocus;\\n background: $fl-backgroundFocus;\\n }\\n &:not(select):read-only,\\n &:disabled {\\n color: $fl-placeholderColor;\\n border-color: color(gray, lightest);\\n background-color: color(gray, lightest);\\n\\n cursor: not-allowed;\\n }\\n &.has-suffix {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: none;\\n }\\n }\\n &--white {\\n input {\\n background-color: $fl-background-white;\\n &:focus {\\n background-color: $fl-background-white;\\n }\\n }\\n }\\n &--has-suffix {\\n display: flex;\\n flex-direction: column;\\n flex-grow: 1;\\n input {\\n height: 100%;\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n\\n border-right: none;\\n }\\n }\\n &--has-clear {\\n input {\\n padding-right: 1rem + $fl-spacingX + $fl-spacingX;\\n }\\n }\\n &--has-icon {\\n input {\\n padding-left: 1rem + $fl-spacingX + $fl-spacingX;\\n }\\n }\\n}\\n\\n.input__clear {\\n position: absolute;\\n top: 50%;\\n right: $fl-spacingX;\\n width: 1rem;\\n height: 1rem;\\n\\n color: transparent;\\n\\n transform: translateY(-50%);\\n\\n &:before,\\n &:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n margin-top: -2px;\\n width: 100%;\\n height: 3px;\\n\\n border-radius: 10px;\\n\\n background-color: color(gray);\\n }\\n &:after {\\n transform: rotate(45deg);\\n }\\n &:before {\\n transform: rotate(-45deg);\\n }\\n &:hover {\\n &:before,\\n &:after {\\n background-color: color(red);\\n }\\n }\\n}\\n\\n.input__icon {\\n position: absolute;\\n left: $fl-spacingX;\\n top: 50%;\\n transform: translateY(-50%);\\n width: 1rem;\\n height: 1rem;\\n\\n opacity: 0.3;\\n\\n pointer-events: none;\\n}\\n\\n.field_with_errors {\\n input,\\n textarea {\\n border-color: color(red);\\n }\\n}\\n\",\".input-button {\\n @include mq(s) {\\n display: flex;\\n }\\n}\\n.input-button__left {\\n flex-grow: 1;\\n @include mq(s, max) {\\n margin-bottom: 1rem;\\n }\\n @include mq(s) {\\n margin-right: 0.5rem;\\n }\\n}\\n.input-button__right {\\n flex-shrink: 0;\\n @include mq(s, max) {\\n width: 100%;\\n }\\n}\\n\",\".linechart-container {\\n position: relative; /* If you want text inside of it */\\n width: 100%;\\n padding-top: 40%;\\n @include mq(m, max) {\\n padding-top: 56.25%;\\n }\\n\\n &--small {\\n width: 20rem;\\n height: 5rem;\\n padding-top: 0;\\n }\\n}\\n.linechart-container__inner {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n}\\n\",\".link {\\n padding: 0;\\n\\n border: none;\\n border-radius: 0;\\n\\n text-decoration: underline;\\n color: color(blue, dark);\\n &:hover {\\n color: color(blue);\\n }\\n &:focus {\\n outline: none;\\n\\n color: color(blue);\\n text-decoration: underline;\\n }\\n &--blue-light {\\n color: color(blue, light);\\n &:hover {\\n color: color(blue, lighter);\\n }\\n }\\n &--white {\\n color: color(\\\"white\\\");\\n &:hover {\\n color: color(blue, lighter);\\n }\\n }\\n &--red {\\n color: color(red);\\n &:hover {\\n color: lighten(color(red), 15%);\\n }\\n }\\n}\\n\",\".loading-spinner {\\n text-align: center;\\n}\\n.loading-spinner__logo {\\n display: block;\\n margin: 0 auto;\\n width: 3rem;\\n height: 3rem;\\n\\n animation-name: spin;\\n animation-duration: 3000ms;\\n animation-iteration-count: infinite;\\n animation-timing-function: linear;\\n\\n &--small {\\n width: 1.5rem;\\n height: 1.5rem;\\n }\\n}\\n\\n@keyframes spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.loading-spinner__text {\\n margin-top: 1rem;\\n\\n @include type-setting(1-25);\\n color: color(gray);\\n}\\n\",\".logo {\\n svg {\\n width: auto;\\n height: 2rem;\\n }\\n &--small {\\n svg {\\n height: 1rem;\\n }\\n }\\n}\\n\",\".markdown-content {\\n > * + * {\\n margin-top: 0.75rem;\\n }\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n font-weight: 500;\\n }\\n}\\n\",\".microbiome-pie-chart {\\n &__pie {\\n height: 10rem;\\n }\\n\\n &__legend {\\n display: flex;\\n margin-bottom: 0.3rem;\\n\\n &-color {\\n width: 0.7rem;\\n height: 0.7rem;\\n border-radius: 50%;\\n margin-top: 0.15rem;\\n margin-right: 0.5rem;\\n }\\n\\n &-text {\\n flex-grow: 1;\\n display: flex;\\n justify-content: space-between;\\n }\\n\\n &-value {\\n margin-left: 3rem;\\n font-weight: 500;\\n }\\n }\\n\\n &__legends-container {\\n display: flex;\\n justify-content: center;\\n }\\n}\\n\",\".microbiome-suggestion-section {\\n & > p {\\n margin: 1rem 0;\\n }\\n\\n & > ul {\\n margin: 1rem 0;\\n\\n & > li {\\n margin: 0.25rem 0 0 1.5rem;\\n }\\n }\\n}\\n\",\".number-input {\\n margin-top: auto;\\n position: relative;\\n max-width: 7rem;\\n}\\n.number-input__label {\\n display: block;\\n margin-bottom: 0.25rem;\\n\\n color: color(gray, darkest);\\n @include type-setting(1-25);\\n font-weight: 500;\\n}\\n.number-input__field[type=\\\"text\\\"] {\\n display: inline-block;\\n padding: 0.5rem 0.5rem;\\n height: 2.5rem;\\n width: 100%;\\n min-width: 0;\\n\\n border: 2px solid color(blue, lighter);\\n border-radius: 0.25rem;\\n\\n font-size: 22px;\\n line-height: 1rem;\\n\\n background-color: color(blue, lightest);\\n\\n transition:\\n border-color $animation-short-time $animation-easing,\\n background-color $animation-short-time $animation-easing,\\n padding-left $animation-short-time $animation-easing,\\n padding-right $animation-short-time $animation-easing;\\n -webkit-appearance: none;\\n .number-input--active & {\\n padding-left: 1.5rem;\\n padding-right: 1.5rem;\\n }\\n &:focus {\\n outline: none;\\n border-color: color(blue);\\n }\\n &:hover {\\n border-color: color(blue);\\n }\\n}\\n.react-numeric-input {\\n display: block;\\n position: relative;\\n}\\n.react-numeric-input b {\\n display: block;\\n position: absolute;\\n right: 0rem;\\n top: 50%;\\n width: 1.5rem;\\n height: 2rem;\\n margin-top: -1rem;\\n opacity: 0;\\n\\n cursor: pointer;\\n\\n transform: scale(0);\\n transition: transform $animation-time $animation-easing;\\n\\n .number-input--active & {\\n opacity: 1;\\n transform: scale(1);\\n }\\n &:last-child {\\n left: 0rem;\\n right: auto;\\n }\\n &:hover i {\\n background-color: color(blue, light);\\n }\\n i {\\n display: block;\\n position: absolute;\\n top: 50%;\\n left: 50%;\\n height: 3px;\\n width: 0.625rem;\\n margin-left: -0.3125rem;\\n margin-top: -1.5px;\\n\\n border-radius: 3px;\\n\\n background-color: color(blue);\\n &:nth-child(2) {\\n transform: rotate(90deg);\\n }\\n }\\n}\\n\",\".note {\\n padding: 0.5rem;\\n\\n border-radius: 0.25rem;\\n border: 2px dashed color(\\\"yellow\\\");\\n\\n color: darken(color(\\\"yellow\\\"), 50%);\\n\\n background-color: lighten(color(\\\"yellow\\\"), 30%);\\n}\\n\",\".overall-score-indicator {\\n position: relative;\\n width: 100px;\\n height: 100px;\\n\\n &__background {\\n position: absolute;\\n z-index: -1;\\n left: 0;\\n right: 0;\\n top: 0;\\n bottom: 0;\\n border: 10px solid;\\n border-radius: 50%;\\n opacity: 0.15;\\n }\\n\\n &__texts {\\n position: absolute;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, calc(-50% + 3px));\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n font-weight: 500;\\n }\\n\\n &__score {\\n font-size: 38px;\\n line-height: 28px;\\n }\\n}\\n\",\".pagy-nav {\\n display: flex;\\n span {\\n padding: 0.25rem;\\n margin-left: -1px;\\n min-width: 1.5rem;\\n\\n border: 1px solid color(gray, lightest);\\n\\n text-align: center;\\n &:first-child {\\n padding-left: 0.5rem;\\n\\n border-top-left-radius: 10rem;\\n border-bottom-left-radius: 10rem;\\n }\\n &:last-child {\\n padding-right: 0.5rem;\\n\\n border-top-right-radius: 10rem;\\n border-bottom-right-radius: 10rem;\\n }\\n }\\n span {\\n color: color(gray, light);\\n }\\n span.active {\\n color: color(\\\"white\\\");\\n font-weight: 500;\\n border-color: color(blue);\\n\\n background-color: color(blue);\\n }\\n a {\\n color: color(blue);\\n }\\n}\\n\",\"// Border\\n$radio-border-width: 2px;\\n\\n// Base state\\n$radio-border-base: color(gray);\\n$radio-bg-base: color(\\\"white\\\");\\n$radio-color-base: color(gray, dark);\\n\\n// Focus state\\n$radio-border-focus: color(blue);\\n$radio-bg-focus: color(\\\"white\\\");\\n$radio-color-focus: color(blue);\\n\\n// Checked state\\n$radio-color-checked: color(blue);\\n$radio-bg-checked: color(blue);\\n\\n// Disabled state\\n$radio-border-disabled: color(gray);\\n$radio-bg-disabled: color(gray);\\n$radio-color-disabled: color(gray);\\n\\n// Animation\\n$radio-duration: 50ms;\\n$radio-easing: $animation-easing;\\n\\n.radio {\\n position: relative;\\n input {\\n // Hide the actual input\\n position: absolute;\\n left: 0;\\n margin: 0;\\n width: 0;\\n height: 0;\\n\\n opacity: 0;\\n overflow: hidden;\\n\\n pointer-events: none;\\n z-index: -1;\\n }\\n label {\\n display: block;\\n position: relative;\\n overflow: hidden;\\n min-width: 1.2em;\\n min-height: 1.2em;\\n padding-left: 1.2em + 0.375em;\\n\\n color: $radio-color-base;\\n\\n cursor: pointer;\\n &:before {\\n // Pseudo replacement input\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n top: 0.125em;\\n left: 0;\\n width: 1.2em;\\n height: 1.2em;\\n box-sizing: border-box;\\n\\n border-radius: 10em;\\n border-width: $radio-border-width;\\n border-style: solid;\\n border-color: $radio-border-base;\\n\\n box-shadow: 0 0 0 0.6em $radio-bg-base inset;\\n\\n background-color: $radio-bg-base;\\n\\n transition:\\n box-shadow $radio-duration $radio-easing $radio-duration,\\n border-color $radio-duration $radio-easing 0s,\\n background-color $radio-duration $radio-easing ($radio-duration * 2);\\n }\\n }\\n //\\n // Focus state\\n input:focus + label {\\n color: $radio-color-focus;\\n &:before {\\n background-color: $radio-bg-focus;\\n border-color: $radio-border-focus;\\n\\n box-shadow: none;\\n }\\n }\\n //\\n // Checked state\\n input:checked + label {\\n font-weight: 500;\\n color: $radio-color-checked;\\n &:before {\\n border-color: $radio-bg-checked;\\n\\n background-color: $radio-bg-checked;\\n\\n box-shadow: 0 0 0 0.1875em $radio-bg-base inset;\\n transition:\\n box-shadow $radio-duration $radio-easing 0s,\\n border-color $radio-duration $radio-easing $radio-duration;\\n }\\n }\\n //\\n // Disabled state\\n input:disabled + label {\\n color: $radio-color-disabled;\\n &:before {\\n background-color: $radio-bg-disabled;\\n border-color: $radio-border-disabled;\\n\\n box-shadow: none;\\n }\\n }\\n}\\n\",\".segmented-control {\\n display: flex;\\n}\\n\\n.segmented-control__item {\\n flex-basis: 0;\\n flex-grow: 1;\\n min-width: 128px;\\n padding: 0.5rem;\\n\\n border: 2px solid color(blue);\\n\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n text-decoration: none;\\n text-align: center;\\n overflow: hidden;\\n font-weight: 500;\\n\\n color: color(blue, dark);\\n\\n background-color: #fff;\\n\\n &--active {\\n color: #fff;\\n\\n background-color: color(blue);\\n\\n cursor: default;\\n &:focus {\\n outline: none;\\n }\\n }\\n &:hover:not(.segmented-control__item--active) {\\n background-color: color(blue, lightest);\\n }\\n &:first-child {\\n padding-left: 1rem;\\n border-top-left-radius: 5rem;\\n border-bottom-left-radius: 5rem;\\n }\\n &:last-child {\\n padding-right: 1rem;\\n border-top-right-radius: 5rem;\\n border-bottom-right-radius: 5rem;\\n }\\n &:not(:first-child) {\\n margin-left: -2px;\\n }\\n}\\n\",\".select {\\n position: relative;\\n &:after {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n width: 0.375rem;\\n height: 0.375rem;\\n right: 0.75rem;\\n top: 50%;\\n margin-top: -0.2rem;\\n\\n border-right: 3px solid color(blue);\\n border-bottom: 3px solid color(blue);\\n\\n transform: rotate(45deg);\\n transform-origin: top;\\n pointer-events: none;\\n }\\n}\\n\\n.select select {\\n width: 100%;\\n padding: 0.5rem;\\n padding-right: 2rem;\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n\\n border: 2px solid color(blue, lighter);\\n border-radius: 0.25rem;\\n\\n font-size: 16px;\\n white-space: nowrap;\\n\\n background-color: color(blue, lightest);\\n\\n &:focus {\\n outline: none;\\n border-color: color(blue);\\n }\\n &:-moz-focusring {\\n color: transparent;\\n text-shadow: 0 0 0 #000;\\n }\\n &::-ms-expand {\\n display: none;\\n }\\n @media all and (min-width: 0\\\\0) and (min-resolution: 0.001dpcm) {\\n &:after,\\n &:before {\\n display: none;\\n }\\n }\\n}\\n\\n.select__icon {\\n display: inline-flex;\\n width: 30px;\\n height: 20px;\\n\\n & > * {\\n transform: translateY(4px);\\n }\\n}\\n\",\".stats {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n margin: -0.25rem -1rem;\\n}\\n\\n.stats__item {\\n position: relative;\\n padding: 0.25rem 1rem;\\n white-space: nowrap;\\n\\n @include type-setting(1-25);\\n &:before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute;\\n left: 0;\\n top: 0.25rem;\\n bottom: 0.25rem;\\n\\n width: 1px;\\n\\n background-color: color(gray, light);\\n }\\n &:first-child {\\n &:before {\\n display: none;\\n }\\n }\\n @include mq(m, max) {\\n @include type-setting(1);\\n &:before {\\n display: none;\\n }\\n }\\n}\\n\",\".tooltip-text {\\n display: none;\\n width: max-content;\\n max-width: 400px;\\n position: absolute;\\n z-index: 1;\\n top: 0;\\n left: 0;\\n background: purple;\\n color: white;\\n font-weight: normal;\\n font-size: 14px;\\n padding: 8px;\\n border-radius: 4px;\\n}\\n\\n.tooltip-arrow {\\n position: absolute;\\n background: purple;\\n width: 8px;\\n height: 8px;\\n transform: rotate(45deg);\\n}\\n\",\".activate {\\n &__info {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 1rem;\\n @include mq(m) {\\n flex-direction: row;\\n }\\n }\\n\\n &__info-icon {\\n position: relative;\\n flex: 0 0 120px;\\n width: 120px;\\n height: 120px;\\n background: #dae7f6;\\n border-radius: 50%;\\n margin-bottom: 1rem;\\n\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n\\n @include mq(m) {\\n flex-direction: row;\\n margin-right: 1rem;\\n margin-bottom: 0;\\n }\\n\\n & svg {\\n transform: scale(0.6) translateY(10px);\\n }\\n }\\n\\n &__form {\\n padding: 1rem;\\n max-width: 30rem;\\n }\\n\\n &__bottom {\\n display: flex;\\n justify-content: flex-end;\\n align-items: center;\\n padding: 1rem;\\n background: #f2f7fb;\\n border-top: 2px solid #e2e6f2;\\n border-radius: 0 0 0.5rem 0.5rem;\\n\\n &--center {\\n justify-content: center;\\n }\\n }\\n\\n &__name {\\n @include mq(m) {\\n max-width: 20rem;\\n }\\n }\\n\\n &__contact-info {\\n display: flex;\\n flex-direction: column;\\n @include mq(m) {\\n flex-direction: row;\\n }\\n\\n &-input {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n\\n &:last-of-type {\\n margin-bottom: 0;\\n }\\n\\n @include mq(m) {\\n margin-bottom: 0;\\n padding-right: 1rem;\\n\\n &:last-of-type {\\n padding-left: 1rem;\\n padding-right: 0;\\n }\\n }\\n }\\n }\\n}\\n\",\".admin-header {\\n display: flex;\\n align-items: flex-end;\\n flex-wrap: wrap;\\n}\\n.admin-header__title {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n\\n @include type-setting(2-25);\\n font-weight: 500;\\n color: color(purple);\\n @include mq(s, max) {\\n @include type-setting(1-5);\\n }\\n}\\n\\n.admin-header__small-title {\\n flex-grow: 1;\\n margin-bottom: 1rem;\\n\\n @include type-setting(1-5);\\n font-weight: 500;\\n color: color(purple);\\n}\\n\\n.admin-header__button {\\n flex-shrink: 0;\\n margin-bottom: 1rem;\\n}\\n\",\"// Wrapper\\n.admin-nav-wrapper {\\n background-color: color(purple);\\n}\\n\\n.admin-nav-wrapper__inner {\\n @include mq(l) {\\n display: flex;\\n }\\n}\\n\\n// Logo\\n.admin-nav-logo {\\n display: flex;\\n justify-content: center;\\n margin-right: 0.5rem;\\n padding: 0.5rem;\\n}\\n.admin-nav-logo__image {\\n display: block;\\n height: 1rem;\\n width: auto;\\n}\\n.admin-nav-logo__text {\\n @include type-setting(0-75);\\n text-align: right;\\n color: color(\\\"white\\\");\\n}\\n\\n.admin-nav {\\n @include mq(l) {\\n display: flex;\\n }\\n &--left {\\n flex-grow: 1;\\n }\\n}\\n\\n.admin-nav__link {\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n padding: 0.5rem 0.375rem;\\n\\n @include type-setting(0-75);\\n text-align: center;\\n color: color(\\\"white\\\");\\n font-weight: 500;\\n\\n text-decoration: none;\\n\\n transition: background-color $animation-short-time $animation-easing;\\n &--active {\\n background-color: rgba(color(purple, light), 0.75);\\n }\\n &:hover:not(.admin-nav__link--active) {\\n background-color: rgba(color(purple, light), 0.3);\\n }\\n}\\n\\n.admin-nav-locale-wrapper {\\n display: flex;\\n flex-direction: column;\\n padding-left: 0.5rem;\\n padding-right: 0.5rem;\\n}\\n\\n.admin-nav__locale {\\n // display: flex;\\n // flex-direction: column;\\n padding: 0rem 0rem;\\n\\n color: color(\\\"white\\\");\\n font-size: 0.4rem;\\n\\n text-decoration: none;\\n\\n &--active {\\n background-color: rgba(color(purple, light), 0.75);\\n }\\n &:hover:not(.admin-nav__link--active) {\\n background-color: rgba(color(purple, light), 0.3);\\n }\\n}\\n\",\"// Card layout\\n.auth-card {\\n max-width: 34rem;\\n margin: 0 auto;\\n\\n border-radius: 0.5rem;\\n\\n box-shadow:\\n 0 0.25rem 1rem rgba(0, 0, 0, 0.05),\\n 0 0.125rem 0.125rem rgba(0, 0, 0, 0.025);\\n}\\n\\n.auth-card__top {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 2.5rem 1.5rem;\\n\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n @include mq(s, max) {\\n padding: 1.25rem;\\n }\\n}\\n\\n.auth-card__content {\\n padding: 2rem 1.5rem;\\n\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n\\n background-color: color(\\\"white\\\");\\n @include mq(s, max) {\\n padding: 1.5rem 1.5rem;\\n }\\n}\\n\\n.auth-card__logo {\\n display: flex;\\n svg,\\n img {\\n height: 1.5rem;\\n @include mq(s, max) {\\n height: 1rem;\\n }\\n }\\n}\\n.auth-card__vital_logo {\\n height: 2rem;\\n width: auto;\\n}\\n\\n// Logo grid\\n.auth-methods {\\n display: flex;\\n flex-wrap: wrap;\\n}\\n\\n.auth-methods__item {\\n display: block;\\n flex-basis: 33.333334%;\\n padding: 0.25rem;\\n @include mq(s, max) {\\n flex-basis: 50%;\\n }\\n}\\n\\n.auth-method-link {\\n display: block;\\n\\n box-shadow: 0 1px 0 0 color(blue, lighter);\\n border: 1px solid color(blue, lighter);\\n border-radius: 0.25rem;\\n\\n text-align: center;\\n text-decoration: none;\\n transition: box-shadow $animation-short-time $animation-easing;\\n &:hover {\\n box-shadow:\\n 0 0.25rem 0.75rem color(blue, lighter),\\n 0 1px 1px 1px color(blue, lighter);\\n }\\n}\\n\\n.auth-method-logo {\\n display: block;\\n padding: 0.25rem;\\n svg {\\n max-height: 80px;\\n }\\n}\\n\\n.auth-method-title {\\n padding: 0.25rem;\\n\\n border-top: 1px solid color(blue, lighter);\\n\\n text-decoration: none;\\n @include type-setting(0-75);\\n font-weight: 500;\\n .auth-method-link:hover & {\\n color: color(blue, dark);\\n }\\n}\\n\",\"$nav-container-height: 81px;\\n$nav-container-gutter: 1rem;\\n$nav-container-bg: color(\\\"white\\\");\\n$nav-container-bg-invert: color(purple);\\n\\n$logotype-height: 1rem;\\n$logosymbol-height: 1.5rem;\\n$logofull-height: 1.25rem;\\n$logosymbol-background: color(purple);\\n\\n$navtoggle-height: 24px;\\n$navtoggle-width: 36px;\\n$navtoggle-stroke-height: 4px;\\n$navtoggle-stroke-radius: 0;\\n$navtoggle-stroke-color: color(\\\"black\\\");\\n$navtoggle-stroke-color-invert: color(\\\"white\\\");\\n\\n//\\n// Conainer\\n.nav-container {\\n position: relative;\\n z-index: 9998;\\n background-color: $nav-container-bg;\\n &--invert {\\n background-color: $nav-container-bg-invert;\\n }\\n}\\n\\n.nav-container__inner {\\n display: flex;\\n margin: 0 auto;\\n @include mq(l, max) {\\n flex-direction: column;\\n }\\n}\\n.nav-container__left {\\n display: flex;\\n align-items: stretch;\\n justify-content: space-between;\\n flex-shrink: 1;\\n margin-right: $nav-container-gutter;\\n height: $nav-container-height;\\n @include mq(m) {\\n margin-right: $nav-container-gutter * 2;\\n }\\n @include mq(l) {\\n margin-right: $nav-container-gutter;\\n }\\n}\\n\\n.nav-container__right {\\n flex-grow: 1;\\n flex-basis: auto;\\n}\\n\\n//\\n// Logo\\n.nav-container-logo {\\n display: flex;\\n align-items: stretch;\\n flex-basis: auto;\\n}\\n.nav-container-logo__symbol {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-basis: auto;\\n width: $nav-container-height;\\n\\n background-color: $logosymbol-background;\\n svg {\\n height: $logosymbol-height;\\n }\\n}\\n.nav-container-logo__type {\\n display: flex;\\n align-items: center;\\n flex-basis: auto;\\n padding-left: $nav-container-gutter;\\n svg {\\n height: $logotype-height;\\n width: auto;\\n }\\n}\\n.nav-container-logo__full {\\n display: flex;\\n align-items: center;\\n flex-basis: auto;\\n padding-left: $nav-container-gutter;\\n span {\\n display: flex;\\n }\\n svg {\\n height: $logofull-height;\\n }\\n}\\n\\n//\\n// Navigation List\\n.nav-container-toggle {\\n display: none;\\n flex-shrink: 0;\\n @include mq(l, max) {\\n display: flex;\\n align-items: center;\\n padding: 0 $nav-container-gutter;\\n margin-right: $nav-container-gutter * -1;\\n\\n cursor: pointer;\\n }\\n}\\n\\n//\\n// Toggle\\n.nav-toggle {\\n position: relative;\\n width: $navtoggle-width;\\n height: $navtoggle-height;\\n\\n cursor: pointer;\\n > * {\\n pointer-events: none;\\n }\\n &:before,\\n &:after {\\n content: \\\"\\\";\\n position: absolute;\\n display: block;\\n width: 100%;\\n height: $navtoggle-stroke-height;\\n\\n border-radius: $navtoggle-stroke-radius;\\n background-color: $navtoggle-stroke-color;\\n\\n transition-property: top, bottom, transform;\\n transition-duration: $animation-time;\\n transition-timing-function: $animation-easing;\\n }\\n &:before {\\n top: 0;\\n }\\n &:after {\\n bottom: 0;\\n }\\n &--collapse {\\n &:before {\\n top: 50%;\\n transform: translateY(-50%);\\n }\\n &:after {\\n bottom: 50%;\\n transform: translateY(50%);\\n }\\n }\\n &--rotate {\\n &:before {\\n transform: translateY(-50%) rotateZ(45deg);\\n }\\n &:after {\\n transform: translateY(50%) rotateZ(45deg);\\n }\\n }\\n .nav-container--invert & {\\n &:before,\\n &:after {\\n background-color: $navtoggle-stroke-color-invert;\\n }\\n }\\n}\\n\\n.nav-toggle__inner {\\n position: absolute;\\n top: 50%;\\n width: 100%;\\n height: $navtoggle-stroke-height;\\n transform: translateY(-50%);\\n\\n border-radius: $navtoggle-stroke-radius;\\n\\n background-color: $navtoggle-stroke-color;\\n transition-property: transform;\\n transition-duration: $animation-time;\\n transition-timing-function: $animation-easing;\\n\\n .nav-toggle--rotate & {\\n transform: translateY(-50%) rotateZ(-45deg);\\n }\\n .nav-container--invert & {\\n background-color: $navtoggle-stroke-color-invert;\\n }\\n}\\n\\n//\\n// Navigation List\\n.nav-list {\\n transition: height $animation-time $animation-easing;\\n > div {\\n display: flex;\\n justify-content: space-between;\\n @include mq(l, max) {\\n display: block;\\n overflow-y: auto;\\n max-height: 500px;\\n max-height: calc(100vh - #{$nav-container-height});\\n\\n -webkit-overflow-scrolling: touch;\\n }\\n }\\n}\\n.nav-list__inner {\\n display: flex;\\n height: $nav-container-height;\\n @include mq(l, max) {\\n display: block;\\n height: auto;\\n }\\n}\\n\\n$nav-link-color: color(purple);\\n$nav-link-color-invert: color(\\\"white\\\");\\n$nav-link-paddingX: 0.75rem;\\n$nav-link-paddingY: 0.5rem;\\n$nav-link-borderX: none;\\n$nav-link-borderM: 1px solid rgba(0, 0, 0, 0.1);\\n$nav-link-paddingXM: 1rem;\\n$nav-link-heightM: 3.5rem;\\n\\n.nav-link {\\n position: relative;\\n display: flex;\\n align-items: center;\\n white-space: nowrap;\\n padding-left: $nav-link-paddingX;\\n padding-right: $nav-link-paddingX;\\n\\n color: $nav-link-color;\\n font-size: 18px;\\n text-decoration: none;\\n font-weight: 500;\\n\\n line-height: 1;\\n\\n cursor: pointer;\\n\\n &--menuitem {\\n margin-bottom: 0.2rem;\\n &:hover {\\n text-decoration: underline;\\n }\\n }\\n\\n &--external {\\n flex-grow: 1;\\n background: color(blue, lightest);\\n }\\n .nav-container--invert & {\\n color: $nav-link-color-invert;\\n }\\n\\n @include mq(l) {\\n flex-grow: 1;\\n border-left: $nav-link-borderX;\\n &:last-child {\\n border-right: $nav-link-borderX;\\n }\\n }\\n @include mq(l, max) {\\n padding-left: $nav-link-paddingX;\\n padding-right: $nav-link-paddingX;\\n\\n border-bottom: $nav-link-borderM;\\n\\n line-height: $nav-link-heightM;\\n // If multiple navigation-lists are in use put a border between them since last-child border reset leaves the border out on the first list.\\n &:first-child {\\n border-top: $nav-link-borderM;\\n }\\n &:last-child {\\n border-bottom: none;\\n }\\n }\\n @include mq(m) {\\n padding-left: $nav-container-gutter * 2;\\n padding-right: $nav-container-gutter * 2;\\n }\\n @include mq(l) {\\n padding-left: $nav-link-paddingX;\\n padding-right: $nav-link-paddingX;\\n }\\n}\\n\\n.nav-link__icon {\\n display: flex;\\n align-items: center;\\n margin-right: 0.25rem;\\n svg {\\n width: 1.25rem;\\n height: 1.25rem;\\n }\\n @include mq(l, max) {\\n margin-right: 0.5rem;\\n }\\n}\\n\\n.nav-link__label {\\n display: flex;\\n align-items: center;\\n}\\n\\n.nav-link__arrow {\\n margin-inline-start: 0.4em;\\n transition: rotate 0.5s;\\n height: 24px;\\n display: block;\\n}\\n\\n.nav-link__arrow svg {\\n display: block;\\n}\\n\\n.nav-link:has(.navigation-list__submenu--active) .nav-link__arrow {\\n rotate: 180deg;\\n}\\n\\n@media (min-width: 992px) {\\n .navigation-list__submenu {\\n position: absolute;\\n top: 80%;\\n right: 0;\\n background-color: white;\\n border-radius: 0.5em;\\n box-shadow:\\n 0px 4px 24px 0px rgba(97, 148, 205, 0.13),\\n 0px 2px 4px 0px rgba(50, 32, 83, 0.07);\\n }\\n}\\n\\n.navigation-list__submenu a.nav-link {\\n margin-block: 0.8em;\\n}\\n\\n@media (max-width: 991px) {\\n .navigation-list__submenu a.nav-link {\\n border: none;\\n line-height: 1;\\n padding-left: 0;\\n }\\n\\n .navigation-list__link--dropdown {\\n flex-wrap: wrap;\\n }\\n\\n .navigation-list__submenu {\\n width: 100%;\\n margin-top: -1em;\\n margin-bottom: 0.5em;\\n }\\n}\\n\\n.nav-list__filler-icon {\\n color: transparent;\\n}\\n\",\".login-input[type=\\\"tel\\\"],\\n.login-input[type=\\\"num\\\"],\\n.login-input[type=\\\"text\\\"] {\\n width: 100%;\\n padding: 0.5rem 1rem;\\n\\n border: 2px solid color(blue, lighter);\\n border-radius: 20rem;\\n\\n font-size: 16px;\\n line-height: 1rem;\\n\\n background-color: color(blue, lightest);\\n -webkit-appearance: none;\\n &:focus {\\n outline: none;\\n border-color: color(blue);\\n }\\n}\\n\\n.login-container {\\n position: relative;\\n}\\n\\n.login-content-left-enter {\\n opacity: 0.01;\\n transform: translateX(-100%);\\n}\\n.login-content-left-enter-active {\\n opacity: 1;\\n transition:\\n transform 400ms $animation-easing,\\n opacity 400ms $animation-easing;\\n transform: translateX(0%);\\n}\\n.login-content-left-exit {\\n opacity: 1;\\n\\n transform: translateX(0%);\\n}\\n.login-content-left-exit-active {\\n opacity: 0.01;\\n transition:\\n transform 200ms $animation-easing,\\n opacity 200ms $animation-easing;\\n transform: translateX(-100%);\\n}\\n\\n.login-content-right-enter {\\n opacity: 0.01;\\n transform: translateX(100%);\\n}\\n.login-content-right-enter-active {\\n opacity: 1;\\n transition:\\n transform 400ms $animation-easing,\\n opacity 400ms $animation-easing;\\n transform: translateX(0%);\\n}\\n.login-content-right-exit {\\n opacity: 1;\\n\\n transform: translateX(0%);\\n}\\n.login-content-right-exit-active {\\n opacity: 0.01;\\n transition:\\n transform 200ms $animation-easing,\\n opacity 200ms $animation-easing;\\n transform: translateX(100%);\\n}\\n\\n.login-container__back {\\n display: block;\\n position: absolute;\\n left: 0;\\n top: 0;\\n width: 1.5rem;\\n height: 1.5rem;\\n padding: 0;\\n\\n border: none;\\n\\n svg {\\n width: 100%;\\n height: 100%;\\n stroke: color(purple);\\n }\\n &:hover svg {\\n stroke: lighten(color(purple), 20%);\\n }\\n &:focus {\\n outline: none;\\n\\n border: 2px solid color(purple);\\n }\\n}\\n\\n.login-logo {\\n width: 5rem;\\n height: 5rem;\\n &--loading {\\n animation-name: spin;\\n animation-duration: 3000ms;\\n animation-iteration-count: infinite;\\n animation-timing-function: linear;\\n }\\n @include mq(s, max) {\\n width: 3rem;\\n height: 3rem;\\n }\\n}\\n\\n.login-logo--vital {\\n height: 2.25rem;\\n width: auto;\\n}\\n\\n.login-language-selector-icon {\\n width: 1rem;\\n height: 1rem;\\n padding-top: 0.25rem;\\n margin-left: 0.5rem;\\n svg {\\n width: 100%;\\n height: 100%;\\n stroke: color(purple);\\n }\\n}\\n\\n.login-language-selector {\\n right: 0;\\n top: 0;\\n padding: 0;\\n border: none;\\n color: color(purple);\\n\\n &:hover {\\n outline: none;\\n }\\n\\n &:focus {\\n outline: none;\\n }\\n}\\n\\n@keyframes spin {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n\",\".notice {\\n display: flex;\\n\\n border-radius: 0.5rem;\\n box-shadow:\\n 0 0.25rem 0.75rem color(blue, lighter),\\n 0 1px 1px 1px color(blue, lighter);\\n\\n background-color: color(\\\"white\\\");\\n}\\n.notice__icon {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 0.75rem;\\n\\n border-top-left-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n\\n background-color: color(blue);\\n svg {\\n width: 1rem;\\n height: 1rem;\\n\\n stroke: color(\\\"white\\\");\\n }\\n}\\n.notice__content {\\n padding: 0.75rem;\\n\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n}\\n\",\".onboarding-wrapper {\\n position: relative;\\n min-height: 100%;\\n width: 100%;\\n overflow-x: hidden;\\n}\\n.onboarding-wrapper__inner {\\n position: absolute;\\n width: 100%;\\n min-height: 100%;\\n top: 0;\\n left: 0;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.onboarding-enter {\\n transform: translateX(100%);\\n .onboarding-animate__left {\\n opacity: 0;\\n transform: translateX(100%);\\n }\\n .onboarding-animate__appear {\\n opacity: 0;\\n transform: translateX(100%);\\n }\\n}\\n.onboarding-enter-active {\\n opacity: 1;\\n transition:\\n transform 500ms $animation-easing 500ms,\\n opacity 500ms $animation-easing 500ms;\\n transform: translateX(0%);\\n .onboarding-animate__left {\\n opacity: 1;\\n transition:\\n transform 500ms $animation-easing 1000ms,\\n opacity 500ms $animation-easing 1000ms;\\n transform: translateX(0%);\\n }\\n .onboarding-animate__appear {\\n opacity: 1;\\n transition:\\n transform 500ms $animation-easing 1500ms,\\n opacity 500ms $animation-easing 1500ms;\\n transform: translateX(0%);\\n }\\n}\\n.onboarding-exit {\\n transform: translateX(0%);\\n .onboarding-animate__left {\\n opacity: 1;\\n transform: translateX(0%);\\n }\\n .onboarding-animate__appear {\\n opacity: 1;\\n transform: translateX(0%);\\n }\\n}\\n.onboarding-exit-active {\\n transition:\\n transform 500ms $animation-easing 500ms,\\n opacity 500ms $animation-easing 500ms;\\n transform: translateX(-100%);\\n .onboarding-animate__left {\\n opacity: 0.01;\\n transition:\\n transform 250ms $animation-easing,\\n opacity 250ms $animation-easing;\\n transform: translateX(-100%);\\n }\\n .onboarding-animate__appear {\\n opacity: 0.01;\\n transition:\\n transform 250ms $animation-easing 250ms,\\n opacity 250ms $animation-easing 250ms;\\n transform: translateX(-100%);\\n }\\n}\\n\\n.onboarding-input input {\\n height: 2.5rem;\\n padding: 0.75rem;\\n\\n border: 2px solid color(blue, lighter);\\n border-radius: 0.25rem;\\n font-size: 22px;\\n\\n min-width: 5rem;\\n max-width: 7rem;\\n\\n background-color: color(blue, lightest);\\n &::placeholder {\\n }\\n}\\n\",\".pdf-preview {\\n display: flex;\\n flex-direction: column;\\n height: 100%;\\n}\\n.pdf-preview__iframe {\\n flex-grow: 1;\\n}\\n.pdf-preview__footer {\\n flex-shrink: 0;\\n padding: 0.5rem 1rem;\\n\\n text-align: center;\\n\\n background-color: color(\\\"white\\\");\\n}\\n.pdf-preview-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0;\\n background-color: color(\\\"white\\\");\\n}\\n.pdf-preview-header__left,\\n.pdf-preview-header__middle,\\n.pdf-preview-header__right {\\n flex: 1;\\n display: flex;\\n justify-content: center;\\n}\\n.pdf-preview-header__left {\\n padding-left: 0.5rem;\\n > * {\\n margin-right: auto;\\n }\\n}\\n.pdf-preview-header__middle {\\n padding: 0.5rem 0;\\n text-align: center;\\n}\\n.pdf-preview-header__right {\\n > * {\\n margin-left: auto;\\n }\\n}\\n.pdf-preview__close {\\n display: flex;\\n align-items: center;\\n padding: 0.5rem;\\n border-radius: 0;\\n\\n border: none;\\n\\n color: color(blue, dark);\\n svg {\\n width: 1rem;\\n height: 1rem;\\n fill: color(blue, dark);\\n }\\n &:hover {\\n color: color(blue);\\n svg {\\n fill: color(blue);\\n }\\n }\\n}\\n\",\".profile-footer {\\n position: fixed;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n padding-bottom: env(safe-area-inset-bottom);\\n\\n box-shadow:\\n 0 -0.25rem 0.75rem color(blue, lighter),\\n 0 -1px 1px 1px color(blue, lighter);\\n\\n background-color: color(purple);\\n\\n &-error {\\n background-color: color(red);\\n }\\n\\n &-enter {\\n opacity: 0.01;\\n transform: translateY(100%);\\n }\\n &-enter-active {\\n opacity: 1;\\n transition:\\n transform 400ms $animation-easing,\\n opacity 400ms $animation-easing;\\n transform: translateY(0%);\\n }\\n &-exit {\\n opacity: 1;\\n\\n transform: translateY(0%);\\n }\\n &-exit-active {\\n opacity: 0.01;\\n\\n background-color: color(green);\\n\\n transform: translateY(100%);\\n transition:\\n transform 200ms $animation-easing 2000ms,\\n opacity 200ms $animation-easing 2000ms,\\n background-color 200ms $animation-easing;\\n }\\n}\\n\\n.profile-card__notice {\\n display: flex;\\n\\n color: color(\\\"white\\\");\\n font-weight: 500;\\n > * + * {\\n margin-left: 0.25rem;\\n }\\n svg {\\n width: 1rem;\\n height: 1rem;\\n\\n stroke: color(\\\"white\\\");\\n }\\n}\\n\",\".range-slider {\\n position: relative;\\n display: flex;\\n padding-top: 1.25rem;\\n padding-bottom: 0.25rem;\\n}\\n.range-slider__unit {\\n display: block;\\n position: absolute;\\n top: 0;\\n z-index: 2;\\n transform: translateX(-50%);\\n\\n color: color(gray, dark);\\n font-weight: 400;\\n white-space: nowrap;\\n}\\n.range-slider__indicator {\\n display: block;\\n position: absolute;\\n top: 1rem;\\n bottom: 0;\\n width: 2px;\\n z-index: 1;\\n transform: translateX(-50%);\\n border-radius: 10px;\\n background-color: color(\\\"black\\\");\\n}\\n.range-slider__bar {\\n position: relative;\\n height: 0.5rem;\\n width: attr(data-width);\\n border-radius: 2rem;\\n // @include type-setting(0-75);\\n color: color(gray);\\n}\\n.range-slider__value {\\n position: absolute;\\n left: 50%;\\n bottom: -1.25rem;\\n transform: translateX(-50%);\\n}\\n.range-slider__min {\\n font-weight: 500;\\n position: absolute;\\n bottom: -1.25rem;\\n left: 0;\\n transform: translateX(-100%);\\n color: color(\\\"red\\\");\\n}\\n.range-slider__max {\\n font-weight: 500;\\n position: absolute;\\n bottom: -1.25rem;\\n right: 0;\\n transform: translateX(100%);\\n color: color(\\\"red\\\");\\n}\\n.range-slider__recommendation {\\n position: absolute;\\n height: 0.5rem;\\n width: 100px;\\n background-color: color(\\\"yellow\\\");\\n\\n &:after {\\n content: attr(data-value);\\n position: absolute;\\n bottom: -1.25rem;\\n }\\n\\n &--low {\\n left: 0;\\n border-top-left-radius: 10px;\\n border-bottom-left-radius: 10px;\\n &:after {\\n right: 0;\\n transform: translateX(100%);\\n color: color(\\\"green\\\");\\n }\\n }\\n &--high {\\n right: 0;\\n border-top-right-radius: 10px;\\n border-bottom-right-radius: 10px;\\n &:after {\\n left: 0;\\n transform: translateX(-100%);\\n color: color(\\\"green\\\");\\n }\\n }\\n}\\n.range-slider__microbiome-color {\\n background: #d3e3b2;\\n}\\n\",\".result-box {\\n display: flex;\\n flex-direction: column;\\n @include mq(m) {\\n flex-direction: row;\\n }\\n}\\n\\n.result-box__left {\\n display: flex;\\n flex-direction: column;\\n flex-basis: 100%;\\n max-width: 100%;\\n @include mq(m) {\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n @include mq(l) {\\n flex-basis: 55%;\\n max-width: 55%;\\n }\\n &--grey {\\n background-color: color(blue, lightest);\\n }\\n}\\n.result-box__main {\\n padding: 0.75rem;\\n flex-grow: 1;\\n @include mq(m) {\\n padding: 1rem;\\n }\\n}\\n.result-box__right {\\n padding: 0.75rem;\\n flex-basis: 100%;\\n max-width: 100%;\\n @include mq(m) {\\n padding: 1rem;\\n flex-basis: 50%;\\n max-width: 50%;\\n }\\n @include mq(l) {\\n flex-basis: 45%;\\n max-width: 45%;\\n }\\n &--text {\\n background-color: lighten(color(blue, lightest), 2%);\\n @include mq(m, max) {\\n border-top: 2px solid color(blue, lighter);\\n }\\n @include mq(m) {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n border-left: 2px solid color(blue, lighter);\\n }\\n }\\n &--grey {\\n background-color: color(blue, lightest);\\n @include mq(m) {\\n border-left: 2px solid color(blue, lighter);\\n }\\n }\\n &--white-bg {\\n @include mq(m, max) {\\n border-top: 2px solid color(blue, lighter);\\n }\\n @include mq(m) {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n border-left: 2px solid color(blue, lighter);\\n }\\n }\\n &--pending {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n background-color: color(blue, lighter);\\n @include mq(m, max) {\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n }\\n @include mq(m) {\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n }\\n }\\n}\\n.result-box__footer-desktop {\\n border-top: 1px solid color(blue, lighter);\\n padding: 0.5rem 1rem;\\n background-color: color(blue, lightest);\\n @include mq(m, max) {\\n display: none;\\n }\\n}\\n.result-box__footer {\\n display: block;\\n padding: 0.5rem 0.75rem;\\n border-top: 1px solid color(blue, lighter);\\n border-bottom-right-radius: 0.5rem;\\n text-align: center;\\n background-color: color(blue, lightest);\\n @include mq(m) {\\n display: none;\\n }\\n &--microbiome {\\n @include mq(m) {\\n display: flex;\\n }\\n\\n display: flex;\\n padding: 0;\\n border-top: 2px solid color(blue, lighter);\\n }\\n &:hover {\\n .arrow-link {\\n &::after,\\n &::before {\\n right: -0.25rem;\\n }\\n }\\n }\\n}\\n\\n.result-box__chart {\\n margin: 0 1.25rem;\\n @include mq(m) {\\n margin: 0 1rem;\\n }\\n @include mq(l) {\\n }\\n}\\n\\n.result-box__label {\\n margin-bottom: 0.125rem;\\n border-radius: 20rem;\\n color: color(purple);\\n font-weight: 500;\\n @include type-setting(0-75);\\n}\\n.result-box__value {\\n flex-grow: 1;\\n text-align: left;\\n color: color(gray);\\n @include mq(m) {\\n margin-left: 0;\\n }\\n}\\n\\n.result-box__pending {\\n text-align: center;\\n @include type-setting(1-25);\\n\\n color: color(gray);\\n}\\n\\n.result-box__statement {\\n color: color(gray);\\n p + p {\\n margin-top: 0.5rem;\\n }\\n p:last-of-type {\\n margin-bottom: 0.5rem;\\n }\\n}\\n\\n.result-box__readmore,\\n.result-box__comparison {\\n display: flex;\\n align-items: center;\\n font-weight: 600;\\n color: color(purple);\\n cursor: pointer;\\n svg {\\n margin-left: 0.25rem;\\n stroke: color(purple);\\n transition: transform $animation-short-time $animation-easing;\\n }\\n &:hover {\\n text-decoration: underline;\\n svg {\\n text-decoration: none;\\n }\\n }\\n &--open {\\n svg {\\n transform: rotate(180deg);\\n }\\n }\\n}\\n\\n.result-box__readmore--microbiome {\\n flex-basis: 55%;\\n padding: 0.5rem 1rem;\\n}\\n\\n.result-box__comparison--microbiome {\\n flex-basis: 45%;\\n border-left: 2px solid #e2ecf6;\\n padding: 0.5rem 1rem;\\n}\\n\\n.result-box__more {\\n border-top: 1px solid color(blue, lighter);\\n}\\n.result-box__more-top {\\n padding: 0.75rem;\\n flex-grow: 1;\\n border-bottom: 1px solid color(blue, lighter);\\n @include mq(m) {\\n padding: 1rem;\\n }\\n}\\n.result-box__more-notice {\\n text-align: center;\\n color: color(purple);\\n font-weight: 500;\\n}\\n.result-box__more-bottom {\\n padding: 0.75rem;\\n flex-grow: 1;\\n @include mq(m) {\\n padding: 1rem;\\n }\\n}\\n\\n.result-box__microbiome {\\n &-info {\\n display: flex;\\n }\\n &-info-number {\\n flex: 0 0 auto;\\n width: 20px;\\n height: 20px;\\n background: #e0ecf7;\\n color: #6e9fd5;\\n text-align: center;\\n font-weight: 500;\\n line-height: 20px;\\n border-radius: 50%;\\n }\\n &-info-text {\\n flex: 1 1 auto;\\n padding-left: 0.5rem;\\n\\n & > h2 {\\n color: #39235d;\\n font-weight: 500;\\n }\\n\\n & > p {\\n color: #404040;\\n }\\n }\\n &-more-info {\\n border-top: 2px solid color(blue, lighter);\\n }\\n &-long-description {\\n border-top: 2px solid color(blue, lighter);\\n background-color: color(blue, lightest);\\n padding: 0.75rem;\\n\\n & > h2 {\\n color: #39235d;\\n font-weight: 500;\\n }\\n\\n & > p {\\n color: #404040;\\n }\\n\\n @include mq(m) {\\n padding: 1rem;\\n }\\n }\\n}\\n\",\".select-order__main {\\n padding: 1rem;\\n}\\n.select-order__footer {\\n display: flex;\\n align-items: center;\\n\\n padding: 1rem;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n\\n background-color: color(blue, lightest);\\n\\n @include mq(m) {\\n > * + * {\\n margin-left: 1rem;\\n }\\n }\\n @include mq(m, max) {\\n flex-direction: column;\\n align-items: center;\\n > * {\\n width: 100%;\\n max-width: 13rem;\\n }\\n > * + * {\\n margin-top: 0.5rem;\\n }\\n }\\n}\\n\\n.select-order__footer-info {\\n @include mq(m) {\\n flex-grow: 1;\\n }\\n @include mq(m, max) {\\n text-align: center;\\n }\\n}\\n.select-order__footer-button {\\n @include mq(m) {\\n justify-self: flex-end;\\n flex-grow: 1;\\n max-width: 25%;\\n }\\n}\\n\\n.mobile-hide {\\n display: none;\\n @include mq(s) {\\n display: inline;\\n }\\n}\\n\",\".site-wrapper {\\n display: flex;\\n flex-direction: column;\\n align-items: stretch;\\n min-height: 100%;\\n}\\n\\n.site-wrapper__main {\\n flex-grow: 1;\\n flex-shrink: 0;\\n}\\n.site-wrapper__footer {\\n flex-shrink: 0;\\n}\\n\",\".split-card {\\n max-width: 34rem;\\n margin: 0 auto;\\n display: flex;\\n\\n border-radius: 0.5rem;\\n\\n box-shadow:\\n 0 0.25rem 1rem rgba(0, 0, 0, 0.05),\\n 0 0.125rem 0.125rem rgba(0, 0, 0, 0.025);\\n\\n overflow: hidden;\\n @include mq(s, max) {\\n display: block;\\n }\\n}\\n\\n.split-card__half {\\n max-width: 17rem;\\n}\\n\\n.split-card__right,\\n.split-card__left {\\n position: relative;\\n flex-shrink: 0;\\n flex-basis: 0;\\n}\\n\\n.split-card__left {\\n flex-grow: 1;\\n padding: 1.5rem;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n z-index: 2;\\n\\n border-top-left-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n\\n @include mq(m) {\\n min-height: 15rem;\\n }\\n @include mq(s, max) {\\n padding: 1.5rem 1.5rem;\\n border-bottom-left-radius: 0;\\n border-top-right-radius: 0.5rem;\\n }\\n}\\n.split-card__right {\\n flex-grow: 1;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n padding: 2rem 1.5rem;\\n min-height: 23rem;\\n\\n border-top-right-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n\\n background-color: color(\\\"white\\\");\\n @include mq(s, max) {\\n padding: 1.5rem 1.5rem;\\n min-height: 0rem;\\n\\n border-top-right-radius: 0;\\n border-bottom-left-radius: 0.5rem;\\n }\\n}\\n\",\".suggestion-item {\\n flex-grow: 1;\\n position: relative;\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 1rem;\\n border-radius: 0.5rem;\\n box-shadow:\\n 0 0.25rem 0.75rem rgba(color(blue, light), 0.2),\\n 0 1px 1px 1px rgba(color(blue, light), 0.2);\\n background-color: color(\\\"white\\\");\\n}\\n.suggestion-item__main {\\n padding: 1rem 1.5rem;\\n flex-grow: 1;\\n @include mq(m, max) {\\n padding: 0.75rem 1rem;\\n }\\n}\\n\\n.suggestion-item__footer {\\n position: relative;\\n padding: 0.75rem;\\n flex-shrink: 0;\\n display: flex;\\n justify-content: center;\\n text-align: center;\\n border-bottom-left-radius: 0.5rem;\\n border-bottom-right-radius: 0.5rem;\\n background-color: color(blue, lightest);\\n .button {\\n max-width: 12rem;\\n }\\n}\\n\",\".new-suggestion-item {\\n &__background {\\n background-color: color(blue, lighter);\\n }\\n\\n &__editor-buttons {\\n flex: 1 1 auto;\\n display: flex;\\n margin: -8px;\\n\\n & > * {\\n flex: 1 1 0%;\\n max-width: 2000px !important;\\n margin: 8px;\\n }\\n }\\n\\n &__header {\\n position: relative;\\n padding: 1rem 1.5rem;\\n\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n\\n background-color: color(blue, lightest);\\n\\n @include mq(m, max) {\\n padding: 1rem;\\n }\\n\\n min-height: 220px;\\n display: flex;\\n align-items: flex-end;\\n\\n background-size: cover;\\n background-position: center center;\\n }\\n\\n &__header-gradient {\\n position: absolute;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n height: 70%;\\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));\\n }\\n\\n &__header-fields {\\n position: relative;\\n z-index: 2;\\n width: 100%;\\n }\\n\\n &__field,\\n &__field-with-margin {\\n & input[type=\\\"text\\\"] {\\n border: 1px solid color(gray, light);\\n border-radius: 5px;\\n width: 100%;\\n padding: 10px;\\n background: color(\\\"white\\\");\\n }\\n\\n & label {\\n color: color(purple);\\n font-weight: 500;\\n }\\n }\\n\\n &__hidden-field {\\n position: absolute;\\n width: 0px;\\n height: 0px;\\n opacity: 0;\\n visibility: hidden;\\n }\\n\\n &__field-with-margin {\\n margin-top: 1rem;\\n }\\n\\n &__field-white {\\n & label {\\n color: color(\\\"white\\\");\\n font-weight: 500;\\n }\\n }\\n\\n &__new-item {\\n align-self: stretch;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n padding: 1rem;\\n width: 100%;\\n margin-bottom: 1rem;\\n border: none;\\n background: color(blue, lightest);\\n }\\n\\n &__item-link-container {\\n padding: 0 1.5rem 1rem 1.5rem;\\n\\n @include mq(m, max) {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n }\\n\\n &__item-link {\\n display: block;\\n position: relative;\\n background: color(blue, lightest);\\n color: color(orange);\\n @include type-setting(1-25);\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n\\n & > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n }\\n }\\n\\n &__title {\\n @include type-setting(1-5);\\n font-weight: 500;\\n color: color(purple);\\n }\\n\\n &__title-white {\\n position: relative;\\n z-index: 2;\\n @include type-setting(1-5);\\n font-weight: 500;\\n color: #ffffff;\\n }\\n\\n &__order-number {\\n position: absolute;\\n top: 10px;\\n left: 1.5rem;\\n z-index: 2;\\n color: color(purple);\\n }\\n\\n &__order-number-white {\\n position: absolute;\\n top: 10px;\\n left: 1.5rem;\\n z-index: 2;\\n color: #ffffff;\\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);\\n }\\n\\n &__input-context {\\n margin-top: 0.5rem;\\n color: color(gray);\\n @include type-setting(0-75);\\n }\\n}\\n\",\".#{$selectize}-control.plugin-drag_drop {\\n &.multi > .#{$selectize}-input.dragging {\\n overflow: visible;\\n }\\n &.multi > .#{$selectize}-input > div.ui-sortable-placeholder {\\n visibility: visible !important;\\n background: #f2f2f2 !important;\\n background: rgba(0, 0, 0, 0.06) !important;\\n border: 0 none !important;\\n box-shadow: inset 0 0 12px 4px #fff;\\n }\\n .ui-sortable-placeholder::after {\\n content: \\\"!\\\";\\n visibility: hidden;\\n }\\n .ui-sortable-helper {\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\\n }\\n}\\n\",\".#{$selectize}-dropdown.plugin-dropdown_header {\\n .#{$selectize}-dropdown-header {\\n position: relative;\\n padding: ($select-padding-dropdown-item-y * 2)\\n $select-padding-dropdown-item-x;\\n border-bottom: 1px solid $select-color-border;\\n background: mix($select-color-dropdown, $select-color-border, 85%);\\n border-radius: $select-border-radius $select-border-radius 0 0;\\n }\\n .#{$selectize}-dropdown-header-close {\\n position: absolute;\\n right: $select-padding-dropdown-item-x;\\n top: 50%;\\n color: $select-color-text;\\n opacity: 0.4;\\n margin-top: -12px;\\n line-height: 20px;\\n font-size: 20px !important;\\n text-decoration: none;\\n }\\n .#{$selectize}-dropdown-header-close:hover {\\n color: darken($select-color-text, 25%);\\n }\\n}\\n\",\"@use \\\"sass:math\\\";\\n\\n// base styles\\n$selectize: \\\"selectize\\\" !default;\\n$select-font-family: inherit !default;\\n$select-font-smoothing: inherit !default;\\n$select-font-size: 13px !default;\\n$select-line-height: 18px !default;\\n\\n$select-color-text: #303030 !default;\\n$select-color-border: #d0d0d0 !default;\\n$select-color-highlight: rgba(125, 168, 208, 0.2) !default;\\n$select-color-input: #fff !default;\\n$select-color-input-full: $select-color-input !default;\\n$select-color-disabled: #fafafa !default;\\n$select-color-item: #f2f2f2 !default;\\n$select-color-item-text: $select-color-text !default;\\n$select-color-item-border: #d0d0d0 !default;\\n$select-color-item-active: #e8e8e8 !default;\\n$select-color-item-active-text: $select-color-text !default;\\n$select-color-item-active-border: #cacaca !default;\\n$select-color-dropdown: #fff !default;\\n$select-color-dropdown-border: $select-color-border !default;\\n$select-color-dropdown-border-top: #f0f0f0 !default;\\n$select-color-dropdown-item-active: #f5fafd !default;\\n$select-color-dropdown-item-active-text: #495c68 !default;\\n$select-color-dropdown-item-create-text: rgba(\\n red($select-color-text),\\n green($select-color-text),\\n blue($select-color-text),\\n 0.5\\n) !default;\\n$select-color-dropdown-item-create-active-text: $select-color-dropdown-item-active-text !default;\\n$select-color-optgroup: $select-color-dropdown !default;\\n$select-color-optgroup-text: $select-color-text !default;\\n$select-lighten-disabled-item: 30% !default;\\n$select-lighten-disabled-item-text: 30% !default;\\n$select-lighten-disabled-item-border: 30% !default;\\n$select-opacity-disabled: 0.5 !default;\\n\\n$select-shadow-input: inset 0 1px 1px rgba(0, 0, 0, 0.1) !default;\\n$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 0.15) !default;\\n$select-border: 1px solid $select-color-border !default;\\n$select-dropdown-border: 1px solid $select-color-dropdown-border !default;\\n$select-border-radius: 3px !default;\\n\\n$select-width-item-border: 0px !default;\\n$select-max-height-dropdown: 200px !default;\\n\\n$select-padding-x: 8px !default;\\n$select-padding-y: 8px !default;\\n$select-padding-item-x: 6px !default;\\n$select-padding-item-y: 2px !default;\\n$select-padding-dropdown-item-x: $select-padding-x !default;\\n$select-padding-dropdown-item-y: 5px !default;\\n$select-margin-item-x: 3px !default;\\n$select-margin-item-y: 3px !default;\\n\\n$select-arrow-size: 5px !default;\\n$select-arrow-color: #808080 !default;\\n$select-arrow-offset: 15px !default;\\n\\n$select-caret-margin: 0 0px !default;\\n$select-caret-margin-rtl: 0 4px 0 -2px !default;\\n\\n$select-spinner-size: 30px;\\n$select-spinner-border-size: 5px;\\n$select-spinner-border-color: $select-color-border;\\n\\n@mixin selectize-vertical-gradient($color-top, $color-bottom) {\\n background-color: mix($color-top, $color-bottom, 60%);\\n background-image: linear-gradient(to bottom, $color-top, $color-bottom);\\n background-repeat: repeat-x;\\n}\\n\\n@import \\\"plugins/drag_drop.scss\\\";\\n@import \\\"plugins/dropdown_header.scss\\\";\\n@import \\\"plugins/optgroup_columns.scss\\\";\\n@import \\\"plugins/remove_button.scss\\\";\\n@import \\\"plugins/clear_button.scss\\\";\\n@import \\\"plugins/auto_position.scss\\\";\\n\\n.#{$selectize}-control {\\n position: relative;\\n}\\n\\n.#{$selectize}-dropdown,\\n.#{$selectize}-input,\\n.#{$selectize}-input input {\\n color: $select-color-text;\\n font-family: $select-font-family;\\n font-size: $select-font-size;\\n line-height: $select-line-height;\\n font-smoothing: $select-font-smoothing;\\n}\\n\\n.#{$selectize}-input,\\n.#{$selectize}-control.single .#{$selectize}-input.input-active {\\n background: $select-color-input;\\n cursor: text;\\n display: inline-block;\\n}\\n\\n.#{$selectize}-input {\\n border: $select-border;\\n padding: $select-padding-y $select-padding-x;\\n display: inline-block;\\n width: 100%;\\n // overflow: hidden;\\n position: relative;\\n z-index: 1;\\n box-sizing: border-box;\\n box-shadow: $select-shadow-input;\\n border-radius: $select-border-radius;\\n\\n .#{$selectize}-control.multi &.has-items {\\n $padding-x: $select-padding-x;\\n $padding-top: calc(\\n #{$select-padding-y} - #{$select-padding-item-y} - #{$select-width-item-border}\\n );\\n $padding-bottom: calc(\\n #{$select-padding-y} - #{$select-padding-item-y} - #{$select-margin-item-y} -\\n #{$select-width-item-border}\\n );\\n padding: $padding-top $padding-x $padding-bottom;\\n }\\n\\n &.full {\\n background-color: $select-color-input-full;\\n }\\n &.disabled,\\n &.disabled * {\\n cursor: default !important;\\n }\\n &.focus {\\n box-shadow: $select-shadow-input-focus;\\n }\\n &.dropdown-active {\\n border-radius: $select-border-radius $select-border-radius 0 0;\\n }\\n\\n > * {\\n vertical-align: baseline;\\n display: inline-block;\\n zoom: 1;\\n }\\n .#{$selectize}-control.multi & > div {\\n cursor: pointer;\\n margin: 0 $select-margin-item-x $select-margin-item-y 0;\\n padding: $select-padding-item-y $select-padding-item-x;\\n background: $select-color-item;\\n color: $select-color-item-text;\\n border: $select-width-item-border solid $select-color-item-border;\\n\\n &.active {\\n background: $select-color-item-active;\\n color: $select-color-item-active-text;\\n border: $select-width-item-border solid $select-color-item-active-border;\\n }\\n }\\n .#{$selectize}-control.multi &.disabled > div {\\n &,\\n &.active {\\n color: lighten(\\n desaturate($select-color-item-text, 100%),\\n $select-lighten-disabled-item-text\\n );\\n background: lighten(\\n desaturate($select-color-item, 100%),\\n $select-lighten-disabled-item\\n );\\n border: $select-width-item-border solid\\n lighten(\\n desaturate($select-color-item-border, 100%),\\n $select-lighten-disabled-item-border\\n );\\n }\\n }\\n > input {\\n &::-ms-clear {\\n display: none;\\n }\\n display: inline-block !important;\\n padding: 0 !important;\\n min-height: 0 !important;\\n max-height: none !important;\\n max-width: 100% !important;\\n margin: 0 !important;\\n text-indent: 0 !important;\\n border: 0 none !important;\\n background: none !important;\\n line-height: inherit !important;\\n user-select: auto !important;\\n box-shadow: none !important;\\n &:focus {\\n outline: none !important;\\n }\\n\\n &[placeholder] {\\n box-sizing: initial;\\n }\\n }\\n &.has-items > input {\\n margin: $select-caret-margin !important;\\n }\\n}\\n\\n.#{$selectize}-input::after {\\n content: \\\" \\\";\\n display: block;\\n clear: left;\\n}\\n\\n.#{$selectize}-input.dropdown-active::before {\\n content: \\\" \\\";\\n display: block;\\n position: absolute;\\n background: $select-color-dropdown-border-top;\\n height: 1px;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n}\\n\\n.#{$selectize}-dropdown {\\n position: absolute;\\n top: 100%;\\n left: 0;\\n width: 100%;\\n z-index: 10;\\n\\n border: $select-dropdown-border;\\n background: $select-color-dropdown;\\n margin: -1px 0 0 0;\\n border-top: 0 none;\\n box-sizing: border-box;\\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\\n border-radius: 0 0 $select-border-radius $select-border-radius;\\n\\n [data-selectable] {\\n cursor: pointer;\\n overflow: hidden;\\n .highlight {\\n background: $select-color-highlight;\\n border-radius: 1px;\\n }\\n }\\n .option,\\n .optgroup-header,\\n .no-results,\\n .create {\\n padding: $select-padding-dropdown-item-y $select-padding-dropdown-item-x;\\n }\\n .option,\\n [data-disabled],\\n [data-disabled] [data-selectable].option {\\n cursor: inherit;\\n opacity: 0.5;\\n }\\n [data-selectable].option {\\n opacity: 1;\\n cursor: pointer;\\n }\\n .optgroup:first-child .optgroup-header {\\n border-top: 0 none;\\n }\\n .optgroup-header {\\n color: $select-color-optgroup-text;\\n background: $select-color-optgroup;\\n cursor: default;\\n }\\n .active {\\n background-color: $select-color-item-active;\\n color: $select-color-item-active-text;\\n &.create {\\n color: $select-color-dropdown-item-create-active-text;\\n }\\n }\\n\\n .selected {\\n background-color: $select-color-item-active;\\n color: $select-color-item-active-text;\\n }\\n .create {\\n color: $select-color-dropdown-item-create-text;\\n }\\n\\n .active:not(.selected) {\\n background: $select-color-dropdown-item-active;\\n color: $select-color-dropdown-item-active-text;\\n }\\n}\\n\\n.#{$selectize}-dropdown-content {\\n overflow-y: auto;\\n overflow-x: hidden;\\n max-height: $select-max-height-dropdown;\\n overflow-scrolling: touch;\\n}\\n\\n.#{$selectize}-dropdown-emptyoptionlabel {\\n\\ttext-align: center;\\n}\\n\\n.#{$selectize}-dropdown .spinner {\\n display: inline-block;\\n width: $select-spinner-size;\\n height: $select-spinner-size;\\n margin: $select-padding-dropdown-item-y $select-padding-dropdown-item-x;\\n\\n &:after {\\n content: \\\" \\\";\\n display: block;\\n width: $select-spinner-size * 0.8;\\n height: $select-spinner-size * 0.8;\\n margin: $select-spinner-size * 0.1;\\n border-radius: 50%;\\n border: $select-spinner-border-size solid $select-spinner-border-color;\\n border-color: $select-spinner-border-color transparent\\n $select-spinner-border-color transparent;\\n animation: lds-dual-ring 1.2s linear infinite;\\n }\\n @keyframes lds-dual-ring {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n }\\n}\\n\\n.#{$selectize}-control.single .#{$selectize}-input {\\n &,\\n input {\\n cursor: pointer;\\n }\\n &.input-active,\\n &.input-active input:not(:read-only) {\\n cursor: text;\\n }\\n\\n &:after {\\n content: \\\" \\\";\\n display: block;\\n position: absolute;\\n top: 50%;\\n right: $select-arrow-offset;\\n margin-top: round(math.div(-1 * $select-arrow-size, 2));\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: $select-arrow-size $select-arrow-size 0 $select-arrow-size;\\n border-color: $select-arrow-color transparent transparent transparent;\\n }\\n &.dropdown-active:after {\\n margin-top: $select-arrow-size * -0.8;\\n border-width: 0 $select-arrow-size $select-arrow-size $select-arrow-size;\\n border-color: transparent transparent $select-arrow-color transparent;\\n }\\n}\\n\\n.#{$selectize}-control.rtl {\\n text-align: right;\\n &.single .#{$selectize}-input:after {\\n left: $select-arrow-offset;\\n right: auto;\\n }\\n .#{$selectize}-input > input {\\n margin: $select-caret-margin-rtl !important;\\n }\\n}\\n\\n.#{$selectize}-control .#{$selectize}-input.disabled {\\n opacity: $select-opacity-disabled;\\n background-color: $select-color-disabled;\\n}\\n\",\".#{$selectize}-dropdown.plugin-optgroup_columns {\\n .#{$selectize}-dropdown-content {\\n display: flex;\\n }\\n\\n .optgroup {\\n border-right: 1px solid #f2f2f2;\\n border-top: 0 none;\\n flex-grow: 1;\\n flex-basis: 0;\\n min-width: 0;\\n }\\n .optgroup:last-child {\\n border-right: 0 none;\\n }\\n .optgroup:before {\\n display: none;\\n }\\n .optgroup-header {\\n border-top: 0 none;\\n }\\n}\\n\",\".#{$selectize}-control.plugin-remove_button {\\n .item {\\n display: inline-flex;\\n align-items: center;\\n padding-right: 0 !important;\\n }\\n\\n .item .remove {\\n color: inherit;\\n text-decoration: none;\\n vertical-align: middle;\\n display: inline-block;\\n padding: $select-padding-item-y $select-padding-item-x;\\n border-left: 1px solid $select-color-item-border;\\n border-radius: 0 2px 2px 0;\\n box-sizing: border-box;\\n margin-left: $select-padding-item-x;\\n }\\n\\n .item .remove:hover {\\n background: rgba(0, 0, 0, 0.05);\\n }\\n\\n .item.active .remove {\\n border-left-color: $select-color-item-active-border;\\n }\\n\\n .disabled .item .remove:hover {\\n background: none;\\n }\\n\\n .disabled .item .remove {\\n border-left-color: lighten(\\n desaturate($select-color-item-border, 100%),\\n $select-lighten-disabled-item-border\\n );\\n }\\n}\\n\",\"$select-color-item: #1da7ee;\\n$select-color-item-text: #fff;\\n$select-color-item-active-text: #fff;\\n$select-color-item-border: #0073bb;\\n$select-color-item-active: #92c836;\\n$select-color-item-active-border: #00578d;\\n$select-width-item-border: 1px;\\n\\n@import \\\"selectize.scss\\\";\\n\\n.#{$selectize}-control {\\n &.multi {\\n .#{$selectize}-input {\\n &.has-items {\\n $padding-x: $select-padding-x - 3px;\\n padding-left: $padding-x;\\n padding-right: $padding-x;\\n }\\n &.disabled [data-value] {\\n color: #999;\\n text-shadow: none;\\n background: none;\\n box-shadow: none;\\n\\n &,\\n .remove {\\n border-color: #e6e6e6;\\n }\\n .remove {\\n background: none;\\n }\\n }\\n [data-value] {\\n text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);\\n border-radius: 3px;\\n @include selectize-vertical-gradient(#1da7ee, #178ee9);\\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2),\\n inset 0 1px rgba(255, 255, 255, 0.03);\\n &.active {\\n @include selectize-vertical-gradient(#008fd8, #0075cf);\\n }\\n }\\n }\\n }\\n &.single {\\n .#{$selectize}-input {\\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05),\\n inset 0 1px 0 rgba(255, 255, 255, 0.8);\\n @include selectize-vertical-gradient(#fefefe, #f2f2f2);\\n }\\n }\\n}\\n\\n.#{$selectize}-control.single .#{$selectize}-input,\\n.#{$selectize}-dropdown.single {\\n border-color: #b8b8b8;\\n}\\n\\n.#{$selectize}-dropdown {\\n .optgroup-header {\\n padding-top: $select-padding-dropdown-item-y + 2px;\\n font-weight: bold;\\n font-size: 0.85em;\\n }\\n .optgroup {\\n border-top: 1px solid $select-color-dropdown-border-top;\\n &:first-child {\\n border-top: 0 none;\\n }\\n }\\n}\\n\",\".#{$selectize}-control.plugin-clear_button {\\n .clear {\\n text-decoration: none;\\n display: flex;\\n position: absolute;\\n height: 100%;\\n width: 25px;\\n top: 0;\\n right: calc(#{$select-padding-x} - #{$select-padding-item-x});\\n color: rgba(0, 0, 0);\\n opacity: 0.4;\\n font-weight: bold;\\n border: none;\\n cursor: pointer;\\n z-index: 1;\\n font-size: 21px;\\n justify-content: center;\\n align-items: center;\\n }\\n\\n .clear:hover {\\n opacity: 1;\\n }\\n\\n &.single .clear {\\n right: calc(#{$select-padding-x} - #{$select-padding-item-x} + 1.5rem);\\n }\\n\\n}\\n\",\".#{selectize}-dropdown.plugin-auto_position.#{$selectize}-position-top {\\n border-top: 1px solid $select-color-border;\\n border-bottom: 0 none;\\n border-radius: 3px 3px 0 0;\\n box-shadow: 0 -6px 12px rgb(0 0 0 / 18%);\\n}\\n\\n.#{selectize}-control.plugin-auto_position .#{selectize}-input.#{$selectize}-position-top.dropdown-active {\\n border-radius: 0 0 3px 3px;\\n border-top: 0 none;\\n\\n &::before {\\n top: 0;\\n bottom: unset;\\n }\\n}\\n\"]}]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".FilteringHeader-module__root___1FCAE {\\n background: #39235d;\\n position: fixed;\\n top: 0;\\n left: 0;\\n right: 0;\\n z-index: 10000;\\n transform: translateY(-100%);\\n transition: all 0.4s ease-in-out;\\n}\\n\\n.FilteringHeader-module__visible___3DyHx {\\n transform: translateY(0);\\n}\\n\\n.FilteringHeader-module__inner___1UkdI {\\n padding: 0px 12px;\\n display: flex;\\n align-items: center;\\n}\\n\\n.FilteringHeader-module__backToTop___cvtyY {\\n flex: 0 0 auto;\\n position: relative;\\n width: 30px;\\n height: 30px;\\n border: none;\\n margin-right: 12px;\\n padding: 0;\\n}\\n\\n.FilteringHeader-module__backToTop___cvtyY svg {\\n position: absolute;\\n width: 24px;\\n height: 24px;\\n left: 3px;\\n top: 3px;\\n}\\n\\n.FilteringHeader-module__backToTop___cvtyY:focus {\\n border: none;\\n outline: none;\\n background: #67318e;\\n}\\n\\n.FilteringHeader-module__selectWrapper___390ju {\\n flex: 1 1 auto;\\n padding: 12px 0;\\n}\\n\\n.FilteringHeader-module__selectOption___1LDx8 {\\n display: flex;\\n border-bottom: 1px solid #39235d;\\n}\\n\\n.FilteringHeader-module__selectOption___1LDx8:first-of-type {\\n border-top: 1px solid #39235d;\\n}\\n\\n.FilteringHeader-module__multiSelectOption___1pdiX {\\n flex: 1 1 auto;\\n display: flex;\\n align-items: center;\\n}\\n\\n.FilteringHeader-module__multiSelectOption___1pdiX > span {\\n margin-left: 8px;\\n}\\n\\n.FilteringHeader-module__scrollOption___tbQcI {\\n flex: 0 0 auto;\\n width: 100px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 0;\\n padding-left: 10px;\\n border: none;\\n border-radius: 0;\\n border-left: 1px solid #39235d;\\n color: #a771ce;\\n font-weight: bold;\\n transition: color 0.2s ease-in-out;\\n}\\n\\n@media (max-width: 991px) {\\n .FilteringHeader-module__scrollOption___tbQcI {\\n width: 60px;\\n padding-left: 5px;\\n }\\n}\\n\\n.FilteringHeader-module__scrollOption___tbQcI:hover {\\n background: #39235d;\\n}\\n\\n.FilteringHeader-module__scrollOption___tbQcI:disabled {\\n color: rgba(167, 113, 206, 0.1);\\n cursor: not-allowed;\\n}\\n\\n.FilteringHeader-module__scrollOption___tbQcI:disabled:hover {\\n background: transparent;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/components/FilteringHeader/FilteringHeader.module.scss\",\"FilteringHeader.module.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,mBAAA;EACA,eAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,cAAA;EACA,4BAAA;EACA,gCAAA;ACDF;;ADIA;EACE,wBAAA;ACDF;;ADIA;EACE,iBAAA;EACA,aAAA;EACA,mBAAA;ACDF;;ADIA;EACE,cAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,kBAAA;EACA,UAAA;ACDF;;ADGE;EACE,kBAAA;EACA,WAAA;EACA,YAAA;EACA,SAAA;EACA,QAAA;ACDJ;;ADIE;EACE,YAAA;EACA,aAAA;EACA,mBAAA;ACFJ;;ADMA;EACE,cAAA;EACA,eAAA;ACHF;;ADMA;EACE,aAAA;EACA,gCAAA;ACHF;;ADKE;EACE,6BAAA;ACHJ;;ADOA;EACE,cAAA;EACA,aAAA;EACA,mBAAA;ACJF;;ADME;EACE,gBAAA;ACJJ;;ADQA;EACE,cAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,UAAA;EACA,kBAAA;EACA,YAAA;EACA,gBAAA;EACA,8BAAA;EACA,cAAA;EACA,iBAAA;EACA,kCAAA;ACLF;;ADOE;EAfF;IAgBI,WAAA;IACA,iBAAA;ECJF;AACF;;ADME;EACE,mBAAA;ACJJ;;ADOE;EACE,+BAAA;EACA,mBAAA;ACLJ;;ADOI;EACE,uBAAA;ACLN\",\"file\":\"FilteringHeader.module.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.root {\\n background: color(purple);\\n position: fixed;\\n top: 0;\\n left: 0;\\n right: 0;\\n z-index: 10000;\\n transform: translateY(-100%);\\n transition: all 0.4s ease-in-out;\\n}\\n\\n.visible {\\n transform: translateY(0);\\n}\\n\\n.inner {\\n padding: 0px 12px;\\n display: flex;\\n align-items: center;\\n}\\n\\n.backToTop {\\n flex: 0 0 auto;\\n position: relative;\\n width: 30px;\\n height: 30px;\\n border: none;\\n margin-right: 12px;\\n padding: 0;\\n\\n & svg {\\n position: absolute;\\n width: 24px;\\n height: 24px;\\n left: 3px;\\n top: 3px;\\n }\\n\\n &:focus {\\n border: none;\\n outline: none;\\n background: color(purple, light);\\n }\\n}\\n\\n.selectWrapper {\\n flex: 1 1 auto;\\n padding: 12px 0;\\n}\\n\\n.selectOption {\\n display: flex;\\n border-bottom: 1px solid color(purple);\\n\\n &:first-of-type {\\n border-top: 1px solid color(purple);\\n }\\n}\\n\\n.multiSelectOption {\\n flex: 1 1 auto;\\n display: flex;\\n align-items: center;\\n\\n & > span {\\n margin-left: 8px;\\n }\\n}\\n\\n.scrollOption {\\n flex: 0 0 auto;\\n width: 100px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 0;\\n padding-left: 10px;\\n border: none;\\n border-radius: 0;\\n border-left: 1px solid color(purple);\\n color: lighten(color(purple, light), 25%);\\n font-weight: bold;\\n transition: color 0.2s ease-in-out;\\n\\n @media (max-width: 991px) {\\n width: 60px;\\n padding-left: 5px;\\n }\\n\\n &:hover {\\n background: color(purple);\\n }\\n\\n &:disabled {\\n color: rgba(lighten(color(purple, light), 25%), 0.1);\\n cursor: not-allowed;\\n\\n &:hover {\\n background: transparent;\\n }\\n }\\n}\\n\",\".root {\\n background: #39235d;\\n position: fixed;\\n top: 0;\\n left: 0;\\n right: 0;\\n z-index: 10000;\\n transform: translateY(-100%);\\n transition: all 0.4s ease-in-out;\\n}\\n\\n.visible {\\n transform: translateY(0);\\n}\\n\\n.inner {\\n padding: 0px 12px;\\n display: flex;\\n align-items: center;\\n}\\n\\n.backToTop {\\n flex: 0 0 auto;\\n position: relative;\\n width: 30px;\\n height: 30px;\\n border: none;\\n margin-right: 12px;\\n padding: 0;\\n}\\n.backToTop svg {\\n position: absolute;\\n width: 24px;\\n height: 24px;\\n left: 3px;\\n top: 3px;\\n}\\n.backToTop:focus {\\n border: none;\\n outline: none;\\n background: #67318e;\\n}\\n\\n.selectWrapper {\\n flex: 1 1 auto;\\n padding: 12px 0;\\n}\\n\\n.selectOption {\\n display: flex;\\n border-bottom: 1px solid #39235d;\\n}\\n.selectOption:first-of-type {\\n border-top: 1px solid #39235d;\\n}\\n\\n.multiSelectOption {\\n flex: 1 1 auto;\\n display: flex;\\n align-items: center;\\n}\\n.multiSelectOption > span {\\n margin-left: 8px;\\n}\\n\\n.scrollOption {\\n flex: 0 0 auto;\\n width: 100px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 0;\\n padding-left: 10px;\\n border: none;\\n border-radius: 0;\\n border-left: 1px solid #39235d;\\n color: #a771ce;\\n font-weight: bold;\\n transition: color 0.2s ease-in-out;\\n}\\n@media (max-width: 991px) {\\n .scrollOption {\\n width: 60px;\\n padding-left: 5px;\\n }\\n}\\n.scrollOption:hover {\\n background: #39235d;\\n}\\n.scrollOption:disabled {\\n color: rgba(167, 113, 206, 0.1);\\n cursor: not-allowed;\\n}\\n.scrollOption:disabled:hover {\\n background: transparent;\\n}\"]}]);\n// Exports\nexports.locals = {\n\t\"root\": \"FilteringHeader-module__root___1FCAE\",\n\t\"visible\": \"FilteringHeader-module__visible___3DyHx\",\n\t\"inner\": \"FilteringHeader-module__inner___1UkdI\",\n\t\"backToTop\": \"FilteringHeader-module__backToTop___cvtyY\",\n\t\"selectWrapper\": \"FilteringHeader-module__selectWrapper___390ju\",\n\t\"selectOption\": \"FilteringHeader-module__selectOption___1LDx8\",\n\t\"multiSelectOption\": \"FilteringHeader-module__multiSelectOption___1pdiX\",\n\t\"scrollOption\": \"FilteringHeader-module__scrollOption___tbQcI\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".Markdown-module__markdown___1Q-Tb code,\\n.Markdown-module__renderedMarkdown___1A_Zj code {\\n font-family: Consolas, \\\"Andale Mono WT\\\", \\\"Andale Mono\\\", \\\"Lucida Console\\\", \\\"Lucida Sans Typewriter\\\", \\\"DejaVu Sans Mono\\\", \\\"Bitstream Vera Sans Mono\\\", \\\"Liberation Mono\\\", \\\"Nimbus Mono L\\\", Monaco, \\\"Courier New\\\", Courier, monospace;\\n letter-spacing: 0.1em;\\n color: #39235d;\\n font-weight: 700;\\n}\\n.Markdown-module__markdown___1Q-Tb ul,\\n.Markdown-module__markdown___1Q-Tb ol,\\n.Markdown-module__renderedMarkdown___1A_Zj ul,\\n.Markdown-module__renderedMarkdown___1A_Zj ol {\\n padding-left: 10px;\\n margin-bottom: 1rem;\\n}\\n.Markdown-module__markdown___1Q-Tb ul li::marker,\\n.Markdown-module__renderedMarkdown___1A_Zj ul li::marker {\\n color: #39235d;\\n}\\n.Markdown-module__markdown___1Q-Tb h1,\\n.Markdown-module__renderedMarkdown___1A_Zj h1 {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n}\\n.Markdown-module__markdown___1Q-Tb h2,\\n.Markdown-module__renderedMarkdown___1A_Zj h2 {\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n}\\n.Markdown-module__markdown___1Q-Tb h1,\\n.Markdown-module__markdown___1Q-Tb h2,\\n.Markdown-module__markdown___1Q-Tb h3,\\n.Markdown-module__renderedMarkdown___1A_Zj h1,\\n.Markdown-module__renderedMarkdown___1A_Zj h2,\\n.Markdown-module__renderedMarkdown___1A_Zj h3 {\\n font-weight: 500;\\n color: #39235d;\\n margin-bottom: 0.5rem;\\n}\\n.Markdown-module__markdown___1Q-Tb p,\\n.Markdown-module__renderedMarkdown___1A_Zj p {\\n margin-bottom: 1rem;\\n}\\n.Markdown-module__markdown___1Q-Tb strong,\\n.Markdown-module__renderedMarkdown___1A_Zj strong {\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n font-weight: 500;\\n color: #39235d;\\n line-height: 1rem;\\n}\\n.Markdown-module__markdown___1Q-Tb > *:last-child,\\n.Markdown-module__renderedMarkdown___1A_Zj > *:last-child {\\n margin-bottom: 0;\\n}\\n.Markdown-module__renderedMarkdown___1A_Zj ol {\\n padding-left: 0;\\n}\\n.Markdown-module__renderedMarkdown___1A_Zj ol li::marker {\\n content: \\\"\\\";\\n display: none;\\n}\\n.Markdown-module__renderedMarkdown___1A_Zj ul {\\n margin-left: 1rem;\\n}\\n.Markdown-module__renderedMarkdown___1A_Zj li {\\n margin: 0.5rem 0;\\n}\\n.Markdown-module__orderedListItem___2wSkm {\\n display: flex;\\n}\\n.Markdown-module__orderedListItemIndex___Cm9G2 {\\n flex-shrink: 0;\\n display: inline-block;\\n width: 1.25rem;\\n height: 1.25rem;\\n margin-right: 0.5rem;\\n border-radius: 50%;\\n text-align: center;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n line-height: 1.25rem;\\n font-weight: 700;\\n color: #3e7cb2;\\n background-color: #e2ecf6;\\n transform: translateY(-0.125rem);\\n}\\n.Markdown-module__editorWrapper___3-hei {\\n flex: 1 1 auto;\\n max-width: 100%;\\n -webkit-hyphens: auto;\\n hyphens: auto;\\n}\\n.Markdown-module__editorWrapper___3-hei > div {\\n display: flex;\\n flex-direction: column;\\n border: none;\\n font-family: inherit;\\n min-height: 120px;\\n}\\n.Markdown-module__editorWrapper___3-hei > div > div:nth-of-type(1) {\\n margin: 0;\\n border: none;\\n flex: 0 0 auto;\\n display: flex;\\n flex-wrap: wrap;\\n}\\n.Markdown-module__editorWrapper___3-hei > div > div:nth-of-type(2) {\\n margin: 0;\\n padding: 0;\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n border: none;\\n}\\n.Markdown-module__editorWrapper___3-hei > div > div:nth-of-type(2) > div {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n}\\n.Markdown-module__editorWrapper___3-hei > div > div:nth-of-type(2) > div > div {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid #a1a7bb;\\n border-radius: 5px;\\n}\\n.Markdown-module__editorWrapper___3-hei > div > div:nth-of-type(2) > div > div > div {\\n flex: 1 1 auto;\\n padding: 10px;\\n}\\n.Markdown-module__div___tBURL.Markdown-module__DraftEditor-root___J0qhR {\\n border: 1px solid #000;\\n background-color: beige;\\n height: 200px;\\n width: 300px;\\n overflow-y: auto;\\n}\\n.Markdown-module__div___tBURL.Markdown-module__DraftEditor-editorContainer___3GjhN,\\n.Markdown-module__div___tBURL.Markdown-module__public-DraftEditor-content___3nV_j {\\n height: 100%;\\n}\\n.Markdown-module__draftJsEditor___ssWl8 {\\n border: 1px solid #a1a7bb;\\n border-radius: 4px;\\n}\\n.Markdown-module__rdw-editor-toolbar___1u07D {\\n padding: 0px !important;\\n}\\n.Markdown-module__asd___10gki {\\n border: 1px solid red;\\n}\\n.Markdown-module__Markdown-module__editorWrapper___3-hei___1SuMq > div > div:nth-of-type(2) > div > div > div {\\n padding: 0px !important;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/components/Markdown/Markdown.module.scss\",\"Markdown.module.scss\",\"/rails/app/javascript/src/styles/setup/_mixins.scss\"],\"names\":[],\"mappings\":\"AAIE;;EACE,iOAAA;EAIA,qBAAA;EACA,cAAA;EACA,gBAAA;ACLJ;ADQE;;;;EAEE,kBAAA;EACA,mBAAA;ACJJ;ADOE;;EACE,cAAA;ACJJ;ADOE;;EEuCA,iBAAA;EACA,mBAAA;AD1CF;ADME;;EEmCA,kBAAA;EACA,oBAAA;ADrCF;ADKE;;;;;;EAGE,gBAAA;EACA,cAAA;EACA,qBAAA;ACAJ;ADGE;;EACE,mBAAA;ACAJ;ADGE;;EEmBA,kBAAA;EACA,oBAAA;EFlBE,gBAAA;EACA,cAAA;EACA,iBAAA;ACCJ;ADEE;;EACE,gBAAA;ACCJ;ADIE;EACE,eAAA;ACDJ;ADGI;EACE,WAAA;EACA,aAAA;ACDN;ADKE;EACE,iBAAA;ACHJ;ADME;EACE,gBAAA;ACJJ;ADQA;EACE,aAAA;ACLF;ADQA;EACE,cAAA;EACA,qBAAA;EACA,cAAA;EACA,eAAA;EACA,oBAAA;EACA,kBAAA;EACA,kBAAA;EEvBA,kBAAA;EACA,iBAAA;EFyBA,oBAAA;EACA,gBAAA;EACA,cAAA;EACA,yBAAA;EACA,gCAAA;ACLF;ADSA;EACE,cAAA;EACA,eAAA;EACA,qBAAA;UAAA,aAAA;ACNF;ADSE;EACE,aAAA;EACA,sBAAA;EACA,YAAA;EACA,oBAAA;EACA,iBAAA;ACPJ;ADUI;EACE,SAAA;EACA,YAAA;EACA,cAAA;EACA,aAAA;EACA,eAAA;ACRN;ADYI;EACE,SAAA;EACA,UAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;ACVN;ADYM;EACE,cAAA;EACA,aAAA;EACA,sBAAA;ACVR;ADYQ;EACE,cAAA;EACA,aAAA;EACA,sBAAA;EACA,yBAAA;EACA,kBAAA;ACVV;ADYU;EACE,cAAA;EACA,aAAA;ACVZ;ADkBA;EACE,sBAAA;EACA,uBAAA;EACA,aAAA;EACA,YAAA;EACA,gBAAA;ACfF;ADiBA;;EAEE,YAAA;ACdF;ADiBA;EACE,yBAAA;EAEA,kBAAA;ACfF;ADkBA;EACE,uBAAA;ACfF;ADkBA;EACE,qBAAA;ACfF;ADkBA;EAME,uBAAA;ACpBF\",\"file\":\"Markdown.module.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.markdown,\\n.renderedMarkdown {\\n code {\\n font-family: Consolas, \\\"Andale Mono WT\\\", \\\"Andale Mono\\\", \\\"Lucida Console\\\",\\n \\\"Lucida Sans Typewriter\\\", \\\"DejaVu Sans Mono\\\", \\\"Bitstream Vera Sans Mono\\\",\\n \\\"Liberation Mono\\\", \\\"Nimbus Mono L\\\", Monaco, \\\"Courier New\\\", Courier,\\n monospace;\\n letter-spacing: 0.1em;\\n color: color(purple);\\n font-weight: 700;\\n }\\n\\n ul,\\n ol {\\n padding-left: 10px;\\n margin-bottom: 1rem;\\n }\\n\\n ul li::marker {\\n color: color(purple);\\n }\\n\\n h1 {\\n @include type-setting(1-5);\\n }\\n\\n h2 {\\n @include type-setting(1-25);\\n }\\n\\n h1,\\n h2,\\n h3 {\\n font-weight: 500;\\n color: color(purple);\\n margin-bottom: 0.5rem;\\n }\\n\\n p {\\n margin-bottom: 1rem;\\n }\\n\\n strong {\\n @include type-setting(1-25);\\n font-weight: 500;\\n color: color(purple);\\n line-height: 1rem;\\n }\\n\\n & > *:last-child {\\n margin-bottom: 0;\\n }\\n}\\n\\n.renderedMarkdown {\\n ol {\\n padding-left: 0;\\n\\n li::marker {\\n content: \\\"\\\";\\n display: none;\\n }\\n }\\n\\n ul {\\n margin-left: 1rem;\\n }\\n\\n li {\\n margin: 0.5rem 0;\\n }\\n}\\n\\n.orderedListItem {\\n display: flex;\\n}\\n\\n.orderedListItemIndex {\\n flex-shrink: 0;\\n display: inline-block;\\n width: 1.25rem;\\n height: 1.25rem;\\n margin-right: 0.5rem;\\n border-radius: 50%;\\n text-align: center;\\n @include type-setting(1);\\n\\n line-height: 1.25rem;\\n font-weight: 700;\\n color: color(blue, dark);\\n background-color: color(blue, lighter);\\n transform: translateY(-0.125rem);\\n}\\n\\n// override styles for react-rte\\n.editorWrapper {\\n flex: 1 1 auto;\\n max-width: 100%;\\n hyphens: auto;\\n\\n // targets editor root\\n & > div {\\n display: flex;\\n flex-direction: column;\\n border: none;\\n font-family: inherit;\\n min-height: 120px;\\n\\n // targets toolbar\\n & > div:nth-of-type(1) {\\n margin: 0;\\n border: none;\\n flex: 0 0 auto;\\n display: flex;\\n flex-wrap: wrap;\\n }\\n\\n // targets textarea\\n & > div:nth-of-type(2) {\\n margin: 0;\\n padding: 0;\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n border: none;\\n\\n & > div {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n\\n & > div {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid color(gray, light);\\n border-radius: 5px;\\n\\n & > div {\\n flex: 1 1 auto;\\n padding: 10px;\\n }\\n }\\n }\\n }\\n }\\n}\\n\\n.div.DraftEditor-root {\\n border: 1px solid #000;\\n background-color: beige;\\n height: 200px;\\n width: 300px;\\n overflow-y: auto;\\n}\\n.div.DraftEditor-editorContainer,\\n.div.public-DraftEditor-content {\\n height: 100%;\\n}\\n\\n.draftJsEditor {\\n border: 1px solid #a1a7bb;\\n\\n border-radius: 4px;\\n}\\n\\n.rdw-editor-toolbar {\\n padding: 0px !important;\\n}\\n\\n.asd {\\n border: 1px solid red;\\n}\\n\\n.Markdown-module__editorWrapper___3-hei\\n > div\\n > div:nth-of-type(2)\\n > div\\n > div\\n > div {\\n padding: 0px !important;\\n}\\n\",\".markdown code,\\n.renderedMarkdown code {\\n font-family: Consolas, \\\"Andale Mono WT\\\", \\\"Andale Mono\\\", \\\"Lucida Console\\\", \\\"Lucida Sans Typewriter\\\", \\\"DejaVu Sans Mono\\\", \\\"Bitstream Vera Sans Mono\\\", \\\"Liberation Mono\\\", \\\"Nimbus Mono L\\\", Monaco, \\\"Courier New\\\", Courier, monospace;\\n letter-spacing: 0.1em;\\n color: #39235d;\\n font-weight: 700;\\n}\\n.markdown ul,\\n.markdown ol,\\n.renderedMarkdown ul,\\n.renderedMarkdown ol {\\n padding-left: 10px;\\n margin-bottom: 1rem;\\n}\\n.markdown ul li::marker,\\n.renderedMarkdown ul li::marker {\\n color: #39235d;\\n}\\n.markdown h1,\\n.renderedMarkdown h1 {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n}\\n.markdown h2,\\n.renderedMarkdown h2 {\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n}\\n.markdown h1,\\n.markdown h2,\\n.markdown h3,\\n.renderedMarkdown h1,\\n.renderedMarkdown h2,\\n.renderedMarkdown h3 {\\n font-weight: 500;\\n color: #39235d;\\n margin-bottom: 0.5rem;\\n}\\n.markdown p,\\n.renderedMarkdown p {\\n margin-bottom: 1rem;\\n}\\n.markdown strong,\\n.renderedMarkdown strong {\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n font-weight: 500;\\n color: #39235d;\\n line-height: 1rem;\\n}\\n.markdown > *:last-child,\\n.renderedMarkdown > *:last-child {\\n margin-bottom: 0;\\n}\\n\\n.renderedMarkdown ol {\\n padding-left: 0;\\n}\\n.renderedMarkdown ol li::marker {\\n content: \\\"\\\";\\n display: none;\\n}\\n.renderedMarkdown ul {\\n margin-left: 1rem;\\n}\\n.renderedMarkdown li {\\n margin: 0.5rem 0;\\n}\\n\\n.orderedListItem {\\n display: flex;\\n}\\n\\n.orderedListItemIndex {\\n flex-shrink: 0;\\n display: inline-block;\\n width: 1.25rem;\\n height: 1.25rem;\\n margin-right: 0.5rem;\\n border-radius: 50%;\\n text-align: center;\\n font-size: 0.67rem;\\n line-height: 1rem;\\n line-height: 1.25rem;\\n font-weight: 700;\\n color: #3e7cb2;\\n background-color: #e2ecf6;\\n transform: translateY(-0.125rem);\\n}\\n\\n.editorWrapper {\\n flex: 1 1 auto;\\n max-width: 100%;\\n hyphens: auto;\\n}\\n.editorWrapper > div {\\n display: flex;\\n flex-direction: column;\\n border: none;\\n font-family: inherit;\\n min-height: 120px;\\n}\\n.editorWrapper > div > div:nth-of-type(1) {\\n margin: 0;\\n border: none;\\n flex: 0 0 auto;\\n display: flex;\\n flex-wrap: wrap;\\n}\\n.editorWrapper > div > div:nth-of-type(2) {\\n margin: 0;\\n padding: 0;\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n border: none;\\n}\\n.editorWrapper > div > div:nth-of-type(2) > div {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n}\\n.editorWrapper > div > div:nth-of-type(2) > div > div {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n border: 1px solid #a1a7bb;\\n border-radius: 5px;\\n}\\n.editorWrapper > div > div:nth-of-type(2) > div > div > div {\\n flex: 1 1 auto;\\n padding: 10px;\\n}\\n\\n.div.DraftEditor-root {\\n border: 1px solid #000;\\n background-color: beige;\\n height: 200px;\\n width: 300px;\\n overflow-y: auto;\\n}\\n\\n.div.DraftEditor-editorContainer,\\n.div.public-DraftEditor-content {\\n height: 100%;\\n}\\n\\n.draftJsEditor {\\n border: 1px solid #a1a7bb;\\n border-radius: 4px;\\n}\\n\\n.rdw-editor-toolbar {\\n padding: 0px !important;\\n}\\n\\n.asd {\\n border: 1px solid red;\\n}\\n\\n.Markdown-module__editorWrapper___3-hei > div > div:nth-of-type(2) > div > div > div {\\n padding: 0px !important;\\n}\",\"//\\n// Media query mixin\\n@mixin mq($point, $max: null) {\\n @if map-has-key($mq-points, $point) {\\n $point: map-get($mq-points, $point);\\n @if $max {\\n @media screen and (max-width: #{$point - 1}px) {\\n @content;\\n }\\n } @else {\\n @media screen and (min-width: #{$point}px) {\\n @content;\\n }\\n }\\n } @else {\\n @error \\\"No such breakpoint: `#{$point}`.\\\";\\n }\\n}\\n\\n//\\n// Map class mixin\\n@mixin map-to-class($map, $property, $selector, $divider: \\\"\\\") {\\n $selector: if($selector == \\\"\\\" and &, &, $selector);\\n\\n @each $key, $value in $map {\\n $suffix: if($key == \\\"base\\\", \\\"\\\", $divider + $key);\\n @at-root #{$selector}#{$suffix} {\\n @if type-of($value) == map {\\n @include map-to-class($value, $property, \\\"\\\", $divider) {\\n @content;\\n }\\n } @else {\\n #{$property}: $value;\\n }\\n }\\n }\\n}\\n\\n//\\n// Get color value from map\\n@function color($color, $tone: \\\"base\\\") {\\n @if map-has-key($colors, \\\"#{$color}\\\") {\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == map {\\n @return map-get(map-get($colors, \\\"#{$color}\\\"), $tone);\\n }\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == color {\\n @return map-get($colors, \\\"#{$color}\\\");\\n }\\n @warn \\\"Color `#{$color}` found without value\\\";\\n }\\n @warn \\\"Unknown `#{$color}` color\\\";\\n @return null;\\n}\\n\\n//\\n// Get font-size from map\\n@function font-size($key) {\\n @return map-get($type, $key);\\n}\\n\\n//\\n// Get font-size from map\\n@mixin type-setting($key) {\\n font-size: map-get($type, $key);\\n line-height: map-get($line, $key);\\n}\\n\"]}]);\n// Exports\nexports.locals = {\n\t\"markdown\": \"Markdown-module__markdown___1Q-Tb\",\n\t\"renderedMarkdown\": \"Markdown-module__renderedMarkdown___1A_Zj\",\n\t\"orderedListItem\": \"Markdown-module__orderedListItem___2wSkm\",\n\t\"orderedListItemIndex\": \"Markdown-module__orderedListItemIndex___Cm9G2\",\n\t\"editorWrapper\": \"Markdown-module__editorWrapper___3-hei\",\n\t\"div\": \"Markdown-module__div___tBURL\",\n\t\"DraftEditor-root\": \"Markdown-module__DraftEditor-root___J0qhR\",\n\t\"DraftEditor-editorContainer\": \"Markdown-module__DraftEditor-editorContainer___3GjhN\",\n\t\"public-DraftEditor-content\": \"Markdown-module__public-DraftEditor-content___3nV_j\",\n\t\"draftJsEditor\": \"Markdown-module__draftJsEditor___ssWl8\",\n\t\"rdw-editor-toolbar\": \"Markdown-module__rdw-editor-toolbar___1u07D\",\n\t\"asd\": \"Markdown-module__asd___10gki\",\n\t\"Markdown-module__editorWrapper___3-hei\": \"Markdown-module__Markdown-module__editorWrapper___3-hei___1SuMq\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".NewSuggestionItem-module__editorButtons___1u3F_ {\\n flex: 1 1 auto;\\n display: flex;\\n margin: -8px;\\n}\\n.NewSuggestionItem-module__editorButtons___1u3F_ > button {\\n margin: 8px;\\n}\\n.NewSuggestionItem-module__header___3KBoh {\\n position: relative;\\n padding: 1rem 1.5rem;\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n min-height: 220px;\\n display: flex;\\n align-items: flex-end;\\n background-size: cover;\\n background-position: center center;\\n}\\n@media screen and (max-width: 767px) {\\n .NewSuggestionItem-module__header___3KBoh {\\n padding: 1rem;\\n }\\n}\\n.NewSuggestionItem-module__headerGradient___ZRCfk {\\n position: absolute;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n height: 70%;\\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));\\n}\\n.NewSuggestionItem-module__headerFields___3mdgC {\\n position: relative;\\n z-index: 2;\\n width: 100%;\\n}\\n.NewSuggestionItem-module__field___MlLPA input[type=text],\\n.NewSuggestionItem-module__fieldWithMargin___2DV07 input[type=text] {\\n border: 1px solid #a1a7bb;\\n border-radius: 5px;\\n width: 100%;\\n padding: 10px;\\n background: #ffffff;\\n}\\n.NewSuggestionItem-module__fieldWithMargin___2DV07 {\\n margin-top: 1rem;\\n}\\n.NewSuggestionItem-module__fieldLabel___3VF6p {\\n color: #39235d;\\n font-weight: 500;\\n}\\n.NewSuggestionItem-module__fieldLabelWhite___3l6qU {\\n color: #ffffff;\\n font-weight: 500;\\n}\\n.NewSuggestionItem-module__newItem___2B8rg {\\n align-self: stretch;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n padding: 1rem;\\n width: 100%;\\n margin-bottom: 1rem;\\n border: none;\\n background: #f3f7fb;\\n}\\n.NewSuggestionItem-module__itemLinkContainer___kQakg {\\n padding: 0 1.5rem 1rem 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .NewSuggestionItem-module__itemLinkContainer___kQakg {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n.NewSuggestionItem-module__itemLink___11FeT {\\n display: block;\\n position: relative;\\n background: #f3f7fb;\\n color: #fc8020;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n}\\n.NewSuggestionItem-module__itemLink___11FeT > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n}\\n.NewSuggestionItem-module__itemTitle___2f_T8 {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n.NewSuggestionItem-module__itemTitleWhite___891Un {\\n position: relative;\\n z-index: 2;\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #ffffff;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/components/NewSuggestionItem/NewSuggestionItem.module.scss\",\"NewSuggestionItem.module.scss\",\"/rails/app/javascript/src/styles/setup/_mixins.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,cAAA;EACA,aAAA;EACA,YAAA;ACDF;ADGE;EACE,WAAA;ACDJ;ADKA;EACE,kBAAA;EACA,oBAAA;EAEA,8BAAA;EACA,+BAAA;EAEA,yBAAA;EAMA,iBAAA;EACA,aAAA;EACA,qBAAA;EAEA,sBAAA;EACA,kCAAA;ACVF;ACdM;EFMN;IAUI,aAAA;ECEF;AACF;ADQA;EACE,kBAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,WAAA;EACA,iEAAA;ACLF;ADQA;EACE,kBAAA;EACA,UAAA;EACA,WAAA;ACLF;ADUE;;EACE,yBAAA;EACA,kBAAA;EACA,WAAA;EACA,aAAA;EACA,mBAAA;ACNJ;ADUA;EACE,gBAAA;ACPF;ADUA;EACE,cAAA;EACA,gBAAA;ACPF;ADUA;EACE,cAAA;EACA,gBAAA;ACPF;ADUA;EACE,mBAAA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,aAAA;EACA,WAAA;EACA,mBAAA;EACA,YAAA;EACA,mBAAA;ACPF;ADUA;EACE,6BAAA;ACPF;AC1EM;EFgFN;IAII,aAAA;IACA,cAAA;ECNF;AACF;ADSA;EACE,cAAA;EACA,kBAAA;EACA,mBAAA;EACA,cAAA;EEpCA,kBAAA;EACA,oBAAA;EFqCA,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;ACLF;ADOE;EACE,kBAAA;EACA,aAAA;EACA,QAAA;EACA,2BAAA;ACLJ;ADSA;EEnDE,iBAAA;EACA,mBAAA;EFoDA,gBAAA;EACA,cAAA;ACLF;ADQA;EACE,kBAAA;EACA,UAAA;EE3DA,iBAAA;EACA,mBAAA;EF4DA,gBAAA;EACA,cAAA;ACJF\",\"file\":\"NewSuggestionItem.module.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.editorButtons {\\n flex: 1 1 auto;\\n display: flex;\\n margin: -8px;\\n\\n & > button {\\n margin: 8px;\\n }\\n}\\n\\n.header {\\n position: relative;\\n padding: 1rem 1.5rem;\\n\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n\\n background-color: color(blue, lightest);\\n\\n @include mq(m, max) {\\n padding: 1rem;\\n }\\n\\n min-height: 220px;\\n display: flex;\\n align-items: flex-end;\\n\\n background-size: cover;\\n background-position: center center;\\n}\\n\\n.headerGradient {\\n position: absolute;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n height: 70%;\\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));\\n}\\n\\n.headerFields {\\n position: relative;\\n z-index: 2;\\n width: 100%;\\n}\\n\\n.field,\\n.fieldWithMargin {\\n & input[type=\\\"text\\\"] {\\n border: 1px solid color(gray, light);\\n border-radius: 5px;\\n width: 100%;\\n padding: 10px;\\n background: #ffffff;\\n }\\n}\\n\\n.fieldWithMargin {\\n margin-top: 1rem;\\n}\\n\\n.fieldLabel {\\n color: color(purple);\\n font-weight: 500;\\n}\\n\\n.fieldLabelWhite {\\n color: #ffffff;\\n font-weight: 500;\\n}\\n\\n.newItem {\\n align-self: stretch;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n padding: 1rem;\\n width: 100%;\\n margin-bottom: 1rem;\\n border: none;\\n background: color(blue, lightest);\\n}\\n\\n.itemLinkContainer {\\n padding: 0 1.5rem 1rem 1.5rem;\\n\\n @include mq(m, max) {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n\\n.itemLink {\\n display: block;\\n position: relative;\\n background: color(blue, lightest);\\n color: color(orange);\\n @include type-setting(1-25);\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n\\n & > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n }\\n}\\n\\n.itemTitle {\\n @include type-setting(1-5);\\n font-weight: 500;\\n color: color(purple);\\n}\\n\\n.itemTitleWhite {\\n position: relative;\\n z-index: 2;\\n @include type-setting(1-5);\\n font-weight: 500;\\n color: #ffffff;\\n}\\n\",\".editorButtons {\\n flex: 1 1 auto;\\n display: flex;\\n margin: -8px;\\n}\\n.editorButtons > button {\\n margin: 8px;\\n}\\n\\n.header {\\n position: relative;\\n padding: 1rem 1.5rem;\\n border-top-left-radius: 0.5rem;\\n border-top-right-radius: 0.5rem;\\n background-color: #f3f7fb;\\n min-height: 220px;\\n display: flex;\\n align-items: flex-end;\\n background-size: cover;\\n background-position: center center;\\n}\\n@media screen and (max-width: 767px) {\\n .header {\\n padding: 1rem;\\n }\\n}\\n\\n.headerGradient {\\n position: absolute;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n height: 70%;\\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));\\n}\\n\\n.headerFields {\\n position: relative;\\n z-index: 2;\\n width: 100%;\\n}\\n\\n.field input[type=text],\\n.fieldWithMargin input[type=text] {\\n border: 1px solid #a1a7bb;\\n border-radius: 5px;\\n width: 100%;\\n padding: 10px;\\n background: #ffffff;\\n}\\n\\n.fieldWithMargin {\\n margin-top: 1rem;\\n}\\n\\n.fieldLabel {\\n color: #39235d;\\n font-weight: 500;\\n}\\n\\n.fieldLabelWhite {\\n color: #ffffff;\\n font-weight: 500;\\n}\\n\\n.newItem {\\n align-self: stretch;\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n padding: 1rem;\\n width: 100%;\\n margin-bottom: 1rem;\\n border: none;\\n background: #f3f7fb;\\n}\\n\\n.itemLinkContainer {\\n padding: 0 1.5rem 1rem 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .itemLinkContainer {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n\\n.itemLink {\\n display: block;\\n position: relative;\\n background: #f3f7fb;\\n color: #fc8020;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n}\\n.itemLink > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n}\\n\\n.itemTitle {\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #39235d;\\n}\\n\\n.itemTitleWhite {\\n position: relative;\\n z-index: 2;\\n font-size: 1.2rem;\\n line-height: 1.5rem;\\n font-weight: 500;\\n color: #ffffff;\\n}\",\"//\\n// Media query mixin\\n@mixin mq($point, $max: null) {\\n @if map-has-key($mq-points, $point) {\\n $point: map-get($mq-points, $point);\\n @if $max {\\n @media screen and (max-width: #{$point - 1}px) {\\n @content;\\n }\\n } @else {\\n @media screen and (min-width: #{$point}px) {\\n @content;\\n }\\n }\\n } @else {\\n @error \\\"No such breakpoint: `#{$point}`.\\\";\\n }\\n}\\n\\n//\\n// Map class mixin\\n@mixin map-to-class($map, $property, $selector, $divider: \\\"\\\") {\\n $selector: if($selector == \\\"\\\" and &, &, $selector);\\n\\n @each $key, $value in $map {\\n $suffix: if($key == \\\"base\\\", \\\"\\\", $divider + $key);\\n @at-root #{$selector}#{$suffix} {\\n @if type-of($value) == map {\\n @include map-to-class($value, $property, \\\"\\\", $divider) {\\n @content;\\n }\\n } @else {\\n #{$property}: $value;\\n }\\n }\\n }\\n}\\n\\n//\\n// Get color value from map\\n@function color($color, $tone: \\\"base\\\") {\\n @if map-has-key($colors, \\\"#{$color}\\\") {\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == map {\\n @return map-get(map-get($colors, \\\"#{$color}\\\"), $tone);\\n }\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == color {\\n @return map-get($colors, \\\"#{$color}\\\");\\n }\\n @warn \\\"Color `#{$color}` found without value\\\";\\n }\\n @warn \\\"Unknown `#{$color}` color\\\";\\n @return null;\\n}\\n\\n//\\n// Get font-size from map\\n@function font-size($key) {\\n @return map-get($type, $key);\\n}\\n\\n//\\n// Get font-size from map\\n@mixin type-setting($key) {\\n font-size: map-get($type, $key);\\n line-height: map-get($line, $key);\\n}\\n\"]}]);\n// Exports\nexports.locals = {\n\t\"editorButtons\": \"NewSuggestionItem-module__editorButtons___1u3F_\",\n\t\"header\": \"NewSuggestionItem-module__header___3KBoh\",\n\t\"headerGradient\": \"NewSuggestionItem-module__headerGradient___ZRCfk\",\n\t\"headerFields\": \"NewSuggestionItem-module__headerFields___3mdgC\",\n\t\"field\": \"NewSuggestionItem-module__field___MlLPA\",\n\t\"fieldWithMargin\": \"NewSuggestionItem-module__fieldWithMargin___2DV07\",\n\t\"fieldLabel\": \"NewSuggestionItem-module__fieldLabel___3VF6p\",\n\t\"fieldLabelWhite\": \"NewSuggestionItem-module__fieldLabelWhite___3l6qU\",\n\t\"newItem\": \"NewSuggestionItem-module__newItem___2B8rg\",\n\t\"itemLinkContainer\": \"NewSuggestionItem-module__itemLinkContainer___kQakg\",\n\t\"itemLink\": \"NewSuggestionItem-module__itemLink___11FeT\",\n\t\"itemTitle\": \"NewSuggestionItem-module__itemTitle___2f_T8\",\n\t\"itemTitleWhite\": \"NewSuggestionItem-module__itemTitleWhite___891Un\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".ResultSummaryCard-module__dropDownSelectionsWrapper___3RwNl {\\n display: flex;\\n justify-content: space-between;\\n flex-direction: row;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__dropDownSelectionsWrapper___3RwNl {\\n flex-direction: column;\\n }\\n}\\n.ResultSummaryCard-module__infoContainer___3e29g {\\n flex: 2 1;\\n position: relative;\\n bottom: 5px;\\n}\\n.ResultSummaryCard-module__dropDownSectionWrapper___1eXZx {\\n display: flex;\\n flex: 1 1;\\n flex-direction: column;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__redBorder___3n2RQ::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: #ef686f;\\n }\\n}\\n@media (min-width: 991px) {\\n .ResultSummaryCard-module__redBorder___3n2RQ::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n height: 6px;\\n width: 100%;\\n background: #ef686f;\\n }\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__greenBorder___58Uy3::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: #43c45f;\\n }\\n}\\n@media (min-width: 991px) {\\n .ResultSummaryCard-module__greenBorder___58Uy3::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 6px;\\n background: #43c45f;\\n }\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__whiteBorder___hfGWw::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: white;\\n }\\n}\\n@media (min-width: 991px) {\\n .ResultSummaryCard-module__whiteBorder___hfGWw::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 6px;\\n background: white;\\n }\\n}\\n.ResultSummaryCard-module__sectionHeader___3hQqT {\\n display: flex;\\n justify-content: space-between;\\n border-top: 1px solid blue;\\n vertical-align: text-bottom;\\n border-radius: 0px;\\n border: 1px solid #e2ecf6;\\n width: 100%;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__sectionHeader___3hQqT {\\n padding: 0.75rem 0.75rem 0.5rem 0.9rem;\\n }\\n}\\n.ResultSummaryCard-module__sectionHeader___3hQqT > svg {\\n color: red;\\n}\\n.ResultSummaryCard-module__bottomActionsWrapper___1-y_L {\\n display: flex;\\n justify-content: flex-end;\\n padding: 0.25rem;\\n background-color: #f3f7fb;\\n border-bottom-right-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__bottomActionsWrapper___1-y_L {\\n text-align: center;\\n padding: 0px;\\n flex-direction: column;\\n }\\n}\\n.ResultSummaryCard-module__iconWithLabelWrapper___1MEDB {\\n margin-right: 1rem;\\n display: inline;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__iconWithLabelWrapper___1MEDB {\\n margin-right: 0px;\\n display: block;\\n }\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__bottomActionsWrapper___1-y_L > div {\\n border: 1px solid #e2ecf6;\\n margin-right: 0px;\\n padding: 0.4rem 0.25rem 0.25rem 0.25rem;\\n }\\n}\\n.ResultSummaryCard-module__bottomActionsWrapper___1-y_L > button {\\n padding: 0px;\\n border: none;\\n text-decoration: underline;\\n color: #6e9fd5;\\n padding: 0.75rem 0.5rem 0.5rem 0.5rem;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__bottomActionsWrapper___1-y_L > button {\\n border: 1px solid #e2ecf6;\\n border-radius: 0;\\n }\\n}\\n.ResultSummaryCard-module__bottomActionsWrapper___1-y_L > button:hover {\\n color: #e2ecf6;\\n}\\n.ResultSummaryCard-module__smallLabel___3P5N7 {\\n vertical-align: text-bottom;\\n font-weight: 500;\\n margin-bottom: 5px;\\n position: relative;\\n bottom: 1px;\\n}\\n.ResultSummaryCard-module__blue___Rcs9S {\\n color: #6e9fd5;\\n}\\n.ResultSummaryCard-module__gray___3ckpu {\\n color: #626e8e;\\n}\\n.ResultSummaryCard-module__labelIcon___2ZU_6 {\\n color: #6e9fd5;\\n margin-right: 0.25rem;\\n}\\n.ResultSummaryCard-module__resultBullet___1cffv {\\n padding: 0.1rem 0.6rem 0.1rem 0.6rem;\\n font-weight: 450;\\n margin: 0.25rem;\\n background-color: #eff0f4;\\n color: #3e7cb2;\\n border-radius: 16px;\\n display: inline-block;\\n border: none;\\n}\\n.ResultSummaryCard-module__resultBullet___1cffv:hover {\\n text-decoration: underline;\\n}\\n.ResultSummaryCard-module__testBulletsContainer___2N2Vr {\\n border: 1px solid #e2ecf6;\\n padding: 0.3rem;\\n height: 100%;\\n}\\n.ResultSummaryCard-module__absoluteCenter___bvEtC {\\n position: absolute;\\n color: #43c45f;\\n top: 47%;\\n left: 15%;\\n font-weight: 600;\\n transform: translateY(-50%);\\n font-size: 0.86rem;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__absoluteCenter___bvEtC {\\n left: 21%;\\n top: 30%;\\n }\\n}\\n.ResultSummaryCard-module__pieLabel___3A2mP {\\n margin: auto;\\n margin-left: 0px;\\n padding-left: 0.5rem;\\n font-weight: 500;\\n color: #626e8e;\\n position: relative;\\n top: 38%;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__pieLabel___3A2mP {\\n margin-top: 1.2rem;\\n padding: 0;\\n width: 100%;\\n top: 0%;\\n }\\n}\\n.ResultSummaryCard-module__pieContainer___1FLaH {\\n position: relative;\\n height: 120px;\\n display: flex;\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__pieContainer___1FLaH {\\n flex-direction: column;\\n }\\n}\\n@media (max-width: 991px) {\\n .ResultSummaryCard-module__pieContainer___1FLaH > svg {\\n float: right;\\n }\\n}\\n.ResultSummaryCard-module__pieHelper___3TAeq > svg {\\n float: right;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/components/ResultSummary/ResultSummaryCard.module.scss\",\"ResultSummaryCard.module.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,aAAA;EACA,8BAAA;EACA,mBAAA;ACDF;ADGE;EALF;IAMI,sBAAA;ECAF;AACF;ADGA;EACE,SAAA;EACA,kBAAA;EACA,WAAA;ACAF;ADGA;EACE,aAAA;EACA,SAAA;EACA,sBAAA;ACAF;ADIE;EACE;IACE,WAAA;IACA,kBAAA;IACA,MAAA;IACA,OAAA;IACA,YAAA;IACA,UAAA;IACA,mBAAA;ECDJ;AACF;ADGE;EACE;IACE,WAAA;IACA,kBAAA;IACA,SAAA;IACA,OAAA;IACA,WAAA;IACA,WAAA;IACA,mBAAA;ECDJ;AACF;ADME;EACE;IACE,WAAA;IACA,kBAAA;IACA,MAAA;IACA,OAAA;IACA,YAAA;IACA,UAAA;IACA,mBAAA;ECHJ;AACF;ADKE;EACE;IACE,WAAA;IACA,kBAAA;IACA,SAAA;IACA,OAAA;IACA,WAAA;IACA,WAAA;IACA,mBAAA;ECHJ;AACF;ADQE;EACE;IACE,WAAA;IACA,kBAAA;IACA,MAAA;IACA,OAAA;IACA,YAAA;IACA,UAAA;IACA,iBAAA;ECLJ;AACF;ADOE;EACE;IACE,WAAA;IACA,kBAAA;IACA,SAAA;IACA,OAAA;IACA,WAAA;IACA,WAAA;IACA,iBAAA;ECLJ;AACF;ADSA;EACE,aAAA;EACA,8BAAA;EACA,0BAAA;EACA,2BAAA;EACA,kBAAA;EAEA,yBAAA;EACA,WAAA;ACPF;ADQE;EATF;IAUI,sCAAA;ECLF;AACF;ADOA;EACE,UAAA;ACJF;ADOA;EACE,aAAA;EACA,yBAAA;EACA,gBAAA;EACA,yBAAA;EACA,kCAAA;EACA,iCAAA;ACJF;ADKE;EAPF;IAQI,kBAAA;IACA,YAAA;IACA,sBAAA;ECFF;AACF;ADKA;EACE,kBAAA;EACA,eAAA;ACFF;ADGE;EAHF;IAII,iBAAA;IACA,cAAA;ECAF;AACF;ADIE;EADF;IAEI,yBAAA;IACA,iBAAA;IACA,uCAAA;ECAF;AACF;ADGA;EACE,YAAA;EACA,YAAA;EACA,0BAAA;EACA,cAAA;EACA,qCAAA;ACAF;ADCE;EANF;IAOI,yBAAA;IACA,gBAAA;ECEF;AACF;ADDE;EACE,cAAA;ACGJ;ADCA;EACE,2BAAA;EACA,gBAAA;EACA,kBAAA;EACA,kBAAA;EACA,WAAA;ACEF;ADCA;EACE,cAAA;ACEF;ADCA;EACE,cAAA;ACEF;ADCA;EACE,cAAA;EACA,qBAAA;ACEF;ADCA;EACE,oCAAA;EACA,gBAAA;EACA,eAAA;EACA,yBAAA;EACA,cAAA;EACA,mBAAA;EACA,qBAAA;EACA,YAAA;ACEF;ADDE;EACE,0BAAA;ACGJ;ADCA;EACE,yBAAA;EACA,eAAA;EACA,YAAA;ACEF;ADAA;EACE,kBAAA;EACA,cAAA;EACA,QAAA;EACA,SAAA;EACA,gBAAA;EACA,2BAAA;EACA,kBAAA;ACGF;ADDE;EATF;IAUI,SAAA;IACA,QAAA;ECIF;AACF;ADDA;EACE,YAAA;EACA,gBAAA;EACA,oBAAA;EACA,gBAAA;EACA,cAAA;EACA,kBAAA;EACA,QAAA;ACIF;ADHE;EARF;IASI,kBAAA;IACA,UAAA;IACA,WAAA;IACA,OAAA;ECMF;AACF;ADHA;EACE,kBAAA;EACA,aAAA;EACA,aAAA;ACMF;ADLE;EAJF;IAKI,sBAAA;ECQF;AACF;ADJE;EADF;IAEI,YAAA;ECQF;AACF;ADLA;EACE,YAAA;ACQF\",\"file\":\"ResultSummaryCard.module.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.dropDownSelectionsWrapper {\\n display: flex;\\n justify-content: space-between;\\n flex-direction: row;\\n\\n @media (max-width: 991px) {\\n flex-direction: column;\\n }\\n}\\n\\n.infoContainer {\\n flex: 2;\\n position: relative;\\n bottom: 5px;\\n}\\n\\n.dropDownSectionWrapper {\\n display: flex;\\n flex: 1;\\n flex-direction: column;\\n}\\n\\n.redBorder {\\n @media (max-width: 991px) {\\n &::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: color(red);\\n }\\n }\\n @media (min-width: 991px) {\\n &::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n height: 6px;\\n width: 100%;\\n background: color(red);\\n }\\n }\\n}\\n\\n.greenBorder {\\n @media (max-width: 991px) {\\n &::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: color(green);\\n }\\n }\\n @media (min-width: 991px) {\\n &::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 6px;\\n background: color(green);\\n }\\n }\\n}\\n\\n.whiteBorder {\\n @media (max-width: 991px) {\\n &::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: white;\\n }\\n }\\n @media (min-width: 991px) {\\n &::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 6px;\\n background: white;\\n }\\n }\\n}\\n\\n.sectionHeader {\\n display: flex;\\n justify-content: space-between;\\n border-top: 1px solid blue;\\n vertical-align: text-bottom;\\n border-radius: 0px;\\n\\n border: 1px solid color(blue, lighter);\\n width: 100%;\\n @media (max-width: 991px) {\\n padding: 0.75rem 0.75rem 0.5rem 0.9rem;\\n }\\n}\\n.sectionHeader > svg {\\n color: red;\\n}\\n\\n.bottomActionsWrapper {\\n display: flex;\\n justify-content: flex-end;\\n padding: 0.25rem;\\n background-color: color(blue, lightest);\\n border-bottom-right-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n @media (max-width: 991px) {\\n text-align: center;\\n padding: 0px;\\n flex-direction: column;\\n }\\n}\\n\\n.iconWithLabelWrapper {\\n margin-right: 1rem;\\n display: inline;\\n @media (max-width: 991px) {\\n margin-right: 0px;\\n display: block;\\n }\\n}\\n\\n.bottomActionsWrapper > div {\\n @media (max-width: 991px) {\\n border: 1px solid color(blue, lighter);\\n margin-right: 0px;\\n padding: 0.4rem 0.25rem 0.25rem 0.25rem;\\n }\\n}\\n\\n.bottomActionsWrapper > button {\\n padding: 0px;\\n border: none;\\n text-decoration: underline;\\n color: color(blue);\\n padding: 0.75rem 0.5rem 0.5rem 0.5rem;\\n @media (max-width: 991px) {\\n border: 1px solid color(blue, lighter);\\n border-radius: 0;\\n }\\n &:hover {\\n color: color(blue, lighter);\\n }\\n}\\n\\n.smallLabel {\\n vertical-align: text-bottom;\\n font-weight: 500;\\n margin-bottom: 5px;\\n position: relative;\\n bottom: 1px;\\n}\\n\\n.blue {\\n color: color(blue);\\n}\\n\\n.gray {\\n color: color(gray);\\n}\\n\\n.labelIcon {\\n color: color(blue);\\n margin-right: 0.25rem;\\n}\\n\\n.resultBullet {\\n padding: 0.1rem 0.6rem 0.1rem 0.6rem;\\n font-weight: 450;\\n margin: 0.25rem;\\n background-color: lighten(#e0e2e9, 5%);\\n color: color(blue, dark);\\n border-radius: 16px;\\n display: inline-block;\\n border: none;\\n &:hover {\\n text-decoration: underline;\\n }\\n}\\n\\n.testBulletsContainer {\\n border: 1px solid color(blue, lighter);\\n padding: 0.3rem;\\n height: 100%;\\n}\\n.absoluteCenter {\\n position: absolute;\\n color: color(green);\\n top: 47%;\\n left: 15%;\\n font-weight: 600;\\n transform: translateY(-50%);\\n font-size: 0.86rem;\\n\\n @media (max-width: 991px) {\\n left: 21%;\\n top: 30%;\\n }\\n}\\n\\n.pieLabel {\\n margin: auto;\\n margin-left: 0px;\\n padding-left: 0.5rem;\\n font-weight: 500;\\n color: color(gray);\\n position: relative;\\n top: 38%;\\n @media (max-width: 991px) {\\n margin-top: 1.2rem;\\n padding: 0;\\n width: 100%;\\n top: 0%;\\n }\\n}\\n\\n.pieContainer {\\n position: relative;\\n height: 120px;\\n display: flex;\\n @media (max-width: 991px) {\\n flex-direction: column;\\n }\\n}\\n\\n.pieContainer > svg {\\n @media (max-width: 991px) {\\n float: right;\\n }\\n}\\n\\n.pieHelper > svg {\\n float: right;\\n}\\n\\n.vertical-center {\\n}\\n\",\".dropDownSelectionsWrapper {\\n display: flex;\\n justify-content: space-between;\\n flex-direction: row;\\n}\\n@media (max-width: 991px) {\\n .dropDownSelectionsWrapper {\\n flex-direction: column;\\n }\\n}\\n\\n.infoContainer {\\n flex: 2;\\n position: relative;\\n bottom: 5px;\\n}\\n\\n.dropDownSectionWrapper {\\n display: flex;\\n flex: 1;\\n flex-direction: column;\\n}\\n\\n@media (max-width: 991px) {\\n .redBorder::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: #ef686f;\\n }\\n}\\n@media (min-width: 991px) {\\n .redBorder::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n height: 6px;\\n width: 100%;\\n background: #ef686f;\\n }\\n}\\n\\n@media (max-width: 991px) {\\n .greenBorder::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: #43c45f;\\n }\\n}\\n@media (min-width: 991px) {\\n .greenBorder::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 6px;\\n background: #43c45f;\\n }\\n}\\n\\n@media (max-width: 991px) {\\n .whiteBorder::before {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 6px;\\n background: white;\\n }\\n}\\n@media (min-width: 991px) {\\n .whiteBorder::before {\\n content: \\\"\\\";\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 6px;\\n background: white;\\n }\\n}\\n\\n.sectionHeader {\\n display: flex;\\n justify-content: space-between;\\n border-top: 1px solid blue;\\n vertical-align: text-bottom;\\n border-radius: 0px;\\n border: 1px solid #e2ecf6;\\n width: 100%;\\n}\\n@media (max-width: 991px) {\\n .sectionHeader {\\n padding: 0.75rem 0.75rem 0.5rem 0.9rem;\\n }\\n}\\n\\n.sectionHeader > svg {\\n color: red;\\n}\\n\\n.bottomActionsWrapper {\\n display: flex;\\n justify-content: flex-end;\\n padding: 0.25rem;\\n background-color: #f3f7fb;\\n border-bottom-right-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n@media (max-width: 991px) {\\n .bottomActionsWrapper {\\n text-align: center;\\n padding: 0px;\\n flex-direction: column;\\n }\\n}\\n\\n.iconWithLabelWrapper {\\n margin-right: 1rem;\\n display: inline;\\n}\\n@media (max-width: 991px) {\\n .iconWithLabelWrapper {\\n margin-right: 0px;\\n display: block;\\n }\\n}\\n\\n@media (max-width: 991px) {\\n .bottomActionsWrapper > div {\\n border: 1px solid #e2ecf6;\\n margin-right: 0px;\\n padding: 0.4rem 0.25rem 0.25rem 0.25rem;\\n }\\n}\\n\\n.bottomActionsWrapper > button {\\n padding: 0px;\\n border: none;\\n text-decoration: underline;\\n color: #6e9fd5;\\n padding: 0.75rem 0.5rem 0.5rem 0.5rem;\\n}\\n@media (max-width: 991px) {\\n .bottomActionsWrapper > button {\\n border: 1px solid #e2ecf6;\\n border-radius: 0;\\n }\\n}\\n.bottomActionsWrapper > button:hover {\\n color: #e2ecf6;\\n}\\n\\n.smallLabel {\\n vertical-align: text-bottom;\\n font-weight: 500;\\n margin-bottom: 5px;\\n position: relative;\\n bottom: 1px;\\n}\\n\\n.blue {\\n color: #6e9fd5;\\n}\\n\\n.gray {\\n color: #626e8e;\\n}\\n\\n.labelIcon {\\n color: #6e9fd5;\\n margin-right: 0.25rem;\\n}\\n\\n.resultBullet {\\n padding: 0.1rem 0.6rem 0.1rem 0.6rem;\\n font-weight: 450;\\n margin: 0.25rem;\\n background-color: #eff0f4;\\n color: #3e7cb2;\\n border-radius: 16px;\\n display: inline-block;\\n border: none;\\n}\\n.resultBullet:hover {\\n text-decoration: underline;\\n}\\n\\n.testBulletsContainer {\\n border: 1px solid #e2ecf6;\\n padding: 0.3rem;\\n height: 100%;\\n}\\n\\n.absoluteCenter {\\n position: absolute;\\n color: #43c45f;\\n top: 47%;\\n left: 15%;\\n font-weight: 600;\\n transform: translateY(-50%);\\n font-size: 0.86rem;\\n}\\n@media (max-width: 991px) {\\n .absoluteCenter {\\n left: 21%;\\n top: 30%;\\n }\\n}\\n\\n.pieLabel {\\n margin: auto;\\n margin-left: 0px;\\n padding-left: 0.5rem;\\n font-weight: 500;\\n color: #626e8e;\\n position: relative;\\n top: 38%;\\n}\\n@media (max-width: 991px) {\\n .pieLabel {\\n margin-top: 1.2rem;\\n padding: 0;\\n width: 100%;\\n top: 0%;\\n }\\n}\\n\\n.pieContainer {\\n position: relative;\\n height: 120px;\\n display: flex;\\n}\\n@media (max-width: 991px) {\\n .pieContainer {\\n flex-direction: column;\\n }\\n}\\n\\n@media (max-width: 991px) {\\n .pieContainer > svg {\\n float: right;\\n }\\n}\\n\\n.pieHelper > svg {\\n float: right;\\n}\"]}]);\n// Exports\nexports.locals = {\n\t\"dropDownSelectionsWrapper\": \"ResultSummaryCard-module__dropDownSelectionsWrapper___3RwNl\",\n\t\"infoContainer\": \"ResultSummaryCard-module__infoContainer___3e29g\",\n\t\"dropDownSectionWrapper\": \"ResultSummaryCard-module__dropDownSectionWrapper___1eXZx\",\n\t\"redBorder\": \"ResultSummaryCard-module__redBorder___3n2RQ\",\n\t\"greenBorder\": \"ResultSummaryCard-module__greenBorder___58Uy3\",\n\t\"whiteBorder\": \"ResultSummaryCard-module__whiteBorder___hfGWw\",\n\t\"sectionHeader\": \"ResultSummaryCard-module__sectionHeader___3hQqT\",\n\t\"bottomActionsWrapper\": \"ResultSummaryCard-module__bottomActionsWrapper___1-y_L\",\n\t\"iconWithLabelWrapper\": \"ResultSummaryCard-module__iconWithLabelWrapper___1MEDB\",\n\t\"smallLabel\": \"ResultSummaryCard-module__smallLabel___3P5N7\",\n\t\"blue\": \"ResultSummaryCard-module__blue___Rcs9S\",\n\t\"gray\": \"ResultSummaryCard-module__gray___3ckpu\",\n\t\"labelIcon\": \"ResultSummaryCard-module__labelIcon___2ZU_6\",\n\t\"resultBullet\": \"ResultSummaryCard-module__resultBullet___1cffv\",\n\t\"testBulletsContainer\": \"ResultSummaryCard-module__testBulletsContainer___2N2Vr\",\n\t\"absoluteCenter\": \"ResultSummaryCard-module__absoluteCenter___bvEtC\",\n\t\"pieLabel\": \"ResultSummaryCard-module__pieLabel___3A2mP\",\n\t\"pieContainer\": \"ResultSummaryCard-module__pieContainer___1FLaH\",\n\t\"pieHelper\": \"ResultSummaryCard-module__pieHelper___3TAeq\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".SuggestionLink-module__itemLinkContainer___32hP4 {\\n padding: 0 1.5rem 1rem 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .SuggestionLink-module__itemLinkContainer___32hP4 {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n.SuggestionLink-module__itemLink___1YL1U {\\n display: block;\\n position: relative;\\n background: #f3f7fb;\\n color: #fc8020;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n text-decoration: none;\\n}\\n.SuggestionLink-module__itemLink___1YL1U.SuggestionLink-module__filled___kqAg4 {\\n background: #fc8020;\\n color: white;\\n}\\n.SuggestionLink-module__itemLink___1YL1U.SuggestionLink-module__underline___785SQ {\\n text-decoration: underline;\\n}\\n.SuggestionLink-module__itemLink___1YL1U > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/components/SuggestionLink/SuggestionLink.module.scss\",\"SuggestionLink.module.scss\",\"/rails/app/javascript/src/styles/setup/_mixins.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,6BAAA;ACDF;ACIM;EFJN;IAII,aAAA;IACA,cAAA;ECAF;AACF;ADGA;EACE,cAAA;EACA,kBAAA;EACA,mBAAA;EACA,cAAA;EEgDA,kBAAA;EACA,oBAAA;EF/CA,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,qBAAA;ACCF;ADAE;EACE,mBAAA;EACA,YAAA;ACEJ;ADAE;EACE,0BAAA;ACEJ;ADAE;EACE,kBAAA;EACA,aAAA;EACA,QAAA;EACA,2BAAA;ACEJ\",\"file\":\"SuggestionLink.module.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.itemLinkContainer {\\n padding: 0 1.5rem 1rem 1.5rem;\\n\\n @include mq(m, max) {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n\\n.itemLink {\\n display: block;\\n position: relative;\\n background: color(blue, lightest);\\n color: color(orange);\\n @include type-setting(1-25);\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n text-decoration: none;\\n &.filled {\\n background: color(orange);\\n color: white;\\n }\\n &.underline {\\n text-decoration: underline;\\n }\\n & > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n }\\n}\\n\",\".itemLinkContainer {\\n padding: 0 1.5rem 1rem 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .itemLinkContainer {\\n padding: 1rem;\\n padding-top: 0;\\n }\\n}\\n\\n.itemLink {\\n display: block;\\n position: relative;\\n background: #f3f7fb;\\n color: #fc8020;\\n font-size: 0.86rem;\\n line-height: 1.25rem;\\n text-align: center;\\n font-weight: 500;\\n padding: 0.5rem 2rem;\\n border-radius: 256px;\\n text-decoration: none;\\n}\\n.itemLink.filled {\\n background: #fc8020;\\n color: white;\\n}\\n.itemLink.underline {\\n text-decoration: underline;\\n}\\n.itemLink > svg {\\n position: absolute;\\n right: 0.5rem;\\n top: 50%;\\n transform: translateY(-50%);\\n}\",\"//\\n// Media query mixin\\n@mixin mq($point, $max: null) {\\n @if map-has-key($mq-points, $point) {\\n $point: map-get($mq-points, $point);\\n @if $max {\\n @media screen and (max-width: #{$point - 1}px) {\\n @content;\\n }\\n } @else {\\n @media screen and (min-width: #{$point}px) {\\n @content;\\n }\\n }\\n } @else {\\n @error \\\"No such breakpoint: `#{$point}`.\\\";\\n }\\n}\\n\\n//\\n// Map class mixin\\n@mixin map-to-class($map, $property, $selector, $divider: \\\"\\\") {\\n $selector: if($selector == \\\"\\\" and &, &, $selector);\\n\\n @each $key, $value in $map {\\n $suffix: if($key == \\\"base\\\", \\\"\\\", $divider + $key);\\n @at-root #{$selector}#{$suffix} {\\n @if type-of($value) == map {\\n @include map-to-class($value, $property, \\\"\\\", $divider) {\\n @content;\\n }\\n } @else {\\n #{$property}: $value;\\n }\\n }\\n }\\n}\\n\\n//\\n// Get color value from map\\n@function color($color, $tone: \\\"base\\\") {\\n @if map-has-key($colors, \\\"#{$color}\\\") {\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == map {\\n @return map-get(map-get($colors, \\\"#{$color}\\\"), $tone);\\n }\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == color {\\n @return map-get($colors, \\\"#{$color}\\\");\\n }\\n @warn \\\"Color `#{$color}` found without value\\\";\\n }\\n @warn \\\"Unknown `#{$color}` color\\\";\\n @return null;\\n}\\n\\n//\\n// Get font-size from map\\n@function font-size($key) {\\n @return map-get($type, $key);\\n}\\n\\n//\\n// Get font-size from map\\n@mixin type-setting($key) {\\n font-size: map-get($type, $key);\\n line-height: map-get($line, $key);\\n}\\n\"]}]);\n// Exports\nexports.locals = {\n\t\"itemLinkContainer\": \"SuggestionLink-module__itemLinkContainer___32hP4\",\n\t\"itemLink\": \"SuggestionLink-module__itemLink___1YL1U\",\n\t\"filled\": \"SuggestionLink-module__filled___kqAg4\",\n\t\"underline\": \"SuggestionLink-module__underline___785SQ\"\n};\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".responsive-suggestion-card {\\n display: flex;\\n flex-direction: row;\\n}\\n@media screen and (max-width: 767px) {\\n .responsive-suggestion-card {\\n flex-direction: column;\\n }\\n}\\n.responsive-suggestion-card_left {\\n flex: 1 1;\\n padding: 1.5rem;\\n border-right: 1px solid #e0e2e9;\\n}\\n@media screen and (max-width: 767px) {\\n .responsive-suggestion-card_left {\\n padding-bottom: 0px;\\n border-right: none;\\n }\\n}\\n.repurhase-suggestion-promotion-container {\\n padding: 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .repurhase-suggestion-promotion-container {\\n padding-top: 0px;\\n padding-bottom: 0px;\\n }\\n}\\n#how-to-prepare-link-left {\\n display: block;\\n}\\n@media screen and (max-width: 767px) {\\n #how-to-prepare-link-left {\\n display: none;\\n }\\n}\\n#how-to-prepare-link-right {\\n display: none;\\n}\\n@media screen and (max-width: 767px) {\\n #how-to-prepare-link-right {\\n display: block;\\n }\\n}\\n.repurchase-icon-container {\\n width: 480px;\\n}\\n@media screen and (max-width: 767px) {\\n .repurchase-icon-container {\\n width: 100%;\\n }\\n}\\n.company-contact-container {\\n background-color: white;\\n width: 100%;\\n padding-top: 1rem;\\n padding-bottom: 1rem;\\n margin-bottom: 0;\\n min-height: 8rem;\\n}\\n.promotions-banner-container {\\n background-color: white;\\n width: 100%;\\n padding-top: 3.5rem;\\n padding-bottom: 2rem;\\n min-height: 18rem;\\n}\\n.repurchase-graphic {\\n display: block;\\n}\\n@media screen and (max-width: 767px) {\\n .repurchase-graphic {\\n display: none;\\n }\\n}\\n.desktop-1-5-padding {\\n padding: 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .desktop-1-5-padding {\\n padding: 0px;\\n }\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/styles/components/_suggestion-section.scss\",\"_suggestion-section.scss\",\"/rails/app/javascript/src/styles/setup/_mixins.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,aAAA;EACA,mBAAA;ACDF;ACGM;EFJN;IAII,sBAAA;ECCF;AACF;ADEA;EACE,SAAA;EACA,eAAA;EACA,+BAAA;ACCF;ACRM;EFIN;IAKI,mBAAA;IACA,kBAAA;ECGF;AACF;ADAA;EACE,eAAA;ACGF;AClBM;EFcN;IAGI,gBAAA;IACA,mBAAA;ECKF;AACF;ADFA;EACE,cAAA;ACKF;AC5BM;EFsBN;IAGI,aAAA;ECOF;AACF;ADJA;EACE,aAAA;ACOF;ACrCM;EF6BN;IAGI,cAAA;ECSF;AACF;ADNA;EACE,YAAA;ACSF;AC9CM;EFoCN;IAGI,WAAA;ECWF;AACF;ADRA;EACE,uBAAA;EACA,WAAA;EACA,iBAAA;EACA,oBAAA;EACA,gBAAA;EACA,gBAAA;ACWF;ADRA;EACE,uBAAA;EACA,WAAA;EACA,mBAAA;EACA,oBAAA;EACA,iBAAA;ACWF;ADRA;EACE,cAAA;ACWF;ACxEM;EF4DN;IAGI,aAAA;ECaF;AACF;ADVA;EACE,eAAA;ACaF;ACjFM;EFmEN;IAGI,YAAA;ECeF;AACF\",\"file\":\"_suggestion-section.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.responsive-suggestion-card {\\n display: flex;\\n flex-direction: row;\\n @include mq(m, max) {\\n flex-direction: column;\\n }\\n}\\n\\n.responsive-suggestion-card_left {\\n flex: 1;\\n padding: 1.5rem;\\n border-right: 1px solid color(gray, lightest);\\n @include mq(m, max) {\\n padding-bottom: 0px;\\n border-right: none;\\n }\\n}\\n\\n.repurhase-suggestion-promotion-container {\\n padding: 1.5rem;\\n @include mq(m, max) {\\n padding-top: 0px;\\n padding-bottom: 0px;\\n }\\n}\\n\\n#how-to-prepare-link-left {\\n display: block;\\n @include mq(m, max) {\\n display: none;\\n }\\n}\\n\\n#how-to-prepare-link-right {\\n display: none;\\n @include mq(m, max) {\\n display: block;\\n }\\n}\\n\\n.repurchase-icon-container {\\n width: 480px;\\n @include mq(m, max) {\\n width: 100%;\\n }\\n}\\n\\n.company-contact-container {\\n background-color: white;\\n width: 100%;\\n padding-top: 1rem;\\n padding-bottom: 1rem;\\n margin-bottom: 0;\\n min-height: 8rem;\\n}\\n\\n.promotions-banner-container {\\n background-color: white;\\n width: 100%;\\n padding-top: 3.5rem;\\n padding-bottom: 2rem;\\n min-height: 18rem;\\n}\\n\\n.repurchase-graphic {\\n display: block;\\n @include mq(m, max) {\\n display: none;\\n }\\n}\\n\\n.desktop-1-5-padding {\\n padding: 1.5rem;\\n @include mq(m, max) {\\n padding: 0px;\\n }\\n}\\n\",\".responsive-suggestion-card {\\n display: flex;\\n flex-direction: row;\\n}\\n@media screen and (max-width: 767px) {\\n .responsive-suggestion-card {\\n flex-direction: column;\\n }\\n}\\n\\n.responsive-suggestion-card_left {\\n flex: 1;\\n padding: 1.5rem;\\n border-right: 1px solid #e0e2e9;\\n}\\n@media screen and (max-width: 767px) {\\n .responsive-suggestion-card_left {\\n padding-bottom: 0px;\\n border-right: none;\\n }\\n}\\n\\n.repurhase-suggestion-promotion-container {\\n padding: 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .repurhase-suggestion-promotion-container {\\n padding-top: 0px;\\n padding-bottom: 0px;\\n }\\n}\\n\\n#how-to-prepare-link-left {\\n display: block;\\n}\\n@media screen and (max-width: 767px) {\\n #how-to-prepare-link-left {\\n display: none;\\n }\\n}\\n\\n#how-to-prepare-link-right {\\n display: none;\\n}\\n@media screen and (max-width: 767px) {\\n #how-to-prepare-link-right {\\n display: block;\\n }\\n}\\n\\n.repurchase-icon-container {\\n width: 480px;\\n}\\n@media screen and (max-width: 767px) {\\n .repurchase-icon-container {\\n width: 100%;\\n }\\n}\\n\\n.company-contact-container {\\n background-color: white;\\n width: 100%;\\n padding-top: 1rem;\\n padding-bottom: 1rem;\\n margin-bottom: 0;\\n min-height: 8rem;\\n}\\n\\n.promotions-banner-container {\\n background-color: white;\\n width: 100%;\\n padding-top: 3.5rem;\\n padding-bottom: 2rem;\\n min-height: 18rem;\\n}\\n\\n.repurchase-graphic {\\n display: block;\\n}\\n@media screen and (max-width: 767px) {\\n .repurchase-graphic {\\n display: none;\\n }\\n}\\n\\n.desktop-1-5-padding {\\n padding: 1.5rem;\\n}\\n@media screen and (max-width: 767px) {\\n .desktop-1-5-padding {\\n padding: 0px;\\n }\\n}\",\"//\\n// Media query mixin\\n@mixin mq($point, $max: null) {\\n @if map-has-key($mq-points, $point) {\\n $point: map-get($mq-points, $point);\\n @if $max {\\n @media screen and (max-width: #{$point - 1}px) {\\n @content;\\n }\\n } @else {\\n @media screen and (min-width: #{$point}px) {\\n @content;\\n }\\n }\\n } @else {\\n @error \\\"No such breakpoint: `#{$point}`.\\\";\\n }\\n}\\n\\n//\\n// Map class mixin\\n@mixin map-to-class($map, $property, $selector, $divider: \\\"\\\") {\\n $selector: if($selector == \\\"\\\" and &, &, $selector);\\n\\n @each $key, $value in $map {\\n $suffix: if($key == \\\"base\\\", \\\"\\\", $divider + $key);\\n @at-root #{$selector}#{$suffix} {\\n @if type-of($value) == map {\\n @include map-to-class($value, $property, \\\"\\\", $divider) {\\n @content;\\n }\\n } @else {\\n #{$property}: $value;\\n }\\n }\\n }\\n}\\n\\n//\\n// Get color value from map\\n@function color($color, $tone: \\\"base\\\") {\\n @if map-has-key($colors, \\\"#{$color}\\\") {\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == map {\\n @return map-get(map-get($colors, \\\"#{$color}\\\"), $tone);\\n }\\n @if type-of(map-get($colors, \\\"#{$color}\\\")) == color {\\n @return map-get($colors, \\\"#{$color}\\\");\\n }\\n @warn \\\"Color `#{$color}` found without value\\\";\\n }\\n @warn \\\"Unknown `#{$color}` color\\\";\\n @return null;\\n}\\n\\n//\\n// Get font-size from map\\n@function font-size($key) {\\n @return map-get($type, $key);\\n}\\n\\n//\\n// Get font-size from map\\n@mixin type-setting($key) {\\n font-size: map-get($type, $key);\\n line-height: map-get($line, $key);\\n}\\n\"]}]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".article-link-button {\\n margin-right: 0.5rem;\\n min-width: 180px;\\n margin-bottom: 0.5rem;\\n}\\n.disabled-card {\\n background-color: #F4F7FA !important;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/styles/components/_test-result.scss\",\"_test-result.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,oBAAA;EACA,gBAAA;EACA,qBAAA;ACDF;ADMA;EACE,oCAAA;ACJF\",\"file\":\"_test-result.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.article-link-button {\\n margin-right: 0.5rem;\\n min-width: 180px;\\n margin-bottom: 0.5rem;\\n @include mq(m, max) {\\n }\\n}\\n\\n.disabled-card {\\n background-color: #F4F7FA !important;\\n}\",\".article-link-button {\\n margin-right: 0.5rem;\\n min-width: 180px;\\n margin-bottom: 0.5rem;\\n}\\n.disabled-card {\\n background-color: #F4F7FA !important;\\n}\"]}]);\n// Exports\nmodule.exports = exports;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".max-height-helper {\\n height: 250px;\\n overflow: hidden;\\n box-shadow: inset 0 -7px 9px -7px rgba(0, 0, 0, 0.4);\\n}\\n\\n.shadow {\\n background: linear-gradient(transparent, white 80%);\\n}\\n\\n.blur {\\n filter: blur(1px);\\n}\\n\\n.obfuscate {\\n filter: blur(3px);\\n}\\n\\n.smallLabel {\\n color: #39235d;\\n vertical-align: text-bottom;\\n font-weight: 500;\\n margin-bottom: 5px;\\n position: relative;\\n bottom: 1px;\\n}\\n\\n.smallLabel:hover {\\n text-decoration: none;\\n cursor: pointer;\\n}\\n\\n.labelIcon {\\n color: #39235d;\\n margin-right: 0.25rem;\\n}\\n\\n.show-more-container {\\n position: absolute;\\n width: 100%;\\n height: 100px;\\n bottom: 0;\\n padding-top: 20px;\\n margin-left: -1rem;\\n border-bottom-right-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n\\n.show-more-text {\\n left: 1rem;\\n text-decoration: underline;\\n color: #6e9fd5;\\n position: absolute;\\n bottom: 10px;\\n}\", \"\",{\"version\":3,\"sources\":[\"/rails/app/javascript/src/styles/components/_user-doctor-review.scss\",\"_user-doctor-review.scss\"],\"names\":[],\"mappings\":\"AAEA;EACE,aAAA;EACA,gBAAA;EACA,oDAAA;ACDF;;ADIA;EACE,mDAAA;ACDF;;ADIA;EACE,iBAAA;ACDF;;ADIA;EACE,iBAAA;ACDF;;ADIA;EACE,cAAA;EACA,2BAAA;EACA,gBAAA;EACA,kBAAA;EACA,kBAAA;EACA,WAAA;ACDF;;ADGE;EACE,qBAAA;EACA,eAAA;ACDJ;;ADKA;EACE,cAAA;EACA,qBAAA;ACFF;;ADKA;EACE,kBAAA;EACA,WAAA;EACA,aAAA;EACA,SAAA;EACA,iBAAA;EACA,kBAAA;EACA,kCAAA;EACA,iCAAA;ACFF;;ADKA;EACE,UAAA;EACA,0BAAA;EACA,cAAA;EACA,kBAAA;EACA,YAAA;ACFF\",\"file\":\"_user-doctor-review.scss\",\"sourcesContent\":[\"@import \\\"@variables\\\";\\n\\n.max-height-helper {\\n height: 250px;\\n overflow: hidden;\\n box-shadow: inset 0 -7px 9px -7px rgba(0, 0, 0, 0.4);\\n}\\n\\n.shadow {\\n background: linear-gradient(transparent, white 80%);\\n}\\n\\n.blur {\\n filter: blur(1px);\\n}\\n\\n.obfuscate {\\n filter: blur(3px);\\n}\\n\\n.smallLabel {\\n color: color(purple);\\n vertical-align: text-bottom;\\n font-weight: 500;\\n margin-bottom: 5px;\\n position: relative;\\n bottom: 1px;\\n\\n &:hover {\\n text-decoration: none;\\n cursor: pointer;\\n }\\n}\\n\\n.labelIcon {\\n color: color(purple);\\n margin-right: 0.25rem;\\n}\\n\\n.show-more-container {\\n position: absolute;\\n width: 100%;\\n height: 100px;\\n bottom: 0;\\n padding-top: 20px;\\n margin-left: -1rem;\\n border-bottom-right-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n\\n.show-more-text {\\n left: 1rem;\\n text-decoration: underline;\\n color: color(blue);\\n position: absolute;\\n bottom: 10px;\\n}\\n\",\".max-height-helper {\\n height: 250px;\\n overflow: hidden;\\n box-shadow: inset 0 -7px 9px -7px rgba(0, 0, 0, 0.4);\\n}\\n\\n.shadow {\\n background: linear-gradient(transparent, white 80%);\\n}\\n\\n.blur {\\n filter: blur(1px);\\n}\\n\\n.obfuscate {\\n filter: blur(3px);\\n}\\n\\n.smallLabel {\\n color: #39235d;\\n vertical-align: text-bottom;\\n font-weight: 500;\\n margin-bottom: 5px;\\n position: relative;\\n bottom: 1px;\\n}\\n.smallLabel:hover {\\n text-decoration: none;\\n cursor: pointer;\\n}\\n\\n.labelIcon {\\n color: #39235d;\\n margin-right: 0.25rem;\\n}\\n\\n.show-more-container {\\n position: absolute;\\n width: 100%;\\n height: 100px;\\n bottom: 0;\\n padding-top: 20px;\\n margin-left: -1rem;\\n border-bottom-right-radius: 0.5rem;\\n border-bottom-left-radius: 0.5rem;\\n}\\n\\n.show-more-text {\\n left: 1rem;\\n text-decoration: underline;\\n color: #6e9fd5;\\n position: absolute;\\n bottom: 10px;\\n}\"]}]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","\"use strict\";\n\nmodule.exports = function (url, options) {\n if (!options) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n url = url && url.__esModule ? url.default : url;\n\n if (typeof url !== 'string') {\n return url;\n } // If url is already wrapped in quotes, remove them\n\n\n if (/^['\"].*['\"]$/.test(url)) {\n // eslint-disable-next-line no-param-reassign\n url = url.slice(1, -1);\n }\n\n if (options.hash) {\n // eslint-disable-next-line no-param-reassign\n url += options.hash;\n } // Should url be wrapped?\n // See https://drafts.csswg.org/css-values-3/#urls\n\n\n if (/[\"'() \\t\\n]/.test(url) || options.needQuotes) {\n return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, '\\\\n'), \"\\\"\");\n }\n\n return url;\n};","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds, and nice the\n // default domain accordingly.\n if (!Array.isArray(tz)) {\n const max = x1, tn = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n tz = ticks(x0, x1, tn);\n\n // If the last threshold is coincident with the domain’s upper bound, the\n // last bin will be zero-width. If the default domain is used, and this\n // last threshold is coincident with the maximum input value, we can\n // extend the niced upper bound by one tick to ensure uniform bin widths;\n // otherwise, we simply remove the last threshold. Note that we don’t\n // coerce values or the domain to numbers, and thus must be careful to\n // compare order (>=) rather than strict equality (===)!\n if (tz[tz.length - 1] >= x1) {\n if (max >= x1 && domain === extent) {\n const step = tickIncrement(x0, x1, tn);\n if (isFinite(step)) {\n if (step > 0) {\n x1 = (Math.floor(x1 / step) + 1) * step;\n } else if (step < 0) {\n x1 = (Math.ceil(x1 * -step) + 1) / -step;\n }\n }\n } else {\n tz.pop();\n }\n }\n }\n\n // Remove any thresholds outside the domain.\n var m = tz.length;\n while (tz[0] <= x0) tz.shift(), --m;\n while (tz[m - 1] > x1) tz.pop(), --m;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n for (i = 0; i < n; ++i) {\n x = values[i];\n if (x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;\n };\n\n return histogram;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const 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 function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","function length(array) {\n return array.length | 0;\n}\n\nfunction empty(length) {\n return !(length > 0);\n}\n\nfunction arrayify(values) {\n return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n values = values.map(arrayify);\n const lengths = values.map(length);\n const j = values.length - 1;\n const index = new Array(j + 1).fill(0);\n const product = [];\n if (j < 0 || lengths.some(empty)) return product;\n while (true) {\n product.push(index.map((j, i) => values[i][j]));\n let i = j;\n while (++index[i] === lengths[i]) {\n if (i === 0) return reduce ? product.map(reduce) : product;\n index[i--] = 0;\n }\n }\n}\n","export default function cumsum(values, valueof) {\n var sum = 0, index = 0;\n return Float64Array.from(values, valueof === undefined\n ? v => (sum += +v || 0)\n : v => (sum += +valueof(v, index++, values) || 0));\n}","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n const v = variance(values, valueof);\n return v ? Math.sqrt(v) : v;\n}\n","export default function difference(values, ...others) {\n values = new Set(values);\n for (const other of others) {\n for (const value of other) {\n values.delete(value);\n }\n }\n return values;\n}\n","export default function disjoint(values, other) {\n const iterator = other[Symbol.iterator](), set = new Set();\n for (const v of values) {\n if (set.has(v)) return false;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) break;\n if (Object.is(v, value)) return false;\n set.add(value);\n }\n }\n return true;\n}\n","export default function every(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (!test(value, ++index, values)) {\n return false;\n }\n }\n return true;\n}\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 filter(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n const array = [];\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n array.push(value);\n }\n }\n return array;\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n let max;\n let defined = false;\n if (compare.length === 1) {\n let maxValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, maxValue) > 0\n : ascending(value, value) === 0) {\n max = element;\n maxValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, max) > 0\n : compare(value, value) === 0) {\n max = value;\n defined = true;\n }\n }\n }\n return max;\n}\n","import ascending from \"./ascending.js\";\nimport maxIndex from \"./maxIndex.js\";\n\nexport default function greatestIndex(values, compare = ascending) {\n if (compare.length === 1) return maxIndex(values, compare);\n let maxValue;\n let max = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (max < 0\n ? compare(value, value) === 0\n : compare(value, maxValue) > 0) {\n maxValue = value;\n max = index;\n }\n }\n return max;\n}\n","import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n return nest(values, Array.from, identity, keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n if (values.length !== 1) throw new Error(\"duplicate key\");\n return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n return (function regroup(values, i) {\n if (i >= keys.length) return reduce(values);\n const groups = new InternMap();\n const keyof = keys[i++];\n let index = -1;\n for (const value of values) {\n const key = keyof(value, ++index, values);\n const group = groups.get(key);\n if (group) group.push(value);\n else groups.set(key, [value]);\n }\n for (const [key, values] of groups) {\n groups.set(key, regroup(values, i));\n }\n return map(groups);\n })(values, 0);\n}\n","import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n return (reduce.length === 1\n ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n .map(([key]) => key);\n}\n","export default function(x) {\n return x;\n}\n","export {default as bisect, bisectRight, bisectLeft, bisectCenter} 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 {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.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 nice} from \"./nice.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, shuffler} 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\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n","import set from \"./set.js\";\n\nexport default function intersection(values, ...others) {\n values = new Set(values);\n others = others.map(set);\n out: for (const value of values) {\n for (const other of others) {\n if (!other.has(value)) {\n values.delete(value);\n continue out;\n }\n }\n }\n return values;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function least(values, compare = ascending) {\n let min;\n let defined = false;\n if (compare.length === 1) {\n let minValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, minValue) < 0\n : ascending(value, value) === 0) {\n min = element;\n minValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, min) < 0\n : compare(value, value) === 0) {\n min = value;\n defined = true;\n }\n }\n }\n return min;\n}\n","import ascending from \"./ascending.js\";\nimport minIndex from \"./minIndex.js\";\n\nexport default function leastIndex(values, compare = ascending) {\n if (compare.length === 1) return minIndex(values, compare);\n let minValue;\n let min = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (min < 0\n ? compare(value, value) === 0\n : compare(value, minValue) < 0) {\n minValue = value;\n min = index;\n }\n }\n return min;\n}\n","export default function map(values, mapper) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n return Array.from(values, (value, index) => mapper(value, index, values));\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 maxIndex(values, valueof) {\n let max;\n let maxIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n }\n return maxIndex;\n}\n","export default function mean(values, valueof) {\n let count = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n }\n if (count) return sum / count;\n}\n","import quantile from \"./quantile.js\";\n\nexport default function(values, valueof) {\n return quantile(values, 0.5, valueof);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\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 function minIndex(values, valueof) {\n let min;\n let minIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n }\n return minIndex;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export default function pairs(values, pairof = pair) {\n const pairs = [];\n let previous;\n let first = false;\n for (const value of values) {\n if (first) pairs.push(pairof(previous, value));\n previous = value;\n first = true;\n }\n return pairs;\n}\n\nexport function pair(a, b) {\n return [a, b];\n}\n","export default function(source, keys) {\n return Array.from(keys, key => source[key]);\n}\n","import max from \"./max.js\";\nimport min from \"./min.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","import ascending from \"./ascending.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) {\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(array, k, newLeft, newRight, compare);\n }\n\n const t = array[k];\n let i = left;\n let j = right;\n\n swap(array, left, k);\n if (compare(array[right], t) > 0) swap(array, left, right);\n\n while (i < j) {\n swap(array, i, j), ++i, --j;\n while (compare(array[i], t) < 0) ++i;\n while (compare(array[j], t) > 0) --j;\n }\n\n if (compare(array[left], t) === 0) swap(array, left, j);\n else ++j, swap(array, j, right);\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n return array;\n}\n\nfunction swap(array, i, j) {\n const t = array[i];\n array[i] = array[j];\n array[j] = t;\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","export default function reduce(values, reducer, value) {\n if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n const iterator = values[Symbol.iterator]();\n let done, next, index = -1;\n if (arguments.length < 3) {\n ({done, value} = iterator.next());\n if (done) return;\n ++index;\n }\n while (({done, value: next} = iterator.next()), !done) {\n value = reducer(value, next, ++index, values);\n }\n return value;\n}\n","export default function reverse(values) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n return Array.from(values).reverse();\n}\n","import leastIndex from \"./leastIndex.js\";\n\nexport default function scan(values, compare) {\n const index = leastIndex(values, compare);\n return index < 0 ? undefined : index;\n}\n","export default function set(values) {\n return values instanceof Set ? values : new Set(values);\n}\n","export default shuffler(Math.random);\n\nexport function shuffler(random) {\n return function shuffle(array, i0 = 0, i1 = array.length) {\n let m = i1 - (i0 = +i0);\n while (m) {\n const i = random() * m-- | 0, t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n return array;\n };\n}\n","export default function some(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n return true;\n }\n }\n return false;\n}\n","import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n values = Array.from(values);\n let [f = ascending] = F;\n if (f.length === 1 || F.length > 1) {\n const index = Uint32Array.from(values, (d, i) => i);\n if (F.length > 1) {\n F = F.map(f => values.map(f));\n index.sort((i, j) => {\n for (const f of F) {\n const c = ascending(f[i], f[j]);\n if (c) return c;\n }\n });\n } else {\n f = values.map(f);\n index.sort((i, j) => ascending(f[i], f[j]));\n }\n return permute(values, index);\n }\n return values.sort(f);\n}\n","import superset from \"./superset.js\";\n\nexport default function subset(values, other) {\n return superset(other, values);\n}\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","export default function superset(values, other) {\n const iterator = values[Symbol.iterator](), set = new Set();\n for (const o of other) {\n if (set.has(o)) continue;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) return false;\n set.add(value);\n if (Object.is(o, value)) break;\n }\n }\n return true;\n}\n","import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function(values, min, max) {\n return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(count(values), -1 / 3)));\n}\n","import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function(values, min, max) {\n return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3)));\n}\n","import count from \"../count.js\";\n\nexport default function(values) {\n return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;\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 let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + 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","import min from \"./min.js\";\n\nexport default function(matrix) {\n if (!(n = matrix.length)) return [];\n for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n row[j] = matrix[j][i];\n }\n }\n return transpose;\n}\n\nfunction length(d) {\n return d.length;\n}\n","export default function union(...others) {\n const set = new Set();\n for (const other of others) {\n for (const o of other) {\n set.add(o);\n }\n }\n return set;\n}\n","export default function variance(values, valueof) {\n let count = 0;\n let delta;\n let mean = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n }\n if (count > 1) return sum / (count - 1);\n}\n","import transpose from \"./transpose.js\";\n\nexport default function() {\n return transpose(arguments);\n}\n","export default function(map) {\n var entries = [];\n for (var key in map) entries.push({key: key, value: map[key]});\n return entries;\n}\n","export {default as nest} from \"./nest\";\nexport {default as set} from \"./set\";\nexport {default as map} from \"./map\";\nexport {default as keys} from \"./keys\";\nexport {default as values} from \"./values\";\nexport {default as entries} from \"./entries\";\n","export default function(map) {\n var keys = [];\n for (var key in map) keys.push(key);\n return keys;\n}\n","export var prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n constructor: Map,\n has: function(key) {\n return (prefix + key) in this;\n },\n get: function(key) {\n return this[prefix + key];\n },\n set: function(key, value) {\n this[prefix + key] = value;\n return this;\n },\n remove: function(key) {\n var property = prefix + key;\n return property in this && delete this[property];\n },\n clear: function() {\n for (var property in this) if (property[0] === prefix) delete this[property];\n },\n keys: function() {\n var keys = [];\n for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));\n return keys;\n },\n values: function() {\n var values = [];\n for (var property in this) if (property[0] === prefix) values.push(this[property]);\n return values;\n },\n entries: function() {\n var entries = [];\n for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});\n return entries;\n },\n size: function() {\n var size = 0;\n for (var property in this) if (property[0] === prefix) ++size;\n return size;\n },\n empty: function() {\n for (var property in this) if (property[0] === prefix) return false;\n return true;\n },\n each: function(f) {\n for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);\n }\n};\n\nfunction map(object, f) {\n var map = new Map;\n\n // Copy constructor.\n if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });\n\n // Index array by numeric index or specified key function.\n else if (Array.isArray(object)) {\n var i = -1,\n n = object.length,\n o;\n\n if (f == null) while (++i < n) map.set(i, object[i]);\n else while (++i < n) map.set(f(o = object[i], i, object), o);\n }\n\n // Convert object to map.\n else if (object) for (var key in object) map.set(key, object[key]);\n\n return map;\n}\n\nexport default map;\n","import map from \"./map\";\n\nexport default function() {\n var keys = [],\n sortKeys = [],\n sortValues,\n rollup,\n nest;\n\n function apply(array, depth, createResult, setResult) {\n if (depth >= keys.length) {\n if (sortValues != null) array.sort(sortValues);\n return rollup != null ? rollup(array) : array;\n }\n\n var i = -1,\n n = array.length,\n key = keys[depth++],\n keyValue,\n value,\n valuesByKey = map(),\n values,\n result = createResult();\n\n while (++i < n) {\n if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n values.push(value);\n } else {\n valuesByKey.set(keyValue, [value]);\n }\n }\n\n valuesByKey.each(function(values, key) {\n setResult(result, key, apply(values, depth, createResult, setResult));\n });\n\n return result;\n }\n\n function entries(map, depth) {\n if (++depth > keys.length) return map;\n var array, sortKey = sortKeys[depth - 1];\n if (rollup != null && depth >= keys.length) array = map.entries();\n else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });\n return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;\n }\n\n return nest = {\n object: function(array) { return apply(array, 0, createObject, setObject); },\n map: function(array) { return apply(array, 0, createMap, setMap); },\n entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },\n key: function(d) { keys.push(d); return nest; },\n sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },\n sortValues: function(order) { sortValues = order; return nest; },\n rollup: function(f) { rollup = f; return nest; }\n };\n}\n\nfunction createObject() {\n return {};\n}\n\nfunction setObject(object, key, value) {\n object[key] = value;\n}\n\nfunction createMap() {\n return map();\n}\n\nfunction setMap(map, key, value) {\n map.set(key, value);\n}\n","import {default as map, prefix} from \"./map\";\n\nfunction Set() {}\n\nvar proto = map.prototype;\n\nSet.prototype = set.prototype = {\n constructor: Set,\n has: proto.has,\n add: function(value) {\n value += \"\";\n this[prefix + value] = value;\n return this;\n },\n remove: proto.remove,\n clear: proto.clear,\n values: proto.keys,\n size: proto.size,\n empty: proto.empty,\n each: proto.each\n};\n\nfunction set(object, f) {\n var set = new Set;\n\n // Copy constructor.\n if (object instanceof Set) object.each(function(value) { set.add(value); });\n\n // Otherwise, assume it’s an array.\n else if (object) {\n var i = -1, n = object.length;\n if (f == null) while (++i < n) set.add(object[i]);\n else while (++i < n) set.add(f(object[i], i, object));\n }\n\n return set;\n}\n\nexport default set;\n","export default function(map) {\n var values = [];\n for (var key in map) values.push(map[key]);\n return values;\n}\n","import define, {extend} from \"./define.js\";\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 reHex = /^#([0-9a-f]{3,8})$/,\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 copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\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]) // eslint-disable-line no-prototype-builtins\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: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\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\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 formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\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","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {deg2rad, rad2deg} from \"./math.js\";\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 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","export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {deg2rad, rad2deg} from \"./math.js\";\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","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\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 {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\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, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\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","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","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(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\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(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","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\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 === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + 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 (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\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\": formatDecimal,\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","export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\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 === undefined && (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 === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%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 === undefined ? 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 // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : 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 after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” 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 exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\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.js\";\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 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 var slice = Array.prototype.slice;\n\nexport function shuffle(array) {\n var m = array.length,\n t,\n i;\n\n while (m) {\n i = Math.random() * m-- | 0;\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n\n return array;\n}\n","function defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n return x + c.x;\n}\n\nfunction maxY(children) {\n return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n var children;\n while (children = node.children) node = children[0];\n return node;\n}\n\nfunction leafRight(node) {\n var children;\n while (children = node.children) node = children[children.length - 1];\n return node;\n}\n\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = false;\n\n function cluster(root) {\n var previousNode,\n x = 0;\n\n // First walk, computing the initial x & y values.\n root.eachAfter(function(node) {\n var children = node.children;\n if (children) {\n node.x = meanX(children);\n node.y = maxY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n\n var left = leafLeft(root),\n right = leafRight(root),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2;\n\n // Second walk, normalizing x & y to the desired size.\n return root.eachAfter(nodeSize ? function(node) {\n node.x = (node.x - root.x) * dx;\n node.y = (root.y - node.y) * dy;\n } : function(node) {\n node.x = (node.x - x0) / (x1 - x0) * dx;\n node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n });\n }\n\n cluster.separation = function(x) {\n return arguments.length ? (separation = x, cluster) : separation;\n };\n\n cluster.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n };\n\n cluster.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n };\n\n return cluster;\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() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\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() {\n var nodes = [];\n this.each(function(node) {\n nodes.push(node);\n });\n return nodes;\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], 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(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","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 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’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\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(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\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 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","import {shuffle, slice} from \"../array.js\";\n\nexport default function(circles) {\n var i = 0, n = (circles = shuffle(slice.call(circles))).length, B = [], p, e;\n\n while (i < n) {\n p = circles[i];\n if (e && enclosesWeak(e, p)) ++i;\n else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n }\n\n return e;\n}\n\nfunction extendBasis(B, p) {\n var i, j;\n\n if (enclosesWeakAll(p, B)) return [p];\n\n // If we get here then B must have at least one element.\n for (i = 0; i < B.length; ++i) {\n if (enclosesNot(p, B[i])\n && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n return [B[i], p];\n }\n }\n\n // If we get here then B must have at least two elements.\n for (i = 0; i < B.length - 1; ++i) {\n for (j = i + 1; j < B.length; ++j) {\n if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n && enclosesNot(encloseBasis2(B[i], p), B[j])\n && enclosesNot(encloseBasis2(B[j], p), B[i])\n && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n return [B[i], B[j], p];\n }\n }\n }\n\n // If we get here then something is very wrong.\n throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n for (var i = 0; i < B.length; ++i) {\n if (!enclosesWeak(a, B[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction encloseBasis(B) {\n switch (B.length) {\n case 1: return encloseBasis1(B[0]);\n case 2: return encloseBasis2(B[0], B[1]);\n case 3: return encloseBasis3(B[0], B[1], B[2]);\n }\n}\n\nfunction encloseBasis1(a) {\n return {\n x: a.x,\n y: a.y,\n r: a.r\n };\n}\n\nfunction encloseBasis2(a, b) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n l = Math.sqrt(x21 * x21 + y21 * y21);\n return {\n x: (x1 + x2 + x21 / l * r21) / 2,\n y: (y1 + y2 + y21 / l * r21) / 2,\n r: (l + r1 + r2) / 2\n };\n}\n\nfunction encloseBasis3(a, b, c) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x3 = c.x, y3 = c.y, r3 = c.r,\n a2 = x1 - x2,\n a3 = x1 - x3,\n b2 = y1 - y2,\n b3 = y1 - y3,\n c2 = r2 - r1,\n c3 = r3 - r1,\n d1 = x1 * x1 + y1 * y1 - r1 * r1,\n d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n ab = a3 * b2 - a2 * b3,\n xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n xb = (b3 * c2 - b2 * c3) / ab,\n ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n yb = (a2 * c3 - a3 * c2) / ab,\n A = xb * xb + yb * yb - 1,\n B = 2 * (r1 + xa * xb + ya * yb),\n C = xa * xa + ya * ya - r1 * r1,\n r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n return {\n x: x1 + xa + xb * r,\n y: y1 + ya + yb * r,\n r: r\n };\n}\n","import {packEnclose} from \"./siblings.js\";\nimport {optional} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nfunction defaultRadius(d) {\n return Math.sqrt(d.value);\n}\n\nexport default function() {\n var radius = null,\n dx = 1,\n dy = 1,\n padding = constantZero;\n\n function pack(root) {\n root.x = dx / 2, root.y = dy / 2;\n if (radius) {\n root.eachBefore(radiusLeaf(radius))\n .eachAfter(packChildren(padding, 0.5))\n .eachBefore(translateChild(1));\n } else {\n root.eachBefore(radiusLeaf(defaultRadius))\n .eachAfter(packChildren(constantZero, 1))\n .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))\n .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n }\n return root;\n }\n\n pack.radius = function(x) {\n return arguments.length ? (radius = optional(x), pack) : radius;\n };\n\n pack.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n };\n\n pack.padding = function(x) {\n return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n };\n\n return pack;\n}\n\nfunction radiusLeaf(radius) {\n return function(node) {\n if (!node.children) {\n node.r = Math.max(0, +radius(node) || 0);\n }\n };\n}\n\nfunction packChildren(padding, k) {\n return function(node) {\n if (children = node.children) {\n var children,\n i,\n n = children.length,\n r = padding(node) * k || 0,\n e;\n\n if (r) for (i = 0; i < n; ++i) children[i].r += r;\n e = packEnclose(children);\n if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n node.r = e + r;\n }\n };\n}\n\nfunction translateChild(k) {\n return function(node) {\n var parent = node.parent;\n node.r *= k;\n if (parent) {\n node.x = parent.x + k * node.x;\n node.y = parent.y + k * node.y;\n }\n };\n}\n","import enclose from \"./enclose.js\";\n\nfunction place(b, a, c) {\n var dx = b.x - a.x, x, a2,\n dy = b.y - a.y, y, b2,\n d2 = dx * dx + dy * dy;\n if (d2) {\n a2 = a.r + c.r, a2 *= a2;\n b2 = b.r + c.r, b2 *= b2;\n if (a2 > b2) {\n x = (d2 + b2 - a2) / (2 * d2);\n y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n c.x = b.x - x * dx - y * dy;\n c.y = b.y - x * dy + y * dx;\n } else {\n x = (d2 + a2 - b2) / (2 * d2);\n y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n c.x = a.x + x * dx - y * dy;\n c.y = a.y + x * dy + y * dx;\n }\n } else {\n c.x = a.x + c.r;\n c.y = a.y;\n }\n}\n\nfunction intersects(a, b) {\n var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n var a = node._,\n b = node.next._,\n ab = a.r + b.r,\n dx = (a.x * b.r + b.x * a.r) / ab,\n dy = (a.y * b.r + b.y * a.r) / ab;\n return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n this._ = circle;\n this.next = null;\n this.previous = null;\n}\n\nexport function packEnclose(circles) {\n if (!(n = circles.length)) return 0;\n\n var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n // Place the first circle.\n a = circles[0], a.x = 0, a.y = 0;\n if (!(n > 1)) return a.r;\n\n // Place the second circle.\n b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n if (!(n > 2)) return a.r + b.r;\n\n // Place the third circle.\n place(b, a, c = circles[2]);\n\n // Initialize the front-chain using the first three circles a, b and c.\n a = new Node(a), b = new Node(b), c = new Node(c);\n a.next = c.previous = b;\n b.next = a.previous = c;\n c.next = b.previous = a;\n\n // Attempt to place each remaining circle…\n pack: for (i = 3; i < n; ++i) {\n place(a._, b._, c = circles[i]), c = new Node(c);\n\n // Find the closest intersecting circle on the front-chain, if any.\n // “Closeness” is determined by linear distance along the front-chain.\n // “Ahead” or “behind” is likewise determined by linear distance.\n j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n do {\n if (sj <= sk) {\n if (intersects(j._, c._)) {\n b = j, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sj += j._.r, j = j.next;\n } else {\n if (intersects(k._, c._)) {\n a = k, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sk += k._.r, k = k.previous;\n }\n } while (j !== k.next);\n\n // Success! Insert the new circle c between a and b.\n c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n // Compute the new closest circle pair to the centroid.\n aa = score(a);\n while ((c = c.next) !== b) {\n if ((ca = score(c)) < aa) {\n a = c, aa = ca;\n }\n }\n b = a.next;\n }\n\n // Compute the enclosing circle of the front chain.\n a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a);\n\n // Translate the circles to put the enclosing circle around the origin.\n for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n return c.r;\n}\n\nexport default function(circles) {\n packEnclose(circles);\n return circles;\n}\n","import roundNode from \"./treemap/round.js\";\nimport treemapDice from \"./treemap/dice.js\";\n\nexport default function() {\n var dx = 1,\n dy = 1,\n padding = 0,\n round = false;\n\n function partition(root) {\n var n = root.height + 1;\n root.x0 =\n root.y0 = padding;\n root.x1 = dx;\n root.y1 = dy / n;\n root.eachBefore(positionNode(dy, n));\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(dy, n) {\n return function(node) {\n if (node.children) {\n treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n }\n var x0 = node.x0,\n y0 = node.y0,\n x1 = node.x1 - padding,\n y1 = node.y1 - padding;\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 };\n }\n\n partition.round = function(x) {\n return arguments.length ? (round = !!x, partition) : round;\n };\n\n partition.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n };\n\n partition.padding = function(x) {\n return arguments.length ? (padding = +x, partition) : padding;\n };\n\n return partition;\n}\n","import {required} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar keyPrefix = \"$\", // Protect against keys like “__proto__”.\n preroot = {depth: -1},\n ambiguous = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId;\n\n function stratify(data) {\n var d,\n i,\n n = data.length,\n root,\n parent,\n node,\n nodes = new Array(n),\n nodeId,\n nodeKey,\n nodeByKey = {};\n\n for (i = 0; i < n; ++i) {\n d = data[i], node = nodes[i] = new Node(d);\n if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = keyPrefix + (node.id = nodeId);\n nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], nodeId = parentId(data[i], i, data);\n if (nodeId == null || !(nodeId += \"\")) {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n } else {\n parent = nodeByKey[keyPrefix + nodeId];\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = required(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = required(x), stratify) : parentId;\n };\n\n return stratify;\n}\n","import {Node} from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n this.a = this; // ancestor\n this.z = 0; // prelim\n this.m = 0; // mod\n this.c = 0; // change\n this.s = 0; // shift\n this.t = null; // thread\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root);\n\n // Compute the layout using Buchheim et al.’s algorithm.\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk);\n\n // If a fixed node size is specified, scale x and y.\n if (nodeSize) root.eachBefore(sizeNode);\n\n // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n\n return root;\n }\n\n // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n\n // Computes all real x-coordinates by summing up the modifiers recursively.\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n\n // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function(x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n };\n\n tree.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n };\n\n return tree;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i, n = nodes.length,\n sum, sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = (value / 2) + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;\n else hi = mid;\n }\n\n if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if ((x1 - x0) > (y1 - y0)) {\n var xk = (x0 * valueRight + x1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = (y0 * valueRight + y1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\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 && (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","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","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport {phi, squarifyRatio} from \"./squarify.js\";\n\nexport default (function custom(ratio) {\n\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);\n else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);\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 && (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 dice from \"./dice.js\";\nimport slice from \"./slice.js\";\n\nexport default function(parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\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 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 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","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","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\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(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n","import {hue} from \"./color.js\";\n\nexport default function(a, b) {\n var i = hue(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\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","import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\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","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\";\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","export default function piecewise(interpolate, values) {\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n","export default function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\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 return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\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","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 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","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 {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","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 ≅ 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 path} from \"./path.js\";\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’re 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","import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n","export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"d8b365f5f5f55ab4ac\",\n \"a6611adfc27d80cdc1018571\",\n \"a6611adfc27df5f5f580cdc1018571\",\n \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"af8dc3f7f7f77fbf7b\",\n \"7b3294c2a5cfa6dba0008837\",\n \"7b3294c2a5cff7f7f7a6dba0008837\",\n \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e9a3c9f7f7f7a1d76a\",\n \"d01c8bf1b6dab8e1864dac26\",\n \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"998ec3f7f7f7f1a340\",\n \"5e3c99b2abd2fdb863e66101\",\n \"5e3c99b2abd2f7f7f7fdb863e66101\",\n \"542788998ec3d8daebfee0b6f1a340b35806\",\n \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62f7f7f767a9cf\",\n \"ca0020f4a58292c5de0571b0\",\n \"ca0020f4a582f7f7f792c5de0571b0\",\n \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62ffffff999999\",\n \"ca0020f4a582bababa404040\",\n \"ca0020f4a582ffffffbababa404040\",\n \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91bfdb\",\n \"d7191cfdae61abd9e92c7bb6\",\n \"d7191cfdae61ffffbfabd9e92c7bb6\",\n \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91cf60\",\n \"d7191cfdae61a6d96a1a9641\",\n \"d7191cfdae61ffffbfa6d96a1a9641\",\n \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf99d594\",\n \"d7191cfdae61abdda42b83ba\",\n \"d7191cfdae61ffffbfabdda42b83ba\",\n \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n","export {default as schemeCategory10} from \"./categorical/category10.js\";\nexport {default as schemeAccent} from \"./categorical/Accent.js\";\nexport {default as schemeDark2} from \"./categorical/Dark2.js\";\nexport {default as schemePaired} from \"./categorical/Paired.js\";\nexport {default as schemePastel1} from \"./categorical/Pastel1.js\";\nexport {default as schemePastel2} from \"./categorical/Pastel2.js\";\nexport {default as schemeSet1} from \"./categorical/Set1.js\";\nexport {default as schemeSet2} from \"./categorical/Set2.js\";\nexport {default as schemeSet3} from \"./categorical/Set3.js\";\nexport {default as schemeTableau10} from \"./categorical/Tableau10.js\";\nexport {default as interpolateBrBG, scheme as schemeBrBG} from \"./diverging/BrBG.js\";\nexport {default as interpolatePRGn, scheme as schemePRGn} from \"./diverging/PRGn.js\";\nexport {default as interpolatePiYG, scheme as schemePiYG} from \"./diverging/PiYG.js\";\nexport {default as interpolatePuOr, scheme as schemePuOr} from \"./diverging/PuOr.js\";\nexport {default as interpolateRdBu, scheme as schemeRdBu} from \"./diverging/RdBu.js\";\nexport {default as interpolateRdGy, scheme as schemeRdGy} from \"./diverging/RdGy.js\";\nexport {default as interpolateRdYlBu, scheme as schemeRdYlBu} from \"./diverging/RdYlBu.js\";\nexport {default as interpolateRdYlGn, scheme as schemeRdYlGn} from \"./diverging/RdYlGn.js\";\nexport {default as interpolateSpectral, scheme as schemeSpectral} from \"./diverging/Spectral.js\";\nexport {default as interpolateBuGn, scheme as schemeBuGn} from \"./sequential-multi/BuGn.js\";\nexport {default as interpolateBuPu, scheme as schemeBuPu} from \"./sequential-multi/BuPu.js\";\nexport {default as interpolateGnBu, scheme as schemeGnBu} from \"./sequential-multi/GnBu.js\";\nexport {default as interpolateOrRd, scheme as schemeOrRd} from \"./sequential-multi/OrRd.js\";\nexport {default as interpolatePuBuGn, scheme as schemePuBuGn} from \"./sequential-multi/PuBuGn.js\";\nexport {default as interpolatePuBu, scheme as schemePuBu} from \"./sequential-multi/PuBu.js\";\nexport {default as interpolatePuRd, scheme as schemePuRd} from \"./sequential-multi/PuRd.js\";\nexport {default as interpolateRdPu, scheme as schemeRdPu} from \"./sequential-multi/RdPu.js\";\nexport {default as interpolateYlGnBu, scheme as schemeYlGnBu} from \"./sequential-multi/YlGnBu.js\";\nexport {default as interpolateYlGn, scheme as schemeYlGn} from \"./sequential-multi/YlGn.js\";\nexport {default as interpolateYlOrBr, scheme as schemeYlOrBr} from \"./sequential-multi/YlOrBr.js\";\nexport {default as interpolateYlOrRd, scheme as schemeYlOrRd} from \"./sequential-multi/YlOrRd.js\";\nexport {default as interpolateBlues, scheme as schemeBlues} from \"./sequential-single/Blues.js\";\nexport {default as interpolateGreens, scheme as schemeGreens} from \"./sequential-single/Greens.js\";\nexport {default as interpolateGreys, scheme as schemeGreys} from \"./sequential-single/Greys.js\";\nexport {default as interpolatePurples, scheme as schemePurples} from \"./sequential-single/Purples.js\";\nexport {default as interpolateReds, scheme as schemeReds} from \"./sequential-single/Reds.js\";\nexport {default as interpolateOranges, scheme as schemeOranges} from \"./sequential-single/Oranges.js\";\nexport {default as interpolateCividis} from \"./sequential-multi/cividis.js\";\nexport {default as interpolateCubehelixDefault} from \"./sequential-multi/cubehelix.js\";\nexport {default as interpolateRainbow, warm as interpolateWarm, cool as interpolateCool} from \"./sequential-multi/rainbow.js\";\nexport {default as interpolateSinebow} from \"./sequential-multi/sinebow.js\";\nexport {default as interpolateTurbo} from \"./sequential-multi/turbo.js\";\nexport {default as interpolateViridis, magma as interpolateMagma, inferno as interpolateInferno, plasma as interpolatePlasma} from \"./sequential-multi/viridis.js\";\n","import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default function(scheme) {\n return interpolateRgbBasis(scheme[scheme.length - 1]);\n}\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5f999d8c92ca25f\",\n \"edf8fbb2e2e266c2a4238b45\",\n \"edf8fbb2e2e266c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0ecf49ebcda8856a7\",\n \"edf8fbb3cde38c96c688419d\",\n \"edf8fbb3cde38c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0f3dba8ddb543a2ca\",\n \"f0f9e8bae4bc7bccc42b8cbe\",\n \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee8c8fdbb84e34a33\",\n \"fef0d9fdcc8afc8d59d7301f\",\n \"fef0d9fdcc8afc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece7f2a6bddb2b8cbe\",\n \"f1eef6bdc9e174a9cf0570b0\",\n \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece2f0a6bddb1c9099\",\n \"f6eff7bdc9e167a9cf02818a\",\n \"f6eff7bdc9e167a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e7e1efc994c7dd1c77\",\n \"f1eef6d7b5d8df65b0ce1256\",\n \"f1eef6d7b5d8df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fde0ddfa9fb5c51b8a\",\n \"feebe2fbb4b9f768a1ae017e\",\n \"feebe2fbb4b9f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f7fcb9addd8e31a354\",\n \"ffffccc2e69978c679238443\",\n \"ffffccc2e69978c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"edf8b17fcdbb2c7fb8\",\n \"ffffcca1dab441b6c4225ea8\",\n \"ffffcca1dab441b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fff7bcfec44fd95f0e\",\n \"ffffd4fed98efe9929cc4c02\",\n \"ffffd4fed98efe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ffeda0feb24cf03b20\",\n \"ffffb2fecc5cfd8d3ce31a1c\",\n \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n","export default function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n + \")\";\n}\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n}\n","import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n pi_1_3 = Math.PI / 3,\n pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n var x;\n t = (0.5 - t) * Math.PI;\n c.r = 255 * (x = Math.sin(t)) * x;\n c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n return c + \"\";\n}\n","export default function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n + \")\";\n}\n","import colors from \"../colors.js\";\n\nfunction ramp(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"deebf79ecae13182bd\",\n \"eff3ffbdd7e76baed62171b5\",\n \"eff3ffbdd7e76baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5e0a1d99b31a354\",\n \"edf8e9bae4b374c476238b45\",\n \"edf8e9bae4b374c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f0f0f0bdbdbd636363\",\n \"f7f7f7cccccc969696525252\",\n \"f7f7f7cccccc969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee6cefdae6be6550d\",\n \"feeddefdbe85fd8d3cd94701\",\n \"feeddefdbe85fd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"efedf5bcbddc756bb1\",\n \"f2f0f7cbc9e29e9ac86a51a3\",\n \"f2f0f7cbc9e29e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee0d2fc9272de2d26\",\n \"fee5d9fcae91fb6a4acb181d\",\n \"fee5d9fcae91fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n","import define, {extend} from \"./define.js\";\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 reHex = /^#([0-9a-f]{3,8})$/,\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 copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\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]) // eslint-disable-line no-prototype-builtins\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: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\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\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 formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\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","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\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) * degrees - 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) * radians,\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 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","export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst 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) * degrees;\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 * radians;\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","export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\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 {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\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, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\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","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","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(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\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(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","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\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 === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + 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 (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\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 === undefined && (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 === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%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 === undefined ? 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 // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : 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 after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” 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 exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\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.js\";\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","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 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","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","export default x => () => x;\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\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(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n","import {hue} from \"./color.js\";\n\nexport default function(a, b) {\n var i = hue(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\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","import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\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","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\";\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 {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n if (values === undefined) values = interpolate, interpolate = value;\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n","export default function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\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 return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\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","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 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","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\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 {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","var 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\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(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 ≅ 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 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","import formatLocale from \"./locale.js\";\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","export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n","import {utcFormat} from \"./defaultLocale.js\";\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.js\";\nimport {utcParse} from \"./defaultLocale.js\";\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","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 newDate(y, m, d) {\n return {y: y, m: m, d: d, 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 \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\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 \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\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 \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\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, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\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 if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\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 // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\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(newDate(d.y, 0, 1)), 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 = localDate(newDate(d.y, 0, 1)), 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(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).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 localDate(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.get(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.get(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.get(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.get(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.get(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 formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\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 function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\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 += \"\", false);\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 += \"\", true);\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 return new Map(names.map((name, i) => [name.toLowerCase(), i]));\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 parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, 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.s = +n[0], 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) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(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) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\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 formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\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) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(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) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\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 formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\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 interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport default day;\nexport var days = day.range;\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","import interval from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\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","export {\n default as timeInterval\n} from \"./interval.js\";\n\nexport {\n default as timeMillisecond,\n milliseconds as timeMilliseconds,\n default as utcMillisecond,\n milliseconds as utcMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n default as timeSecond,\n seconds as timeSeconds,\n default as utcSecond,\n seconds as utcSeconds\n} from \"./second.js\";\n\nexport {\n default as timeMinute,\n minutes as timeMinutes\n} from \"./minute.js\";\n\nexport {\n default as timeHour,\n hours as timeHours\n} from \"./hour.js\";\n\nexport {\n default as timeDay,\n days as timeDays\n} from \"./day.js\";\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.js\";\n\nexport {\n default as timeMonth,\n months as timeMonths\n} from \"./month.js\";\n\nexport {\n default as timeYear,\n years as timeYears\n} from \"./year.js\";\n\nexport {\n default as utcMinute,\n utcMinutes as utcMinutes\n} from \"./utcMinute.js\";\n\nexport {\n default as utcHour,\n utcHours as utcHours\n} from \"./utcHour.js\";\n\nexport {\n default as utcDay,\n utcDays as utcDays\n} from \"./utcDay.js\";\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.js\";\n\nexport {\n default as utcMonth,\n utcMonths as utcMonths\n} from \"./utcMonth.js\";\n\nexport {\n default as utcYear,\n utcYears as utcYears\n} from \"./utcYear.js\";\n\nexport {\n utcTicks,\n utcTickInterval,\n timeTicks,\n timeTickInterval\n} from \"./ticks.js\";\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 = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\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.js\";\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","import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\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.js\";\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.js\";\nimport {durationSecond} from \"./duration.js\";\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 {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport millisecond from \"./millisecond.js\";\nimport second from \"./second.js\";\nimport minute from \"./minute.js\";\nimport hour from \"./hour.js\";\nimport day from \"./day.js\";\nimport {sunday as week} from \"./week.js\";\nimport month from \"./month.js\";\nimport year from \"./year.js\";\nimport utcMinute from \"./utcMinute.js\";\nimport utcHour from \"./utcHour.js\";\nimport utcDay from \"./utcDay.js\";\nimport {utcSunday as utcWeek} from \"./utcWeek.js\";\nimport utcMonth from \"./utcMonth.js\";\nimport utcYear from \"./utcYear.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const 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 ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(year, month, week, day, hour, minute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\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.js\";\nimport {durationHour} from \"./duration.js\";\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.js\";\nimport {durationMinute} from \"./duration.js\";\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.js\";\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.js\";\nimport {durationWeek} from \"./duration.js\";\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.js\";\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","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\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.js\";\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 {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 constants(x) {\n return function() {\n return x;\n };\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 x == null || 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","import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n s = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1, r2;\n return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function() {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}\n","import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function(_) {\n return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n return linearish(scale);\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","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 {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 var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\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","import {ticks} from \"d3-array\";\nimport {format} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n return function(x) {\n return -f(-x);\n };\n}\n\nexport function loggish(transform) {\n var scale = transform(transformLog, transformExp),\n domain = scale.domain,\n base = 10,\n logs,\n pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = function(count) {\n var d = domain(),\n u = d[0],\n v = d[d.length - 1],\n r;\n\n if (r = v < u) i = u, u = v, v = i;\n\n var i = logs(u),\n j = logs(v),\n p,\n k,\n t,\n n = count == null ? 10 : +count,\n z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1, p = pows(i); k < base; ++k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1, p = pows(i); k >= 1; --k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = function(count, specifier) {\n if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n if (typeof specifier !== \"function\") specifier = format(specifier);\n if (count === Infinity) return specifier;\n if (count == null) count = 10;\n var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return function(d) {\n var i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = function() {\n return domain(nice(domain(), {\n floor: function(x) { return pows(Math.floor(logs(x))); },\n ceil: function(x) { return pows(Math.ceil(logs(x))); }\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, log()).base(scale.base());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","export default function nice(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","export default function number(x) {\n return +x;\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 {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {linearish} from \"./linear.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n return scale;\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1];\n };\n\n scale.range = function(_) {\n return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN]\n : i < 1 ? [x0, domain[0]]\n : i >= n ? [domain[n - 1], x1]\n : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function() {\n return domain.slice();\n };\n\n scale.copy = function() {\n return quantize()\n .domain([x0, x1])\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}\n","import continuous from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nfunction square(x) {\n return Math.sign(x) * x * x;\n}\n\nfunction unsquare(x) {\n return Math.sign(x) * Math.sqrt(Math.abs(x));\n}\n\nexport default function radial() {\n var squared = continuous(),\n range = [0, 1],\n round = false,\n unknown;\n\n function scale(x) {\n var y = unsquare(squared(x));\n return isNaN(y) ? unknown : round ? Math.round(y) : y;\n }\n\n scale.invert = function(y) {\n return squared.invert(square(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (squared.domain(_), scale) : squared.domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? (squared.range((range = Array.from(_, number)).map(square)), scale) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return scale.range(_).round(true);\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, scale) : round;\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (squared.clamp(_), scale) : squared.clamp();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return radial(squared.domain(), range)\n .round(round)\n .clamp(squared.clamp())\n .unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1;\n return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantile} from \"d3-array\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\n\nexport default function sequentialQuantile() {\n var domain = [],\n interpolator = identity;\n\n function scale(x) {\n if (x != null && !isNaN(x = +x)) return interpolator((bisect(domain, x, 1) - 1) / (domain.length - 1));\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return scale;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.range = function() {\n return domain.map((d, i) => interpolator(i / (domain.length - 1)));\n };\n\n scale.quantiles = function(n) {\n return Array.from({length: n + 1}, (_, i) => quantile(domain, i / n));\n };\n\n scale.copy = function() {\n return sequentialQuantile(interpolator).domain(domain);\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(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 {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} 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\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(ticks, tickInterval, year, month, week, day, hour, minute, second, 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 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 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 return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\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 if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\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 ≥ r0, da1 ≥ 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’s 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’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s 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","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","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport {lineRadial} from \"./lineRadial.js\";\n\nexport default function() {\n var a = area().curve(curveRadialLinear),\n c = a.curve,\n x0 = a.lineX0,\n x1 = a.lineX1,\n y0 = a.lineY0,\n y1 = a.lineY1;\n\n a.angle = a.x, delete a.x;\n a.startAngle = a.x0, delete a.x0;\n a.endAngle = a.x1, delete a.x1;\n a.radius = a.y, delete a.y;\n a.innerRadius = a.y0, delete a.y0;\n a.outerRadius = a.y1, delete a.y1;\n a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;\n a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;\n a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;\n a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;\n\n a.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return a;\n}\n","export var slice = Array.prototype.slice;\n","export default function(x) {\n return function constant() {\n return x;\n };\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","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\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 BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.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 if (this._line || (this._line !== 0 && this._point === 3)) 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; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // 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 BasisOpen(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.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 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, 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; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.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 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) 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; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.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 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); 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\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\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; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.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 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\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","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.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 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); 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 var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\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; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, 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: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\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","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","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 curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport line from \"./line.js\";\n\nexport function lineRadial(l) {\n var c = l.curve;\n\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n\n l.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return l;\n}\n\nexport default function() {\n return lineRadial(line().curve(curveRadialLinear));\n}\n","import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\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","export default function() {}\n","export default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n for (yp = yn = 0, i = 0; i < n; ++i) {\n if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n d[0] = yp, d[1] = yp += dy;\n } else if (dy < 0) {\n d[1] = yn, d[0] = yn += dy;\n } else {\n d[0] = 0, d[1] = dy;\n }\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\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 x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","export default function(x, y) {\n return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}\n","import {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var kz = keys.apply(this, arguments),\n i,\n m = data.length,\n n = kz.length,\n sz = new Array(n),\n oz;\n\n for (i = 0; i < n; ++i) {\n for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n si[j] = sij = [0, +value(data[j], ki, j, data)];\n sij.data = data[j];\n }\n si.key = ki;\n }\n\n for (i = 0, oz = order(sz); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import {path} from \"d3-path\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport star from \"./symbol/star.js\";\nimport square from \"./symbol/square.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport wye from \"./symbol/wye.js\";\nimport constant from \"./constant.js\";\n\nexport var symbols = [\n circle,\n cross,\n diamond,\n square,\n star,\n triangle,\n wye\n];\n\nexport default function() {\n var type = constant(circle),\n size = constant(64),\n context = null;\n\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}\n","import {pi, tau} from \"../math.js\";\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","export default {\n draw: function(context, size) {\n var r = Math.sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }\n};\n","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\n\nexport default {\n draw: function(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","export default {\n draw: function(context, size) {\n var w = Math.sqrt(size),\n x = -w / 2;\n context.rect(x, x, w, w);\n }\n};\n","import {pi, tau} from \"../math.js\";\n\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","var sqrt3 = Math.sqrt(3);\n\nexport default {\n draw: function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","import formatLocale from \"./locale.js\";\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","export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n","import {utcFormat} from \"./defaultLocale.js\";\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.js\";\nimport {utcParse} from \"./defaultLocale.js\";\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","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 newDate(y, m, d) {\n return {y: y, m: m, d: d, 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 \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\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 \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\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 \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\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, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\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 if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\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 // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\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(newDate(d.y, 0, 1)), 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 = localDate(newDate(d.y, 0, 1)), 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(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).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 localDate(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 formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\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 function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\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 += \"\", false);\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 += \"\", true);\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 parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, 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.s = +n[0], 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) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(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) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\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 formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\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) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(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) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\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 formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\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 interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\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","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.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\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","export {\n default as timeInterval\n} from \"./interval.js\";\n\nexport {\n default as timeMillisecond,\n milliseconds as timeMilliseconds,\n default as utcMillisecond,\n milliseconds as utcMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n default as timeSecond,\n seconds as timeSeconds,\n default as utcSecond,\n seconds as utcSeconds\n} from \"./second.js\";\n\nexport {\n default as timeMinute,\n minutes as timeMinutes\n} from \"./minute.js\";\n\nexport {\n default as timeHour,\n hours as timeHours\n} from \"./hour.js\";\n\nexport {\n default as timeDay,\n days as timeDays\n} from \"./day.js\";\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.js\";\n\nexport {\n default as timeMonth,\n months as timeMonths\n} from \"./month.js\";\n\nexport {\n default as timeYear,\n years as timeYears\n} from \"./year.js\";\n\nexport {\n default as utcMinute,\n utcMinutes as utcMinutes\n} from \"./utcMinute.js\";\n\nexport {\n default as utcHour,\n utcHours as utcHours\n} from \"./utcHour.js\";\n\nexport {\n default as utcDay,\n utcDays as utcDays\n} from \"./utcDay.js\";\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.js\";\n\nexport {\n default as utcMonth,\n utcMonths as utcMonths\n} from \"./utcMonth.js\";\n\nexport {\n default as utcYear,\n utcYears as utcYears\n} from \"./utcYear.js\";\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 = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\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.js\";\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","import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\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.js\";\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.js\";\nimport {durationSecond} from \"./duration.js\";\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.js\";\nimport {durationDay} from \"./duration.js\";\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.js\";\nimport {durationHour} from \"./duration.js\";\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.js\";\nimport {durationMinute} from \"./duration.js\";\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.js\";\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.js\";\nimport {durationWeek} from \"./duration.js\";\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.js\";\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","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\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.js\";\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","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","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 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 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 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_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')\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 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 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 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 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 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 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_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","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 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 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 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 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')\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')\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 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 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 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')\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 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 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 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","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","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","/**\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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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","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 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 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 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 ±YYYYY\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 ±YYY\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 // ±hh\n token = parseTokenTimezoneHH.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\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 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')\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 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 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 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 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 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 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 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 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 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 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","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 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","/**\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 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 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","import {characterEntities} from 'character-entities'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Decode a single character reference (without the `&` or `;`).\n * You probably only need this when you’re building parsers yourself that follow\n * different rules compared to HTML.\n * This is optimized to be tiny in browsers.\n *\n * @param {string} value\n * `notin` (named), `#123` (deci), `#x123` (hexa).\n * @returns {string|false}\n * Decoded reference.\n */\nexport function decodeNamedCharacterReference(value) {\n return own.call(characterEntities, value) ? characterEntities[value] : false\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar jsonapi_types_1 = require(\"jsonapi-types\");\nfunction mapRelation(rel) {\n if (rel) {\n return rel.id;\n }\n return null;\n}\nfunction transformResource(res, findIncluded, include) {\n var attributes = res.attributes;\n var relationships = res.relationships;\n var out = res;\n for (var _i = 0, _a = Object.keys(out); _i < _a.length; _i++) {\n var key = _a[_i];\n if (key !== 'id' && key !== 'type' && key !== 'meta') {\n delete out[key];\n }\n }\n if (attributes) {\n for (var _b = 0, _c = Object.keys(attributes); _b < _c.length; _b++) {\n var field = _c[_b];\n out[field] = attributes[field];\n }\n }\n if (relationships) {\n var _loop_1 = function (field) {\n var value = relationships[field];\n if (Array.isArray(value.data)) {\n if (!include || include.some(function (path) {\n return path === field || path[0] === field;\n })) {\n out[field] = value.data.map(findIncluded);\n }\n else {\n out[field] = value.data.map(mapRelation);\n }\n }\n else if (!Array.isArray(value.data)) {\n if (!include || include.some(function (path) {\n return path === field || path[0] === field;\n })) {\n out[field] = findIncluded(value.data);\n }\n else {\n out[field] = mapRelation(value.data);\n }\n }\n };\n for (var _d = 0, _e = Object.keys(relationships); _d < _e.length; _d++) {\n var field = _e[_d];\n _loop_1(field);\n }\n }\n return out;\n}\n/*\n* Uses linear search under 10000 items, and objects otherwise\n*/\nfunction createResourceLookup(resources) {\n if (resources.length < 10000) {\n return function (rel) {\n if (!rel) {\n return null;\n }\n for (var _i = 0, resources_2 = resources; _i < resources_2.length; _i++) {\n var item = resources_2[_i];\n if (item.id === rel.id && item.type === rel.type) {\n return item;\n }\n }\n return rel.id;\n };\n }\n else {\n var types_1 = {};\n for (var _i = 0, resources_1 = resources; _i < resources_1.length; _i++) {\n var item = resources_1[_i];\n var ids = types_1[item.type];\n if (!ids) {\n ids = types_1[item.type] = {};\n }\n ids[item.id] = item;\n }\n return function (rel) {\n if (!rel) {\n return null;\n }\n var ids = types_1[rel.type];\n return ids && ids[rel.id] || rel.id;\n };\n }\n}\n/*\n* top: http://jsonapi.org/format/#document-structure (object | null)\n* include: http://jsonapi.org/format/#fetching-includes ((string | string[])[])\n*/\nfunction default_1(top, include) {\n if (top) {\n var out = { data: null };\n if (jsonapi_types_1.hasLinks(top)) {\n out.links = top.links;\n }\n if (top.jsonapi) {\n out.jsonapi = top.jsonapi;\n }\n if (top.meta) {\n out.meta = top.meta;\n }\n if (jsonapi_types_1.isSuccess(top)) {\n var resources = [];\n var validData = [];\n if (Array.isArray(top.data)) {\n for (var _i = 0, _a = top.data; _i < _a.length; _i++) {\n var item = _a[_i];\n if (item !== null) {\n validData.push(item);\n }\n }\n }\n else if (top.data) {\n validData.push(top.data);\n }\n if (jsonapi_types_1.hasIncluded(top)) {\n resources = validData.concat(top.included || []);\n }\n else {\n resources = validData;\n }\n var findIncluded = include ? createResourceLookup(resources) : mapRelation;\n if (jsonapi_types_1.hasIncluded(top) && top.included) {\n for (var _b = 0, _c = top.included; _b < _c.length; _b++) {\n var item = _c[_b];\n transformResource(item, findIncluded);\n }\n delete top.included;\n }\n if (top.data) {\n if (Array.isArray(top.data)) {\n for (var _d = 0, validData_1 = validData; _d < validData_1.length; _d++) {\n var item = validData_1[_d];\n transformResource(item, findIncluded, include);\n }\n out.data = top.data;\n }\n else {\n transformResource(top.data, findIncluded, include);\n out.data = top.data;\n }\n }\n return out;\n }\n else {\n var error = new Error('JSONAPI error');\n error.data = top;\n throw error;\n }\n }\n return null;\n}\nexports.default = default_1;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = addClass;\n\nvar _hasClass = _interopRequireDefault(require(\"./hasClass\"));\n\nfunction addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nexports.__esModule = true;\nexports.default = hasClass;\n\nfunction hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);else return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}\n\nmodule.exports = exports[\"default\"];","'use strict';\n\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar moveBlockInContentState = require(\"./moveBlockInContentState\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock;\nvar List = Immutable.List,\n Repeat = Immutable.Repeat;\nvar AtomicBlockUtils = {\n insertAtomicBlock: function insertAtomicBlock(editorState, entityKey, character) {\n var contentState = editorState.getCurrentContent();\n var selectionState = editorState.getSelection();\n var afterRemoval = DraftModifier.removeRange(contentState, selectionState, 'backward');\n var targetSelection = afterRemoval.getSelectionAfter();\n var afterSplit = DraftModifier.splitBlock(afterRemoval, targetSelection);\n var insertionTarget = afterSplit.getSelectionAfter();\n var asAtomicBlock = DraftModifier.setBlockType(afterSplit, insertionTarget, 'atomic');\n var charData = CharacterMetadata.create({\n entity: entityKey\n });\n var atomicBlockConfig = {\n key: generateRandomKey(),\n type: 'atomic',\n text: character,\n characterList: List(Repeat(charData, character.length))\n };\n var atomicDividerBlockConfig = {\n key: generateRandomKey(),\n type: 'unstyled'\n };\n\n if (experimentalTreeDataSupport) {\n atomicBlockConfig = _objectSpread({}, atomicBlockConfig, {\n nextSibling: atomicDividerBlockConfig.key\n });\n atomicDividerBlockConfig = _objectSpread({}, atomicDividerBlockConfig, {\n prevSibling: atomicBlockConfig.key\n });\n }\n\n var fragmentArray = [new ContentBlockRecord(atomicBlockConfig), new ContentBlockRecord(atomicDividerBlockConfig)];\n var fragment = BlockMapBuilder.createFromArray(fragmentArray);\n var withAtomicBlock = DraftModifier.replaceWithFragment(asAtomicBlock, insertionTarget, fragment);\n var newContent = withAtomicBlock.merge({\n selectionBefore: selectionState,\n selectionAfter: withAtomicBlock.getSelectionAfter().set('hasFocus', true)\n });\n return EditorState.push(editorState, newContent, 'insert-fragment');\n },\n moveAtomicBlock: function moveAtomicBlock(editorState, atomicBlock, targetRange, insertionMode) {\n var contentState = editorState.getCurrentContent();\n var selectionState = editorState.getSelection();\n var withMovedAtomicBlock;\n\n if (insertionMode === 'before' || insertionMode === 'after') {\n var targetBlock = contentState.getBlockForKey(insertionMode === 'before' ? targetRange.getStartKey() : targetRange.getEndKey());\n withMovedAtomicBlock = moveBlockInContentState(contentState, atomicBlock, targetBlock, insertionMode);\n } else {\n var afterRemoval = DraftModifier.removeRange(contentState, targetRange, 'backward');\n var selectionAfterRemoval = afterRemoval.getSelectionAfter();\n\n var _targetBlock = afterRemoval.getBlockForKey(selectionAfterRemoval.getFocusKey());\n\n if (selectionAfterRemoval.getStartOffset() === 0) {\n withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'before');\n } else if (selectionAfterRemoval.getEndOffset() === _targetBlock.getLength()) {\n withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'after');\n } else {\n var afterSplit = DraftModifier.splitBlock(afterRemoval, selectionAfterRemoval);\n var selectionAfterSplit = afterSplit.getSelectionAfter();\n\n var _targetBlock2 = afterSplit.getBlockForKey(selectionAfterSplit.getFocusKey());\n\n withMovedAtomicBlock = moveBlockInContentState(afterSplit, atomicBlock, _targetBlock2, 'before');\n }\n }\n\n var newContent = withMovedAtomicBlock.merge({\n selectionBefore: selectionState,\n selectionAfter: withMovedAtomicBlock.getSelectionAfter().set('hasFocus', true)\n });\n return EditorState.push(editorState, newContent, 'move-block');\n }\n};\nmodule.exports = AtomicBlockUtils;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Immutable = require(\"immutable\");\n\nvar OrderedMap = Immutable.OrderedMap;\nvar BlockMapBuilder = {\n createFromArray: function createFromArray(blocks) {\n return OrderedMap(blocks.map(function (block) {\n return [block.getKey(), block];\n }));\n }\n};\nmodule.exports = BlockMapBuilder;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar getOwnObjectValues = require(\"./getOwnObjectValues\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Repeat = Immutable.Repeat,\n Record = Immutable.Record;\n\nvar returnTrue = function returnTrue() {\n return true;\n};\n\nvar defaultLeafRange = {\n start: null,\n end: null\n};\nvar LeafRange = Record(defaultLeafRange);\nvar defaultDecoratorRange = {\n start: null,\n end: null,\n decoratorKey: null,\n leaves: null\n};\nvar DecoratorRange = Record(defaultDecoratorRange);\nvar BlockTree = {\n /**\n * Generate a block tree for a given ContentBlock/decorator pair.\n */\n generate: function generate(contentState, block, decorator) {\n var textLength = block.getLength();\n\n if (!textLength) {\n return List.of(new DecoratorRange({\n start: 0,\n end: 0,\n decoratorKey: null,\n leaves: List.of(new LeafRange({\n start: 0,\n end: 0\n }))\n }));\n }\n\n var leafSets = [];\n var decorations = decorator ? decorator.getDecorations(block, contentState) : List(Repeat(null, textLength));\n var chars = block.getCharacterList();\n findRangesImmutable(decorations, areEqual, returnTrue, function (start, end) {\n leafSets.push(new DecoratorRange({\n start: start,\n end: end,\n decoratorKey: decorations.get(start),\n leaves: generateLeaves(chars.slice(start, end).toList(), start)\n }));\n });\n return List(leafSets);\n },\n fromJS: function fromJS(_ref) {\n var leaves = _ref.leaves,\n other = _objectWithoutPropertiesLoose(_ref, [\"leaves\"]);\n\n return new DecoratorRange(_objectSpread({}, other, {\n leaves: leaves != null ? List(Array.isArray(leaves) ? leaves : getOwnObjectValues(leaves)).map(function (leaf) {\n return LeafRange(leaf);\n }) : null\n }));\n }\n};\n/**\n * Generate LeafRange records for a given character list.\n */\n\nfunction generateLeaves(characters, offset) {\n var leaves = [];\n var inlineStyles = characters.map(function (c) {\n return c.getStyle();\n }).toList();\n findRangesImmutable(inlineStyles, areEqual, returnTrue, function (start, end) {\n leaves.push(new LeafRange({\n start: start + offset,\n end: end + offset\n }));\n });\n return List(leaves);\n}\n\nfunction areEqual(a, b) {\n return a === b;\n}\n\nmodule.exports = BlockTree;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar _require = require(\"immutable\"),\n Map = _require.Map,\n OrderedSet = _require.OrderedSet,\n Record = _require.Record; // Immutable.map is typed such that the value for every key in the map\n// must be the same type\n\n\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n style: EMPTY_SET,\n entity: null\n};\nvar CharacterMetadataRecord = Record(defaultRecord);\n\nvar CharacterMetadata = /*#__PURE__*/function (_CharacterMetadataRec) {\n _inheritsLoose(CharacterMetadata, _CharacterMetadataRec);\n\n function CharacterMetadata() {\n return _CharacterMetadataRec.apply(this, arguments) || this;\n }\n\n var _proto = CharacterMetadata.prototype;\n\n _proto.getStyle = function getStyle() {\n return this.get('style');\n };\n\n _proto.getEntity = function getEntity() {\n return this.get('entity');\n };\n\n _proto.hasStyle = function hasStyle(style) {\n return this.getStyle().includes(style);\n };\n\n CharacterMetadata.applyStyle = function applyStyle(record, style) {\n var withStyle = record.set('style', record.getStyle().add(style));\n return CharacterMetadata.create(withStyle);\n };\n\n CharacterMetadata.removeStyle = function removeStyle(record, style) {\n var withoutStyle = record.set('style', record.getStyle().remove(style));\n return CharacterMetadata.create(withoutStyle);\n };\n\n CharacterMetadata.applyEntity = function applyEntity(record, entityKey) {\n var withEntity = record.getEntity() === entityKey ? record : record.set('entity', entityKey);\n return CharacterMetadata.create(withEntity);\n }\n /**\n * Use this function instead of the `CharacterMetadata` constructor.\n * Since most content generally uses only a very small number of\n * style/entity permutations, we can reuse these objects as often as\n * possible.\n */\n ;\n\n CharacterMetadata.create = function create(config) {\n if (!config) {\n return EMPTY;\n }\n\n var defaultConfig = {\n style: EMPTY_SET,\n entity: null\n }; // Fill in unspecified properties, if necessary.\n\n var configMap = Map(defaultConfig).merge(config);\n var existing = pool.get(configMap);\n\n if (existing) {\n return existing;\n }\n\n var newCharacter = new CharacterMetadata(configMap);\n pool = pool.set(configMap, newCharacter);\n return newCharacter;\n };\n\n CharacterMetadata.fromJS = function fromJS(_ref) {\n var style = _ref.style,\n entity = _ref.entity;\n return new CharacterMetadata({\n style: Array.isArray(style) ? OrderedSet(style) : style,\n entity: Array.isArray(entity) ? OrderedSet(entity) : entity\n });\n };\n\n return CharacterMetadata;\n}(CharacterMetadataRecord);\n\nvar EMPTY = new CharacterMetadata();\nvar pool = Map([[Map(defaultRecord), EMPTY]]);\nCharacterMetadata.EMPTY = EMPTY;\nmodule.exports = CharacterMetadata;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List;\nvar DELIMITER = '.';\n/**\n * A CompositeDraftDecorator traverses through a list of DraftDecorator\n * instances to identify sections of a ContentBlock that should be rendered\n * in a \"decorated\" manner. For example, hashtags, mentions, and links may\n * be intended to stand out visually, be rendered as anchors, etc.\n *\n * The list of decorators supplied to the constructor will be used in the\n * order they are provided. This allows the caller to specify a priority for\n * string matching, in case of match collisions among decorators.\n *\n * For instance, I may have a link with a `#` in its text. Though this section\n * of text may match our hashtag decorator, it should not be treated as a\n * hashtag. I should therefore list my link DraftDecorator\n * before my hashtag DraftDecorator when constructing this composite\n * decorator instance.\n *\n * Thus, when a collision like this is encountered, the earlier match is\n * preserved and the new match is discarded.\n */\n\nvar CompositeDraftDecorator = /*#__PURE__*/function () {\n function CompositeDraftDecorator(decorators) {\n _defineProperty(this, \"_decorators\", void 0);\n\n // Copy the decorator array, since we use this array order to determine\n // precedence of decoration matching. If the array is mutated externally,\n // we don't want to be affected here.\n this._decorators = decorators.slice();\n }\n\n var _proto = CompositeDraftDecorator.prototype;\n\n _proto.getDecorations = function getDecorations(block, contentState) {\n var decorations = Array(block.getText().length).fill(null);\n\n this._decorators.forEach(function (\n /*object*/\n decorator,\n /*number*/\n ii) {\n var counter = 0;\n var strategy = decorator.strategy;\n\n var callback = function callback(\n /*number*/\n start,\n /*number*/\n end) {\n // Find out if any of our matching range is already occupied\n // by another decorator. If so, discard the match. Otherwise, store\n // the component key for rendering.\n if (canOccupySlice(decorations, start, end)) {\n occupySlice(decorations, start, end, ii + DELIMITER + counter);\n counter++;\n }\n };\n\n strategy(block, callback, contentState);\n });\n\n return List(decorations);\n };\n\n _proto.getComponentForKey = function getComponentForKey(key) {\n var componentKey = parseInt(key.split(DELIMITER)[0], 10);\n return this._decorators[componentKey].component;\n };\n\n _proto.getPropsForKey = function getPropsForKey(key) {\n var componentKey = parseInt(key.split(DELIMITER)[0], 10);\n return this._decorators[componentKey].props;\n };\n\n return CompositeDraftDecorator;\n}();\n/**\n * Determine whether we can occupy the specified slice of the decorations\n * array.\n */\n\n\nfunction canOccupySlice(decorations, start, end) {\n for (var ii = start; ii < end; ii++) {\n if (decorations[ii] != null) {\n return false;\n }\n }\n\n return true;\n}\n/**\n * Splice the specified component into our decoration array at the desired\n * range.\n */\n\n\nfunction occupySlice(targetArr, start, end, componentKey) {\n for (var ii = start; ii < end; ii++) {\n targetArr[ii] = componentKey;\n }\n}\n\nmodule.exports = CompositeDraftDecorator;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat;\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n key: '',\n type: 'unstyled',\n text: '',\n characterList: List(),\n depth: 0,\n data: Map()\n};\nvar ContentBlockRecord = Record(defaultRecord);\n\nvar decorateCharacterList = function decorateCharacterList(config) {\n if (!config) {\n return config;\n }\n\n var characterList = config.characterList,\n text = config.text;\n\n if (text && !characterList) {\n config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length));\n }\n\n return config;\n};\n\nvar ContentBlock = /*#__PURE__*/function (_ContentBlockRecord) {\n _inheritsLoose(ContentBlock, _ContentBlockRecord);\n\n function ContentBlock(config) {\n return _ContentBlockRecord.call(this, decorateCharacterList(config)) || this;\n }\n\n var _proto = ContentBlock.prototype;\n\n _proto.getKey = function getKey() {\n return this.get('key');\n };\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getText = function getText() {\n return this.get('text');\n };\n\n _proto.getCharacterList = function getCharacterList() {\n return this.get('characterList');\n };\n\n _proto.getLength = function getLength() {\n return this.getText().length;\n };\n\n _proto.getDepth = function getDepth() {\n return this.get('depth');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n _proto.getInlineStyleAt = function getInlineStyleAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getStyle() : EMPTY_SET;\n };\n\n _proto.getEntityAt = function getEntityAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getEntity() : null;\n }\n /**\n * Execute a callback for every contiguous range of styles within the block.\n */\n ;\n\n _proto.findStyleRanges = function findStyleRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback);\n }\n /**\n * Execute a callback for every contiguous range of entities within the block.\n */\n ;\n\n _proto.findEntityRanges = function findEntityRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback);\n };\n\n return ContentBlock;\n}(ContentBlockRecord);\n\nfunction haveEqualStyle(charA, charB) {\n return charA.getStyle() === charB.getStyle();\n}\n\nfunction haveEqualEntity(charA, charB) {\n return charA.getEntity() === charB.getEntity();\n}\n\nmodule.exports = ContentBlock;","/**\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of ContentBlock adding support for nesting references by\n * providing links to children, parent, prevSibling, and nextSibling.\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat;\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n parent: null,\n characterList: List(),\n data: Map(),\n depth: 0,\n key: '',\n text: '',\n type: 'unstyled',\n children: List(),\n prevSibling: null,\n nextSibling: null\n};\n\nvar haveEqualStyle = function haveEqualStyle(charA, charB) {\n return charA.getStyle() === charB.getStyle();\n};\n\nvar haveEqualEntity = function haveEqualEntity(charA, charB) {\n return charA.getEntity() === charB.getEntity();\n};\n\nvar decorateCharacterList = function decorateCharacterList(config) {\n if (!config) {\n return config;\n }\n\n var characterList = config.characterList,\n text = config.text;\n\n if (text && !characterList) {\n config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length));\n }\n\n return config;\n};\n\nvar ContentBlockNode = /*#__PURE__*/function (_ref) {\n _inheritsLoose(ContentBlockNode, _ref);\n\n function ContentBlockNode() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultRecord;\n\n /* eslint-disable-next-line constructor-super */\n return _ref.call(this, decorateCharacterList(props)) || this;\n }\n\n var _proto = ContentBlockNode.prototype;\n\n _proto.getKey = function getKey() {\n return this.get('key');\n };\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getText = function getText() {\n return this.get('text');\n };\n\n _proto.getCharacterList = function getCharacterList() {\n return this.get('characterList');\n };\n\n _proto.getLength = function getLength() {\n return this.getText().length;\n };\n\n _proto.getDepth = function getDepth() {\n return this.get('depth');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n _proto.getInlineStyleAt = function getInlineStyleAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getStyle() : EMPTY_SET;\n };\n\n _proto.getEntityAt = function getEntityAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getEntity() : null;\n };\n\n _proto.getChildKeys = function getChildKeys() {\n return this.get('children');\n };\n\n _proto.getParentKey = function getParentKey() {\n return this.get('parent');\n };\n\n _proto.getPrevSiblingKey = function getPrevSiblingKey() {\n return this.get('prevSibling');\n };\n\n _proto.getNextSiblingKey = function getNextSiblingKey() {\n return this.get('nextSibling');\n };\n\n _proto.findStyleRanges = function findStyleRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback);\n };\n\n _proto.findEntityRanges = function findEntityRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback);\n };\n\n return ContentBlockNode;\n}(Record(defaultRecord));\n\nmodule.exports = ContentBlockNode;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getOwnObjectValues = require(\"./getOwnObjectValues\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar sanitizeDraftText = require(\"./sanitizeDraftText\");\n\nvar List = Immutable.List,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat,\n ImmutableMap = Immutable.Map,\n OrderedMap = Immutable.OrderedMap;\nvar defaultRecord = {\n entityMap: null,\n blockMap: null,\n selectionBefore: null,\n selectionAfter: null\n};\nvar ContentStateRecord = Record(defaultRecord);\n/* $FlowFixMe[signature-verification-failure] Supressing a `signature-\n * verification-failure` error here. TODO: T65949050 Clean up the branch for\n * this GK */\n\nvar ContentBlockNodeRecord = gkx('draft_tree_data_support') ? ContentBlockNode : ContentBlock;\n\nvar ContentState = /*#__PURE__*/function (_ContentStateRecord) {\n _inheritsLoose(ContentState, _ContentStateRecord);\n\n function ContentState() {\n return _ContentStateRecord.apply(this, arguments) || this;\n }\n\n var _proto = ContentState.prototype;\n\n _proto.getEntityMap = function getEntityMap() {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity;\n };\n\n _proto.getBlockMap = function getBlockMap() {\n return this.get('blockMap');\n };\n\n _proto.getSelectionBefore = function getSelectionBefore() {\n return this.get('selectionBefore');\n };\n\n _proto.getSelectionAfter = function getSelectionAfter() {\n return this.get('selectionAfter');\n };\n\n _proto.getBlockForKey = function getBlockForKey(key) {\n var block = this.getBlockMap().get(key);\n return block;\n };\n\n _proto.getKeyBefore = function getKeyBefore(key) {\n return this.getBlockMap().reverse().keySeq().skipUntil(function (v) {\n return v === key;\n }).skip(1).first();\n };\n\n _proto.getKeyAfter = function getKeyAfter(key) {\n return this.getBlockMap().keySeq().skipUntil(function (v) {\n return v === key;\n }).skip(1).first();\n };\n\n _proto.getBlockAfter = function getBlockAfter(key) {\n return this.getBlockMap().skipUntil(function (_, k) {\n return k === key;\n }).skip(1).first();\n };\n\n _proto.getBlockBefore = function getBlockBefore(key) {\n return this.getBlockMap().reverse().skipUntil(function (_, k) {\n return k === key;\n }).skip(1).first();\n };\n\n _proto.getBlocksAsArray = function getBlocksAsArray() {\n return this.getBlockMap().toArray();\n };\n\n _proto.getFirstBlock = function getFirstBlock() {\n return this.getBlockMap().first();\n };\n\n _proto.getLastBlock = function getLastBlock() {\n return this.getBlockMap().last();\n };\n\n _proto.getPlainText = function getPlainText(delimiter) {\n return this.getBlockMap().map(function (block) {\n return block ? block.getText() : '';\n }).join(delimiter || '\\n');\n };\n\n _proto.getLastCreatedEntityKey = function getLastCreatedEntityKey() {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity.__getLastCreatedEntityKey();\n };\n\n _proto.hasText = function hasText() {\n var blockMap = this.getBlockMap();\n return blockMap.size > 1 || // make sure that there are no zero width space chars\n escape(blockMap.first().getText()).replace(/%u200B/g, '').length > 0;\n };\n\n _proto.createEntity = function createEntity(type, mutability, data) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__create(type, mutability, data);\n\n return this;\n };\n\n _proto.mergeEntityData = function mergeEntityData(key, toMerge) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__mergeData(key, toMerge);\n\n return this;\n };\n\n _proto.replaceEntityData = function replaceEntityData(key, newData) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__replaceData(key, newData);\n\n return this;\n };\n\n _proto.addEntity = function addEntity(instance) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__add(instance);\n\n return this;\n };\n\n _proto.getEntity = function getEntity(key) {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity.__get(key);\n };\n\n _proto.getAllEntities = function getAllEntities() {\n return DraftEntity.__getAll();\n };\n\n _proto.loadWithEntities = function loadWithEntities(entities) {\n return DraftEntity.__loadWithEntities(entities);\n };\n\n ContentState.createFromBlockArray = function createFromBlockArray( // TODO: update flow type when we completely deprecate the old entity API\n blocks, entityMap) {\n // TODO: remove this when we completely deprecate the old entity API\n var theBlocks = Array.isArray(blocks) ? blocks : blocks.contentBlocks;\n var blockMap = BlockMapBuilder.createFromArray(theBlocks);\n var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey());\n return new ContentState({\n blockMap: blockMap,\n entityMap: entityMap || DraftEntity,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n };\n\n ContentState.createFromText = function createFromText(text) {\n var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : /\\r\\n?|\\n/g;\n var strings = text.split(delimiter);\n var blocks = strings.map(function (block) {\n block = sanitizeDraftText(block);\n return new ContentBlockNodeRecord({\n key: generateRandomKey(),\n text: block,\n type: 'unstyled',\n characterList: List(Repeat(CharacterMetadata.EMPTY, block.length))\n });\n });\n return ContentState.createFromBlockArray(blocks);\n };\n\n ContentState.fromJS = function fromJS(state) {\n return new ContentState(_objectSpread({}, state, {\n blockMap: OrderedMap(state.blockMap).map(ContentState.createContentBlockFromJS),\n selectionBefore: new SelectionState(state.selectionBefore),\n selectionAfter: new SelectionState(state.selectionAfter)\n }));\n };\n\n ContentState.createContentBlockFromJS = function createContentBlockFromJS(block) {\n var characterList = block.characterList;\n return new ContentBlockNodeRecord(_objectSpread({}, block, {\n data: ImmutableMap(block.data),\n characterList: characterList != null ? List((Array.isArray(characterList) ? characterList : getOwnObjectValues(characterList)).map(function (c) {\n return CharacterMetadata.fromJS(c);\n })) : undefined\n }));\n };\n\n return ContentState;\n}(ContentStateRecord);\n\nmodule.exports = ContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar _require = require(\"immutable\"),\n Map = _require.Map;\n\nvar ContentStateInlineStyle = {\n add: function add(contentState, selectionState, inlineStyle) {\n return modifyInlineStyle(contentState, selectionState, inlineStyle, true);\n },\n remove: function remove(contentState, selectionState, inlineStyle) {\n return modifyInlineStyle(contentState, selectionState, inlineStyle, false);\n }\n};\n\nfunction modifyInlineStyle(contentState, selectionState, inlineStyle, addOrRemove) {\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var newBlocks = blockMap.skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat(Map([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) {\n var sliceStart;\n var sliceEnd;\n\n if (startKey === endKey) {\n sliceStart = startOffset;\n sliceEnd = endOffset;\n } else {\n sliceStart = blockKey === startKey ? startOffset : 0;\n sliceEnd = blockKey === endKey ? endOffset : block.getLength();\n }\n\n var chars = block.getCharacterList();\n var current;\n\n while (sliceStart < sliceEnd) {\n current = chars.get(sliceStart);\n chars = chars.set(sliceStart, addOrRemove ? CharacterMetadata.applyStyle(current, inlineStyle) : CharacterMetadata.removeStyle(current, inlineStyle));\n sliceStart++;\n }\n\n return block.set('characterList', chars);\n });\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = ContentStateInlineStyle;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar getWindowForNode = require(\"./getWindowForNode\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar Map = Immutable.Map;\n// Heavily based on Prosemirror's DOMObserver https://github.com/ProseMirror/prosemirror-view/blob/master/src/domobserver.js\nvar DOM_OBSERVER_OPTIONS = {\n subtree: true,\n characterData: true,\n childList: true,\n characterDataOldValue: false,\n attributes: false\n}; // IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\n\nvar USE_CHAR_DATA = UserAgent.isBrowser('IE <= 11');\n\nvar DOMObserver = /*#__PURE__*/function () {\n function DOMObserver(container) {\n var _this = this;\n\n _defineProperty(this, \"observer\", void 0);\n\n _defineProperty(this, \"container\", void 0);\n\n _defineProperty(this, \"mutations\", void 0);\n\n _defineProperty(this, \"onCharData\", void 0);\n\n this.container = container;\n this.mutations = Map();\n var containerWindow = getWindowForNode(container);\n\n if (containerWindow.MutationObserver && !USE_CHAR_DATA) {\n this.observer = new containerWindow.MutationObserver(function (mutations) {\n return _this.registerMutations(mutations);\n });\n } else {\n this.onCharData = function (e) {\n !(e.target instanceof Node) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected target to be an instance of Node') : invariant(false) : void 0;\n\n _this.registerMutation({\n type: 'characterData',\n target: e.target\n });\n };\n }\n }\n\n var _proto = DOMObserver.prototype;\n\n _proto.start = function start() {\n if (this.observer) {\n this.observer.observe(this.container, DOM_OBSERVER_OPTIONS);\n } else {\n /* $FlowFixMe[incompatible-call] (>=0.68.0 site=www,mobile) This event\n * type is not defined by Flow's standard library */\n this.container.addEventListener('DOMCharacterDataModified', this.onCharData);\n }\n };\n\n _proto.stopAndFlushMutations = function stopAndFlushMutations() {\n var observer = this.observer;\n\n if (observer) {\n this.registerMutations(observer.takeRecords());\n observer.disconnect();\n } else {\n /* $FlowFixMe[incompatible-call] (>=0.68.0 site=www,mobile) This event\n * type is not defined by Flow's standard library */\n this.container.removeEventListener('DOMCharacterDataModified', this.onCharData);\n }\n\n var mutations = this.mutations;\n this.mutations = Map();\n return mutations;\n };\n\n _proto.registerMutations = function registerMutations(mutations) {\n for (var i = 0; i < mutations.length; i++) {\n this.registerMutation(mutations[i]);\n }\n };\n\n _proto.getMutationTextContent = function getMutationTextContent(mutation) {\n var type = mutation.type,\n target = mutation.target,\n removedNodes = mutation.removedNodes;\n\n if (type === 'characterData') {\n // When `textContent` is '', there is a race condition that makes\n // getting the offsetKey from the target not possible.\n // These events are also followed by a `childList`, which is the one\n // we are able to retrieve the offsetKey and apply the '' text.\n if (target.textContent !== '') {\n // IE 11 considers the enter keypress that concludes the composition\n // as an input char. This strips that newline character so the draft\n // state does not receive spurious newlines.\n if (USE_CHAR_DATA) {\n return target.textContent.replace('\\n', '');\n }\n\n return target.textContent;\n }\n } else if (type === 'childList') {\n if (removedNodes && removedNodes.length) {\n // `characterData` events won't happen or are ignored when\n // removing the last character of a leaf node, what happens\n // instead is a `childList` event with a `removedNodes` array.\n // For this case the textContent should be '' and\n // `DraftModifier.replaceText` will make sure the content is\n // updated properly.\n return '';\n } else if (target.textContent !== '') {\n // Typing Chinese in an empty block in MS Edge results in a\n // `childList` event with non-empty textContent.\n // See https://github.com/facebook/draft-js/issues/2082\n return target.textContent;\n }\n }\n\n return null;\n };\n\n _proto.registerMutation = function registerMutation(mutation) {\n var textContent = this.getMutationTextContent(mutation);\n\n if (textContent != null) {\n var offsetKey = nullthrows(findAncestorOffsetKey(mutation.target));\n this.mutations = this.mutations.set(offsetKey, textContent);\n }\n };\n\n return DOMObserver;\n}();\n\nmodule.exports = DOMObserver;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar _require = require(\"immutable\"),\n Map = _require.Map;\n\nvar UL_WRAP = React.createElement(\"ul\", {\n className: cx('public/DraftStyleDefault/ul')\n});\nvar OL_WRAP = React.createElement(\"ol\", {\n className: cx('public/DraftStyleDefault/ol')\n});\nvar PRE_WRAP = React.createElement(\"pre\", {\n className: cx('public/DraftStyleDefault/pre')\n});\nvar DefaultDraftBlockRenderMap = Map({\n 'header-one': {\n element: 'h1'\n },\n 'header-two': {\n element: 'h2'\n },\n 'header-three': {\n element: 'h3'\n },\n 'header-four': {\n element: 'h4'\n },\n 'header-five': {\n element: 'h5'\n },\n 'header-six': {\n element: 'h6'\n },\n section: {\n element: 'section'\n },\n article: {\n element: 'article'\n },\n 'unordered-list-item': {\n element: 'li',\n wrapper: UL_WRAP\n },\n 'ordered-list-item': {\n element: 'li',\n wrapper: OL_WRAP\n },\n blockquote: {\n element: 'blockquote'\n },\n atomic: {\n element: 'figure'\n },\n 'code-block': {\n element: 'pre',\n wrapper: PRE_WRAP\n },\n unstyled: {\n element: 'div',\n aliasedElements: ['p']\n }\n});\nmodule.exports = DefaultDraftBlockRenderMap;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nmodule.exports = {\n BOLD: {\n fontWeight: 'bold'\n },\n CODE: {\n fontFamily: 'monospace',\n wordWrap: 'break-word'\n },\n ITALIC: {\n fontStyle: 'italic'\n },\n STRIKETHROUGH: {\n textDecoration: 'line-through'\n },\n UNDERLINE: {\n textDecoration: 'underline'\n }\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 * @format\n * \n */\n'use strict';\n\nvar AtomicBlockUtils = require(\"./AtomicBlockUtils\");\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar CompositeDraftDecorator = require(\"./CompositeDraftDecorator\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentState = require(\"./ContentState\");\n\nvar DefaultDraftBlockRenderMap = require(\"./DefaultDraftBlockRenderMap\");\n\nvar DefaultDraftInlineStyle = require(\"./DefaultDraftInlineStyle\");\n\nvar DraftEditor = require(\"./DraftEditor.react\");\n\nvar DraftEditorBlock = require(\"./DraftEditorBlock.react\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftEntityInstance = require(\"./DraftEntityInstance\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar KeyBindingUtil = require(\"./KeyBindingUtil\");\n\nvar RawDraftContentState = require(\"./RawDraftContentState\");\n\nvar RichTextEditorUtil = require(\"./RichTextEditorUtil\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar convertFromDraftStateToRaw = require(\"./convertFromDraftStateToRaw\");\n\nvar convertFromRawToDraftState = require(\"./convertFromRawToDraftState\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getDefaultKeyBinding = require(\"./getDefaultKeyBinding\");\n\nvar getVisibleSelectionRect = require(\"./getVisibleSelectionRect\");\n\nvar convertFromHTML = require(\"./convertFromHTMLToContentBlocks\");\n\nvar DraftPublic = {\n Editor: DraftEditor,\n EditorBlock: DraftEditorBlock,\n EditorState: EditorState,\n CompositeDecorator: CompositeDraftDecorator,\n Entity: DraftEntity,\n EntityInstance: DraftEntityInstance,\n BlockMapBuilder: BlockMapBuilder,\n CharacterMetadata: CharacterMetadata,\n ContentBlock: ContentBlock,\n ContentState: ContentState,\n RawDraftContentState: RawDraftContentState,\n SelectionState: SelectionState,\n AtomicBlockUtils: AtomicBlockUtils,\n KeyBindingUtil: KeyBindingUtil,\n Modifier: DraftModifier,\n RichUtils: RichTextEditorUtil,\n DefaultDraftBlockRenderMap: DefaultDraftBlockRenderMap,\n DefaultDraftInlineStyle: DefaultDraftInlineStyle,\n convertFromHTML: convertFromHTML,\n convertFromRaw: convertFromRawToDraftState,\n convertToRaw: convertFromDraftStateToRaw,\n genKey: generateRandomKey,\n getDefaultKeyBinding: getDefaultKeyBinding,\n getVisibleSelectionRect: getVisibleSelectionRect\n};\nmodule.exports = DraftPublic;","/**\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 * @format\n * \n * @preventMunge\n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DefaultDraftBlockRenderMap = require(\"./DefaultDraftBlockRenderMap\");\n\nvar DefaultDraftInlineStyle = require(\"./DefaultDraftInlineStyle\");\n\nvar DraftEditorCompositionHandler = require(\"./DraftEditorCompositionHandler\");\n\nvar DraftEditorContents = require(\"./DraftEditorContents.react\");\n\nvar DraftEditorDragHandler = require(\"./DraftEditorDragHandler\");\n\nvar DraftEditorEditHandler = require(\"./DraftEditorEditHandler\");\n\nvar flushControlled = require(\"./DraftEditorFlushControlled\");\n\nvar DraftEditorPlaceholder = require(\"./DraftEditorPlaceholder.react\");\n\nvar DraftEffects = require(\"./DraftEffects\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar React = require(\"react\");\n\nvar Scroll = require(\"fbjs/lib/Scroll\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getDefaultKeyBinding = require(\"./getDefaultKeyBinding\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar gkx = require(\"./gkx\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar isIE = UserAgent.isBrowser('IE'); // IE does not support the `input` event on contentEditable, so we can't\n// observe spellcheck behavior.\n\nvar allowSpellCheck = !isIE; // Define a set of handler objects to correspond to each possible `mode`\n// of editor behavior.\n\nvar handlerMap = {\n edit: DraftEditorEditHandler,\n composite: DraftEditorCompositionHandler,\n drag: DraftEditorDragHandler,\n cut: null,\n render: null\n};\nvar didInitODS = false;\n\nvar UpdateDraftEditorFlags = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(UpdateDraftEditorFlags, _React$Component);\n\n function UpdateDraftEditorFlags() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = UpdateDraftEditorFlags.prototype;\n\n _proto.render = function render() {\n return null;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._update();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._update();\n };\n\n _proto._update = function _update() {\n var editor = this.props.editor;\n /**\n * Sometimes a render triggers a 'focus' or other event, and that will\n * schedule a second render pass.\n * In order to make sure the second render pass gets the latest editor\n * state, we update it here.\n * Example:\n * render #1\n * +\n * |\n * | cWU -> Nothing ... latestEditorState = STALE_STATE :(\n * |\n * | render -> this.props.editorState = FRESH_STATE\n * | + *and* set latestEditorState = FRESH_STATE\n * |\n * | |\n * | +--> triggers 'focus' event, calling 'handleFocus' with latestEditorState\n * | +\n * | |\n * +>cdU -> latestEditorState = FRESH_STATE | the 'handleFocus' call schedules render #2\n * | with latestEditorState, which is FRESH_STATE\n * |\n * render #2 <--------------------------------------+\n * +\n * |\n * | cwU -> nothing updates\n * |\n * | render -> this.props.editorState = FRESH_STATE which was passed in above\n * |\n * +>cdU fires and resets latestEditorState = FRESH_STATE\n * ---\n * Note that if we don't set latestEditorState in 'render' in the above\n * diagram, then STALE_STATE gets passed to render #2.\n */\n\n editor._latestEditorState = this.props.editorState;\n /**\n * The reason we set this 'blockSelectEvents' flag is that IE will fire a\n * 'selectionChange' event when we programmatically change the selection,\n * meaning it would trigger a new select event while we are in the middle\n * of updating.\n * We found that the 'selection.addRange' was what triggered the stray\n * selectionchange event in IE.\n * To be clear - we have not been able to reproduce specific bugs related\n * to this stray selection event, but have recorded logs that some\n * conditions do cause it to get bumped into during editOnSelect.\n */\n\n editor._blockSelectEvents = true;\n };\n\n return UpdateDraftEditorFlags;\n}(React.Component);\n/**\n * `DraftEditor` is the root editor component. It composes a `contentEditable`\n * div, and provides a wide variety of useful function props for managing the\n * state of the editor. See `DraftEditorProps` for details.\n */\n\n\nvar DraftEditor = /*#__PURE__*/function (_React$Component2) {\n _inheritsLoose(DraftEditor, _React$Component2);\n\n /**\n * Define proxies that can route events to the current handler.\n */\n function DraftEditor(props) {\n var _this;\n\n _this = _React$Component2.call(this, props) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"_blockSelectEvents\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_clipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_handler\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_dragCount\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_internalDrag\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_editorKey\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_placeholderAccessibilityID\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_latestEditorState\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_latestCommittedEditorState\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_pendingStateFromBeforeInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onBeforeInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onBlur\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCharacterData\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCompositionEnd\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCompositionStart\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCopy\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCut\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragEnd\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragOver\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragStart\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDrop\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onFocus\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyPress\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyUp\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onMouseDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onMouseUp\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onPaste\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onSelect\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"editor\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"editorContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"focus\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"blur\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setMode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"exitCurrentMode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"restoreEditorDOM\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setClipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getClipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getEditorKey\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"update\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_handleEditorContainerRef\", function (node) {\n _this.editorContainer = node; // Instead of having a direct ref on the child, we'll grab it here.\n // This is safe as long as the rendered structure is static (which it is).\n // This lets the child support ref={props.editorRef} without merging refs.\n\n _this.editor = node !== null ? node.firstChild : null;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focus\", function (scrollPosition) {\n var editorState = _this.props.editorState;\n var alreadyHasFocus = editorState.getSelection().getHasFocus();\n var editorNode = _this.editor;\n\n if (!editorNode) {\n // once in a while people call 'focus' in a setTimeout, and the node has\n // been deleted, so it can be null in that case.\n return;\n }\n\n var scrollParent = Style.getScrollParent(editorNode);\n\n var _ref = scrollPosition || getScrollPosition(scrollParent),\n x = _ref.x,\n y = _ref.y;\n\n !isHTMLElement(editorNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'editorNode is not an HTMLElement') : invariant(false) : void 0;\n editorNode.focus(); // Restore scroll position\n\n if (scrollParent === window) {\n window.scrollTo(x, y);\n } else {\n Scroll.setTop(scrollParent, y);\n } // On Chrome and Safari, calling focus on contenteditable focuses the\n // cursor at the first character. This is something you don't expect when\n // you're clicking on an input element but not directly on a character.\n // Put the cursor back where it was before the blur.\n\n\n if (!alreadyHasFocus) {\n _this.update(EditorState.forceSelection(editorState, editorState.getSelection()));\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"blur\", function () {\n var editorNode = _this.editor;\n\n if (!editorNode) {\n return;\n }\n\n !isHTMLElement(editorNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'editorNode is not an HTMLElement') : invariant(false) : void 0;\n editorNode.blur();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setMode\", function (mode) {\n var _this$props = _this.props,\n onPaste = _this$props.onPaste,\n onCut = _this$props.onCut,\n onCopy = _this$props.onCopy;\n\n var editHandler = _objectSpread({}, handlerMap.edit);\n\n if (onPaste) {\n /* $FlowFixMe[incompatible-type] (>=0.117.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.117 was deployed. To see the\n * error delete this comment and run Flow. */\n editHandler.onPaste = onPaste;\n }\n\n if (onCut) {\n editHandler.onCut = onCut;\n }\n\n if (onCopy) {\n editHandler.onCopy = onCopy;\n }\n\n var handler = _objectSpread({}, handlerMap, {\n edit: editHandler\n });\n\n _this._handler = handler[mode];\n });\n\n _defineProperty(_assertThisInitialized(_this), \"exitCurrentMode\", function () {\n _this.setMode('edit');\n });\n\n _defineProperty(_assertThisInitialized(_this), \"restoreEditorDOM\", function (scrollPosition) {\n _this.setState({\n contentsKey: _this.state.contentsKey + 1\n }, function () {\n _this.focus(scrollPosition);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setClipboard\", function (clipboard) {\n _this._clipboard = clipboard;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getClipboard\", function () {\n return _this._clipboard;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"update\", function (editorState) {\n _this._latestEditorState = editorState;\n\n _this.props.onChange(editorState);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", function () {\n _this._dragCount++;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", function () {\n _this._dragCount--;\n\n if (_this._dragCount === 0) {\n _this.exitCurrentMode();\n }\n });\n\n _this._blockSelectEvents = false;\n _this._clipboard = null;\n _this._handler = null;\n _this._dragCount = 0;\n _this._editorKey = props.editorKey || generateRandomKey();\n _this._placeholderAccessibilityID = 'placeholder-' + _this._editorKey;\n _this._latestEditorState = props.editorState;\n _this._latestCommittedEditorState = props.editorState;\n _this._onBeforeInput = _this._buildHandler('onBeforeInput');\n _this._onBlur = _this._buildHandler('onBlur');\n _this._onCharacterData = _this._buildHandler('onCharacterData');\n _this._onCompositionEnd = _this._buildHandler('onCompositionEnd');\n _this._onCompositionStart = _this._buildHandler('onCompositionStart');\n _this._onCopy = _this._buildHandler('onCopy');\n _this._onCut = _this._buildHandler('onCut');\n _this._onDragEnd = _this._buildHandler('onDragEnd');\n _this._onDragOver = _this._buildHandler('onDragOver');\n _this._onDragStart = _this._buildHandler('onDragStart');\n _this._onDrop = _this._buildHandler('onDrop');\n _this._onInput = _this._buildHandler('onInput');\n _this._onFocus = _this._buildHandler('onFocus');\n _this._onKeyDown = _this._buildHandler('onKeyDown');\n _this._onKeyPress = _this._buildHandler('onKeyPress');\n _this._onKeyUp = _this._buildHandler('onKeyUp');\n _this._onMouseDown = _this._buildHandler('onMouseDown');\n _this._onMouseUp = _this._buildHandler('onMouseUp');\n _this._onPaste = _this._buildHandler('onPaste');\n _this._onSelect = _this._buildHandler('onSelect');\n\n _this.getEditorKey = function () {\n return _this._editorKey;\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n ['onDownArrow', 'onEscape', 'onLeftArrow', 'onRightArrow', 'onTab', 'onUpArrow'].forEach(function (propName) {\n if (props.hasOwnProperty(propName)) {\n // eslint-disable-next-line no-console\n console.warn(\"Supplying an `\".concat(propName, \"` prop to `DraftEditor` has \") + 'been deprecated. If your handler needs access to the keyboard ' + 'event, supply a custom `keyBindingFn` prop that falls back to ' + 'the default one (eg. https://is.gd/wHKQ3W).');\n }\n });\n } // See `restoreEditorDOM()`.\n\n\n _this.state = {\n contentsKey: 0\n };\n return _this;\n }\n /**\n * Build a method that will pass the event to the specified handler method.\n * This allows us to look up the correct handler function for the current\n * editor mode, if any has been specified.\n */\n\n\n var _proto2 = DraftEditor.prototype;\n\n _proto2._buildHandler = function _buildHandler(eventName) {\n var _this2 = this;\n\n // Wrap event handlers in `flushControlled`. In sync mode, this is\n // effectively a no-op. In async mode, this ensures all updates scheduled\n // inside the handler are flushed before React yields to the browser.\n return function (e) {\n if (!_this2.props.readOnly) {\n var method = _this2._handler && _this2._handler[eventName];\n\n if (method) {\n if (flushControlled) {\n flushControlled(function () {\n return method(_this2, e);\n });\n } else {\n method(_this2, e);\n }\n }\n }\n };\n };\n\n _proto2._showPlaceholder = function _showPlaceholder() {\n return !!this.props.placeholder && !this.props.editorState.isInCompositionMode() && !this.props.editorState.getCurrentContent().hasText();\n };\n\n _proto2._renderPlaceholder = function _renderPlaceholder() {\n if (this._showPlaceholder()) {\n var placeHolderProps = {\n text: nullthrows(this.props.placeholder),\n editorState: this.props.editorState,\n textAlignment: this.props.textAlignment,\n accessibilityID: this._placeholderAccessibilityID\n };\n /* $FlowFixMe[incompatible-type] (>=0.112.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.112 was deployed. To see the\n * error delete this comment and run Flow. */\n\n return React.createElement(DraftEditorPlaceholder, placeHolderProps);\n }\n\n return null;\n }\n /**\n * returns ariaDescribedBy prop with '{{editor_id_placeholder}}' replaced with\n * the DOM id of the placeholder (if it exists)\n * @returns aria-describedby attribute value\n */\n ;\n\n _proto2._renderARIADescribedBy = function _renderARIADescribedBy() {\n var describedBy = this.props.ariaDescribedBy || '';\n var placeholderID = this._showPlaceholder() ? this._placeholderAccessibilityID : '';\n return describedBy.replace('{{editor_id_placeholder}}', placeholderID) || undefined;\n };\n\n _proto2.render = function render() {\n var _this$props2 = this.props,\n blockRenderMap = _this$props2.blockRenderMap,\n blockRendererFn = _this$props2.blockRendererFn,\n blockStyleFn = _this$props2.blockStyleFn,\n customStyleFn = _this$props2.customStyleFn,\n customStyleMap = _this$props2.customStyleMap,\n editorState = _this$props2.editorState,\n preventScroll = _this$props2.preventScroll,\n readOnly = _this$props2.readOnly,\n textAlignment = _this$props2.textAlignment,\n textDirectionality = _this$props2.textDirectionality;\n var rootClass = cx({\n 'DraftEditor/root': true,\n 'DraftEditor/alignLeft': textAlignment === 'left',\n 'DraftEditor/alignRight': textAlignment === 'right',\n 'DraftEditor/alignCenter': textAlignment === 'center'\n });\n var contentStyle = {\n outline: 'none',\n // fix parent-draggable Safari bug. #1326\n userSelect: 'text',\n WebkitUserSelect: 'text',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word'\n }; // The aria-expanded and aria-haspopup properties should only be rendered\n // for a combobox.\n\n /* $FlowFixMe[prop-missing] (>=0.68.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n\n var ariaRole = this.props.role || 'textbox';\n var ariaExpanded = ariaRole === 'combobox' ? !!this.props.ariaExpanded : null;\n var editorContentsProps = {\n blockRenderMap: blockRenderMap,\n blockRendererFn: blockRendererFn,\n blockStyleFn: blockStyleFn,\n customStyleMap: _objectSpread({}, DefaultDraftInlineStyle, customStyleMap),\n customStyleFn: customStyleFn,\n editorKey: this._editorKey,\n editorState: editorState,\n preventScroll: preventScroll,\n textDirectionality: textDirectionality\n };\n return React.createElement(\"div\", {\n className: rootClass\n }, this._renderPlaceholder(), React.createElement(\"div\", {\n className: cx('DraftEditor/editorContainer'),\n ref: this._handleEditorContainerRef\n }, React.createElement(\"div\", {\n \"aria-activedescendant\": readOnly ? null : this.props.ariaActiveDescendantID,\n \"aria-autocomplete\": readOnly ? null : this.props.ariaAutoComplete,\n \"aria-controls\": readOnly ? null : this.props.ariaControls,\n \"aria-describedby\": this._renderARIADescribedBy(),\n \"aria-expanded\": readOnly ? null : ariaExpanded,\n \"aria-label\": this.props.ariaLabel,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n \"aria-multiline\": this.props.ariaMultiline,\n \"aria-owns\": readOnly ? null : this.props.ariaOwneeID,\n autoCapitalize: this.props.autoCapitalize,\n autoComplete: this.props.autoComplete,\n autoCorrect: this.props.autoCorrect,\n className: cx({\n // Chrome's built-in translation feature mutates the DOM in ways\n // that Draft doesn't expect (ex: adding tags inside\n // DraftEditorLeaf spans) and causes problems. We add notranslate\n // here which makes its autotranslation skip over this subtree.\n notranslate: !readOnly,\n 'public/DraftEditor/content': true\n }),\n contentEditable: !readOnly,\n \"data-testid\": this.props.webDriverTestID,\n onBeforeInput: this._onBeforeInput,\n onBlur: this._onBlur,\n onCompositionEnd: this._onCompositionEnd,\n onCompositionStart: this._onCompositionStart,\n onCopy: this._onCopy,\n onCut: this._onCut,\n onDragEnd: this._onDragEnd,\n onDragEnter: this.onDragEnter,\n onDragLeave: this.onDragLeave,\n onDragOver: this._onDragOver,\n onDragStart: this._onDragStart,\n onDrop: this._onDrop,\n onFocus: this._onFocus,\n onInput: this._onInput,\n onKeyDown: this._onKeyDown,\n onKeyPress: this._onKeyPress,\n onKeyUp: this._onKeyUp,\n onMouseUp: this._onMouseUp,\n onPaste: this._onPaste,\n onSelect: this._onSelect,\n ref: this.props.editorRef,\n role: readOnly ? null : ariaRole,\n spellCheck: allowSpellCheck && this.props.spellCheck,\n style: contentStyle,\n suppressContentEditableWarning: true,\n tabIndex: this.props.tabIndex\n }, React.createElement(UpdateDraftEditorFlags, {\n editor: this,\n editorState: editorState\n }), React.createElement(DraftEditorContents, _extends({}, editorContentsProps, {\n key: 'contents' + this.state.contentsKey\n })))));\n };\n\n _proto2.componentDidMount = function componentDidMount() {\n this._blockSelectEvents = false;\n\n if (!didInitODS && gkx('draft_ods_enabled')) {\n didInitODS = true;\n DraftEffects.initODS();\n }\n\n this.setMode('edit');\n /**\n * IE has a hardcoded \"feature\" that attempts to convert link text into\n * anchors in contentEditable DOM. This breaks the editor's expectations of\n * the DOM, and control is lost. Disable it to make IE behave.\n * See: http://blogs.msdn.com/b/ieinternals/archive/2010/09/15/\n * ie9-beta-minor-change-list.aspx\n */\n\n if (isIE) {\n // editor can be null after mounting\n // https://stackoverflow.com/questions/44074747/componentdidmount-called-before-ref-callback\n if (!this.editor) {\n global.execCommand('AutoUrlDetect', false, false);\n } else {\n this.editor.ownerDocument.execCommand('AutoUrlDetect', false, false);\n }\n }\n };\n\n _proto2.componentDidUpdate = function componentDidUpdate() {\n this._blockSelectEvents = false;\n this._latestEditorState = this.props.editorState;\n this._latestCommittedEditorState = this.props.editorState;\n }\n /**\n * Used via `this.focus()`.\n *\n * Force focus back onto the editor node.\n *\n * We attempt to preserve scroll position when focusing. You can also pass\n * a specified scroll position (for cases like `cut` behavior where it should\n * be restored to a known position).\n */\n ;\n\n return DraftEditor;\n}(React.Component);\n\n_defineProperty(DraftEditor, \"defaultProps\", {\n ariaDescribedBy: '{{editor_id_placeholder}}',\n blockRenderMap: DefaultDraftBlockRenderMap,\n blockRendererFn: function blockRendererFn() {\n return null;\n },\n blockStyleFn: function blockStyleFn() {\n return '';\n },\n keyBindingFn: getDefaultKeyBinding,\n readOnly: false,\n spellCheck: false,\n stripPastedStyles: false\n});\n\nmodule.exports = DraftEditor;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorLeaf = require(\"./DraftEditorLeaf.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar Scroll = require(\"fbjs/lib/Scroll\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar UnicodeBidi = require(\"fbjs/lib/UnicodeBidi\");\n\nvar UnicodeBidiDirection = require(\"fbjs/lib/UnicodeBidiDirection\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar getElementPosition = require(\"fbjs/lib/getElementPosition\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar getViewportDimensions = require(\"fbjs/lib/getViewportDimensions\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar SCROLL_BUFFER = 10;\n\n/**\n * Return whether a block overlaps with either edge of the `SelectionState`.\n */\nvar isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) {\n return selection.getAnchorKey() === key || selection.getFocusKey() === key;\n};\n/**\n * The default block renderer for a `DraftEditor` component.\n *\n * A `DraftEditorBlock` is able to render a given `ContentBlock` to its\n * appropriate decorator and inline style components.\n */\n\n\nvar DraftEditorBlock = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorBlock, _React$Component);\n\n function DraftEditorBlock() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"_node\", void 0);\n\n return _this;\n }\n\n var _proto = DraftEditorBlock.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.block !== nextProps.block || this.props.tree !== nextProps.tree || this.props.direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection;\n }\n /**\n * When a block is mounted and overlaps the selection state, we need to make\n * sure that the cursor is visible to match native behavior. This may not\n * be the case if the user has pressed `RETURN` or pasted some content, since\n * programmatically creating these new blocks and setting the DOM selection\n * will miss out on the browser natively scrolling to that position.\n *\n * To replicate native behavior, if the block overlaps the selection state\n * on mount, force the scroll position. Check the scroll state of the scroll\n * parent, and adjust it to align the entire block to the bottom of the\n * scroll parent.\n */\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.preventScroll) {\n return;\n }\n\n var selection = this.props.selection;\n var endKey = selection.getEndKey();\n\n if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) {\n return;\n }\n\n var blockNode = this._node;\n\n if (blockNode == null) {\n return;\n }\n\n var scrollParent = Style.getScrollParent(blockNode);\n var scrollPosition = getScrollPosition(scrollParent);\n var scrollDelta;\n\n if (scrollParent === window) {\n var nodePosition = getElementPosition(blockNode);\n var nodeBottom = nodePosition.y + nodePosition.height;\n var viewportHeight = getViewportDimensions().height;\n scrollDelta = nodeBottom - viewportHeight;\n\n if (scrollDelta > 0) {\n window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER);\n }\n } else {\n !isHTMLElement(blockNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'blockNode is not an HTMLElement') : invariant(false) : void 0;\n var blockBottom = blockNode.offsetHeight + blockNode.offsetTop;\n var pOffset = scrollParent.offsetTop + scrollParent.offsetHeight;\n var scrollBottom = pOffset + scrollPosition.y;\n scrollDelta = blockBottom - scrollBottom;\n\n if (scrollDelta > 0) {\n Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER);\n }\n }\n };\n\n _proto._renderChildren = function _renderChildren() {\n var _this2 = this;\n\n var block = this.props.block;\n var blockKey = block.getKey();\n var text = block.getText();\n var lastLeafSet = this.props.tree.size - 1;\n var hasSelection = isBlockOnSelectionEdge(this.props.selection, blockKey);\n return this.props.tree.map(function (leafSet, ii) {\n var leavesForLeafSet = leafSet.get('leaves'); // T44088704\n\n if (leavesForLeafSet.size === 0) {\n return null;\n }\n\n var lastLeaf = leavesForLeafSet.size - 1;\n var leaves = leavesForLeafSet.map(function (leaf, jj) {\n var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj);\n var start = leaf.get('start');\n var end = leaf.get('end');\n return React.createElement(DraftEditorLeaf, {\n key: offsetKey,\n offsetKey: offsetKey,\n block: block,\n start: start,\n selection: hasSelection ? _this2.props.selection : null,\n forceSelection: _this2.props.forceSelection,\n text: text.slice(start, end),\n styleSet: block.getInlineStyleAt(start),\n customStyleMap: _this2.props.customStyleMap,\n customStyleFn: _this2.props.customStyleFn,\n isLast: ii === lastLeafSet && jj === lastLeaf\n });\n }).toArray();\n var decoratorKey = leafSet.get('decoratorKey');\n\n if (decoratorKey == null) {\n return leaves;\n }\n\n if (!_this2.props.decorator) {\n return leaves;\n }\n\n var decorator = nullthrows(_this2.props.decorator);\n var DecoratorComponent = decorator.getComponentForKey(decoratorKey);\n\n if (!DecoratorComponent) {\n return leaves;\n }\n\n var decoratorProps = decorator.getPropsForKey(decoratorKey);\n var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, ii, 0);\n var start = leavesForLeafSet.first().get('start');\n var end = leavesForLeafSet.last().get('end');\n var decoratedText = text.slice(start, end);\n var entityKey = block.getEntityAt(leafSet.get('start')); // Resetting dir to the same value on a child node makes Chrome/Firefox\n // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/\n\n var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), _this2.props.direction);\n var commonProps = {\n contentState: _this2.props.contentState,\n decoratedText: decoratedText,\n dir: dir,\n start: start,\n end: end,\n blockKey: blockKey,\n entityKey: entityKey,\n offsetKey: decoratorOffsetKey\n };\n return React.createElement(DecoratorComponent, _extends({}, decoratorProps, commonProps, {\n key: decoratorOffsetKey\n }), leaves);\n }).toArray();\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n direction = _this$props.direction,\n offsetKey = _this$props.offsetKey;\n var className = cx({\n 'public/DraftStyleDefault/block': true,\n 'public/DraftStyleDefault/ltr': direction === 'LTR',\n 'public/DraftStyleDefault/rtl': direction === 'RTL'\n });\n return React.createElement(\"div\", {\n \"data-offset-key\": offsetKey,\n className: className,\n ref: function ref(_ref) {\n return _this3._node = _ref;\n }\n }, this._renderChildren());\n };\n\n return DraftEditorBlock;\n}(React.Component);\n\nmodule.exports = DraftEditorBlock;","/**\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of DraftEditorBlock.react.js and DraftEditorContents.react.js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorNode = require(\"./DraftEditorNode.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar Scroll = require(\"fbjs/lib/Scroll\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar getElementPosition = require(\"fbjs/lib/getElementPosition\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar getViewportDimensions = require(\"fbjs/lib/getViewportDimensions\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar SCROLL_BUFFER = 10;\nvar List = Immutable.List; // we should harden up the bellow flow types to make them more strict\n\n/**\n * Return whether a block overlaps with either edge of the `SelectionState`.\n */\nvar isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) {\n return selection.getAnchorKey() === key || selection.getFocusKey() === key;\n};\n/**\n * We will use this helper to identify blocks that need to be wrapped but have siblings that\n * also share the same wrapper element, this way we can do the wrapping once the last sibling\n * is added.\n */\n\n\nvar shouldNotAddWrapperElement = function shouldNotAddWrapperElement(block, contentState) {\n var nextSiblingKey = block.getNextSiblingKey();\n return nextSiblingKey ? contentState.getBlockForKey(nextSiblingKey).getType() === block.getType() : false;\n};\n\nvar applyWrapperElementToSiblings = function applyWrapperElementToSiblings(wrapperTemplate, Element, nodes) {\n var wrappedSiblings = []; // we check back until we find a sibling that does not have same wrapper\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = nodes.reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var sibling = _step.value;\n\n if (sibling.type !== Element) {\n break;\n }\n\n wrappedSiblings.push(sibling);\n } // we now should remove from acc the wrappedSiblings and add them back under same wrap\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator[\"return\"] != null) {\n _iterator[\"return\"]();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n nodes.splice(nodes.indexOf(wrappedSiblings[0]), wrappedSiblings.length + 1);\n var childrenIs = wrappedSiblings.reverse();\n var key = childrenIs[0].key;\n nodes.push(React.cloneElement(wrapperTemplate, {\n key: \"\".concat(key, \"-wrap\"),\n 'data-offset-key': DraftOffsetKey.encode(key, 0, 0)\n }, childrenIs));\n return nodes;\n};\n\nvar getDraftRenderConfig = function getDraftRenderConfig(block, blockRenderMap) {\n var configForType = blockRenderMap.get(block.getType()) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n var Element = configForType.element || blockRenderMap.get('unstyled').element;\n return {\n Element: Element,\n wrapperTemplate: wrapperTemplate\n };\n};\n\nvar getCustomRenderConfig = function getCustomRenderConfig(block, blockRendererFn) {\n var customRenderer = blockRendererFn(block);\n\n if (!customRenderer) {\n return {};\n }\n\n var CustomComponent = customRenderer.component,\n customProps = customRenderer.props,\n customEditable = customRenderer.editable;\n return {\n CustomComponent: CustomComponent,\n customProps: customProps,\n customEditable: customEditable\n };\n};\n\nvar getElementPropsConfig = function getElementPropsConfig(block, editorKey, offsetKey, blockStyleFn, customConfig, ref) {\n var elementProps = {\n 'data-block': true,\n 'data-editor': editorKey,\n 'data-offset-key': offsetKey,\n key: block.getKey(),\n ref: ref\n };\n var customClass = blockStyleFn(block);\n\n if (customClass) {\n elementProps.className = customClass;\n }\n\n if (customConfig.customEditable !== undefined) {\n elementProps = _objectSpread({}, elementProps, {\n contentEditable: customConfig.customEditable,\n suppressContentEditableWarning: true\n });\n }\n\n return elementProps;\n};\n\nvar DraftEditorBlockNode = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorBlockNode, _React$Component);\n\n function DraftEditorBlockNode() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"wrapperRef\", React.createRef());\n\n return _this;\n }\n\n var _proto = DraftEditorBlockNode.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var _this$props = this.props,\n block = _this$props.block,\n direction = _this$props.direction,\n tree = _this$props.tree;\n var isContainerNode = !block.getChildKeys().isEmpty();\n var blockHasChanged = block !== nextProps.block || tree !== nextProps.tree || direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection; // if we have children at this stage we always re-render container nodes\n // else if its a root node we avoid re-rendering by checking for block updates\n\n return isContainerNode || blockHasChanged;\n }\n /**\n * When a block is mounted and overlaps the selection state, we need to make\n * sure that the cursor is visible to match native behavior. This may not\n * be the case if the user has pressed `RETURN` or pasted some content, since\n * programatically creating these new blocks and setting the DOM selection\n * will miss out on the browser natively scrolling to that position.\n *\n * To replicate native behavior, if the block overlaps the selection state\n * on mount, force the scroll position. Check the scroll state of the scroll\n * parent, and adjust it to align the entire block to the bottom of the\n * scroll parent.\n */\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n var selection = this.props.selection;\n var endKey = selection.getEndKey();\n\n if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) {\n return;\n }\n\n var blockNode = this.wrapperRef.current;\n\n if (!blockNode) {\n // This Block Node was rendered without a wrapper element.\n return;\n }\n\n var scrollParent = Style.getScrollParent(blockNode);\n var scrollPosition = getScrollPosition(scrollParent);\n var scrollDelta;\n\n if (scrollParent === window) {\n var nodePosition = getElementPosition(blockNode);\n var nodeBottom = nodePosition.y + nodePosition.height;\n var viewportHeight = getViewportDimensions().height;\n scrollDelta = nodeBottom - viewportHeight;\n\n if (scrollDelta > 0) {\n window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER);\n }\n } else {\n !isHTMLElement(blockNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'blockNode is not an HTMLElement') : invariant(false) : void 0;\n var htmlBlockNode = blockNode;\n var blockBottom = htmlBlockNode.offsetHeight + htmlBlockNode.offsetTop;\n var scrollBottom = scrollParent.offsetHeight + scrollPosition.y;\n scrollDelta = blockBottom - scrollBottom;\n\n if (scrollDelta > 0) {\n Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER);\n }\n }\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n block = _this$props2.block,\n blockRenderMap = _this$props2.blockRenderMap,\n blockRendererFn = _this$props2.blockRendererFn,\n blockStyleFn = _this$props2.blockStyleFn,\n contentState = _this$props2.contentState,\n decorator = _this$props2.decorator,\n editorKey = _this$props2.editorKey,\n editorState = _this$props2.editorState,\n customStyleFn = _this$props2.customStyleFn,\n customStyleMap = _this$props2.customStyleMap,\n direction = _this$props2.direction,\n forceSelection = _this$props2.forceSelection,\n selection = _this$props2.selection,\n tree = _this$props2.tree;\n var children = null;\n\n if (block.children.size) {\n children = block.children.reduce(function (acc, key) {\n var offsetKey = DraftOffsetKey.encode(key, 0, 0);\n var child = contentState.getBlockForKey(key);\n var customConfig = getCustomRenderConfig(child, blockRendererFn);\n var Component = customConfig.CustomComponent || DraftEditorBlockNode;\n\n var _getDraftRenderConfig = getDraftRenderConfig(child, blockRenderMap),\n Element = _getDraftRenderConfig.Element,\n wrapperTemplate = _getDraftRenderConfig.wrapperTemplate;\n\n var elementProps = getElementPropsConfig(child, editorKey, offsetKey, blockStyleFn, customConfig, null);\n\n var childProps = _objectSpread({}, _this2.props, {\n tree: editorState.getBlockTree(key),\n blockProps: customConfig.customProps,\n offsetKey: offsetKey,\n block: child\n });\n\n acc.push(React.createElement(Element, elementProps, React.createElement(Component, childProps)));\n\n if (!wrapperTemplate || shouldNotAddWrapperElement(child, contentState)) {\n return acc;\n } // if we are here it means we are the last block\n // that has a wrapperTemplate so we should wrap itself\n // and all other previous siblings that share the same wrapper\n\n\n applyWrapperElementToSiblings(wrapperTemplate, Element, acc);\n return acc;\n }, []);\n }\n\n var blockKey = block.getKey();\n var offsetKey = DraftOffsetKey.encode(blockKey, 0, 0);\n var customConfig = getCustomRenderConfig(block, blockRendererFn);\n var Component = customConfig.CustomComponent;\n var blockNode = Component != null ? React.createElement(Component, _extends({}, this.props, {\n tree: editorState.getBlockTree(blockKey),\n blockProps: customConfig.customProps,\n offsetKey: offsetKey,\n block: block\n })) : React.createElement(DraftEditorNode, {\n block: block,\n children: children,\n contentState: contentState,\n customStyleFn: customStyleFn,\n customStyleMap: customStyleMap,\n decorator: decorator,\n direction: direction,\n forceSelection: forceSelection,\n hasSelection: isBlockOnSelectionEdge(selection, blockKey),\n selection: selection,\n tree: tree\n });\n\n if (block.getParentKey()) {\n return blockNode;\n }\n\n var _getDraftRenderConfig2 = getDraftRenderConfig(block, blockRenderMap),\n Element = _getDraftRenderConfig2.Element;\n\n var elementProps = getElementPropsConfig(block, editorKey, offsetKey, blockStyleFn, customConfig, this.wrapperRef); // root block nodes needs to be wrapped\n\n return React.createElement(Element, elementProps, blockNode);\n };\n\n return DraftEditorBlockNode;\n}(React.Component);\n\nmodule.exports = DraftEditorBlockNode;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DOMObserver = require(\"./DOMObserver\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar editOnSelect = require(\"./editOnSelect\");\n\nvar getContentEditableContainer = require(\"./getContentEditableContainer\");\n\nvar getDraftEditorSelection = require(\"./getDraftEditorSelection\");\n\nvar getEntityKeyForSelection = require(\"./getEntityKeyForSelection\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar isIE = UserAgent.isBrowser('IE');\n/**\n * Millisecond delay to allow `compositionstart` to fire again upon\n * `compositionend`.\n *\n * This is used for Korean input to ensure that typing can continue without\n * the editor trying to render too quickly. More specifically, Safari 7.1+\n * triggers `compositionstart` a little slower than Chrome/FF, which\n * leads to composed characters being resolved and re-render occurring\n * sooner than we want.\n */\n\nvar RESOLVE_DELAY = 20;\n/**\n * A handful of variables used to track the current composition and its\n * resolution status. These exist at the module level because it is not\n * possible to have compositions occurring in multiple editors simultaneously,\n * and it simplifies state management with respect to the DraftEditor component.\n */\n\nvar resolved = false;\nvar stillComposing = false;\nvar domObserver = null;\n\nfunction startDOMObserver(editor) {\n if (!domObserver) {\n domObserver = new DOMObserver(getContentEditableContainer(editor));\n domObserver.start();\n }\n}\n\nvar DraftEditorCompositionHandler = {\n /**\n * A `compositionstart` event has fired while we're still in composition\n * mode. Continue the current composition session to prevent a re-render.\n */\n onCompositionStart: function onCompositionStart(editor) {\n stillComposing = true;\n startDOMObserver(editor);\n },\n\n /**\n * Attempt to end the current composition session.\n *\n * Defer handling because browser will still insert the chars into active\n * element after `compositionend`. If a `compositionstart` event fires\n * before `resolveComposition` executes, our composition session will\n * continue.\n *\n * The `resolved` flag is useful because certain IME interfaces fire the\n * `compositionend` event multiple times, thus queueing up multiple attempts\n * at handling the composition. Since handling the same composition event\n * twice could break the DOM, we only use the first event. Example: Arabic\n * Google Input Tools on Windows 8.1 fires `compositionend` three times.\n */\n onCompositionEnd: function onCompositionEnd(editor) {\n resolved = false;\n stillComposing = false;\n setTimeout(function () {\n if (!resolved) {\n DraftEditorCompositionHandler.resolveComposition(editor);\n }\n }, RESOLVE_DELAY);\n },\n onSelect: editOnSelect,\n\n /**\n * In Safari, keydown events may fire when committing compositions. If\n * the arrow keys are used to commit, prevent default so that the cursor\n * doesn't move, otherwise it will jump back noticeably on re-render.\n */\n onKeyDown: function onKeyDown(editor, e) {\n if (!stillComposing) {\n // If a keydown event is received after compositionend but before the\n // 20ms timer expires (ex: type option-E then backspace, or type A then\n // backspace in 2-Set Korean), we should immediately resolve the\n // composition and reinterpret the key press in edit mode.\n DraftEditorCompositionHandler.resolveComposition(editor);\n\n editor._onKeyDown(e);\n\n return;\n }\n\n if (e.which === Keys.RIGHT || e.which === Keys.LEFT) {\n e.preventDefault();\n }\n },\n\n /**\n * Keypress events may fire when committing compositions. In Firefox,\n * pressing RETURN commits the composition and inserts extra newline\n * characters that we do not want. `preventDefault` allows the composition\n * to be committed while preventing the extra characters.\n */\n onKeyPress: function onKeyPress(_editor, e) {\n if (e.which === Keys.RETURN) {\n e.preventDefault();\n }\n },\n\n /**\n * Attempt to insert composed characters into the document.\n *\n * If we are still in a composition session, do nothing. Otherwise, insert\n * the characters into the document and terminate the composition session.\n *\n * If no characters were composed -- for instance, the user\n * deleted all composed characters and committed nothing new --\n * force a re-render. We also re-render when the composition occurs\n * at the beginning of a leaf, to ensure that if the browser has\n * created a new text node for the composition, we will discard it.\n *\n * Resetting innerHTML will move focus to the beginning of the editor,\n * so we update to force it back to the correct place.\n */\n resolveComposition: function resolveComposition(editor) {\n if (stillComposing) {\n return;\n }\n\n var mutations = nullthrows(domObserver).stopAndFlushMutations();\n domObserver = null;\n resolved = true;\n var editorState = EditorState.set(editor._latestEditorState, {\n inCompositionMode: false\n });\n editor.exitCurrentMode();\n\n if (!mutations.size) {\n editor.update(editorState);\n return;\n } // TODO, check if Facebook still needs this flag or if it could be removed.\n // Since there can be multiple mutations providing a `composedChars` doesn't\n // apply well on this new model.\n // if (\n // gkx('draft_handlebeforeinput_composed_text') &&\n // editor.props.handleBeforeInput &&\n // isEventHandled(\n // editor.props.handleBeforeInput(\n // composedChars,\n // editorState,\n // event.timeStamp,\n // ),\n // )\n // ) {\n // return;\n // }\n\n\n var contentState = editorState.getCurrentContent();\n mutations.forEach(function (composedChars, offsetKey) {\n var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey),\n blockKey = _DraftOffsetKey$decod.blockKey,\n decoratorKey = _DraftOffsetKey$decod.decoratorKey,\n leafKey = _DraftOffsetKey$decod.leafKey;\n\n var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]),\n start = _editorState$getBlock.start,\n end = _editorState$getBlock.end;\n\n var replacementRange = editorState.getSelection().merge({\n anchorKey: blockKey,\n focusKey: blockKey,\n anchorOffset: start,\n focusOffset: end,\n isBackward: false\n });\n var entityKey = getEntityKeyForSelection(contentState, replacementRange);\n var currentStyle = contentState.getBlockForKey(blockKey).getInlineStyleAt(start);\n contentState = DraftModifier.replaceText(contentState, replacementRange, composedChars, currentStyle, entityKey); // We need to update the editorState so the leaf node ranges are properly\n // updated and multiple mutations are correctly applied.\n\n editorState = EditorState.set(editorState, {\n currentContent: contentState\n });\n }); // When we apply the text changes to the ContentState, the selection always\n // goes to the end of the field, but it should just stay where it is\n // after compositionEnd.\n\n var documentSelection = getDraftEditorSelection(editorState, getContentEditableContainer(editor));\n var compositionEndSelectionState = documentSelection.selectionState;\n editor.restoreEditorDOM(); // See:\n // - https://github.com/facebook/draft-js/issues/2093\n // - https://github.com/facebook/draft-js/pull/2094\n // Apply this fix only in IE for now. We can test it in\n // other browsers in the future to ensure no regressions\n\n var editorStateWithUpdatedSelection = isIE ? EditorState.forceSelection(editorState, compositionEndSelectionState) : EditorState.acceptSelection(editorState, compositionEndSelectionState);\n editor.update(EditorState.push(editorStateWithUpdatedSelection, contentState, 'insert-characters'));\n }\n};\nmodule.exports = DraftEditorCompositionHandler;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorBlock = require(\"./DraftEditorBlock.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar joinClasses = require(\"fbjs/lib/joinClasses\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\n/**\n * Provide default styling for list items. This way, lists will be styled with\n * proper counters and indentation even if the caller does not specify\n * their own styling at all. If more than five levels of nesting are needed,\n * the necessary CSS classes can be provided via `blockStyleFn` configuration.\n */\nvar getListItemClasses = function getListItemClasses(type, depth, shouldResetCount, direction) {\n return cx({\n 'public/DraftStyleDefault/unorderedListItem': type === 'unordered-list-item',\n 'public/DraftStyleDefault/orderedListItem': type === 'ordered-list-item',\n 'public/DraftStyleDefault/reset': shouldResetCount,\n 'public/DraftStyleDefault/depth0': depth === 0,\n 'public/DraftStyleDefault/depth1': depth === 1,\n 'public/DraftStyleDefault/depth2': depth === 2,\n 'public/DraftStyleDefault/depth3': depth === 3,\n 'public/DraftStyleDefault/depth4': depth >= 4,\n 'public/DraftStyleDefault/listLTR': direction === 'LTR',\n 'public/DraftStyleDefault/listRTL': direction === 'RTL'\n });\n};\n/**\n * `DraftEditorContents` is the container component for all block components\n * rendered for a `DraftEditor`. It is optimized to aggressively avoid\n * re-rendering blocks whenever possible.\n *\n * This component is separate from `DraftEditor` because certain props\n * (for instance, ARIA props) must be allowed to update without affecting\n * the contents of the editor.\n */\n\n\nvar DraftEditorContents = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorContents, _React$Component);\n\n function DraftEditorContents() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorContents.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var prevEditorState = this.props.editorState;\n var nextEditorState = nextProps.editorState;\n var prevDirectionMap = prevEditorState.getDirectionMap();\n var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render.\n\n if (prevDirectionMap !== nextDirectionMap) {\n return true;\n }\n\n var didHaveFocus = prevEditorState.getSelection().getHasFocus();\n var nowHasFocus = nextEditorState.getSelection().getHasFocus();\n\n if (didHaveFocus !== nowHasFocus) {\n return true;\n }\n\n var nextNativeContent = nextEditorState.getNativelyRenderedContent();\n var wasComposing = prevEditorState.isInCompositionMode();\n var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively\n // rendered state, there's nothing new to be done.\n\n if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) {\n return false;\n }\n\n var prevContent = prevEditorState.getCurrentContent();\n var nextContent = nextEditorState.getCurrentContent();\n var prevDecorator = prevEditorState.getDecorator();\n var nextDecorator = nextEditorState.getDecorator();\n return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection();\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n blockRenderMap = _this$props.blockRenderMap,\n blockRendererFn = _this$props.blockRendererFn,\n blockStyleFn = _this$props.blockStyleFn,\n customStyleMap = _this$props.customStyleMap,\n customStyleFn = _this$props.customStyleFn,\n editorState = _this$props.editorState,\n editorKey = _this$props.editorKey,\n preventScroll = _this$props.preventScroll,\n textDirectionality = _this$props.textDirectionality;\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var forceSelection = editorState.mustForceSelection();\n var decorator = editorState.getDecorator();\n var directionMap = nullthrows(editorState.getDirectionMap());\n var blocksAsArray = content.getBlocksAsArray();\n var processedBlocks = [];\n var currentDepth = null;\n var lastWrapperTemplate = null;\n\n for (var ii = 0; ii < blocksAsArray.length; ii++) {\n var _block = blocksAsArray[ii];\n\n var key = _block.getKey();\n\n var blockType = _block.getType();\n\n var customRenderer = blockRendererFn(_block);\n var CustomComponent = void 0,\n customProps = void 0,\n customEditable = void 0;\n\n if (customRenderer) {\n CustomComponent = customRenderer.component;\n customProps = customRenderer.props;\n customEditable = customRenderer.editable;\n }\n\n var direction = textDirectionality ? textDirectionality : directionMap.get(key);\n var offsetKey = DraftOffsetKey.encode(key, 0, 0);\n var componentProps = {\n contentState: content,\n block: _block,\n blockProps: customProps,\n blockStyleFn: blockStyleFn,\n customStyleMap: customStyleMap,\n customStyleFn: customStyleFn,\n decorator: decorator,\n direction: direction,\n forceSelection: forceSelection,\n offsetKey: offsetKey,\n preventScroll: preventScroll,\n selection: selection,\n tree: editorState.getBlockTree(key)\n };\n var configForType = blockRenderMap.get(blockType) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n var Element = configForType.element || blockRenderMap.get('unstyled').element;\n\n var depth = _block.getDepth();\n\n var _className = '';\n\n if (blockStyleFn) {\n _className = blockStyleFn(_block);\n } // List items are special snowflakes, since we handle nesting and\n // counters manually.\n\n\n if (Element === 'li') {\n var shouldResetCount = lastWrapperTemplate !== wrapperTemplate || currentDepth === null || depth > currentDepth;\n _className = joinClasses(_className, getListItemClasses(blockType, depth, shouldResetCount, direction));\n }\n\n var Component = CustomComponent || DraftEditorBlock;\n var childProps = {\n className: _className,\n 'data-block': true,\n 'data-editor': editorKey,\n 'data-offset-key': offsetKey,\n key: key\n };\n\n if (customEditable !== undefined) {\n childProps = _objectSpread({}, childProps, {\n contentEditable: customEditable,\n suppressContentEditableWarning: true\n });\n }\n\n var child = React.createElement(Element, childProps,\n /* $FlowFixMe[incompatible-type] (>=0.112.0 site=www,mobile) This\n * comment suppresses an error found when Flow v0.112 was deployed. To\n * see the error delete this comment and run Flow. */\n React.createElement(Component, _extends({}, componentProps, {\n key: key\n })));\n processedBlocks.push({\n block: child,\n wrapperTemplate: wrapperTemplate,\n key: key,\n offsetKey: offsetKey\n });\n\n if (wrapperTemplate) {\n currentDepth = _block.getDepth();\n } else {\n currentDepth = null;\n }\n\n lastWrapperTemplate = wrapperTemplate;\n } // Group contiguous runs of blocks that have the same wrapperTemplate\n\n\n var outputBlocks = [];\n\n for (var _ii = 0; _ii < processedBlocks.length;) {\n var info = processedBlocks[_ii];\n\n if (info.wrapperTemplate) {\n var blocks = [];\n\n do {\n blocks.push(processedBlocks[_ii].block);\n _ii++;\n } while (_ii < processedBlocks.length && processedBlocks[_ii].wrapperTemplate === info.wrapperTemplate);\n\n var wrapperElement = React.cloneElement(info.wrapperTemplate, {\n key: info.key + '-wrap',\n 'data-offset-key': info.offsetKey\n }, blocks);\n outputBlocks.push(wrapperElement);\n } else {\n outputBlocks.push(info.block);\n _ii++;\n }\n }\n\n return React.createElement(\"div\", {\n \"data-contents\": \"true\"\n }, outputBlocks);\n };\n\n return DraftEditorContents;\n}(React.Component);\n\nmodule.exports = DraftEditorContents;","/**\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 * @format\n * \n */\n'use strict';\n\nvar gkx = require(\"./gkx\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nmodule.exports = experimentalTreeDataSupport ? require(\"./DraftEditorContentsExperimental.react\") : require(\"./DraftEditorContents-core.react\");","/**\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of DraftEditorContents.react.js for tree nodes\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorBlockNode = require(\"./DraftEditorBlockNode.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\n/**\n * `DraftEditorContents` is the container component for all block components\n * rendered for a `DraftEditor`. It is optimized to aggressively avoid\n * re-rendering blocks whenever possible.\n *\n * This component is separate from `DraftEditor` because certain props\n * (for instance, ARIA props) must be allowed to update without affecting\n * the contents of the editor.\n */\nvar DraftEditorContentsExperimental = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorContentsExperimental, _React$Component);\n\n function DraftEditorContentsExperimental() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorContentsExperimental.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var prevEditorState = this.props.editorState;\n var nextEditorState = nextProps.editorState;\n var prevDirectionMap = prevEditorState.getDirectionMap();\n var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render.\n\n if (prevDirectionMap !== nextDirectionMap) {\n return true;\n }\n\n var didHaveFocus = prevEditorState.getSelection().getHasFocus();\n var nowHasFocus = nextEditorState.getSelection().getHasFocus();\n\n if (didHaveFocus !== nowHasFocus) {\n return true;\n }\n\n var nextNativeContent = nextEditorState.getNativelyRenderedContent();\n var wasComposing = prevEditorState.isInCompositionMode();\n var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively\n // rendered state, there's nothing new to be done.\n\n if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) {\n return false;\n }\n\n var prevContent = prevEditorState.getCurrentContent();\n var nextContent = nextEditorState.getCurrentContent();\n var prevDecorator = prevEditorState.getDecorator();\n var nextDecorator = nextEditorState.getDecorator();\n return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection();\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n blockRenderMap = _this$props.blockRenderMap,\n blockRendererFn = _this$props.blockRendererFn,\n blockStyleFn = _this$props.blockStyleFn,\n customStyleMap = _this$props.customStyleMap,\n customStyleFn = _this$props.customStyleFn,\n editorState = _this$props.editorState,\n editorKey = _this$props.editorKey,\n textDirectionality = _this$props.textDirectionality;\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var forceSelection = editorState.mustForceSelection();\n var decorator = editorState.getDecorator();\n var directionMap = nullthrows(editorState.getDirectionMap());\n var blocksAsArray = content.getBlocksAsArray();\n var rootBlock = blocksAsArray[0];\n var processedBlocks = [];\n var nodeBlock = rootBlock;\n\n while (nodeBlock) {\n var blockKey = nodeBlock.getKey();\n var blockProps = {\n blockRenderMap: blockRenderMap,\n blockRendererFn: blockRendererFn,\n blockStyleFn: blockStyleFn,\n contentState: content,\n customStyleFn: customStyleFn,\n customStyleMap: customStyleMap,\n decorator: decorator,\n editorKey: editorKey,\n editorState: editorState,\n forceSelection: forceSelection,\n selection: selection,\n block: nodeBlock,\n direction: textDirectionality ? textDirectionality : directionMap.get(blockKey),\n tree: editorState.getBlockTree(blockKey)\n };\n var configForType = blockRenderMap.get(nodeBlock.getType()) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n processedBlocks.push({\n /* $FlowFixMe[incompatible-type] (>=0.112.0 site=www,mobile) This\n * comment suppresses an error found when Flow v0.112 was deployed. To\n * see the error delete this comment and run Flow. */\n block: React.createElement(DraftEditorBlockNode, _extends({\n key: blockKey\n }, blockProps)),\n wrapperTemplate: wrapperTemplate,\n key: blockKey,\n offsetKey: DraftOffsetKey.encode(blockKey, 0, 0)\n });\n var nextBlockKey = nodeBlock.getNextSiblingKey();\n nodeBlock = nextBlockKey ? content.getBlockForKey(nextBlockKey) : null;\n } // Group contiguous runs of blocks that have the same wrapperTemplate\n\n\n var outputBlocks = [];\n\n for (var ii = 0; ii < processedBlocks.length;) {\n var info = processedBlocks[ii];\n\n if (info.wrapperTemplate) {\n var blocks = [];\n\n do {\n blocks.push(processedBlocks[ii].block);\n ii++;\n } while (ii < processedBlocks.length && processedBlocks[ii].wrapperTemplate === info.wrapperTemplate);\n\n var wrapperElement = React.cloneElement(info.wrapperTemplate, {\n key: info.key + '-wrap',\n 'data-offset-key': info.offsetKey\n }, blocks);\n outputBlocks.push(wrapperElement);\n } else {\n outputBlocks.push(info.block);\n ii++;\n }\n }\n\n return React.createElement(\"div\", {\n \"data-contents\": \"true\"\n }, outputBlocks);\n };\n\n return DraftEditorContentsExperimental;\n}(React.Component);\n\nmodule.exports = DraftEditorContentsExperimental;","/**\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar UnicodeBidi = require(\"fbjs/lib/UnicodeBidi\");\n\nvar UnicodeBidiDirection = require(\"fbjs/lib/UnicodeBidiDirection\");\n\nvar DraftEditorDecoratedLeaves = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorDecoratedLeaves, _React$Component);\n\n function DraftEditorDecoratedLeaves() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorDecoratedLeaves.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n block = _this$props.block,\n children = _this$props.children,\n contentState = _this$props.contentState,\n decorator = _this$props.decorator,\n decoratorKey = _this$props.decoratorKey,\n direction = _this$props.direction,\n leafSet = _this$props.leafSet,\n text = _this$props.text;\n var blockKey = block.getKey();\n var leavesForLeafSet = leafSet.get('leaves');\n var DecoratorComponent = decorator.getComponentForKey(decoratorKey);\n var decoratorProps = decorator.getPropsForKey(decoratorKey);\n var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, parseInt(decoratorKey, 10), 0);\n var decoratedText = text.slice(leavesForLeafSet.first().get('start'), leavesForLeafSet.last().get('end')); // Resetting dir to the same value on a child node makes Chrome/Firefox\n // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/\n\n var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), direction);\n return React.createElement(DecoratorComponent, _extends({}, decoratorProps, {\n contentState: contentState,\n decoratedText: decoratedText,\n dir: dir,\n key: decoratorOffsetKey,\n entityKey: block.getEntityAt(leafSet.get('start')),\n offsetKey: decoratorOffsetKey\n }), children);\n };\n\n return DraftEditorDecoratedLeaves;\n}(React.Component);\n\nmodule.exports = DraftEditorDecoratedLeaves;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DataTransfer = require(\"fbjs/lib/DataTransfer\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar getTextContentFromFiles = require(\"./getTextContentFromFiles\");\n\nvar getUpdatedSelectionState = require(\"./getUpdatedSelectionState\");\n\nvar getWindowForNode = require(\"./getWindowForNode\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n/**\n * Get a SelectionState for the supplied mouse event.\n */\n\n\nfunction getSelectionForEvent(event, editorState) {\n var node = null;\n var offset = null;\n var eventTargetDocument = getCorrectDocumentFromNode(event.currentTarget);\n /* $FlowFixMe[prop-missing] (>=0.68.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n\n if (typeof eventTargetDocument.caretRangeFromPoint === 'function') {\n /* $FlowFixMe[incompatible-use] (>=0.68.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n var dropRange = eventTargetDocument.caretRangeFromPoint(event.x, event.y);\n node = dropRange.startContainer;\n offset = dropRange.startOffset;\n } else if (event.rangeParent) {\n node = event.rangeParent;\n offset = event.rangeOffset;\n } else {\n return null;\n }\n\n node = nullthrows(node);\n offset = nullthrows(offset);\n var offsetKey = nullthrows(findAncestorOffsetKey(node));\n return getUpdatedSelectionState(editorState, offsetKey, offset, offsetKey, offset);\n}\n\nvar DraftEditorDragHandler = {\n /**\n * Drag originating from input terminated.\n */\n onDragEnd: function onDragEnd(editor) {\n editor.exitCurrentMode();\n endDrag(editor);\n },\n\n /**\n * Handle data being dropped.\n */\n onDrop: function onDrop(editor, e) {\n var data = new DataTransfer(e.nativeEvent.dataTransfer);\n var editorState = editor._latestEditorState;\n var dropSelection = getSelectionForEvent(e.nativeEvent, editorState);\n e.preventDefault();\n editor._dragCount = 0;\n editor.exitCurrentMode();\n\n if (dropSelection == null) {\n return;\n }\n\n var files = data.getFiles();\n\n if (files.length > 0) {\n if (editor.props.handleDroppedFiles && isEventHandled(editor.props.handleDroppedFiles(dropSelection, files))) {\n return;\n }\n /* $FlowFixMe[incompatible-call] This comment suppresses an error found\n * DataTransfer was typed. getFiles() returns an array of , not Blob */\n\n\n getTextContentFromFiles(files, function (fileText) {\n fileText && editor.update(insertTextAtSelection(editorState, dropSelection, fileText));\n });\n return;\n }\n\n var dragType = editor._internalDrag ? 'internal' : 'external';\n\n if (editor.props.handleDrop && isEventHandled(editor.props.handleDrop(dropSelection, data, dragType))) {// handled\n } else if (editor._internalDrag) {\n editor.update(moveText(editorState, dropSelection));\n } else {\n editor.update(insertTextAtSelection(editorState, dropSelection, data.getText()));\n }\n\n endDrag(editor);\n }\n};\n\nfunction endDrag(editor) {\n editor._internalDrag = false; // Fix issue #1383\n // Prior to React v16.5.0 onDrop breaks onSelect event:\n // https://github.com/facebook/react/issues/11379.\n // Dispatching a mouseup event on DOM node will make it go back to normal.\n\n var editorNode = editor.editorContainer;\n\n if (editorNode) {\n var mouseUpEvent = new MouseEvent('mouseup', {\n view: getWindowForNode(editorNode),\n bubbles: true,\n cancelable: true\n });\n editorNode.dispatchEvent(mouseUpEvent);\n }\n}\n\nfunction moveText(editorState, targetSelection) {\n var newContentState = DraftModifier.moveText(editorState.getCurrentContent(), editorState.getSelection(), targetSelection);\n return EditorState.push(editorState, newContentState, 'insert-fragment');\n}\n/**\n * Insert text at a specified selection.\n */\n\n\nfunction insertTextAtSelection(editorState, selection, text) {\n var newContentState = DraftModifier.insertText(editorState.getCurrentContent(), selection, text, editorState.getCurrentInlineStyle());\n return EditorState.push(editorState, newContentState, 'insert-fragment');\n}\n\nmodule.exports = DraftEditorDragHandler;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar onBeforeInput = require(\"./editOnBeforeInput\");\n\nvar onBlur = require(\"./editOnBlur\");\n\nvar onCompositionStart = require(\"./editOnCompositionStart\");\n\nvar onCopy = require(\"./editOnCopy\");\n\nvar onCut = require(\"./editOnCut\");\n\nvar onDragOver = require(\"./editOnDragOver\");\n\nvar onDragStart = require(\"./editOnDragStart\");\n\nvar onFocus = require(\"./editOnFocus\");\n\nvar onInput = require(\"./editOnInput\");\n\nvar onKeyDown = require(\"./editOnKeyDown\");\n\nvar onPaste = require(\"./editOnPaste\");\n\nvar onSelect = require(\"./editOnSelect\");\n\nvar isChrome = UserAgent.isBrowser('Chrome');\nvar isFirefox = UserAgent.isBrowser('Firefox');\nvar selectionHandler = isChrome || isFirefox ? onSelect : function (e) {};\nvar DraftEditorEditHandler = {\n onBeforeInput: onBeforeInput,\n onBlur: onBlur,\n onCompositionStart: onCompositionStart,\n onCopy: onCopy,\n onCut: onCut,\n onDragOver: onDragOver,\n onDragStart: onDragStart,\n onFocus: onFocus,\n onInput: onInput,\n onKeyDown: onKeyDown,\n onPaste: onPaste,\n onSelect: onSelect,\n // In certain cases, contenteditable on chrome does not fire the onSelect\n // event, causing problems with cursor positioning. Therefore, the selection\n // state update handler is added to more events to ensure that the selection\n // state is always synced with the actual cursor positions.\n onMouseUp: selectionHandler,\n onKeyUp: selectionHandler\n};\nmodule.exports = DraftEditorEditHandler;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nvar ReactDOMComet = require(\"react-dom\");\n\nvar flushControlled = ReactDOMComet.unstable_flushControlled;\nmodule.exports = flushControlled;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorTextNode = require(\"./DraftEditorTextNode.react\");\n\nvar React = require(\"react\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLBRElement = require(\"./isHTMLBRElement\");\n\nvar setDraftEditorSelection = require(\"./setDraftEditorSelection\").setDraftEditorSelection;\n\n/**\n * All leaf nodes in the editor are spans with single text nodes. Leaf\n * elements are styled based on the merging of an optional custom style map\n * and a default style map.\n *\n * `DraftEditorLeaf` also provides a wrapper for calling into the imperative\n * DOM Selection API. In this way, top-level components can declaratively\n * maintain the selection state.\n */\nvar DraftEditorLeaf = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorLeaf, _React$Component);\n\n function DraftEditorLeaf() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"leaf\", void 0);\n\n return _this;\n }\n\n var _proto = DraftEditorLeaf.prototype;\n\n _proto._setSelection = function _setSelection() {\n var selection = this.props.selection; // If selection state is irrelevant to the parent block, no-op.\n\n if (selection == null || !selection.getHasFocus()) {\n return;\n }\n\n var _this$props = this.props,\n block = _this$props.block,\n start = _this$props.start,\n text = _this$props.text;\n var blockKey = block.getKey();\n var end = start + text.length;\n\n if (!selection.hasEdgeWithin(blockKey, start, end)) {\n return;\n } // Determine the appropriate target node for selection. If the child\n // is not a text node, it is a
    spacer. In this case, use the\n // itself as the selection target.\n\n\n var node = this.leaf;\n !node ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing node') : invariant(false) : void 0;\n var child = node.firstChild;\n !child ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing child') : invariant(false) : void 0;\n var targetNode;\n\n if (child.nodeType === Node.TEXT_NODE) {\n targetNode = child;\n } else if (isHTMLBRElement(child)) {\n targetNode = node;\n } else {\n targetNode = child.firstChild;\n !targetNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing targetNode') : invariant(false) : void 0;\n }\n\n setDraftEditorSelection(selection, targetNode, blockKey, start, end);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var leafNode = this.leaf;\n !leafNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing leafNode') : invariant(false) : void 0;\n var shouldUpdate = leafNode.textContent !== nextProps.text || nextProps.styleSet !== this.props.styleSet || nextProps.forceSelection;\n return shouldUpdate;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._setSelection();\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._setSelection();\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var block = this.props.block;\n var text = this.props.text; // If the leaf is at the end of its block and ends in a soft newline, append\n // an extra line feed character. Browsers collapse trailing newline\n // characters, which leaves the cursor in the wrong place after a\n // shift+enter. The extra character repairs this.\n\n if (text.endsWith('\\n') && this.props.isLast) {\n text += '\\n';\n }\n\n var _this$props2 = this.props,\n customStyleMap = _this$props2.customStyleMap,\n customStyleFn = _this$props2.customStyleFn,\n offsetKey = _this$props2.offsetKey,\n styleSet = _this$props2.styleSet;\n var styleObj = styleSet.reduce(function (map, styleName) {\n var mergedStyles = {};\n var style = customStyleMap[styleName];\n\n if (style !== undefined && map.textDecoration !== style.textDecoration) {\n // .trim() is necessary for IE9/10/11 and Edge\n mergedStyles.textDecoration = [map.textDecoration, style.textDecoration].join(' ').trim();\n }\n\n return _assign(map, style, mergedStyles);\n }, {});\n\n if (customStyleFn) {\n var newStyles = customStyleFn(styleSet, block);\n styleObj = _assign(styleObj, newStyles);\n }\n\n return React.createElement(\"span\", {\n \"data-offset-key\": offsetKey,\n ref: function ref(_ref) {\n return _this2.leaf = _ref;\n },\n style: styleObj\n }, React.createElement(DraftEditorTextNode, null, text));\n };\n\n return DraftEditorLeaf;\n}(React.Component);\n\nmodule.exports = DraftEditorLeaf;","/**\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorDecoratedLeaves = require(\"./DraftEditorDecoratedLeaves.react\");\n\nvar DraftEditorLeaf = require(\"./DraftEditorLeaf.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar List = Immutable.List;\n\nvar DraftEditorNode = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorNode, _React$Component);\n\n function DraftEditorNode() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorNode.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n block = _this$props.block,\n contentState = _this$props.contentState,\n customStyleFn = _this$props.customStyleFn,\n customStyleMap = _this$props.customStyleMap,\n decorator = _this$props.decorator,\n direction = _this$props.direction,\n forceSelection = _this$props.forceSelection,\n hasSelection = _this$props.hasSelection,\n selection = _this$props.selection,\n tree = _this$props.tree;\n var blockKey = block.getKey();\n var text = block.getText();\n var lastLeafSet = tree.size - 1;\n var children = this.props.children || tree.map(function (leafSet, ii) {\n var decoratorKey = leafSet.get('decoratorKey');\n var leavesForLeafSet = leafSet.get('leaves');\n var lastLeaf = leavesForLeafSet.size - 1;\n var Leaves = leavesForLeafSet.map(function (leaf, jj) {\n var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj);\n var start = leaf.get('start');\n var end = leaf.get('end');\n return React.createElement(DraftEditorLeaf, {\n key: offsetKey,\n offsetKey: offsetKey,\n block: block,\n start: start,\n selection: hasSelection ? selection : null,\n forceSelection: forceSelection,\n text: text.slice(start, end),\n styleSet: block.getInlineStyleAt(start),\n customStyleMap: customStyleMap,\n customStyleFn: customStyleFn,\n isLast: decoratorKey === lastLeafSet && jj === lastLeaf\n });\n }).toArray();\n\n if (!decoratorKey || !decorator) {\n return Leaves;\n }\n\n return React.createElement(DraftEditorDecoratedLeaves, {\n block: block,\n children: Leaves,\n contentState: contentState,\n decorator: decorator,\n decoratorKey: decoratorKey,\n direction: direction,\n leafSet: leafSet,\n text: text,\n key: ii\n });\n }).toArray();\n return React.createElement(\"div\", {\n \"data-offset-key\": DraftOffsetKey.encode(blockKey, 0, 0),\n className: cx({\n 'public/DraftStyleDefault/block': true,\n 'public/DraftStyleDefault/ltr': direction === 'LTR',\n 'public/DraftStyleDefault/rtl': direction === 'RTL'\n })\n }, children);\n };\n\n return DraftEditorNode;\n}(React.Component);\n\nmodule.exports = DraftEditorNode;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\n/**\n * This component is responsible for rendering placeholder text for the\n * `DraftEditor` component.\n *\n * Override placeholder style via CSS.\n */\nvar DraftEditorPlaceholder = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorPlaceholder, _React$Component);\n\n function DraftEditorPlaceholder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorPlaceholder.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.text !== nextProps.text || this.props.editorState.getSelection().getHasFocus() !== nextProps.editorState.getSelection().getHasFocus();\n };\n\n _proto.render = function render() {\n var hasFocus = this.props.editorState.getSelection().getHasFocus();\n var className = cx({\n 'public/DraftEditorPlaceholder/root': true,\n 'public/DraftEditorPlaceholder/hasFocus': hasFocus\n });\n var contentStyle = {\n whiteSpace: 'pre-wrap'\n };\n return React.createElement(\"div\", {\n className: className\n }, React.createElement(\"div\", {\n className: cx('public/DraftEditorPlaceholder/inner'),\n id: this.props.accessibilityID,\n style: contentStyle\n }, this.props.text));\n };\n\n return DraftEditorPlaceholder;\n}(React.Component);\n\nmodule.exports = DraftEditorPlaceholder;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar React = require(\"react\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isElement = require(\"./isElement\"); // In IE, spans with
    tags render as two newlines. By rendering a span\n// with only a newline character, we can be sure to render a single line.\n\n\nvar useNewlineChar = UserAgent.isBrowser('IE <= 11');\n/**\n * Check whether the node should be considered a newline.\n */\n\nfunction isNewline(node) {\n return useNewlineChar ? node.textContent === '\\n' : node.tagName === 'BR';\n}\n/**\n * Placeholder elements for empty text content.\n *\n * What is this `data-text` attribute, anyway? It turns out that we need to\n * put an attribute on the lowest-level text node in order to preserve correct\n * spellcheck handling. If the is naked, Chrome and Safari may do\n * bizarre things to do the DOM -- split text nodes, create extra spans, etc.\n * If the has an attribute, this appears not to happen.\n * See http://jsfiddle.net/9khdavod/ for the failure case, and\n * http://jsfiddle.net/7pg143f7/ for the fixed case.\n */\n\n\nvar NEWLINE_A = function NEWLINE_A(ref) {\n return useNewlineChar ? React.createElement(\"span\", {\n key: \"A\",\n \"data-text\": \"true\",\n ref: ref\n }, '\\n') : React.createElement(\"br\", {\n key: \"A\",\n \"data-text\": \"true\",\n ref: ref\n });\n};\n\nvar NEWLINE_B = function NEWLINE_B(ref) {\n return useNewlineChar ? React.createElement(\"span\", {\n key: \"B\",\n \"data-text\": \"true\",\n ref: ref\n }, '\\n') : React.createElement(\"br\", {\n key: \"B\",\n \"data-text\": \"true\",\n ref: ref\n });\n};\n\n/**\n * The lowest-level component in a `DraftEditor`, the text node component\n * replaces the default React text node implementation. This allows us to\n * perform custom handling of newline behavior and avoid re-rendering text\n * nodes with DOM state that already matches the expectations of our immutable\n * editor state.\n */\nvar DraftEditorTextNode = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorTextNode, _React$Component);\n\n function DraftEditorTextNode(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // By flipping this flag, we also keep flipping keys which forces\n // React to remount this node every time it rerenders.\n\n _defineProperty(_assertThisInitialized(_this), \"_forceFlag\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_node\", void 0);\n\n _this._forceFlag = false;\n return _this;\n }\n\n var _proto = DraftEditorTextNode.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var node = this._node;\n var shouldBeNewline = nextProps.children === '';\n !isElement(node) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'node is not an Element') : invariant(false) : void 0;\n var elementNode = node;\n\n if (shouldBeNewline) {\n return !isNewline(elementNode);\n }\n\n return elementNode.textContent !== nextProps.children;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._forceFlag = !this._forceFlag;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._forceFlag = !this._forceFlag;\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n if (this.props.children === '') {\n return this._forceFlag ? NEWLINE_A(function (ref) {\n return _this2._node = ref;\n }) : NEWLINE_B(function (ref) {\n return _this2._node = ref;\n });\n }\n\n return React.createElement(\"span\", {\n key: this._forceFlag ? 'A' : 'B',\n \"data-text\": \"true\",\n ref: function ref(_ref) {\n return _this2._node = _ref;\n }\n }, this.props.children);\n };\n\n return DraftEditorTextNode;\n}(React.Component);\n\nmodule.exports = DraftEditorTextNode;","/**\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';\n\nmodule.exports = {\n initODS: function initODS() {},\n handleExtensionCausedError: function handleExtensionCausedError() {}\n};","\"use strict\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nvar DraftEntityInstance = require(\"./DraftEntityInstance\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar uuid = require(\"./uuid\");\n\nvar Map = Immutable.Map;\nvar instances = Map();\nvar instanceKey = uuid();\n/**\n * Temporary utility for generating the warnings\n */\n\nfunction logWarning(oldMethodCall, newMethodCall) {\n console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon!\\nPlease use \"' + newMethodCall + '\" instead.');\n}\n\n/**\n * A \"document entity\" is an object containing metadata associated with a\n * piece of text in a ContentBlock.\n *\n * For example, a `link` entity might include a `uri` property. When a\n * ContentBlock is rendered in the browser, text that refers to that link\n * entity may be rendered as an anchor, with the `uri` as the href value.\n *\n * In a ContentBlock, every position in the text may correspond to zero\n * or one entities. This correspondence is tracked using a key string,\n * generated via DraftEntity.create() and used to obtain entity metadata\n * via DraftEntity.get().\n */\nvar DraftEntity = {\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.getLastCreatedEntityKey' instead.\n * ---\n * Get the random key string from whatever entity was last created.\n * We need this to support the new API, as part of transitioning to put Entity\n * storage in contentState.\n */\n getLastCreatedEntityKey: function getLastCreatedEntityKey() {\n logWarning('DraftEntity.getLastCreatedEntityKey', 'contentState.getLastCreatedEntityKey');\n return DraftEntity.__getLastCreatedEntityKey();\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.createEntity' instead.\n * ---\n * Create a DraftEntityInstance and store it for later retrieval.\n *\n * A random key string will be generated and returned. This key may\n * be used to track the entity's usage in a ContentBlock, and for\n * retrieving data about the entity at render time.\n */\n create: function create(type, mutability, data) {\n logWarning('DraftEntity.create', 'contentState.createEntity');\n return DraftEntity.__create(type, mutability, data);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.addEntity' instead.\n * ---\n * Add an existing DraftEntityInstance to the DraftEntity map. This is\n * useful when restoring instances from the server.\n */\n add: function add(instance) {\n logWarning('DraftEntity.add', 'contentState.addEntity');\n return DraftEntity.__add(instance);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.getEntity' instead.\n * ---\n * Retrieve the entity corresponding to the supplied key string.\n */\n get: function get(key) {\n logWarning('DraftEntity.get', 'contentState.getEntity');\n return DraftEntity.__get(key);\n },\n\n /**\n * Get all the entities in the content state.\n */\n __getAll: function __getAll() {\n return instances;\n },\n\n /**\n * Load the entity map with the given set of entities.\n */\n __loadWithEntities: function __loadWithEntities(entities) {\n instances = entities;\n instanceKey = uuid();\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.mergeEntityData' instead.\n * ---\n * Entity instances are immutable. If you need to update the data for an\n * instance, this method will merge your data updates and return a new\n * instance.\n */\n mergeData: function mergeData(key, toMerge) {\n logWarning('DraftEntity.mergeData', 'contentState.mergeEntityData');\n return DraftEntity.__mergeData(key, toMerge);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.replaceEntityData' instead.\n * ---\n * Completely replace the data for a given instance.\n */\n replaceData: function replaceData(key, newData) {\n logWarning('DraftEntity.replaceData', 'contentState.replaceEntityData');\n return DraftEntity.__replaceData(key, newData);\n },\n // ***********************************WARNING******************************\n // --- the above public API will be deprecated in the next version of Draft!\n // The methods below this line are private - don't call them directly.\n\n /**\n * Get the random key string from whatever entity was last created.\n * We need this to support the new API, as part of transitioning to put Entity\n * storage in contentState.\n */\n __getLastCreatedEntityKey: function __getLastCreatedEntityKey() {\n return instanceKey;\n },\n\n /**\n * Create a DraftEntityInstance and store it for later retrieval.\n *\n * A random key string will be generated and returned. This key may\n * be used to track the entity's usage in a ContentBlock, and for\n * retrieving data about the entity at render time.\n */\n __create: function __create(type, mutability, data) {\n return DraftEntity.__add(new DraftEntityInstance({\n type: type,\n mutability: mutability,\n data: data || {}\n }));\n },\n\n /**\n * Add an existing DraftEntityInstance to the DraftEntity map. This is\n * useful when restoring instances from the server.\n */\n __add: function __add(instance) {\n instanceKey = uuid();\n instances = instances.set(instanceKey, instance);\n return instanceKey;\n },\n\n /**\n * Retrieve the entity corresponding to the supplied key string.\n */\n __get: function __get(key) {\n var instance = instances.get(key);\n !!!instance ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unknown DraftEntity key: %s.', key) : invariant(false) : void 0;\n return instance;\n },\n\n /**\n * Entity instances are immutable. If you need to update the data for an\n * instance, this method will merge your data updates and return a new\n * instance.\n */\n __mergeData: function __mergeData(key, toMerge) {\n var instance = DraftEntity.__get(key);\n\n var newData = _objectSpread({}, instance.getData(), toMerge);\n\n var newInstance = instance.set('data', newData);\n instances = instances.set(key, newInstance);\n return newInstance;\n },\n\n /**\n * Completely replace the data for a given instance.\n */\n __replaceData: function __replaceData(key, newData) {\n var instance = DraftEntity.__get(key);\n\n var newInstance = instance.set('data', newData);\n instances = instances.set(key, newInstance);\n return newInstance;\n }\n};\nmodule.exports = DraftEntity;","/**\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 * @legacyServerCallableInstance\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Immutable = require(\"immutable\");\n\nvar Record = Immutable.Record;\nvar DraftEntityInstanceRecord = Record({\n type: 'TOKEN',\n mutability: 'IMMUTABLE',\n data: Object\n});\n/**\n * An instance of a document entity, consisting of a `type` and relevant\n * `data`, metadata about the entity.\n *\n * For instance, a \"link\" entity might provide a URI, and a \"mention\"\n * entity might provide the mentioned user's ID. These pieces of data\n * may be used when rendering the entity as part of a ContentBlock DOM\n * representation. For a link, the data would be used as an href for\n * the rendered anchor. For a mention, the ID could be used to retrieve\n * a hovercard.\n */\n\nvar DraftEntityInstance = /*#__PURE__*/function (_DraftEntityInstanceR) {\n _inheritsLoose(DraftEntityInstance, _DraftEntityInstanceR);\n\n function DraftEntityInstance() {\n return _DraftEntityInstanceR.apply(this, arguments) || this;\n }\n\n var _proto = DraftEntityInstance.prototype;\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getMutability = function getMutability() {\n return this.get('mutability');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n return DraftEntityInstance;\n}(DraftEntityInstanceRecord);\n\nmodule.exports = DraftEntityInstance;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Identify the range to delete from a segmented entity.\n *\n * Rules:\n *\n * Example: 'John F. Kennedy'\n *\n * - Deletion from within any non-whitespace (i.e. ['John', 'F.', 'Kennedy'])\n * will return the range of that text.\n *\n * 'John F. Kennedy' -> 'John F.'\n * ^\n *\n * - Forward deletion of whitespace will remove the following section:\n *\n * 'John F. Kennedy' -> 'John Kennedy'\n * ^\n *\n * - Backward deletion of whitespace will remove the previous section:\n *\n * 'John F. Kennedy' -> 'F. Kennedy'\n * ^\n */\nvar DraftEntitySegments = {\n getRemovalRange: function getRemovalRange(selectionStart, selectionEnd, text, entityStart, direction) {\n var segments = text.split(' ');\n segments = segments.map(function (\n /*string*/\n segment,\n /*number*/\n ii) {\n if (direction === 'forward') {\n if (ii > 0) {\n return ' ' + segment;\n }\n } else if (ii < segments.length - 1) {\n return segment + ' ';\n }\n\n return segment;\n });\n var segmentStart = entityStart;\n var segmentEnd;\n var segment;\n var removalStart = null;\n var removalEnd = null;\n\n for (var jj = 0; jj < segments.length; jj++) {\n segment = segments[jj];\n segmentEnd = segmentStart + segment.length; // Our selection overlaps this segment.\n\n if (selectionStart < segmentEnd && segmentStart < selectionEnd) {\n if (removalStart !== null) {\n removalEnd = segmentEnd;\n } else {\n removalStart = segmentStart;\n removalEnd = segmentEnd;\n }\n } else if (removalStart !== null) {\n break;\n }\n\n segmentStart = segmentEnd;\n }\n\n var entityEnd = entityStart + text.length;\n var atStart = removalStart === entityStart;\n var atEnd = removalEnd === entityEnd;\n\n if (!atStart && atEnd || atStart && !atEnd) {\n if (direction === 'forward') {\n if (removalEnd !== entityEnd) {\n removalEnd++;\n }\n } else if (removalStart !== entityStart) {\n removalStart--;\n }\n }\n\n return {\n start: removalStart,\n end: removalEnd\n };\n }\n};\nmodule.exports = DraftEntitySegments;","/**\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';\n\nmodule.exports = {\n logBlockedSelectionEvent: function logBlockedSelectionEvent() {\n return null;\n },\n logSelectionStateFailure: function logSelectionStateFailure() {\n return null;\n }\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentStateInlineStyle = require(\"./ContentStateInlineStyle\");\n\nvar applyEntityToContentState = require(\"./applyEntityToContentState\");\n\nvar getCharacterRemovalRange = require(\"./getCharacterRemovalRange\");\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n\nvar Immutable = require(\"immutable\");\n\nvar insertFragmentIntoContentState = require(\"./insertFragmentIntoContentState\");\n\nvar insertTextIntoContentState = require(\"./insertTextIntoContentState\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar modifyBlockForContentState = require(\"./modifyBlockForContentState\");\n\nvar removeEntitiesAtEdges = require(\"./removeEntitiesAtEdges\");\n\nvar removeRangeFromContentState = require(\"./removeRangeFromContentState\");\n\nvar splitBlockInContentState = require(\"./splitBlockInContentState\");\n\nvar OrderedSet = Immutable.OrderedSet;\n/**\n * `DraftModifier` provides a set of convenience methods that apply\n * modifications to a `ContentState` object based on a target `SelectionState`.\n *\n * Any change to a `ContentState` should be decomposable into a series of\n * transaction functions that apply the required changes and return output\n * `ContentState` objects.\n *\n * These functions encapsulate some of the most common transaction sequences.\n */\n\nvar DraftModifier = {\n replaceText: function replaceText(contentState, rangeToReplace, text, inlineStyle, entityKey) {\n var withoutEntities = removeEntitiesAtEdges(contentState, rangeToReplace);\n var withoutText = removeRangeFromContentState(withoutEntities, rangeToReplace);\n var character = CharacterMetadata.create({\n style: inlineStyle || OrderedSet(),\n entity: entityKey || null\n });\n return insertTextIntoContentState(withoutText, withoutText.getSelectionAfter(), text, character);\n },\n insertText: function insertText(contentState, targetRange, text, inlineStyle, entityKey) {\n !targetRange.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Target range must be collapsed for `insertText`.') : invariant(false) : void 0;\n return DraftModifier.replaceText(contentState, targetRange, text, inlineStyle, entityKey);\n },\n moveText: function moveText(contentState, removalRange, targetRange) {\n var movedFragment = getContentStateFragment(contentState, removalRange);\n var afterRemoval = DraftModifier.removeRange(contentState, removalRange, 'backward');\n return DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment);\n },\n replaceWithFragment: function replaceWithFragment(contentState, targetRange, fragment) {\n var mergeBlockData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'REPLACE_WITH_NEW_DATA';\n var withoutEntities = removeEntitiesAtEdges(contentState, targetRange);\n var withoutText = removeRangeFromContentState(withoutEntities, targetRange);\n return insertFragmentIntoContentState(withoutText, withoutText.getSelectionAfter(), fragment, mergeBlockData);\n },\n removeRange: function removeRange(contentState, rangeToRemove, removalDirection) {\n var startKey, endKey, startBlock, endBlock;\n\n if (rangeToRemove.getIsBackward()) {\n rangeToRemove = rangeToRemove.merge({\n anchorKey: rangeToRemove.getFocusKey(),\n anchorOffset: rangeToRemove.getFocusOffset(),\n focusKey: rangeToRemove.getAnchorKey(),\n focusOffset: rangeToRemove.getAnchorOffset(),\n isBackward: false\n });\n }\n\n startKey = rangeToRemove.getAnchorKey();\n endKey = rangeToRemove.getFocusKey();\n startBlock = contentState.getBlockForKey(startKey);\n endBlock = contentState.getBlockForKey(endKey);\n var startOffset = rangeToRemove.getStartOffset();\n var endOffset = rangeToRemove.getEndOffset();\n var startEntityKey = startBlock.getEntityAt(startOffset);\n var endEntityKey = endBlock.getEntityAt(endOffset - 1); // Check whether the selection state overlaps with a single entity.\n // If so, try to remove the appropriate substring of the entity text.\n\n if (startKey === endKey) {\n if (startEntityKey && startEntityKey === endEntityKey) {\n var adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection);\n return removeRangeFromContentState(contentState, adjustedRemovalRange);\n }\n }\n\n var withoutEntities = removeEntitiesAtEdges(contentState, rangeToRemove);\n return removeRangeFromContentState(withoutEntities, rangeToRemove);\n },\n splitBlock: function splitBlock(contentState, selectionState) {\n var withoutEntities = removeEntitiesAtEdges(contentState, selectionState);\n var withoutText = removeRangeFromContentState(withoutEntities, selectionState);\n return splitBlockInContentState(withoutText, withoutText.getSelectionAfter());\n },\n applyInlineStyle: function applyInlineStyle(contentState, selectionState, inlineStyle) {\n return ContentStateInlineStyle.add(contentState, selectionState, inlineStyle);\n },\n removeInlineStyle: function removeInlineStyle(contentState, selectionState, inlineStyle) {\n return ContentStateInlineStyle.remove(contentState, selectionState, inlineStyle);\n },\n setBlockType: function setBlockType(contentState, selectionState, blockType) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n type: blockType,\n depth: 0\n });\n });\n },\n setBlockData: function setBlockData(contentState, selectionState, blockData) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n data: blockData\n });\n });\n },\n mergeBlockData: function mergeBlockData(contentState, selectionState, blockData) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n data: block.getData().merge(blockData)\n });\n });\n },\n applyEntity: function applyEntity(contentState, selectionState, entityKey) {\n var withoutEntities = removeEntitiesAtEdges(contentState, selectionState);\n return applyEntityToContentState(withoutEntities, selectionState, entityKey);\n }\n};\nmodule.exports = DraftModifier;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar KEY_DELIMITER = '-';\nvar DraftOffsetKey = {\n encode: function encode(blockKey, decoratorKey, leafKey) {\n return blockKey + KEY_DELIMITER + decoratorKey + KEY_DELIMITER + leafKey;\n },\n decode: function decode(offsetKey) {\n // Extracts the last two parts of offsetKey and captures the rest in blockKeyParts\n var _offsetKey$split$reve = offsetKey.split(KEY_DELIMITER).reverse(),\n leafKey = _offsetKey$split$reve[0],\n decoratorKey = _offsetKey$split$reve[1],\n blockKeyParts = _offsetKey$split$reve.slice(2);\n\n return {\n // Recomposes the parts of blockKey after reversing them\n blockKey: blockKeyParts.reverse().join(KEY_DELIMITER),\n decoratorKey: parseInt(decoratorKey, 10),\n leafKey: parseInt(leafKey, 10)\n };\n }\n};\nmodule.exports = DraftOffsetKey;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar convertFromHTMLToContentBlocks = require(\"./convertFromHTMLToContentBlocks\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getSafeBodyFromHTML = require(\"./getSafeBodyFromHTML\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar sanitizeDraftText = require(\"./sanitizeDraftText\");\n\nvar List = Immutable.List,\n Repeat = Immutable.Repeat;\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock;\nvar DraftPasteProcessor = {\n processHTML: function processHTML(html, blockRenderMap) {\n return convertFromHTMLToContentBlocks(html, getSafeBodyFromHTML, blockRenderMap);\n },\n processText: function processText(textBlocks, character, type) {\n return textBlocks.reduce(function (acc, textLine, index) {\n textLine = sanitizeDraftText(textLine);\n var key = generateRandomKey();\n var blockNodeConfig = {\n key: key,\n type: type,\n text: textLine,\n characterList: List(Repeat(character, textLine.length))\n }; // next block updates previous block\n\n if (experimentalTreeDataSupport && index !== 0) {\n var prevSiblingIndex = index - 1; // update previous block\n\n var previousBlock = acc[prevSiblingIndex] = acc[prevSiblingIndex].merge({\n nextSibling: key\n });\n blockNodeConfig = _objectSpread({}, blockNodeConfig, {\n prevSibling: previousBlock.getKey()\n });\n }\n\n acc.push(new ContentBlockRecord(blockNodeConfig));\n return acc;\n }, []);\n }\n};\nmodule.exports = DraftPasteProcessor;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar TokenizeUtil = require(\"fbjs/lib/TokenizeUtil\");\n\nvar punctuation = TokenizeUtil.getPunctuation(); // The apostrophe and curly single quotes behave in a curious way: when\n// surrounded on both sides by word characters, they behave as word chars; when\n// either neighbor is punctuation or an end of the string, they behave as\n// punctuation.\n\nvar CHAMELEON_CHARS = \"['\\u2018\\u2019]\"; // Remove the underscore, which should count as part of the removable word. The\n// \"chameleon chars\" also count as punctuation in this regex.\n\nvar WHITESPACE_AND_PUNCTUATION = '\\\\s|(?![_])' + punctuation;\nvar DELETE_STRING = '^' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)';\nvar DELETE_REGEX = new RegExp(DELETE_STRING);\nvar BACKSPACE_STRING = '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '$';\nvar BACKSPACE_REGEX = new RegExp(BACKSPACE_STRING);\n\nfunction getRemovableWord(text, isBackward) {\n var matches = isBackward ? BACKSPACE_REGEX.exec(text) : DELETE_REGEX.exec(text);\n return matches ? matches[0] : text;\n}\n\nvar DraftRemovableWord = {\n getBackward: function getBackward(text) {\n return getRemovableWord(text, true);\n },\n getForward: function getForward(text) {\n return getRemovableWord(text, false);\n }\n};\nmodule.exports = DraftRemovableWord;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftStringKey = {\n stringify: function stringify(key) {\n return '_' + String(key);\n },\n unstringify: function unstringify(key) {\n return key.slice(1);\n }\n};\nmodule.exports = DraftStringKey;","\"use strict\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar traverseInDepthOrder = function traverseInDepthOrder(blocks, fn) {\n var stack = [].concat(blocks).reverse();\n\n while (stack.length) {\n var _block = stack.pop();\n\n fn(_block);\n var children = _block.children;\n !Array.isArray(children) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid tree raw block') : invariant(false) : void 0;\n stack = stack.concat([].concat(children.reverse()));\n }\n};\n\nvar isListBlock = function isListBlock(block) {\n if (!(block && block.type)) {\n return false;\n }\n\n var type = block.type;\n return type === 'unordered-list-item' || type === 'ordered-list-item';\n};\n\nvar addDepthToChildren = function addDepthToChildren(block) {\n if (Array.isArray(block.children)) {\n block.children = block.children.map(function (child) {\n return child.type === block.type ? _objectSpread({}, child, {\n depth: (block.depth || 0) + 1\n }) : child;\n });\n }\n};\n/**\n * This adapter is intended to be be used as an adapter to draft tree data\n *\n * draft state <=====> draft tree state\n */\n\n\nvar DraftTreeAdapter = {\n /**\n * Converts from a tree raw state back to draft raw state\n */\n fromRawTreeStateToRawState: function fromRawTreeStateToRawState(draftTreeState) {\n var blocks = draftTreeState.blocks;\n var transformedBlocks = [];\n !Array.isArray(blocks) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid raw state') : invariant(false) : void 0;\n\n if (!Array.isArray(blocks) || !blocks.length) {\n return draftTreeState;\n }\n\n traverseInDepthOrder(blocks, function (block) {\n var newBlock = _objectSpread({}, block);\n\n if (isListBlock(block)) {\n newBlock.depth = newBlock.depth || 0;\n addDepthToChildren(block); // if it's a non-leaf node, we don't do anything else\n\n if (block.children != null && block.children.length > 0) {\n return;\n }\n }\n\n delete newBlock.children;\n transformedBlocks.push(newBlock);\n });\n draftTreeState.blocks = transformedBlocks;\n return _objectSpread({}, draftTreeState, {\n blocks: transformedBlocks\n });\n },\n\n /**\n * Converts from draft raw state to tree draft state\n */\n fromRawStateToRawTreeState: function fromRawStateToRawTreeState(draftState) {\n var transformedBlocks = [];\n var parentStack = [];\n draftState.blocks.forEach(function (block) {\n var isList = isListBlock(block);\n var depth = block.depth || 0;\n\n var treeBlock = _objectSpread({}, block, {\n children: []\n });\n\n if (!isList) {\n transformedBlocks.push(treeBlock);\n return;\n }\n\n var lastParent = parentStack[0]; // block is non-nested & there are no nested blocks, directly push block\n\n if (lastParent == null && depth === 0) {\n transformedBlocks.push(treeBlock); // block is first nested block or previous nested block is at a lower level\n } else if (lastParent == null || lastParent.depth < depth - 1) {\n // create new parent block\n var newParent = {\n key: generateRandomKey(),\n text: '',\n depth: depth - 1,\n type: block.type,\n children: [],\n entityRanges: [],\n inlineStyleRanges: []\n };\n parentStack.unshift(newParent);\n\n if (depth === 1) {\n // add as a root-level block\n transformedBlocks.push(newParent);\n } else if (lastParent != null) {\n // depth > 1 => also add as previous parent's child\n lastParent.children.push(newParent);\n }\n\n newParent.children.push(treeBlock);\n } else if (lastParent.depth === depth - 1) {\n // add as child of last parent\n lastParent.children.push(treeBlock);\n } else {\n // pop out parents at levels above this one from the parent stack\n while (lastParent != null && lastParent.depth >= depth) {\n parentStack.shift();\n lastParent = parentStack[0];\n }\n\n if (depth > 0) {\n lastParent.children.push(treeBlock);\n } else {\n transformedBlocks.push(treeBlock);\n }\n }\n });\n return _objectSpread({}, draftState, {\n blocks: transformedBlocks\n });\n }\n};\nmodule.exports = DraftTreeAdapter;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar warning = require(\"fbjs/lib/warning\");\n\nvar DraftTreeInvariants = {\n /**\n * Check if the block is valid\n */\n isValidBlock: function isValidBlock(block, blockMap) {\n var key = block.getKey(); // is its parent's child\n\n var parentKey = block.getParentKey();\n\n if (parentKey != null) {\n var parent = blockMap.get(parentKey);\n\n if (!parent.getChildKeys().includes(key)) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is missing parent -> child pointer on %s', key) : void 0;\n return false;\n }\n } // is its children's parent\n\n\n var children = block.getChildKeys().map(function (k) {\n return blockMap.get(k);\n });\n\n if (!children.every(function (c) {\n return c.getParentKey() === key;\n })) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is missing child -> parent pointer on %s', key) : void 0;\n return false;\n } // is its previous sibling's next sibling\n\n\n var prevSiblingKey = block.getPrevSiblingKey();\n\n if (prevSiblingKey != null) {\n var prevSibling = blockMap.get(prevSiblingKey);\n\n if (prevSibling.getNextSiblingKey() !== key) {\n process.env.NODE_ENV !== \"production\" ? warning(true, \"Tree is missing nextSibling pointer on %s's prevSibling\", key) : void 0;\n return false;\n }\n } // is its next sibling's previous sibling\n\n\n var nextSiblingKey = block.getNextSiblingKey();\n\n if (nextSiblingKey != null) {\n var nextSibling = blockMap.get(nextSiblingKey);\n\n if (nextSibling.getPrevSiblingKey() !== key) {\n process.env.NODE_ENV !== \"production\" ? warning(true, \"Tree is missing prevSibling pointer on %s's nextSibling\", key) : void 0;\n return false;\n }\n } // no 2-node cycles\n\n\n if (nextSiblingKey !== null && prevSiblingKey !== null) {\n if (prevSiblingKey === nextSiblingKey) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree has a two-node cycle at %s', key) : void 0;\n return false;\n }\n } // if it's a leaf node, it has text but no children\n\n\n if (block.text != '') {\n if (block.getChildKeys().size > 0) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Leaf node %s has children', key) : void 0;\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * Checks that this is a connected tree on all the blocks\n * starting from the first block, traversing nextSibling and child pointers\n * should be a tree (preorder traversal - parent, then children)\n * num of connected node === number of blocks\n */\n isConnectedTree: function isConnectedTree(blockMap) {\n // exactly one node has no previous sibling + no parent\n var eligibleFirstNodes = blockMap.toArray().filter(function (block) {\n return block.getParentKey() == null && block.getPrevSiblingKey() == null;\n });\n\n if (eligibleFirstNodes.length !== 1) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is not connected. More or less than one first node') : void 0;\n return false;\n }\n\n var firstNode = eligibleFirstNodes.shift();\n var nodesSeen = 0;\n var currentKey = firstNode.getKey();\n var visitedStack = [];\n\n while (currentKey != null) {\n var currentNode = blockMap.get(currentKey);\n var childKeys = currentNode.getChildKeys();\n var nextSiblingKey = currentNode.getNextSiblingKey(); // if the node has children, add parent's next sibling to stack and go to children\n\n if (childKeys.size > 0) {\n if (nextSiblingKey != null) {\n visitedStack.unshift(nextSiblingKey);\n }\n\n var children = childKeys.map(function (k) {\n return blockMap.get(k);\n });\n\n var _firstNode = children.find(function (block) {\n return block.getPrevSiblingKey() == null;\n });\n\n if (_firstNode == null) {\n process.env.NODE_ENV !== \"production\" ? warning(true, '%s has no first child', currentKey) : void 0;\n return false;\n }\n\n currentKey = _firstNode.getKey(); // TODO(T32490138): Deal with multi-node cycles here\n } else {\n if (currentNode.getNextSiblingKey() != null) {\n currentKey = currentNode.getNextSiblingKey();\n } else {\n currentKey = visitedStack.shift();\n }\n }\n\n nodesSeen++;\n }\n\n if (nodesSeen !== blockMap.size) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is not connected. %s nodes were seen instead of %s', nodesSeen, blockMap.size) : void 0;\n return false;\n }\n\n return true;\n },\n\n /**\n * Checks that the block map is a connected tree with valid blocks\n */\n isValidTree: function isValidTree(blockMap) {\n var _this = this;\n\n var blocks = blockMap.toArray();\n\n if (!blocks.every(function (block) {\n return _this.isValidBlock(block, blockMap);\n })) {\n return false;\n }\n\n return this.isConnectedTree(blockMap);\n }\n};\nmodule.exports = DraftTreeInvariants;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeBidiService = require(\"fbjs/lib/UnicodeBidiService\");\n\nvar Immutable = require(\"immutable\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar OrderedMap = Immutable.OrderedMap;\nvar bidiService;\nvar EditorBidiService = {\n getDirectionMap: function getDirectionMap(content, prevBidiMap) {\n if (!bidiService) {\n bidiService = new UnicodeBidiService();\n } else {\n bidiService.reset();\n }\n\n var blockMap = content.getBlockMap();\n var nextBidi = blockMap.valueSeq().map(function (block) {\n return nullthrows(bidiService).getDirection(block.getText());\n });\n var bidiMap = OrderedMap(blockMap.keySeq().zip(nextBidi));\n\n if (prevBidiMap != null && Immutable.is(prevBidiMap, bidiMap)) {\n return prevBidiMap;\n }\n\n return bidiMap;\n }\n};\nmodule.exports = EditorBidiService;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar BlockTree = require(\"./BlockTree\");\n\nvar ContentState = require(\"./ContentState\");\n\nvar EditorBidiService = require(\"./EditorBidiService\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar Immutable = require(\"immutable\");\n\nvar OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Stack = Immutable.Stack,\n OrderedMap = Immutable.OrderedMap,\n List = Immutable.List; // When configuring an editor, the user can chose to provide or not provide\n// basically all keys. `currentContent` varies, so this type doesn't include it.\n// (See the types defined below.)\n\nvar defaultRecord = {\n allowUndo: true,\n currentContent: null,\n decorator: null,\n directionMap: null,\n forceSelection: false,\n inCompositionMode: false,\n inlineStyleOverride: null,\n lastChangeType: null,\n nativelyRenderedContent: null,\n redoStack: Stack(),\n selection: null,\n treeMap: null,\n undoStack: Stack()\n};\nvar EditorStateRecord = Record(defaultRecord);\n\nvar EditorState = /*#__PURE__*/function () {\n EditorState.createEmpty = function createEmpty(decorator) {\n return this.createWithText('', decorator);\n };\n\n EditorState.createWithText = function createWithText(text, decorator) {\n return EditorState.createWithContent(ContentState.createFromText(text), decorator);\n };\n\n EditorState.createWithContent = function createWithContent(contentState, decorator) {\n if (contentState.getBlockMap().count() === 0) {\n return EditorState.createEmpty(decorator);\n }\n\n var firstKey = contentState.getBlockMap().first().getKey();\n return EditorState.create({\n currentContent: contentState,\n undoStack: Stack(),\n redoStack: Stack(),\n decorator: decorator || null,\n selection: SelectionState.createEmpty(firstKey)\n });\n };\n\n EditorState.create = function create(config) {\n var currentContent = config.currentContent,\n decorator = config.decorator;\n\n var recordConfig = _objectSpread({}, config, {\n treeMap: generateNewTreeMap(currentContent, decorator),\n directionMap: EditorBidiService.getDirectionMap(currentContent)\n });\n\n return new EditorState(new EditorStateRecord(recordConfig));\n };\n\n EditorState.fromJS = function fromJS(config) {\n return new EditorState(new EditorStateRecord(_objectSpread({}, config, {\n directionMap: config.directionMap != null ? OrderedMap(config.directionMap) : config.directionMap,\n inlineStyleOverride: config.inlineStyleOverride != null ? OrderedSet(config.inlineStyleOverride) : config.inlineStyleOverride,\n nativelyRenderedContent: config.nativelyRenderedContent != null ? ContentState.fromJS(config.nativelyRenderedContent) : config.nativelyRenderedContent,\n redoStack: config.redoStack != null ? Stack(config.redoStack.map(function (v) {\n return ContentState.fromJS(v);\n })) : config.redoStack,\n selection: config.selection != null ? new SelectionState(config.selection) : config.selection,\n treeMap: config.treeMap != null ? OrderedMap(config.treeMap).map(function (v) {\n return List(v).map(function (v) {\n return BlockTree.fromJS(v);\n });\n }) : config.treeMap,\n undoStack: config.undoStack != null ? Stack(config.undoStack.map(function (v) {\n return ContentState.fromJS(v);\n })) : config.undoStack,\n currentContent: ContentState.fromJS(config.currentContent)\n })));\n };\n\n EditorState.set = function set(editorState, put) {\n var map = editorState.getImmutable().withMutations(function (state) {\n var existingDecorator = state.get('decorator');\n var decorator = existingDecorator;\n\n if (put.decorator === null) {\n decorator = null;\n } else if (put.decorator) {\n decorator = put.decorator;\n }\n\n var newContent = put.currentContent || editorState.getCurrentContent();\n\n if (decorator !== existingDecorator) {\n var treeMap = state.get('treeMap');\n var newTreeMap;\n\n if (decorator && existingDecorator) {\n newTreeMap = regenerateTreeForNewDecorator(newContent, newContent.getBlockMap(), treeMap, decorator, existingDecorator);\n } else {\n newTreeMap = generateNewTreeMap(newContent, decorator);\n }\n\n state.merge({\n decorator: decorator,\n treeMap: newTreeMap,\n nativelyRenderedContent: null\n });\n return;\n }\n\n var existingContent = editorState.getCurrentContent();\n\n if (newContent !== existingContent) {\n state.set('treeMap', regenerateTreeForNewBlocks(editorState, newContent.getBlockMap(), newContent.getEntityMap(), decorator));\n }\n\n state.merge(put);\n });\n return new EditorState(map);\n };\n\n var _proto = EditorState.prototype;\n\n _proto.toJS = function toJS() {\n return this.getImmutable().toJS();\n };\n\n _proto.getAllowUndo = function getAllowUndo() {\n return this.getImmutable().get('allowUndo');\n };\n\n _proto.getCurrentContent = function getCurrentContent() {\n return this.getImmutable().get('currentContent');\n };\n\n _proto.getUndoStack = function getUndoStack() {\n return this.getImmutable().get('undoStack');\n };\n\n _proto.getRedoStack = function getRedoStack() {\n return this.getImmutable().get('redoStack');\n };\n\n _proto.getSelection = function getSelection() {\n return this.getImmutable().get('selection');\n };\n\n _proto.getDecorator = function getDecorator() {\n return this.getImmutable().get('decorator');\n };\n\n _proto.isInCompositionMode = function isInCompositionMode() {\n return this.getImmutable().get('inCompositionMode');\n };\n\n _proto.mustForceSelection = function mustForceSelection() {\n return this.getImmutable().get('forceSelection');\n };\n\n _proto.getNativelyRenderedContent = function getNativelyRenderedContent() {\n return this.getImmutable().get('nativelyRenderedContent');\n };\n\n _proto.getLastChangeType = function getLastChangeType() {\n return this.getImmutable().get('lastChangeType');\n }\n /**\n * While editing, the user may apply inline style commands with a collapsed\n * cursor, intending to type text that adopts the specified style. In this\n * case, we track the specified style as an \"override\" that takes precedence\n * over the inline style of the text adjacent to the cursor.\n *\n * If null, there is no override in place.\n */\n ;\n\n _proto.getInlineStyleOverride = function getInlineStyleOverride() {\n return this.getImmutable().get('inlineStyleOverride');\n };\n\n EditorState.setInlineStyleOverride = function setInlineStyleOverride(editorState, inlineStyleOverride) {\n return EditorState.set(editorState, {\n inlineStyleOverride: inlineStyleOverride\n });\n }\n /**\n * Get the appropriate inline style for the editor state. If an\n * override is in place, use it. Otherwise, the current style is\n * based on the location of the selection state.\n */\n ;\n\n _proto.getCurrentInlineStyle = function getCurrentInlineStyle() {\n var override = this.getInlineStyleOverride();\n\n if (override != null) {\n return override;\n }\n\n var content = this.getCurrentContent();\n var selection = this.getSelection();\n\n if (selection.isCollapsed()) {\n return getInlineStyleForCollapsedSelection(content, selection);\n }\n\n return getInlineStyleForNonCollapsedSelection(content, selection);\n };\n\n _proto.getBlockTree = function getBlockTree(blockKey) {\n return this.getImmutable().getIn(['treeMap', blockKey]);\n };\n\n _proto.isSelectionAtStartOfContent = function isSelectionAtStartOfContent() {\n var firstKey = this.getCurrentContent().getBlockMap().first().getKey();\n return this.getSelection().hasEdgeWithin(firstKey, 0, 0);\n };\n\n _proto.isSelectionAtEndOfContent = function isSelectionAtEndOfContent() {\n var content = this.getCurrentContent();\n var blockMap = content.getBlockMap();\n var last = blockMap.last();\n var end = last.getLength();\n return this.getSelection().hasEdgeWithin(last.getKey(), end, end);\n };\n\n _proto.getDirectionMap = function getDirectionMap() {\n return this.getImmutable().get('directionMap');\n }\n /**\n * Incorporate native DOM selection changes into the EditorState. This\n * method can be used when we simply want to accept whatever the DOM\n * has given us to represent selection, and we do not need to re-render\n * the editor.\n *\n * To forcibly move the DOM selection, see `EditorState.forceSelection`.\n */\n ;\n\n EditorState.acceptSelection = function acceptSelection(editorState, selection) {\n return updateSelection(editorState, selection, false);\n }\n /**\n * At times, we need to force the DOM selection to be where we\n * need it to be. This can occur when the anchor or focus nodes\n * are non-text nodes, for instance. In this case, we want to trigger\n * a re-render of the editor, which in turn forces selection into\n * the correct place in the DOM. The `forceSelection` method\n * accomplishes this.\n *\n * This method should be used in cases where you need to explicitly\n * move the DOM selection from one place to another without a change\n * in ContentState.\n */\n ;\n\n EditorState.forceSelection = function forceSelection(editorState, selection) {\n if (!selection.getHasFocus()) {\n selection = selection.set('hasFocus', true);\n }\n\n return updateSelection(editorState, selection, true);\n }\n /**\n * Move selection to the end of the editor without forcing focus.\n */\n ;\n\n EditorState.moveSelectionToEnd = function moveSelectionToEnd(editorState) {\n var content = editorState.getCurrentContent();\n var lastBlock = content.getLastBlock();\n var lastKey = lastBlock.getKey();\n var length = lastBlock.getLength();\n return EditorState.acceptSelection(editorState, new SelectionState({\n anchorKey: lastKey,\n anchorOffset: length,\n focusKey: lastKey,\n focusOffset: length,\n isBackward: false\n }));\n }\n /**\n * Force focus to the end of the editor. This is useful in scenarios\n * where we want to programmatically focus the input and it makes sense\n * to allow the user to continue working seamlessly.\n */\n ;\n\n EditorState.moveFocusToEnd = function moveFocusToEnd(editorState) {\n var afterSelectionMove = EditorState.moveSelectionToEnd(editorState);\n return EditorState.forceSelection(afterSelectionMove, afterSelectionMove.getSelection());\n }\n /**\n * Push the current ContentState onto the undo stack if it should be\n * considered a boundary state, and set the provided ContentState as the\n * new current content.\n */\n ;\n\n EditorState.push = function push(editorState, contentState, changeType) {\n var forceSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n if (editorState.getCurrentContent() === contentState) {\n return editorState;\n }\n\n var directionMap = EditorBidiService.getDirectionMap(contentState, editorState.getDirectionMap());\n\n if (!editorState.getAllowUndo()) {\n return EditorState.set(editorState, {\n currentContent: contentState,\n directionMap: directionMap,\n lastChangeType: changeType,\n selection: contentState.getSelectionAfter(),\n forceSelection: forceSelection,\n inlineStyleOverride: null\n });\n }\n\n var selection = editorState.getSelection();\n var currentContent = editorState.getCurrentContent();\n var undoStack = editorState.getUndoStack();\n var newContent = contentState;\n\n if (selection !== currentContent.getSelectionAfter() || mustBecomeBoundary(editorState, changeType)) {\n undoStack = undoStack.push(currentContent);\n newContent = newContent.set('selectionBefore', selection);\n } else if (changeType === 'insert-characters' || changeType === 'backspace-character' || changeType === 'delete-character') {\n // Preserve the previous selection.\n newContent = newContent.set('selectionBefore', currentContent.getSelectionBefore());\n }\n\n var inlineStyleOverride = editorState.getInlineStyleOverride(); // Don't discard inline style overrides for the following change types:\n\n var overrideChangeTypes = ['adjust-depth', 'change-block-type', 'split-block'];\n\n if (overrideChangeTypes.indexOf(changeType) === -1) {\n inlineStyleOverride = null;\n }\n\n var editorStateChanges = {\n currentContent: newContent,\n directionMap: directionMap,\n undoStack: undoStack,\n redoStack: Stack(),\n lastChangeType: changeType,\n selection: contentState.getSelectionAfter(),\n forceSelection: forceSelection,\n inlineStyleOverride: inlineStyleOverride\n };\n return EditorState.set(editorState, editorStateChanges);\n }\n /**\n * Make the top ContentState in the undo stack the new current content and\n * push the current content onto the redo stack.\n */\n ;\n\n EditorState.undo = function undo(editorState) {\n if (!editorState.getAllowUndo()) {\n return editorState;\n }\n\n var undoStack = editorState.getUndoStack();\n var newCurrentContent = undoStack.peek();\n\n if (!newCurrentContent) {\n return editorState;\n }\n\n var currentContent = editorState.getCurrentContent();\n var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap());\n return EditorState.set(editorState, {\n currentContent: newCurrentContent,\n directionMap: directionMap,\n undoStack: undoStack.shift(),\n redoStack: editorState.getRedoStack().push(currentContent),\n forceSelection: true,\n inlineStyleOverride: null,\n lastChangeType: 'undo',\n nativelyRenderedContent: null,\n selection: currentContent.getSelectionBefore()\n });\n }\n /**\n * Make the top ContentState in the redo stack the new current content and\n * push the current content onto the undo stack.\n */\n ;\n\n EditorState.redo = function redo(editorState) {\n if (!editorState.getAllowUndo()) {\n return editorState;\n }\n\n var redoStack = editorState.getRedoStack();\n var newCurrentContent = redoStack.peek();\n\n if (!newCurrentContent) {\n return editorState;\n }\n\n var currentContent = editorState.getCurrentContent();\n var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap());\n return EditorState.set(editorState, {\n currentContent: newCurrentContent,\n directionMap: directionMap,\n undoStack: editorState.getUndoStack().push(currentContent),\n redoStack: redoStack.shift(),\n forceSelection: true,\n inlineStyleOverride: null,\n lastChangeType: 'redo',\n nativelyRenderedContent: null,\n selection: newCurrentContent.getSelectionAfter()\n });\n }\n /**\n * Not for public consumption.\n */\n ;\n\n function EditorState(immutable) {\n _defineProperty(this, \"_immutable\", void 0);\n\n this._immutable = immutable;\n }\n /**\n * Not for public consumption.\n */\n\n\n _proto.getImmutable = function getImmutable() {\n return this._immutable;\n };\n\n return EditorState;\n}();\n/**\n * Set the supplied SelectionState as the new current selection, and set\n * the `force` flag to trigger manual selection placement by the view.\n */\n\n\nfunction updateSelection(editorState, selection, forceSelection) {\n return EditorState.set(editorState, {\n selection: selection,\n forceSelection: forceSelection,\n nativelyRenderedContent: null,\n inlineStyleOverride: null\n });\n}\n/**\n * Regenerate the entire tree map for a given ContentState and decorator.\n * Returns an OrderedMap that maps all available ContentBlock objects.\n */\n\n\nfunction generateNewTreeMap(contentState, decorator) {\n return contentState.getBlockMap().map(function (block) {\n return BlockTree.generate(contentState, block, decorator);\n }).toOrderedMap();\n}\n/**\n * Regenerate tree map objects for all ContentBlocks that have changed\n * between the current editorState and newContent. Returns an OrderedMap\n * with only changed regenerated tree map objects.\n */\n\n\nfunction regenerateTreeForNewBlocks(editorState, newBlockMap, newEntityMap, decorator) {\n var contentState = editorState.getCurrentContent().set('entityMap', newEntityMap);\n var prevBlockMap = contentState.getBlockMap();\n var prevTreeMap = editorState.getImmutable().get('treeMap');\n return prevTreeMap.merge(newBlockMap.toSeq().filter(function (block, key) {\n return block !== prevBlockMap.get(key);\n }).map(function (block) {\n return BlockTree.generate(contentState, block, decorator);\n }));\n}\n/**\n * Generate tree map objects for a new decorator object, preserving any\n * decorations that are unchanged from the previous decorator.\n *\n * Note that in order for this to perform optimally, decoration Lists for\n * decorators should be preserved when possible to allow for direct immutable\n * List comparison.\n */\n\n\nfunction regenerateTreeForNewDecorator(content, blockMap, previousTreeMap, decorator, existingDecorator) {\n return previousTreeMap.merge(blockMap.toSeq().filter(function (block) {\n return decorator.getDecorations(block, content) !== existingDecorator.getDecorations(block, content);\n }).map(function (block) {\n return BlockTree.generate(content, block, decorator);\n }));\n}\n/**\n * Return whether a change should be considered a boundary state, given\n * the previous change type. Allows us to discard potential boundary states\n * during standard typing or deletion behavior.\n */\n\n\nfunction mustBecomeBoundary(editorState, changeType) {\n var lastChangeType = editorState.getLastChangeType();\n return changeType !== lastChangeType || changeType !== 'insert-characters' && changeType !== 'backspace-character' && changeType !== 'delete-character';\n}\n\nfunction getInlineStyleForCollapsedSelection(content, selection) {\n var startKey = selection.getStartKey();\n var startOffset = selection.getStartOffset();\n var startBlock = content.getBlockForKey(startKey); // If the cursor is not at the start of the block, look backward to\n // preserve the style of the preceding character.\n\n if (startOffset > 0) {\n return startBlock.getInlineStyleAt(startOffset - 1);\n } // The caret is at position zero in this block. If the block has any\n // text at all, use the style of the first character.\n\n\n if (startBlock.getLength()) {\n return startBlock.getInlineStyleAt(0);\n } // Otherwise, look upward in the document to find the closest character.\n\n\n return lookUpwardForInlineStyle(content, startKey);\n}\n\nfunction getInlineStyleForNonCollapsedSelection(content, selection) {\n var startKey = selection.getStartKey();\n var startOffset = selection.getStartOffset();\n var startBlock = content.getBlockForKey(startKey); // If there is a character just inside the selection, use its style.\n\n if (startOffset < startBlock.getLength()) {\n return startBlock.getInlineStyleAt(startOffset);\n } // Check if the selection at the end of a non-empty block. Use the last\n // style in the block.\n\n\n if (startOffset > 0) {\n return startBlock.getInlineStyleAt(startOffset - 1);\n } // Otherwise, look upward in the document to find the closest character.\n\n\n return lookUpwardForInlineStyle(content, startKey);\n}\n\nfunction lookUpwardForInlineStyle(content, fromKey) {\n var lastNonEmpty = content.getBlockMap().reverse().skipUntil(function (_, k) {\n return k === fromKey;\n }).skip(1).skipUntil(function (block, _) {\n return block.getLength();\n }).first();\n\n if (lastNonEmpty) {\n return lastNonEmpty.getInlineStyleAt(lastNonEmpty.getLength() - 1);\n }\n\n return OrderedSet();\n}\n\nmodule.exports = EditorState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar isSoftNewlineEvent = require(\"./isSoftNewlineEvent\");\n\nvar isOSX = UserAgent.isPlatform('Mac OS X');\nvar KeyBindingUtil = {\n /**\n * Check whether the ctrlKey modifier is *not* being used in conjunction with\n * the altKey modifier. If they are combined, the result is an `altGraph`\n * key modifier, which should not be handled by this set of key bindings.\n */\n isCtrlKeyCommand: function isCtrlKeyCommand(e) {\n return !!e.ctrlKey && !e.altKey;\n },\n isOptionKeyCommand: function isOptionKeyCommand(e) {\n return isOSX && e.altKey;\n },\n usesMacOSHeuristics: function usesMacOSHeuristics() {\n return isOSX;\n },\n hasCommandModifier: function hasCommandModifier(e) {\n return isOSX ? !!e.metaKey && !e.altKey : KeyBindingUtil.isCtrlKeyCommand(e);\n },\n isSoftNewlineEvent: isSoftNewlineEvent\n};\nmodule.exports = KeyBindingUtil;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar adjustBlockDepthForContentState = require(\"./adjustBlockDepthForContentState\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar RichTextEditorUtil = {\n currentBlockContainsLink: function currentBlockContainsLink(editorState) {\n var selection = editorState.getSelection();\n var contentState = editorState.getCurrentContent();\n var entityMap = contentState.getEntityMap();\n return contentState.getBlockForKey(selection.getAnchorKey()).getCharacterList().slice(selection.getStartOffset(), selection.getEndOffset()).some(function (v) {\n var entity = v.getEntity();\n return !!entity && entityMap.__get(entity).getType() === 'LINK';\n });\n },\n getCurrentBlockType: function getCurrentBlockType(editorState) {\n var selection = editorState.getSelection();\n return editorState.getCurrentContent().getBlockForKey(selection.getStartKey()).getType();\n },\n getDataObjectForLinkURL: function getDataObjectForLinkURL(uri) {\n return {\n url: uri.toString()\n };\n },\n handleKeyCommand: function handleKeyCommand(editorState, command, eventTimeStamp) {\n switch (command) {\n case 'bold':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'BOLD');\n\n case 'italic':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'ITALIC');\n\n case 'underline':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'UNDERLINE');\n\n case 'code':\n return RichTextEditorUtil.toggleCode(editorState);\n\n case 'backspace':\n case 'backspace-word':\n case 'backspace-to-start-of-line':\n return RichTextEditorUtil.onBackspace(editorState);\n\n case 'delete':\n case 'delete-word':\n case 'delete-to-end-of-block':\n return RichTextEditorUtil.onDelete(editorState);\n\n default:\n // they may have custom editor commands; ignore those\n return null;\n }\n },\n insertSoftNewline: function insertSoftNewline(editorState) {\n var contentState = DraftModifier.insertText(editorState.getCurrentContent(), editorState.getSelection(), '\\n', editorState.getCurrentInlineStyle(), null);\n var newEditorState = EditorState.push(editorState, contentState, 'insert-characters');\n return EditorState.forceSelection(newEditorState, contentState.getSelectionAfter());\n },\n\n /**\n * For collapsed selections at the start of styled blocks, backspace should\n * just remove the existing style.\n */\n onBackspace: function onBackspace(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed() || selection.getAnchorOffset() || selection.getFocusOffset()) {\n return null;\n } // First, try to remove a preceding atomic block.\n\n\n var content = editorState.getCurrentContent();\n var startKey = selection.getStartKey();\n var blockBefore = content.getBlockBefore(startKey);\n\n if (blockBefore && blockBefore.getType() === 'atomic') {\n var blockMap = content.getBlockMap()[\"delete\"](blockBefore.getKey());\n var withoutAtomicBlock = content.merge({\n blockMap: blockMap,\n selectionAfter: selection\n });\n\n if (withoutAtomicBlock !== content) {\n return EditorState.push(editorState, withoutAtomicBlock, 'remove-range');\n }\n } // If that doesn't succeed, try to remove the current block style.\n\n\n var withoutBlockStyle = RichTextEditorUtil.tryToRemoveBlockStyle(editorState);\n\n if (withoutBlockStyle) {\n return EditorState.push(editorState, withoutBlockStyle, 'change-block-type');\n }\n\n return null;\n },\n onDelete: function onDelete(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed()) {\n return null;\n }\n\n var content = editorState.getCurrentContent();\n var startKey = selection.getStartKey();\n var block = content.getBlockForKey(startKey);\n var length = block.getLength(); // The cursor is somewhere within the text. Behave normally.\n\n if (selection.getStartOffset() < length) {\n return null;\n }\n\n var blockAfter = content.getBlockAfter(startKey);\n\n if (!blockAfter || blockAfter.getType() !== 'atomic') {\n return null;\n }\n\n var atomicBlockTarget = selection.merge({\n focusKey: blockAfter.getKey(),\n focusOffset: blockAfter.getLength()\n });\n var withoutAtomicBlock = DraftModifier.removeRange(content, atomicBlockTarget, 'forward');\n\n if (withoutAtomicBlock !== content) {\n return EditorState.push(editorState, withoutAtomicBlock, 'remove-range');\n }\n\n return null;\n },\n onTab: function onTab(event, editorState, maxDepth) {\n var selection = editorState.getSelection();\n var key = selection.getAnchorKey();\n\n if (key !== selection.getFocusKey()) {\n return editorState;\n }\n\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(key);\n var type = block.getType();\n\n if (type !== 'unordered-list-item' && type !== 'ordered-list-item') {\n return editorState;\n }\n\n event.preventDefault();\n var depth = block.getDepth();\n\n if (!event.shiftKey && depth === maxDepth) {\n return editorState;\n }\n\n var withAdjustment = adjustBlockDepthForContentState(content, selection, event.shiftKey ? -1 : 1, maxDepth);\n return EditorState.push(editorState, withAdjustment, 'adjust-depth');\n },\n toggleBlockType: function toggleBlockType(editorState, blockType) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n var endKey = selection.getEndKey();\n var content = editorState.getCurrentContent();\n var target = selection; // Triple-click can lead to a selection that includes offset 0 of the\n // following block. The `SelectionState` for this case is accurate, but\n // we should avoid toggling block type for the trailing block because it\n // is a confusing interaction.\n\n if (startKey !== endKey && selection.getEndOffset() === 0) {\n var blockBefore = nullthrows(content.getBlockBefore(endKey));\n endKey = blockBefore.getKey();\n target = target.merge({\n anchorKey: startKey,\n anchorOffset: selection.getStartOffset(),\n focusKey: endKey,\n focusOffset: blockBefore.getLength(),\n isBackward: false\n });\n }\n\n var hasAtomicBlock = content.getBlockMap().skipWhile(function (_, k) {\n return k !== startKey;\n }).reverse().skipWhile(function (_, k) {\n return k !== endKey;\n }).some(function (v) {\n return v.getType() === 'atomic';\n });\n\n if (hasAtomicBlock) {\n return editorState;\n }\n\n var typeToSet = content.getBlockForKey(startKey).getType() === blockType ? 'unstyled' : blockType;\n return EditorState.push(editorState, DraftModifier.setBlockType(content, target, typeToSet), 'change-block-type');\n },\n toggleCode: function toggleCode(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var focusKey = selection.getFocusKey();\n\n if (selection.isCollapsed() || anchorKey !== focusKey) {\n return RichTextEditorUtil.toggleBlockType(editorState, 'code-block');\n }\n\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'CODE');\n },\n\n /**\n * Toggle the specified inline style for the selection. If the\n * user's selection is collapsed, apply or remove the style for the\n * internal state. If it is not collapsed, apply the change directly\n * to the document state.\n */\n toggleInlineStyle: function toggleInlineStyle(editorState, inlineStyle) {\n var selection = editorState.getSelection();\n var currentStyle = editorState.getCurrentInlineStyle(); // If the selection is collapsed, toggle the specified style on or off and\n // set the result as the new inline style override. This will then be\n // used as the inline style for the next character to be inserted.\n\n if (selection.isCollapsed()) {\n return EditorState.setInlineStyleOverride(editorState, currentStyle.has(inlineStyle) ? currentStyle.remove(inlineStyle) : currentStyle.add(inlineStyle));\n } // If characters are selected, immediately apply or remove the\n // inline style on the document state itself.\n\n\n var content = editorState.getCurrentContent();\n var newContent; // If the style is already present for the selection range, remove it.\n // Otherwise, apply it.\n\n if (currentStyle.has(inlineStyle)) {\n newContent = DraftModifier.removeInlineStyle(content, selection, inlineStyle);\n } else {\n newContent = DraftModifier.applyInlineStyle(content, selection, inlineStyle);\n }\n\n return EditorState.push(editorState, newContent, 'change-inline-style');\n },\n toggleLink: function toggleLink(editorState, targetSelection, entityKey) {\n var withoutLink = DraftModifier.applyEntity(editorState.getCurrentContent(), targetSelection, entityKey);\n return EditorState.push(editorState, withoutLink, 'apply-entity');\n },\n\n /**\n * When a collapsed cursor is at the start of a styled block, changes block\n * type to 'unstyled'. Returns null if selection does not meet that criteria.\n */\n tryToRemoveBlockStyle: function tryToRemoveBlockStyle(editorState) {\n var selection = editorState.getSelection();\n var offset = selection.getAnchorOffset();\n\n if (selection.isCollapsed() && offset === 0) {\n var key = selection.getAnchorKey();\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(key);\n var type = block.getType();\n var blockBefore = content.getBlockBefore(key);\n\n if (type === 'code-block' && blockBefore && blockBefore.getType() === 'code-block' && blockBefore.getLength() !== 0) {\n return null;\n }\n\n if (type !== 'unstyled') {\n return DraftModifier.setBlockType(content, selection, 'unstyled');\n }\n }\n\n return null;\n }\n};\nmodule.exports = RichTextEditorUtil;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar clipboard = null;\n/**\n * Some systems offer a \"secondary\" clipboard to allow quick internal cut\n * and paste behavior. For instance, Ctrl+K (cut) and Ctrl+Y (paste).\n */\n\nvar SecondaryClipboard = {\n cut: function cut(editorState) {\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var targetRange = null;\n\n if (selection.isCollapsed()) {\n var anchorKey = selection.getAnchorKey();\n var blockEnd = content.getBlockForKey(anchorKey).getLength();\n\n if (blockEnd === selection.getAnchorOffset()) {\n var keyAfter = content.getKeyAfter(anchorKey);\n\n if (keyAfter == null) {\n return editorState;\n }\n\n targetRange = selection.set('focusKey', keyAfter).set('focusOffset', 0);\n } else {\n targetRange = selection.set('focusOffset', blockEnd);\n }\n } else {\n targetRange = selection;\n }\n\n targetRange = nullthrows(targetRange); // TODO: This should actually append to the current state when doing\n // successive ^K commands without any other cursor movement\n\n clipboard = getContentStateFragment(content, targetRange);\n var afterRemoval = DraftModifier.removeRange(content, targetRange, 'forward');\n\n if (afterRemoval === content) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n },\n paste: function paste(editorState) {\n if (!clipboard) {\n return editorState;\n }\n\n var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), clipboard);\n return EditorState.push(editorState, newContent, 'insert-fragment');\n }\n};\nmodule.exports = SecondaryClipboard;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Immutable = require(\"immutable\");\n\nvar Record = Immutable.Record;\nvar defaultRecord = {\n anchorKey: '',\n anchorOffset: 0,\n focusKey: '',\n focusOffset: 0,\n isBackward: false,\n hasFocus: false\n};\n/* $FlowFixMe[unclear-type] This comment suppresses an error found when\n * automatically adding a type annotation with the codemod Komodo/Annotate_\n * exports. To see the error delete this comment and run Flow. */\n\nvar SelectionStateRecord = Record(defaultRecord);\n\nvar SelectionState = /*#__PURE__*/function (_SelectionStateRecord) {\n _inheritsLoose(SelectionState, _SelectionStateRecord);\n\n function SelectionState() {\n return _SelectionStateRecord.apply(this, arguments) || this;\n }\n\n var _proto = SelectionState.prototype;\n\n _proto.serialize = function serialize() {\n return 'Anchor: ' + this.getAnchorKey() + ':' + this.getAnchorOffset() + ', ' + 'Focus: ' + this.getFocusKey() + ':' + this.getFocusOffset() + ', ' + 'Is Backward: ' + String(this.getIsBackward()) + ', ' + 'Has Focus: ' + String(this.getHasFocus());\n };\n\n _proto.getAnchorKey = function getAnchorKey() {\n return this.get('anchorKey');\n };\n\n _proto.getAnchorOffset = function getAnchorOffset() {\n return this.get('anchorOffset');\n };\n\n _proto.getFocusKey = function getFocusKey() {\n return this.get('focusKey');\n };\n\n _proto.getFocusOffset = function getFocusOffset() {\n return this.get('focusOffset');\n };\n\n _proto.getIsBackward = function getIsBackward() {\n return this.get('isBackward');\n };\n\n _proto.getHasFocus = function getHasFocus() {\n return this.get('hasFocus');\n }\n /**\n * Return whether the specified range overlaps with an edge of the\n * SelectionState.\n */\n ;\n\n _proto.hasEdgeWithin = function hasEdgeWithin(blockKey, start, end) {\n var anchorKey = this.getAnchorKey();\n var focusKey = this.getFocusKey();\n\n if (anchorKey === focusKey && anchorKey === blockKey) {\n var selectionStart = this.getStartOffset();\n var selectionEnd = this.getEndOffset();\n return start <= selectionStart && selectionStart <= end || // selectionStart is between start and end, or\n start <= selectionEnd && selectionEnd <= end // selectionEnd is between start and end\n ;\n }\n\n if (blockKey !== anchorKey && blockKey !== focusKey) {\n return false;\n }\n\n var offsetToCheck = blockKey === anchorKey ? this.getAnchorOffset() : this.getFocusOffset();\n return start <= offsetToCheck && end >= offsetToCheck;\n };\n\n _proto.isCollapsed = function isCollapsed() {\n return this.getAnchorKey() === this.getFocusKey() && this.getAnchorOffset() === this.getFocusOffset();\n };\n\n _proto.getStartKey = function getStartKey() {\n return this.getIsBackward() ? this.getFocusKey() : this.getAnchorKey();\n };\n\n _proto.getStartOffset = function getStartOffset() {\n return this.getIsBackward() ? this.getFocusOffset() : this.getAnchorOffset();\n };\n\n _proto.getEndKey = function getEndKey() {\n return this.getIsBackward() ? this.getAnchorKey() : this.getFocusKey();\n };\n\n _proto.getEndOffset = function getEndOffset() {\n return this.getIsBackward() ? this.getAnchorOffset() : this.getFocusOffset();\n };\n\n SelectionState.createEmpty = function createEmpty(key) {\n return new SelectionState({\n anchorKey: key,\n anchorOffset: 0,\n focusKey: key,\n focusOffset: 0,\n isBackward: false,\n hasFocus: false\n });\n };\n\n return SelectionState;\n}(SelectionStateRecord);\n\nmodule.exports = SelectionState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction adjustBlockDepthForContentState(contentState, selectionState, adjustment, maxDepth) {\n var startKey = selectionState.getStartKey();\n var endKey = selectionState.getEndKey();\n var blockMap = contentState.getBlockMap();\n var blocks = blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat([[endKey, blockMap.get(endKey)]]).map(function (block) {\n var depth = block.getDepth() + adjustment;\n depth = Math.max(0, Math.min(depth, maxDepth));\n return block.set('depth', depth);\n });\n blockMap = blockMap.merge(blocks);\n return contentState.merge({\n blockMap: blockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = adjustBlockDepthForContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nfunction applyEntityToContentBlock(contentBlock, startArg, end, entityKey) {\n var start = startArg;\n var characterList = contentBlock.getCharacterList();\n\n while (start < end) {\n characterList = characterList.set(start, CharacterMetadata.applyEntity(characterList.get(start), entityKey));\n start++;\n }\n\n return contentBlock.set('characterList', characterList);\n}\n\nmodule.exports = applyEntityToContentBlock;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar applyEntityToContentBlock = require(\"./applyEntityToContentBlock\");\n\nvar Immutable = require(\"immutable\");\n\nfunction applyEntityToContentState(contentState, selectionState, entityKey) {\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var newBlocks = blockMap.skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).toOrderedMap().merge(Immutable.OrderedMap([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) {\n var sliceStart = blockKey === startKey ? startOffset : 0;\n var sliceEnd = blockKey === endKey ? endOffset : block.getLength();\n return applyEntityToContentBlock(block, sliceStart, sliceEnd, entityKey);\n });\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = applyEntityToContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DraftStringKey = require(\"./DraftStringKey\");\n\nvar encodeEntityRanges = require(\"./encodeEntityRanges\");\n\nvar encodeInlineStyleRanges = require(\"./encodeInlineStyleRanges\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar createRawBlock = function createRawBlock(block, entityStorageMap) {\n return {\n key: block.getKey(),\n text: block.getText(),\n type: block.getType(),\n depth: block.getDepth(),\n inlineStyleRanges: encodeInlineStyleRanges(block),\n entityRanges: encodeEntityRanges(block, entityStorageMap),\n data: block.getData().toObject()\n };\n};\n\nvar insertRawBlock = function insertRawBlock(block, entityMap, rawBlocks, blockCacheRef) {\n if (block instanceof ContentBlock) {\n rawBlocks.push(createRawBlock(block, entityMap));\n return;\n }\n\n !(block instanceof ContentBlockNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'block is not a BlockNode') : invariant(false) : void 0;\n var parentKey = block.getParentKey();\n\n var rawBlock = blockCacheRef[block.getKey()] = _objectSpread({}, createRawBlock(block, entityMap), {\n children: []\n });\n\n if (parentKey) {\n blockCacheRef[parentKey].children.push(rawBlock);\n return;\n }\n\n rawBlocks.push(rawBlock);\n};\n\nvar encodeRawBlocks = function encodeRawBlocks(contentState, rawState) {\n var entityMap = rawState.entityMap;\n var rawBlocks = [];\n var blockCacheRef = {};\n var entityCacheRef = {};\n var entityStorageKey = 0;\n contentState.getBlockMap().forEach(function (block) {\n block.findEntityRanges(function (character) {\n return character.getEntity() !== null;\n }, function (start) {\n var entityKey = block.getEntityAt(start); // Stringify to maintain order of otherwise numeric keys.\n\n var stringifiedEntityKey = DraftStringKey.stringify(entityKey); // This makes this function resilient to two entities\n // erroneously having the same key\n\n if (entityCacheRef[stringifiedEntityKey]) {\n return;\n }\n\n entityCacheRef[stringifiedEntityKey] = entityKey; // we need the `any` casting here since this is a temporary state\n // where we will later on flip the entity map and populate it with\n // real entity, at this stage we just need to map back the entity\n // key used by the BlockNode\n\n entityMap[stringifiedEntityKey] = \"\".concat(entityStorageKey);\n entityStorageKey++;\n });\n insertRawBlock(block, entityMap, rawBlocks, blockCacheRef);\n });\n return {\n blocks: rawBlocks,\n entityMap: entityMap\n };\n}; // Flip storage map so that our storage keys map to global\n// DraftEntity keys.\n\n\nvar encodeRawEntityMap = function encodeRawEntityMap(contentState, rawState) {\n var blocks = rawState.blocks,\n entityMap = rawState.entityMap;\n var rawEntityMap = {};\n Object.keys(entityMap).forEach(function (key, index) {\n var entity = contentState.getEntity(DraftStringKey.unstringify(key));\n rawEntityMap[index] = {\n type: entity.getType(),\n mutability: entity.getMutability(),\n data: entity.getData()\n };\n });\n return {\n blocks: blocks,\n entityMap: rawEntityMap\n };\n};\n\nvar convertFromDraftStateToRaw = function convertFromDraftStateToRaw(contentState) {\n var rawDraftContentState = {\n entityMap: {},\n blocks: []\n }; // add blocks\n\n rawDraftContentState = encodeRawBlocks(contentState, rawDraftContentState); // add entities\n\n rawDraftContentState = encodeRawEntityMap(contentState, rawDraftContentState);\n return rawDraftContentState;\n};\n\nmodule.exports = convertFromDraftStateToRaw;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _knownListItemDepthCl;\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DefaultDraftBlockRenderMap = require(\"./DefaultDraftBlockRenderMap\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar URI = require(\"fbjs/lib/URI\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getSafeBodyFromHTML = require(\"./getSafeBodyFromHTML\");\n\nvar gkx = require(\"./gkx\");\n\nvar _require = require(\"immutable\"),\n List = _require.List,\n Map = _require.Map,\n OrderedSet = _require.OrderedSet;\n\nvar isHTMLAnchorElement = require(\"./isHTMLAnchorElement\");\n\nvar isHTMLBRElement = require(\"./isHTMLBRElement\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar isHTMLImageElement = require(\"./isHTMLImageElement\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar NBSP = ' ';\nvar SPACE = ' '; // used for replacing characters in HTML\n\nvar REGEX_CR = new RegExp('\\r', 'g');\nvar REGEX_LF = new RegExp('\\n', 'g');\nvar REGEX_LEADING_LF = new RegExp('^\\n', 'g');\nvar REGEX_NBSP = new RegExp(NBSP, 'g');\nvar REGEX_CARRIAGE = new RegExp(' ?', 'g');\nvar REGEX_ZWS = new RegExp('​?', 'g'); // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n\nvar boldValues = ['bold', 'bolder', '500', '600', '700', '800', '900'];\nvar notBoldValues = ['light', 'lighter', 'normal', '100', '200', '300', '400'];\nvar anchorAttr = ['className', 'href', 'rel', 'target', 'title'];\nvar imgAttr = ['alt', 'className', 'height', 'src', 'width'];\nvar knownListItemDepthClasses = (_knownListItemDepthCl = {}, _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth0'), 0), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth1'), 1), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth2'), 2), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth3'), 3), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth4'), 4), _knownListItemDepthCl);\nvar HTMLTagToRawInlineStyleMap = Map({\n b: 'BOLD',\n code: 'CODE',\n del: 'STRIKETHROUGH',\n em: 'ITALIC',\n i: 'ITALIC',\n s: 'STRIKETHROUGH',\n strike: 'STRIKETHROUGH',\n strong: 'BOLD',\n u: 'UNDERLINE',\n mark: 'HIGHLIGHT'\n});\n\n/**\n * Build a mapping from HTML tags to draftjs block types\n * out of a BlockRenderMap.\n *\n * The BlockTypeMap for the default BlockRenderMap looks like this:\n * Map({\n * h1: 'header-one',\n * h2: 'header-two',\n * h3: 'header-three',\n * h4: 'header-four',\n * h5: 'header-five',\n * h6: 'header-six',\n * blockquote: 'blockquote',\n * figure: 'atomic',\n * pre: ['code-block'],\n * div: 'unstyled',\n * p: 'unstyled',\n * li: ['ordered-list-item', 'unordered-list-item'],\n * })\n */\nvar buildBlockTypeMap = function buildBlockTypeMap(blockRenderMap) {\n var blockTypeMap = {};\n blockRenderMap.mapKeys(function (blockType, desc) {\n var elements = [desc.element];\n\n if (desc.aliasedElements !== undefined) {\n elements.push.apply(elements, desc.aliasedElements);\n }\n\n elements.forEach(function (element) {\n if (blockTypeMap[element] === undefined) {\n blockTypeMap[element] = blockType;\n } else if (typeof blockTypeMap[element] === 'string') {\n blockTypeMap[element] = [blockTypeMap[element], blockType];\n } else {\n blockTypeMap[element].push(blockType);\n }\n });\n });\n return Map(blockTypeMap);\n};\n\nvar detectInlineStyle = function detectInlineStyle(node) {\n if (isHTMLElement(node)) {\n var element = node; // Currently only used to detect preformatted inline code\n\n if (element.style.fontFamily.includes('monospace')) {\n return 'CODE';\n }\n }\n\n return null;\n};\n/**\n * If we're pasting from one DraftEditor to another we can check to see if\n * existing list item depth classes are being used and preserve this style\n */\n\n\nvar getListItemDepth = function getListItemDepth(node) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n Object.keys(knownListItemDepthClasses).some(function (depthClass) {\n if (node.classList.contains(depthClass)) {\n depth = knownListItemDepthClasses[depthClass];\n }\n });\n return depth;\n};\n/**\n * Return true if the provided HTML Element can be used to build a\n * Draftjs-compatible link.\n */\n\n\nvar isValidAnchor = function isValidAnchor(node) {\n if (!isHTMLAnchorElement(node)) {\n return false;\n }\n\n var anchorNode = node;\n\n if (!anchorNode.href || anchorNode.protocol !== 'http:' && anchorNode.protocol !== 'https:' && anchorNode.protocol !== 'mailto:' && anchorNode.protocol !== 'tel:') {\n return false;\n }\n\n try {\n // Just checking whether we can actually create a URI\n var _ = new URI(anchorNode.href);\n\n return true; // We need our catch statements to have arguments, else\n // UglifyJS (which we use for our OSS builds) will crash.\n // eslint-disable-next-line fb-www/no-unused-catch-bindings\n } catch (_) {\n return false;\n }\n};\n/**\n * Return true if the provided HTML Element can be used to build a\n * Draftjs-compatible image.\n */\n\n\nvar isValidImage = function isValidImage(node) {\n if (!isHTMLImageElement(node)) {\n return false;\n }\n\n var imageNode = node;\n return !!(imageNode.attributes.getNamedItem('src') && imageNode.attributes.getNamedItem('src').value);\n};\n/**\n * Try to guess the inline style of an HTML element based on its css\n * styles (font-weight, font-style and text-decoration).\n */\n\n\nvar styleFromNodeAttributes = function styleFromNodeAttributes(node, style) {\n if (!isHTMLElement(node)) {\n return style;\n }\n\n var htmlElement = node;\n var fontWeight = htmlElement.style.fontWeight;\n var fontStyle = htmlElement.style.fontStyle;\n var textDecoration = htmlElement.style.textDecoration;\n return style.withMutations(function (style) {\n if (boldValues.indexOf(fontWeight) >= 0) {\n style.add('BOLD');\n } else if (notBoldValues.indexOf(fontWeight) >= 0) {\n style.remove('BOLD');\n }\n\n if (fontStyle === 'italic') {\n style.add('ITALIC');\n } else if (fontStyle === 'normal') {\n style.remove('ITALIC');\n }\n\n if (textDecoration === 'underline') {\n style.add('UNDERLINE');\n }\n\n if (textDecoration === 'line-through') {\n style.add('STRIKETHROUGH');\n }\n\n if (textDecoration === 'none') {\n style.remove('UNDERLINE');\n style.remove('STRIKETHROUGH');\n }\n });\n};\n/**\n * Determine if a nodeName is a list type, 'ul' or 'ol'\n */\n\n\nvar isListNode = function isListNode(nodeName) {\n return nodeName === 'ul' || nodeName === 'ol';\n};\n/**\n * ContentBlockConfig is a mutable data structure that holds all\n * the information required to build a ContentBlock and an array of\n * all the child nodes (childConfigs).\n * It is being used a temporary data structure by the\n * ContentBlocksBuilder class.\n */\n\n\n/**\n * ContentBlocksBuilder builds a list of ContentBlocks and an Entity Map\n * out of one (or several) HTMLElement(s).\n *\n * The algorithm has two passes: first it builds a tree of ContentBlockConfigs\n * by walking through the HTML nodes and their children, then it walks the\n * ContentBlockConfigs tree to compute parents/siblings and create\n * the actual ContentBlocks.\n *\n * Typical usage is:\n * new ContentBlocksBuilder()\n * .addDOMNode(someHTMLNode)\n * .addDOMNode(someOtherHTMLNode)\n * .getContentBlocks();\n *\n */\nvar ContentBlocksBuilder = /*#__PURE__*/function () {\n // Most of the method in the class depend on the state of the content builder\n // (i.e. currentBlockType, currentDepth, currentEntity etc.). Though it may\n // be confusing at first, it made the code simpler than the alternative which\n // is to pass those values around in every call.\n // The following attributes are used to accumulate text and styles\n // as we are walking the HTML node tree.\n // Describes the future ContentState as a tree of content blocks\n // The content blocks generated from the blockConfigs\n // Entity map use to store links and images found in the HTML nodes\n // Map HTML tags to draftjs block types and disambiguation function\n function ContentBlocksBuilder(blockTypeMap, disambiguate) {\n _defineProperty(this, \"characterList\", List());\n\n _defineProperty(this, \"currentBlockType\", 'unstyled');\n\n _defineProperty(this, \"currentDepth\", 0);\n\n _defineProperty(this, \"currentEntity\", null);\n\n _defineProperty(this, \"currentText\", '');\n\n _defineProperty(this, \"wrapper\", null);\n\n _defineProperty(this, \"blockConfigs\", []);\n\n _defineProperty(this, \"contentBlocks\", []);\n\n _defineProperty(this, \"entityMap\", DraftEntity);\n\n _defineProperty(this, \"blockTypeMap\", void 0);\n\n _defineProperty(this, \"disambiguate\", void 0);\n\n this.clear();\n this.blockTypeMap = blockTypeMap;\n this.disambiguate = disambiguate;\n }\n /**\n * Clear the internal state of the ContentBlocksBuilder\n */\n\n\n var _proto = ContentBlocksBuilder.prototype;\n\n _proto.clear = function clear() {\n this.characterList = List();\n this.blockConfigs = [];\n this.currentBlockType = 'unstyled';\n this.currentDepth = 0;\n this.currentEntity = null;\n this.currentText = '';\n this.entityMap = DraftEntity;\n this.wrapper = null;\n this.contentBlocks = [];\n }\n /**\n * Add an HTMLElement to the ContentBlocksBuilder\n */\n ;\n\n _proto.addDOMNode = function addDOMNode(node) {\n var _this$blockConfigs;\n\n this.contentBlocks = [];\n this.currentDepth = 0; // Converts the HTML node to block config\n\n (_this$blockConfigs = this.blockConfigs).push.apply(_this$blockConfigs, this._toBlockConfigs([node], OrderedSet())); // There might be some left over text in the builder's\n // internal state, if so make a ContentBlock out of it.\n\n\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n this.blockConfigs.push(this._makeBlockConfig());\n } // for chaining\n\n\n return this;\n }\n /**\n * Return the ContentBlocks and the EntityMap that corresponds\n * to the previously added HTML nodes.\n */\n ;\n\n _proto.getContentBlocks = function getContentBlocks() {\n if (this.contentBlocks.length === 0) {\n if (experimentalTreeDataSupport) {\n this._toContentBlocks(this.blockConfigs);\n } else {\n this._toFlatContentBlocks(this.blockConfigs);\n }\n }\n\n return {\n contentBlocks: this.contentBlocks,\n entityMap: this.entityMap\n };\n } // ***********************************WARNING******************************\n // The methods below this line are private - don't call them directly.\n\n /**\n * Generate a new ContentBlockConfig out of the current internal state\n * of the builder, then clears the internal state.\n */\n ;\n\n _proto._makeBlockConfig = function _makeBlockConfig() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var key = config.key || generateRandomKey();\n\n var block = _objectSpread({\n key: key,\n type: this.currentBlockType,\n text: this.currentText,\n characterList: this.characterList,\n depth: this.currentDepth,\n parent: null,\n children: List(),\n prevSibling: null,\n nextSibling: null,\n childConfigs: []\n }, config);\n\n this.characterList = List();\n this.currentBlockType = 'unstyled';\n this.currentText = '';\n return block;\n }\n /**\n * Converts an array of HTML elements to a multi-root tree of content\n * block configs. Some text content may be left in the builders internal\n * state to enable chaining sucessive calls.\n */\n ;\n\n _proto._toBlockConfigs = function _toBlockConfigs(nodes, style) {\n var blockConfigs = [];\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'body' || isListNode(nodeName)) {\n // body, ol and ul are 'block' type nodes so create a block config\n // with the text accumulated so far (if any)\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n blockConfigs.push(this._makeBlockConfig());\n } // body, ol and ul nodes are ignored, but their children are inlined in\n // the parent block config.\n\n\n var wasCurrentDepth = this.currentDepth;\n var wasWrapper = this.wrapper;\n\n if (isListNode(nodeName)) {\n this.wrapper = nodeName;\n\n if (isListNode(wasWrapper)) {\n this.currentDepth++;\n }\n }\n\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), style));\n this.currentDepth = wasCurrentDepth;\n this.wrapper = wasWrapper;\n continue;\n }\n\n var blockType = this.blockTypeMap.get(nodeName);\n\n if (blockType !== undefined) {\n // 'block' type node means we need to create a block config\n // with the text accumulated so far (if any)\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n blockConfigs.push(this._makeBlockConfig());\n }\n\n var _wasCurrentDepth = this.currentDepth;\n var _wasWrapper = this.wrapper;\n this.wrapper = nodeName === 'pre' ? 'pre' : this.wrapper;\n\n if (typeof blockType !== 'string') {\n blockType = this.disambiguate(nodeName, this.wrapper) || blockType[0] || 'unstyled';\n }\n\n if (!experimentalTreeDataSupport && isHTMLElement(node) && (blockType === 'unordered-list-item' || blockType === 'ordered-list-item')) {\n var htmlElement = node;\n this.currentDepth = getListItemDepth(htmlElement, this.currentDepth);\n }\n\n var key = generateRandomKey();\n\n var childConfigs = this._toBlockConfigs(Array.from(node.childNodes), style);\n\n this._trimCurrentText();\n\n blockConfigs.push(this._makeBlockConfig({\n key: key,\n childConfigs: childConfigs,\n type: blockType\n }));\n this.currentDepth = _wasCurrentDepth;\n this.wrapper = _wasWrapper;\n continue;\n }\n\n if (nodeName === '#text') {\n this._addTextNode(node, style);\n\n continue;\n }\n\n if (nodeName === 'br') {\n this._addBreakNode(node, style);\n\n continue;\n }\n\n if (isValidImage(node)) {\n this._addImgNode(node, style);\n\n continue;\n }\n\n if (isValidAnchor(node)) {\n this._addAnchorNode(node, blockConfigs, style);\n\n continue;\n }\n\n var newStyle = style;\n\n if (HTMLTagToRawInlineStyleMap.has(nodeName)) {\n newStyle = newStyle.add(HTMLTagToRawInlineStyleMap.get(nodeName));\n }\n\n newStyle = styleFromNodeAttributes(node, newStyle);\n var inlineStyle = detectInlineStyle(node);\n\n if (inlineStyle != null) {\n newStyle = newStyle.add(inlineStyle);\n }\n\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), newStyle));\n }\n\n return blockConfigs;\n }\n /**\n * Append a string of text to the internal buffer.\n */\n ;\n\n _proto._appendText = function _appendText(text, style) {\n var _this$characterList;\n\n this.currentText += text;\n var characterMetadata = CharacterMetadata.create({\n style: style,\n entity: this.currentEntity\n });\n this.characterList = (_this$characterList = this.characterList).push.apply(_this$characterList, Array(text.length).fill(characterMetadata));\n }\n /**\n * Trim the text in the internal buffer.\n */\n ;\n\n _proto._trimCurrentText = function _trimCurrentText() {\n var l = this.currentText.length;\n var begin = l - this.currentText.trimLeft().length;\n var end = this.currentText.trimRight().length; // We should not trim whitespaces for which an entity is defined.\n\n var entity = this.characterList.findEntry(function (characterMetadata) {\n return characterMetadata.getEntity() !== null;\n });\n begin = entity !== undefined ? Math.min(begin, entity[0]) : begin;\n entity = this.characterList.reverse().findEntry(function (characterMetadata) {\n return characterMetadata.getEntity() !== null;\n });\n end = entity !== undefined ? Math.max(end, l - entity[0]) : end;\n\n if (begin > end) {\n this.currentText = '';\n this.characterList = List();\n } else {\n this.currentText = this.currentText.slice(begin, end);\n this.characterList = this.characterList.slice(begin, end);\n }\n }\n /**\n * Add the content of an HTML text node to the internal state\n */\n ;\n\n _proto._addTextNode = function _addTextNode(node, style) {\n var text = node.textContent;\n var trimmedText = text.trim(); // If we are not in a pre block and the trimmed content is empty,\n // normalize to a single space.\n\n if (trimmedText === '' && this.wrapper !== 'pre') {\n text = ' ';\n }\n\n if (this.wrapper !== 'pre') {\n // Trim leading line feed, which is invisible in HTML\n text = text.replace(REGEX_LEADING_LF, ''); // Can't use empty string because MSWord\n\n text = text.replace(REGEX_LF, SPACE);\n }\n\n this._appendText(text, style);\n };\n\n _proto._addBreakNode = function _addBreakNode(node, style) {\n if (!isHTMLBRElement(node)) {\n return;\n }\n\n this._appendText('\\n', style);\n }\n /**\n * Add the content of an HTML img node to the internal state\n */\n ;\n\n _proto._addImgNode = function _addImgNode(node, style) {\n if (!isHTMLImageElement(node)) {\n return;\n }\n\n var image = node;\n var entityConfig = {};\n imgAttr.forEach(function (attr) {\n var imageAttribute = image.getAttribute(attr);\n\n if (imageAttribute) {\n entityConfig[attr] = imageAttribute;\n }\n }); // TODO: T15530363 update this when we remove DraftEntity entirely\n\n this.currentEntity = this.entityMap.__create('IMAGE', 'IMMUTABLE', entityConfig); // The child text node cannot just have a space or return as content (since\n // we strip those out), unless the image is for presentation only.\n // See https://github.com/facebook/draft-js/issues/231 for some context.\n\n if (gkx('draftjs_fix_paste_for_img')) {\n if (image.getAttribute('role') !== 'presentation') {\n this._appendText(\"\\uD83D\\uDCF7\", style);\n }\n } else {\n this._appendText(\"\\uD83D\\uDCF7\", style);\n }\n\n this.currentEntity = null;\n }\n /**\n * Add the content of an HTML 'a' node to the internal state. Child nodes\n * (if any) are converted to Block Configs and appended to the provided\n * blockConfig array.\n */\n ;\n\n _proto._addAnchorNode = function _addAnchorNode(node, blockConfigs, style) {\n // The check has already been made by isValidAnchor but\n // we have to do it again to keep flow happy.\n if (!isHTMLAnchorElement(node)) {\n return;\n }\n\n var anchor = node;\n var entityConfig = {};\n anchorAttr.forEach(function (attr) {\n var anchorAttribute = anchor.getAttribute(attr);\n\n if (anchorAttribute) {\n entityConfig[attr] = anchorAttribute;\n }\n });\n entityConfig.url = new URI(anchor.href).toString(); // TODO: T15530363 update this when we remove DraftEntity completely\n\n this.currentEntity = this.entityMap.__create('LINK', 'MUTABLE', entityConfig || {});\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), style));\n this.currentEntity = null;\n }\n /**\n * Walk the BlockConfig tree, compute parent/children/siblings,\n * and generate the corresponding ContentBlockNode\n */\n ;\n\n _proto._toContentBlocks = function _toContentBlocks(blockConfigs) {\n var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var l = blockConfigs.length - 1;\n\n for (var i = 0; i <= l; i++) {\n var config = blockConfigs[i];\n config.parent = parent;\n config.prevSibling = i > 0 ? blockConfigs[i - 1].key : null;\n config.nextSibling = i < l ? blockConfigs[i + 1].key : null;\n config.children = List(config.childConfigs.map(function (child) {\n return child.key;\n }));\n this.contentBlocks.push(new ContentBlockNode(_objectSpread({}, config)));\n\n this._toContentBlocks(config.childConfigs, config.key);\n }\n }\n /**\n * Remove 'useless' container nodes from the block config hierarchy, by\n * replacing them with their children.\n */\n ;\n\n _proto._hoistContainersInBlockConfigs = function _hoistContainersInBlockConfigs(blockConfigs) {\n var _this = this;\n\n var hoisted = List(blockConfigs).flatMap(function (blockConfig) {\n // Don't mess with useful blocks\n if (blockConfig.type !== 'unstyled' || blockConfig.text !== '') {\n return [blockConfig];\n }\n\n return _this._hoistContainersInBlockConfigs(blockConfig.childConfigs);\n });\n return hoisted;\n } // ***********************************************************************\n // The two methods below are used for backward compatibility when\n // experimentalTreeDataSupport is disabled.\n\n /**\n * Same as _toContentBlocks but replaces nested blocks by their\n * text content.\n */\n ;\n\n _proto._toFlatContentBlocks = function _toFlatContentBlocks(blockConfigs) {\n var _this2 = this;\n\n var cleanConfigs = this._hoistContainersInBlockConfigs(blockConfigs);\n\n cleanConfigs.forEach(function (config) {\n var _this2$_extractTextFr = _this2._extractTextFromBlockConfigs(config.childConfigs),\n text = _this2$_extractTextFr.text,\n characterList = _this2$_extractTextFr.characterList;\n\n _this2.contentBlocks.push(new ContentBlock(_objectSpread({}, config, {\n text: config.text + text,\n characterList: config.characterList.concat(characterList)\n })));\n });\n }\n /**\n * Extract the text and the associated inline styles form an\n * array of content block configs.\n */\n ;\n\n _proto._extractTextFromBlockConfigs = function _extractTextFromBlockConfigs(blockConfigs) {\n var l = blockConfigs.length - 1;\n var text = '';\n var characterList = List();\n\n for (var i = 0; i <= l; i++) {\n var config = blockConfigs[i];\n text += config.text;\n characterList = characterList.concat(config.characterList);\n\n if (text !== '' && config.type !== 'unstyled') {\n text += '\\n';\n characterList = characterList.push(characterList.last());\n }\n\n var children = this._extractTextFromBlockConfigs(config.childConfigs);\n\n text += children.text;\n characterList = characterList.concat(children.characterList);\n }\n\n return {\n text: text,\n characterList: characterList\n };\n };\n\n return ContentBlocksBuilder;\n}();\n/**\n * Converts an HTML string to an array of ContentBlocks and an EntityMap\n * suitable to initialize the internal state of a Draftjs component.\n */\n\n\nvar convertFromHTMLToContentBlocks = function convertFromHTMLToContentBlocks(html) {\n var DOMBuilder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getSafeBodyFromHTML;\n var blockRenderMap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DefaultDraftBlockRenderMap;\n // Be ABSOLUTELY SURE that the dom builder you pass here won't execute\n // arbitrary code in whatever environment you're running this in. For an\n // example of how we try to do this in-browser, see getSafeBodyFromHTML.\n // Remove funky characters from the HTML string\n html = html.trim().replace(REGEX_CR, '').replace(REGEX_NBSP, SPACE).replace(REGEX_CARRIAGE, '').replace(REGEX_ZWS, ''); // Build a DOM tree out of the HTML string\n\n var safeBody = DOMBuilder(html);\n\n if (!safeBody) {\n return null;\n } // Build a BlockTypeMap out of the BlockRenderMap\n\n\n var blockTypeMap = buildBlockTypeMap(blockRenderMap); // Select the proper block type for the cases where the blockRenderMap\n // uses multiple block types for the same html tag.\n\n var disambiguate = function disambiguate(tag, wrapper) {\n if (tag === 'li') {\n return wrapper === 'ol' ? 'ordered-list-item' : 'unordered-list-item';\n }\n\n return null;\n };\n\n return new ContentBlocksBuilder(blockTypeMap, disambiguate).addDOMNode(safeBody).getContentBlocks();\n};\n\nmodule.exports = convertFromHTMLToContentBlocks;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar ContentState = require(\"./ContentState\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar DraftTreeAdapter = require(\"./DraftTreeAdapter\");\n\nvar DraftTreeInvariants = require(\"./DraftTreeInvariants\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar createCharacterList = require(\"./createCharacterList\");\n\nvar decodeEntityRanges = require(\"./decodeEntityRanges\");\n\nvar decodeInlineStyleRanges = require(\"./decodeInlineStyleRanges\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedMap = Immutable.OrderedMap;\n\nvar decodeBlockNodeConfig = function decodeBlockNodeConfig(block, entityMap) {\n var key = block.key,\n type = block.type,\n data = block.data,\n text = block.text,\n depth = block.depth;\n var blockNodeConfig = {\n text: text,\n depth: depth || 0,\n type: type || 'unstyled',\n key: key || generateRandomKey(),\n data: Map(data),\n characterList: decodeCharacterList(block, entityMap)\n };\n return blockNodeConfig;\n};\n\nvar decodeCharacterList = function decodeCharacterList(block, entityMap) {\n var text = block.text,\n rawEntityRanges = block.entityRanges,\n rawInlineStyleRanges = block.inlineStyleRanges;\n var entityRanges = rawEntityRanges || [];\n var inlineStyleRanges = rawInlineStyleRanges || []; // Translate entity range keys to the DraftEntity map.\n\n return createCharacterList(decodeInlineStyleRanges(text, inlineStyleRanges), decodeEntityRanges(text, entityRanges.filter(function (range) {\n return entityMap.hasOwnProperty(range.key);\n }).map(function (range) {\n return _objectSpread({}, range, {\n key: entityMap[range.key]\n });\n })));\n};\n\nvar addKeyIfMissing = function addKeyIfMissing(block) {\n return _objectSpread({}, block, {\n key: block.key || generateRandomKey()\n });\n};\n/**\n * Node stack is responsible to ensure we traverse the tree only once\n * in depth order, while also providing parent refs to inner nodes to\n * construct their links.\n */\n\n\nvar updateNodeStack = function updateNodeStack(stack, nodes, parentRef) {\n var nodesWithParentRef = nodes.map(function (block) {\n return _objectSpread({}, block, {\n parentRef: parentRef\n });\n }); // since we pop nodes from the stack we need to insert them in reverse\n\n return stack.concat(nodesWithParentRef.reverse());\n};\n/**\n * This will build a tree draft content state by creating the node\n * reference links into a single tree walk. Each node has a link\n * reference to \"parent\", \"children\", \"nextSibling\" and \"prevSibling\"\n * blockMap will be created using depth ordering.\n */\n\n\nvar decodeContentBlockNodes = function decodeContentBlockNodes(blocks, entityMap) {\n return blocks // ensure children have valid keys to enable sibling links\n .map(addKeyIfMissing).reduce(function (blockMap, block, index) {\n !Array.isArray(block.children) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : invariant(false) : void 0; // ensure children have valid keys to enable sibling links\n\n var children = block.children.map(addKeyIfMissing); // root level nodes\n\n var contentBlockNode = new ContentBlockNode(_objectSpread({}, decodeBlockNodeConfig(block, entityMap), {\n prevSibling: index === 0 ? null : blocks[index - 1].key,\n nextSibling: index === blocks.length - 1 ? null : blocks[index + 1].key,\n children: List(children.map(function (child) {\n return child.key;\n }))\n })); // push root node to blockMap\n\n blockMap = blockMap.set(contentBlockNode.getKey(), contentBlockNode); // this stack is used to ensure we visit all nodes respecting depth ordering\n\n var stack = updateNodeStack([], children, contentBlockNode); // start computing children nodes\n\n while (stack.length > 0) {\n // we pop from the stack and start processing this node\n var node = stack.pop(); // parentRef already points to a converted ContentBlockNode\n\n var parentRef = node.parentRef;\n var siblings = parentRef.getChildKeys();\n\n var _index = siblings.indexOf(node.key);\n\n var isValidBlock = Array.isArray(node.children);\n\n if (!isValidBlock) {\n !isValidBlock ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : invariant(false) : void 0;\n break;\n } // ensure children have valid keys to enable sibling links\n\n\n var _children = node.children.map(addKeyIfMissing);\n\n var _contentBlockNode = new ContentBlockNode(_objectSpread({}, decodeBlockNodeConfig(node, entityMap), {\n parent: parentRef.getKey(),\n children: List(_children.map(function (child) {\n return child.key;\n })),\n prevSibling: _index === 0 ? null : siblings.get(_index - 1),\n nextSibling: _index === siblings.size - 1 ? null : siblings.get(_index + 1)\n })); // push node to blockMap\n\n\n blockMap = blockMap.set(_contentBlockNode.getKey(), _contentBlockNode); // this stack is used to ensure we visit all nodes respecting depth ordering\n\n stack = updateNodeStack(stack, _children, _contentBlockNode);\n }\n\n return blockMap;\n }, OrderedMap());\n};\n\nvar decodeContentBlocks = function decodeContentBlocks(blocks, entityMap) {\n return OrderedMap(blocks.map(function (block) {\n var contentBlock = new ContentBlock(decodeBlockNodeConfig(block, entityMap));\n return [contentBlock.getKey(), contentBlock];\n }));\n};\n\nvar decodeRawBlocks = function decodeRawBlocks(rawState, entityMap) {\n var isTreeRawBlock = rawState.blocks.find(function (block) {\n return Array.isArray(block.children) && block.children.length > 0;\n });\n var rawBlocks = experimentalTreeDataSupport && !isTreeRawBlock ? DraftTreeAdapter.fromRawStateToRawTreeState(rawState).blocks : rawState.blocks;\n\n if (!experimentalTreeDataSupport) {\n return decodeContentBlocks(isTreeRawBlock ? DraftTreeAdapter.fromRawTreeStateToRawState(rawState).blocks : rawBlocks, entityMap);\n }\n\n var blockMap = decodeContentBlockNodes(rawBlocks, entityMap); // in dev mode, check that the tree invariants are met\n\n if (process.env.NODE_ENV !== \"production\") {\n !DraftTreeInvariants.isValidTree(blockMap) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Should be a valid tree') : invariant(false) : void 0;\n }\n\n return blockMap;\n};\n\nvar decodeRawEntityMap = function decodeRawEntityMap(rawState) {\n var rawEntityMap = rawState.entityMap;\n var entityMap = {}; // TODO: Update this once we completely remove DraftEntity\n\n Object.keys(rawEntityMap).forEach(function (rawEntityKey) {\n var _rawEntityMap$rawEnti = rawEntityMap[rawEntityKey],\n type = _rawEntityMap$rawEnti.type,\n mutability = _rawEntityMap$rawEnti.mutability,\n data = _rawEntityMap$rawEnti.data; // get the key reference to created entity\n\n entityMap[rawEntityKey] = DraftEntity.__create(type, mutability, data || {});\n });\n return entityMap;\n};\n\nvar convertFromRawToDraftState = function convertFromRawToDraftState(rawState) {\n !Array.isArray(rawState.blocks) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'invalid RawDraftContentState') : invariant(false) : void 0; // decode entities\n\n var entityMap = decodeRawEntityMap(rawState); // decode blockMap\n\n var blockMap = decodeRawBlocks(rawState, entityMap); // create initial selection\n\n var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey());\n return new ContentState({\n blockMap: blockMap,\n entityMap: entityMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n};\n\nmodule.exports = convertFromRawToDraftState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List;\n\nfunction createCharacterList(inlineStyles, entities) {\n var characterArray = inlineStyles.map(function (style, ii) {\n var entity = entities[ii];\n return CharacterMetadata.create({\n style: style,\n entity: entity\n });\n });\n return List(characterArray);\n}\n\nmodule.exports = createCharacterList;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar substr = UnicodeUtils.substr;\n/**\n * Convert to native JavaScript string lengths to determine ranges.\n */\n\nfunction decodeEntityRanges(text, ranges) {\n var entities = Array(text.length).fill(null);\n\n if (ranges) {\n ranges.forEach(function (range) {\n // Using Unicode-enabled substrings converted to JavaScript lengths,\n // fill the output array with entity keys.\n var start = substr(text, 0, range.offset).length;\n var end = start + substr(text, range.offset, range.length).length;\n\n for (var ii = start; ii < end; ii++) {\n entities[ii] = range.key;\n }\n });\n }\n\n return entities;\n}\n\nmodule.exports = decodeEntityRanges;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar _require = require(\"immutable\"),\n OrderedSet = _require.OrderedSet;\n\nvar substr = UnicodeUtils.substr;\nvar EMPTY_SET = OrderedSet();\n/**\n * Convert to native JavaScript string lengths to determine ranges.\n */\n\nfunction decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n\n if (ranges) {\n ranges.forEach(function (range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n\n return styles;\n}\n\nmodule.exports = decodeInlineStyleRanges;","/**\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 * Provides utilities for handling draftjs keys.\n *\n * @emails oncall+draft_js\n * \n * @format\n */\n'use strict';\n\nfunction notEmptyKey(key) {\n return key != null && key != '';\n}\n\nmodule.exports = {\n notEmptyKey: notEmptyKey\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar getEntityKeyForSelection = require(\"./getEntityKeyForSelection\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar isSelectionAtLeafStart = require(\"./isSelectionAtLeafStart\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar setImmediate = require(\"fbjs/lib/setImmediate\"); // When nothing is focused, Firefox regards two characters, `'` and `/`, as\n// commands that should open and focus the \"quickfind\" search bar. This should\n// *never* happen while a contenteditable is focused, but as of v28, it\n// sometimes does, even when the keypress event target is the contenteditable.\n// This breaks the input. Special case these characters to ensure that when\n// they are typed, we prevent default on the event to make sure not to\n// trigger quickfind.\n\n\nvar FF_QUICKFIND_CHAR = \"'\";\nvar FF_QUICKFIND_LINK_CHAR = '/';\nvar isFirefox = UserAgent.isBrowser('Firefox');\n\nfunction mustPreventDefaultForCharacter(character) {\n return isFirefox && (character == FF_QUICKFIND_CHAR || character == FF_QUICKFIND_LINK_CHAR);\n}\n/**\n * Replace the current selection with the specified text string, with the\n * inline style and entity key applied to the newly inserted text.\n */\n\n\nfunction replaceText(editorState, text, inlineStyle, entityKey, forceSelection) {\n var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), text, inlineStyle, entityKey);\n return EditorState.push(editorState, contentState, 'insert-characters', forceSelection);\n}\n/**\n * When `onBeforeInput` executes, the browser is attempting to insert a\n * character into the editor. Apply this character data to the document,\n * allowing native insertion if possible.\n *\n * Native insertion is encouraged in order to limit re-rendering and to\n * preserve spellcheck highlighting, which disappears or flashes if re-render\n * occurs on the relevant text nodes.\n */\n\n\nfunction editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n var chars = e.data; // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n\n if (!chars) {\n return;\n } // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n\n\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState, e.timeStamp))) {\n e.preventDefault();\n return;\n } // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n\n\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()), true));\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()), false); // Bunch of different cases follow where we need to prevent native insertion.\n\n var mustPreventNative = false;\n\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n\n if (!mustPreventNative) {\n // Let's say we have a decorator that highlights hashtags. In many cases\n // we need to prevent native behavior and rerender ourselves --\n // particularly, any case *except* where the inserted characters end up\n // anywhere except exactly where you put them.\n //\n // Using [] to denote a decorated leaf, some examples:\n //\n // 1. 'hi #' and append 'f'\n // desired rendering: 'hi [#f]'\n // native rendering would be: 'hi #f' (incorrect)\n //\n // 2. 'x [#foo]' and insert '#' before 'f'\n // desired rendering: 'x #[#foo]'\n // native rendering would be: 'x [##foo]' (incorrect)\n //\n // 3. '[#foobar]' and insert ' ' between 'foo' and 'bar'\n // desired rendering: '[#foo] bar'\n // native rendering would be: '[#foo bar]' (incorrect)\n //\n // 4. '[#foo]' and delete '#' [won't use this beforeinput codepath though]\n // desired rendering: 'foo'\n // native rendering would be: '[foo]' (incorrect)\n //\n // 5. '[#foo]' and append 'b'\n // desired rendering: '[#foob]'\n // native rendering would be: '[#foob]'\n // (native insertion here would be ok for decorators like simple spans,\n // but not more complex decorators. To be safe, we need to prevent it.)\n //\n // It is safe to allow native insertion if and only if the full list of\n // decorator ranges matches what we expect native insertion to give, and\n // the range lengths have not changed. We don't need to compare the content\n // because the only possible mutation to consider here is inserting plain\n // text and decorators can't affect text content.\n var oldBlockTree = editorState.getBlockTree(anchorKey);\n var newBlockTree = newEditorState.getBlockTree(anchorKey);\n mustPreventNative = oldBlockTree.size !== newBlockTree.size || oldBlockTree.zip(newBlockTree).some(function (_ref) {\n var oldLeafSet = _ref[0],\n newLeafSet = _ref[1];\n // selectionStart is guaranteed to be selectionEnd here\n var oldStart = oldLeafSet.get('start');\n var adjustedStart = oldStart + (oldStart >= selectionStart ? chars.length : 0);\n var oldEnd = oldLeafSet.get('end');\n var adjustedEnd = oldEnd + (oldEnd >= selectionStart ? chars.length : 0);\n var newStart = newLeafSet.get('start');\n var newEnd = newLeafSet.get('end');\n var newDecoratorKey = newLeafSet.get('decoratorKey');\n return (// Different decorators\n oldLeafSet.get('decoratorKey') !== newDecoratorKey || // Different number of inline styles\n oldLeafSet.get('leaves').size !== newLeafSet.get('leaves').size || // Different effective decorator position\n adjustedStart !== newStart || adjustedEnd !== newEnd || // Decorator already existed and its length changed\n newDecoratorKey != null && newEnd - newStart !== oldEnd - oldStart\n );\n });\n }\n\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n newEditorState = EditorState.set(newEditorState, {\n forceSelection: true\n });\n editor.update(newEditorState);\n return;\n } // We made it all the way! Let the browser do its thing and insert the char.\n\n\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n }); // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}\n\nmodule.exports = editOnBeforeInput;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar containsNode = require(\"fbjs/lib/containsNode\");\n\nvar getActiveElement = require(\"fbjs/lib/getActiveElement\");\n\nfunction editOnBlur(editor, e) {\n // In a contentEditable element, when you select a range and then click\n // another active element, this does trigger a `blur` event but will not\n // remove the DOM selection from the contenteditable.\n // This is consistent across all browsers, but we prefer that the editor\n // behave like a textarea, where a `blur` event clears the DOM selection.\n // We therefore force the issue to be certain, checking whether the active\n // element is `body` to force it when blurring occurs within the window (as\n // opposed to clicking to another tab or window).\n var ownerDocument = e.currentTarget.ownerDocument;\n\n if ( // This ESLint rule conflicts with `sketchy-null-bool` flow check\n // eslint-disable-next-line no-extra-boolean-cast\n !Boolean(editor.props.preserveSelectionOnBlur) && getActiveElement(ownerDocument) === ownerDocument.body) {\n var _selection = ownerDocument.defaultView.getSelection();\n\n var editorNode = editor.editor;\n\n if (_selection.rangeCount === 1 && containsNode(editorNode, _selection.anchorNode) && containsNode(editorNode, _selection.focusNode)) {\n _selection.removeAllRanges();\n }\n }\n\n var editorState = editor._latestEditorState;\n var currentSelection = editorState.getSelection();\n\n if (!currentSelection.getHasFocus()) {\n return;\n }\n\n var selection = currentSelection.set('hasFocus', false);\n editor.props.onBlur && editor.props.onBlur(e);\n editor.update(EditorState.acceptSelection(editorState, selection));\n}\n\nmodule.exports = editOnBlur;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n/**\n * The user has begun using an IME input system. Switching to `composite` mode\n * allows handling composition input and disables other edit behavior.\n */\n\n\nfunction editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, {\n inCompositionMode: true\n })); // Allow composition handler to interpret the compositionstart event\n\n editor._onCompositionStart(e);\n}\n\nmodule.exports = editOnCompositionStart;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getFragmentFromSelection = require(\"./getFragmentFromSelection\");\n/**\n * If we have a selection, create a ContentState fragment and store\n * it in our internal clipboard. Subsequent paste events will use this\n * fragment if no external clipboard data is supplied.\n */\n\n\nfunction editOnCopy(editor, e) {\n var editorState = editor._latestEditorState;\n var selection = editorState.getSelection(); // No selection, so there's nothing to copy.\n\n if (selection.isCollapsed()) {\n e.preventDefault();\n return;\n }\n\n editor.setClipboard(getFragmentFromSelection(editor._latestEditorState));\n}\n\nmodule.exports = editOnCopy;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar getFragmentFromSelection = require(\"./getFragmentFromSelection\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar isNode = require(\"./isInstanceOfNode\");\n/**\n * On `cut` events, native behavior is allowed to occur so that the system\n * clipboard is set properly. This means that we need to take steps to recover\n * the editor DOM state after the `cut` has occurred in order to maintain\n * control of the component.\n *\n * In addition, we can keep a copy of the removed fragment, including all\n * styles and entities, for use as an internal paste.\n */\n\n\nfunction editOnCut(editor, e) {\n var editorState = editor._latestEditorState;\n var selection = editorState.getSelection();\n var element = e.target;\n var scrollPosition; // No selection, so there's nothing to cut.\n\n if (selection.isCollapsed()) {\n e.preventDefault();\n return;\n } // Track the current scroll position so that it can be forced back in place\n // after the editor regains control of the DOM.\n\n\n if (isNode(element)) {\n var node = element;\n scrollPosition = getScrollPosition(Style.getScrollParent(node));\n }\n\n var fragment = getFragmentFromSelection(editorState);\n editor.setClipboard(fragment); // Set `cut` mode to disable all event handling temporarily.\n\n editor.setMode('cut'); // Let native `cut` behavior occur, then recover control.\n\n setTimeout(function () {\n editor.restoreEditorDOM(scrollPosition);\n editor.exitCurrentMode();\n editor.update(removeFragment(editorState));\n }, 0);\n}\n\nfunction removeFragment(editorState) {\n var newContent = DraftModifier.removeRange(editorState.getCurrentContent(), editorState.getSelection(), 'forward');\n return EditorState.push(editorState, newContent, 'remove-range');\n}\n\nmodule.exports = editOnCut;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Drag behavior has begun from outside the editor element.\n */\nfunction editOnDragOver(editor, e) {\n editor.setMode('drag');\n e.preventDefault();\n}\n\nmodule.exports = editOnDragOver;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * A `dragstart` event has begun within the text editor component.\n */\nfunction editOnDragStart(editor) {\n editor._internalDrag = true;\n editor.setMode('drag');\n}\n\nmodule.exports = editOnDragStart;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nfunction editOnFocus(editor, e) {\n var editorState = editor._latestEditorState;\n var currentSelection = editorState.getSelection();\n\n if (currentSelection.getHasFocus()) {\n return;\n }\n\n var selection = currentSelection.set('hasFocus', true);\n editor.props.onFocus && editor.props.onFocus(e); // When the tab containing this text editor is hidden and the user does a\n // find-in-page in a _different_ tab, Chrome on Mac likes to forget what the\n // selection was right after sending this focus event and (if you let it)\n // moves the cursor back to the beginning of the editor, so we force the\n // selection here instead of simply accepting it in order to preserve the\n // old cursor position. See https://crbug.com/540004.\n // But it looks like this is fixed in Chrome 60.0.3081.0.\n // Other browsers also don't have this bug, so we prefer to acceptSelection\n // when possible, to ensure that unfocusing and refocusing a Draft editor\n // doesn't preserve the selection, matching how textareas work.\n\n if (UserAgent.isBrowser('Chrome < 60.0.3081.0')) {\n editor.update(EditorState.forceSelection(editorState, selection));\n } else {\n editor.update(EditorState.acceptSelection(editorState, selection));\n }\n}\n\nmodule.exports = editOnFocus;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar _require = require(\"./draftKeyUtils\"),\n notEmptyKey = _require.notEmptyKey;\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar keyCommandPlainBackspace = require(\"./keyCommandPlainBackspace\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar isGecko = UserAgent.isEngine('Gecko');\nvar DOUBLE_NEWLINE = '\\n\\n';\n\nfunction onInputType(inputType, editorState) {\n switch (inputType) {\n case 'deleteContentBackward':\n return keyCommandPlainBackspace(editorState);\n }\n\n return editorState;\n}\n/**\n * This function serves two purposes\n *\n * 1. To update the editorState and call onChange method with the new\n * editorState. This editorState is calculated in editOnBeforeInput but the\n * onChange method is not called with the new state until this method does it.\n * It is done to handle a specific case where certain character inputs might\n * be replaced with something else. E.g. snippets ('rc' might be replaced\n * with boilerplate code for react component). More information on the\n * exact problem can be found here -\n * https://github.com/facebook/draft-js/commit/07892ba479bd4dfc6afd1e0ed179aaf51cd138b1\n *\n * 2. intended to handle spellcheck and autocorrect changes,\n * which occur in the DOM natively without any opportunity to observe or\n * interpret the changes before they occur.\n *\n * The `input` event fires in contentEditable elements reliably for non-IE\n * browsers, immediately after changes occur to the editor DOM. Since our other\n * handlers override or otherwise handle cover other varieties of text input,\n * the DOM state should match the model in all controlled input cases. Thus,\n * when an `input` change leads to a DOM/model mismatch, the change should be\n * due to a spellcheck change, and we can incorporate it into our model.\n */\n\n\nfunction editOnInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n } // at this point editor is not null for sure (after input)\n\n\n var castedEditorElement = editor.editor;\n var domSelection = castedEditorElement.ownerDocument.defaultView.getSelection();\n var anchorNode = domSelection.anchorNode,\n isCollapsed = domSelection.isCollapsed;\n var isNotTextOrElementNode = (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.nodeType) !== Node.TEXT_NODE && (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.nodeType) !== Node.ELEMENT_NODE;\n\n if (anchorNode == null || isNotTextOrElementNode) {\n // TODO: (t16149272) figure out context for this change\n return;\n }\n\n if (anchorNode.nodeType === Node.TEXT_NODE && (anchorNode.previousSibling !== null || anchorNode.nextSibling !== null)) {\n // When typing at the beginning of a visual line, Chrome splits the text\n // nodes into two. Why? No one knows. This commit is suspicious:\n // https://chromium.googlesource.com/chromium/src/+/a3b600981286b135632371477f902214c55a1724\n // To work around, we'll merge the sibling text nodes back into this one.\n var span = anchorNode.parentNode;\n\n if (span == null) {\n // Handle null-parent case.\n return;\n }\n\n anchorNode.nodeValue = span.textContent;\n\n for (var child = span.firstChild; child != null; child = child.nextSibling) {\n if (child !== anchorNode) {\n span.removeChild(child);\n }\n }\n }\n\n var domText = anchorNode.textContent;\n var editorState = editor._latestEditorState;\n var offsetKey = nullthrows(findAncestorOffsetKey(anchorNode));\n\n var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey),\n blockKey = _DraftOffsetKey$decod.blockKey,\n decoratorKey = _DraftOffsetKey$decod.decoratorKey,\n leafKey = _DraftOffsetKey$decod.leafKey;\n\n var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]),\n start = _editorState$getBlock.start,\n end = _editorState$getBlock.end;\n\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(blockKey);\n var modelText = block.getText().slice(start, end); // Special-case soft newlines here. If the DOM text ends in a soft newline,\n // we will have manually inserted an extra soft newline in DraftEditorLeaf.\n // We want to remove this extra newline for the purpose of our comparison\n // of DOM and model text.\n\n if (domText.endsWith(DOUBLE_NEWLINE)) {\n domText = domText.slice(0, -1);\n } // No change -- the DOM is up to date. Nothing to do here.\n\n\n if (domText === modelText) {\n // This can be buggy for some Android keyboards because they don't fire\n // standard onkeydown/pressed events and only fired editOnInput\n // so domText is already changed by the browser and ends up being equal\n // to modelText unexpectedly.\n // Newest versions of Android support the dom-inputevent-inputtype\n // and we can use the `inputType` to properly apply the state changes.\n\n /* $FlowFixMe[prop-missing] inputType is only defined on a draft of a\n * standard. https://w3c.github.io/input-events/#dom-inputevent-inputtype\n */\n var inputType = e.nativeEvent.inputType;\n\n if (inputType) {\n var newEditorState = onInputType(inputType, editorState);\n\n if (newEditorState !== editorState) {\n editor.restoreEditorDOM();\n editor.update(newEditorState);\n return;\n }\n }\n\n return;\n }\n\n var selection = editorState.getSelection(); // We'll replace the entire leaf with the text content of the target.\n\n var targetRange = selection.merge({\n anchorOffset: start,\n focusOffset: end,\n isBackward: false\n });\n var entityKey = block.getEntityAt(start);\n var entity = notEmptyKey(entityKey) ? content.getEntity(entityKey) : null;\n var entityType = entity != null ? entity.getMutability() : null;\n var preserveEntity = entityType === 'MUTABLE'; // Immutable or segmented entities cannot properly be handled by the\n // default browser undo, so we have to use a different change type to\n // force using our internal undo method instead of falling through to the\n // native browser undo.\n\n var changeType = preserveEntity ? 'spellcheck-change' : 'apply-entity';\n var newContent = DraftModifier.replaceText(content, targetRange, domText, block.getInlineStyleAt(start), preserveEntity ? block.getEntityAt(start) : null);\n var anchorOffset, focusOffset, startOffset, endOffset;\n\n if (isGecko) {\n // Firefox selection does not change while the context menu is open, so\n // we preserve the anchor and focus values of the DOM selection.\n anchorOffset = domSelection.anchorOffset;\n focusOffset = domSelection.focusOffset;\n startOffset = start + Math.min(anchorOffset, focusOffset);\n endOffset = startOffset + Math.abs(anchorOffset - focusOffset);\n anchorOffset = startOffset;\n focusOffset = endOffset;\n } else {\n // Browsers other than Firefox may adjust DOM selection while the context\n // menu is open, and Safari autocorrect is prone to providing an inaccurate\n // DOM selection. Don't trust it. Instead, use our existing SelectionState\n // and adjust it based on the number of characters changed during the\n // mutation.\n var charDelta = domText.length - modelText.length;\n startOffset = selection.getStartOffset();\n endOffset = selection.getEndOffset();\n anchorOffset = isCollapsed ? endOffset + charDelta : startOffset;\n focusOffset = endOffset + charDelta;\n } // Segmented entities are completely or partially removed when their\n // text content changes. For this case we do not want any text to be selected\n // after the change, so we are not merging the selection.\n\n\n var contentWithAdjustedDOMSelection = newContent.merge({\n selectionBefore: content.getSelectionAfter(),\n selectionAfter: selection.merge({\n anchorOffset: anchorOffset,\n focusOffset: focusOffset\n })\n });\n editor.update(EditorState.push(editorState, contentWithAdjustedDOMSelection, changeType));\n}\n\nmodule.exports = editOnInput;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar KeyBindingUtil = require(\"./KeyBindingUtil\");\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nvar SecondaryClipboard = require(\"./SecondaryClipboard\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar keyCommandBackspaceToStartOfLine = require(\"./keyCommandBackspaceToStartOfLine\");\n\nvar keyCommandBackspaceWord = require(\"./keyCommandBackspaceWord\");\n\nvar keyCommandDeleteWord = require(\"./keyCommandDeleteWord\");\n\nvar keyCommandInsertNewline = require(\"./keyCommandInsertNewline\");\n\nvar keyCommandMoveSelectionToEndOfBlock = require(\"./keyCommandMoveSelectionToEndOfBlock\");\n\nvar keyCommandMoveSelectionToStartOfBlock = require(\"./keyCommandMoveSelectionToStartOfBlock\");\n\nvar keyCommandPlainBackspace = require(\"./keyCommandPlainBackspace\");\n\nvar keyCommandPlainDelete = require(\"./keyCommandPlainDelete\");\n\nvar keyCommandTransposeCharacters = require(\"./keyCommandTransposeCharacters\");\n\nvar keyCommandUndo = require(\"./keyCommandUndo\");\n\nvar isOptionKeyCommand = KeyBindingUtil.isOptionKeyCommand;\nvar isChrome = UserAgent.isBrowser('Chrome');\n/**\n * Map a `DraftEditorCommand` command value to a corresponding function.\n */\n\nfunction onKeyCommand(command, editorState, e) {\n switch (command) {\n case 'redo':\n return EditorState.redo(editorState);\n\n case 'delete':\n return keyCommandPlainDelete(editorState);\n\n case 'delete-word':\n return keyCommandDeleteWord(editorState);\n\n case 'backspace':\n return keyCommandPlainBackspace(editorState);\n\n case 'backspace-word':\n return keyCommandBackspaceWord(editorState);\n\n case 'backspace-to-start-of-line':\n return keyCommandBackspaceToStartOfLine(editorState, e);\n\n case 'split-block':\n return keyCommandInsertNewline(editorState);\n\n case 'transpose-characters':\n return keyCommandTransposeCharacters(editorState);\n\n case 'move-selection-to-start-of-block':\n return keyCommandMoveSelectionToStartOfBlock(editorState);\n\n case 'move-selection-to-end-of-block':\n return keyCommandMoveSelectionToEndOfBlock(editorState);\n\n case 'secondary-cut':\n return SecondaryClipboard.cut(editorState);\n\n case 'secondary-paste':\n return SecondaryClipboard.paste(editorState);\n\n default:\n return editorState;\n }\n}\n/**\n * Intercept keydown behavior to handle keys and commands manually, if desired.\n *\n * Keydown combinations may be mapped to `DraftCommand` values, which may\n * correspond to command functions that modify the editor or its contents.\n *\n * See `getDefaultKeyBinding` for defaults. Alternatively, the top-level\n * component may provide a custom mapping via the `keyBindingFn` prop.\n */\n\n\nfunction editOnKeyDown(editor, e) {\n var keyCode = e.which;\n var editorState = editor._latestEditorState;\n\n function callDeprecatedHandler(handlerName) {\n var deprecatedHandler = editor.props[handlerName];\n\n if (deprecatedHandler) {\n deprecatedHandler(e);\n return true;\n } else {\n return false;\n }\n }\n\n switch (keyCode) {\n case Keys.RETURN:\n e.preventDefault(); // The top-level component may manually handle newline insertion. If\n // no special handling is performed, fall through to command handling.\n\n if (editor.props.handleReturn && isEventHandled(editor.props.handleReturn(e, editorState))) {\n return;\n }\n\n break;\n\n case Keys.ESC:\n e.preventDefault();\n\n if (callDeprecatedHandler('onEscape')) {\n return;\n }\n\n break;\n\n case Keys.TAB:\n if (callDeprecatedHandler('onTab')) {\n return;\n }\n\n break;\n\n case Keys.UP:\n if (callDeprecatedHandler('onUpArrow')) {\n return;\n }\n\n break;\n\n case Keys.RIGHT:\n if (callDeprecatedHandler('onRightArrow')) {\n return;\n }\n\n break;\n\n case Keys.DOWN:\n if (callDeprecatedHandler('onDownArrow')) {\n return;\n }\n\n break;\n\n case Keys.LEFT:\n if (callDeprecatedHandler('onLeftArrow')) {\n return;\n }\n\n break;\n\n case Keys.SPACE:\n // Prevent Chrome on OSX behavior where option + space scrolls.\n if (isChrome && isOptionKeyCommand(e)) {\n e.preventDefault();\n }\n\n }\n\n var command = editor.props.keyBindingFn(e); // If no command is specified, allow keydown event to continue.\n\n if (command == null || command === '') {\n if (keyCode === Keys.SPACE && isChrome && isOptionKeyCommand(e)) {\n // The default keydown event has already been prevented in order to stop\n // Chrome from scrolling. Insert a nbsp into the editor as OSX would for\n // other browsers.\n var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), \"\\xA0\");\n editor.update(EditorState.push(editorState, contentState, 'insert-characters'));\n }\n\n return;\n }\n\n if (command === 'undo') {\n // Since undo requires some special updating behavior to keep the editor\n // in sync, handle it separately.\n keyCommandUndo(e, editorState, editor.update);\n return;\n } // At this point, we know that we're handling a command of some kind, so\n // we don't want to insert a character following the keydown.\n\n\n e.preventDefault(); // Allow components higher up the tree to handle the command first.\n\n if (editor.props.handleKeyCommand && isEventHandled(editor.props.handleKeyCommand(command, editorState, e.timeStamp))) {\n return;\n }\n\n var newState = onKeyCommand(command, editorState, e);\n\n if (newState !== editorState) {\n editor.update(newState);\n }\n}\n\nmodule.exports = editOnKeyDown;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar DataTransfer = require(\"fbjs/lib/DataTransfer\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftPasteProcessor = require(\"./DraftPasteProcessor\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar RichTextEditorUtil = require(\"./RichTextEditorUtil\");\n\nvar getEntityKeyForSelection = require(\"./getEntityKeyForSelection\");\n\nvar getTextContentFromFiles = require(\"./getTextContentFromFiles\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar splitTextIntoTextBlocks = require(\"./splitTextIntoTextBlocks\");\n/**\n * Paste content.\n */\n\n\nfunction editOnPaste(editor, e) {\n e.preventDefault();\n var data = new DataTransfer(e.clipboardData); // Get files, unless this is likely to be a string the user wants inline.\n\n if (!data.isRichText()) {\n var files = data.getFiles();\n var defaultFileText = data.getText();\n\n if (files.length > 0) {\n // Allow customized paste handling for images, etc. Otherwise, fall\n // through to insert text contents into the editor.\n if (editor.props.handlePastedFiles && isEventHandled(editor.props.handlePastedFiles(files))) {\n return;\n }\n /* $FlowFixMe[incompatible-call] This comment suppresses an error found\n * DataTransfer was typed. getFiles() returns an array of , not Blob */\n\n\n getTextContentFromFiles(files, function (\n /*string*/\n fileText) {\n fileText = fileText || defaultFileText;\n\n if (!fileText) {\n return;\n }\n\n var editorState = editor._latestEditorState;\n var blocks = splitTextIntoTextBlocks(fileText);\n var character = CharacterMetadata.create({\n style: editorState.getCurrentInlineStyle(),\n entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())\n });\n var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState);\n var text = DraftPasteProcessor.processText(blocks, character, currentBlockType);\n var fragment = BlockMapBuilder.createFromArray(text);\n var withInsertedText = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment);\n editor.update(EditorState.push(editorState, withInsertedText, 'insert-fragment'));\n });\n return;\n }\n }\n\n var textBlocks = [];\n var text = data.getText();\n var html = data.getHTML();\n var editorState = editor._latestEditorState;\n\n if (editor.props.formatPastedText) {\n var _editor$props$formatP = editor.props.formatPastedText(text, html),\n formattedText = _editor$props$formatP.text,\n formattedHtml = _editor$props$formatP.html;\n\n text = formattedText;\n html = formattedHtml;\n }\n\n if (editor.props.handlePastedText && isEventHandled(editor.props.handlePastedText(text, html, editorState))) {\n return;\n }\n\n if (text) {\n textBlocks = splitTextIntoTextBlocks(text);\n }\n\n if (!editor.props.stripPastedStyles) {\n // If the text from the paste event is rich content that matches what we\n // already have on the internal clipboard, assume that we should just use\n // the clipboard fragment for the paste. This will allow us to preserve\n // styling and entities, if any are present. Note that newlines are\n // stripped during comparison -- this is because copy/paste within the\n // editor in Firefox and IE will not include empty lines. The resulting\n // paste will preserve the newlines correctly.\n var internalClipboard = editor.getClipboard();\n\n if (!editor.props.formatPastedText && data.isRichText() && internalClipboard) {\n var _html;\n\n if ( // If the editorKey is present in the pasted HTML, it should be safe to\n // assume this is an internal paste.\n ((_html = html) === null || _html === void 0 ? void 0 : _html.indexOf(editor.getEditorKey())) !== -1 || // The copy may have been made within a single block, in which case the\n // editor key won't be part of the paste. In this case, just check\n // whether the pasted text matches the internal clipboard.\n textBlocks.length === 1 && internalClipboard.size === 1 && internalClipboard.first().getText() === text) {\n editor.update(insertFragment(editor._latestEditorState, internalClipboard));\n return;\n }\n } else if (internalClipboard && data.types.includes('com.apple.webarchive') && !data.types.includes('text/html') && areTextBlocksAndClipboardEqual(textBlocks, internalClipboard)) {\n // Safari does not properly store text/html in some cases.\n // Use the internalClipboard if present and equal to what is on\n // the clipboard. See https://bugs.webkit.org/show_bug.cgi?id=19893.\n editor.update(insertFragment(editor._latestEditorState, internalClipboard));\n return;\n } // If there is html paste data, try to parse that.\n\n\n if (html) {\n var htmlFragment = DraftPasteProcessor.processHTML(html, editor.props.blockRenderMap);\n\n if (htmlFragment) {\n var contentBlocks = htmlFragment.contentBlocks,\n entityMap = htmlFragment.entityMap;\n\n if (contentBlocks) {\n var htmlMap = BlockMapBuilder.createFromArray(contentBlocks);\n editor.update(insertFragment(editor._latestEditorState, htmlMap, entityMap));\n return;\n }\n }\n } // Otherwise, create a new fragment from our pasted text. Also\n // empty the internal clipboard, since it's no longer valid.\n\n\n editor.setClipboard(null);\n }\n\n if (textBlocks.length) {\n var character = CharacterMetadata.create({\n style: editorState.getCurrentInlineStyle(),\n entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())\n });\n var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState);\n var textFragment = DraftPasteProcessor.processText(textBlocks, character, currentBlockType);\n var textMap = BlockMapBuilder.createFromArray(textFragment);\n editor.update(insertFragment(editor._latestEditorState, textMap));\n }\n}\n\nfunction insertFragment(editorState, fragment, entityMap) {\n var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment); // TODO: merge the entity map once we stop using DraftEntity\n // like this:\n // const mergedEntityMap = newContent.getEntityMap().merge(entityMap);\n\n return EditorState.push(editorState, newContent.set('entityMap', entityMap), 'insert-fragment');\n}\n\nfunction areTextBlocksAndClipboardEqual(textBlocks, blockMap) {\n return textBlocks.length === blockMap.size && blockMap.valueSeq().every(function (block, ii) {\n return block.getText() === textBlocks[ii];\n });\n}\n\nmodule.exports = editOnPaste;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftJsDebugLogging = require(\"./DraftJsDebugLogging\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar getContentEditableContainer = require(\"./getContentEditableContainer\");\n\nvar getDraftEditorSelection = require(\"./getDraftEditorSelection\");\n\nfunction editOnSelect(editor) {\n if (editor._blockSelectEvents || editor._latestEditorState !== editor.props.editorState) {\n if (editor._blockSelectEvents) {\n var _editorState = editor.props.editorState;\n\n var selectionState = _editorState.getSelection();\n\n DraftJsDebugLogging.logBlockedSelectionEvent({\n // For now I don't think we need any other info\n anonymizedDom: 'N/A',\n extraParams: JSON.stringify({\n stacktrace: new Error().stack\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n }\n\n return;\n }\n\n var editorState = editor.props.editorState;\n var documentSelection = getDraftEditorSelection(editorState, getContentEditableContainer(editor));\n var updatedSelectionState = documentSelection.selectionState;\n\n if (updatedSelectionState !== editorState.getSelection()) {\n if (documentSelection.needsRecovery) {\n editorState = EditorState.forceSelection(editorState, updatedSelectionState);\n } else {\n editorState = EditorState.acceptSelection(editorState, updatedSelectionState);\n }\n\n editor.update(editorState);\n }\n}\n\nmodule.exports = editOnSelect;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftStringKey = require(\"./DraftStringKey\");\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar strlen = UnicodeUtils.strlen;\n/**\n * Convert to UTF-8 character counts for storage.\n */\n\nfunction encodeEntityRanges(block, storageMap) {\n var encoded = [];\n block.findEntityRanges(function (character) {\n return !!character.getEntity();\n }, function (\n /*number*/\n start,\n /*number*/\n end) {\n var text = block.getText();\n var key = block.getEntityAt(start);\n encoded.push({\n offset: strlen(text.slice(0, start)),\n length: strlen(text.slice(start, end)),\n // Encode the key as a number for range storage.\n key: Number(storageMap[DraftStringKey.stringify(key)])\n });\n });\n return encoded;\n}\n\nmodule.exports = encodeEntityRanges;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar areEqual = function areEqual(a, b) {\n return a === b;\n};\n\nvar isTruthy = function isTruthy(a) {\n return !!a;\n};\n\nvar EMPTY_ARRAY = [];\n/**\n * Helper function for getting encoded styles for each inline style. Convert\n * to UTF-8 character counts for storage.\n */\n\nfunction getEncodedInlinesForType(block, styleList, styleToEncode) {\n var ranges = []; // Obtain an array with ranges for only the specified style.\n\n var filteredInlines = styleList.map(function (style) {\n return style.has(styleToEncode);\n }).toList();\n findRangesImmutable(filteredInlines, areEqual, // We only want to keep ranges with nonzero style values.\n isTruthy, function (start, end) {\n var text = block.getText();\n ranges.push({\n offset: UnicodeUtils.strlen(text.slice(0, start)),\n length: UnicodeUtils.strlen(text.slice(start, end)),\n style: styleToEncode\n });\n });\n return ranges;\n}\n/*\n * Retrieve the encoded arrays of inline styles, with each individual style\n * treated separately.\n */\n\n\nfunction encodeInlineStyleRanges(block) {\n var styleList = block.getCharacterList().map(function (c) {\n return c.getStyle();\n }).toList();\n var ranges = styleList.flatten().toSet().map(function (style) {\n return getEncodedInlinesForType(block, styleList, style);\n });\n return Array.prototype.concat.apply(EMPTY_ARRAY, ranges.toJS());\n}\n\nmodule.exports = encodeInlineStyleRanges;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar getRangeClientRects = require(\"./getRangeClientRects\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n/**\n * Return the computed line height, in pixels, for the provided element.\n */\n\n\nfunction getLineHeightPx(element) {\n var computed = getComputedStyle(element);\n var correctDocument = getCorrectDocumentFromNode(element);\n var div = correctDocument.createElement('div');\n div.style.fontFamily = computed.fontFamily;\n div.style.fontSize = computed.fontSize;\n div.style.fontStyle = computed.fontStyle;\n div.style.fontWeight = computed.fontWeight;\n div.style.lineHeight = computed.lineHeight;\n div.style.position = 'absolute';\n div.textContent = 'M';\n var documentBody = correctDocument.body;\n !documentBody ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing document.body') : invariant(false) : void 0; // forced layout here\n\n documentBody.appendChild(div);\n var rect = div.getBoundingClientRect();\n documentBody.removeChild(div);\n return rect.height;\n}\n/**\n * Return whether every ClientRect in the provided list lies on the same line.\n *\n * We assume that the rects on the same line all contain the baseline, so the\n * lowest top line needs to be above the highest bottom line (i.e., if you were\n * to project the rects onto the y-axis, their intersection would be nonempty).\n *\n * In addition, we require that no two boxes are lineHeight (or more) apart at\n * either top or bottom, which helps protect against false positives for fonts\n * with extremely large glyph heights (e.g., with a font size of 17px, Zapfino\n * produces rects of height 58px!).\n */\n\n\nfunction areRectsOnOneLine(rects, lineHeight) {\n var minTop = Infinity;\n var minBottom = Infinity;\n var maxTop = -Infinity;\n var maxBottom = -Infinity;\n\n for (var ii = 0; ii < rects.length; ii++) {\n var rect = rects[ii];\n\n if (rect.width === 0 || rect.width === 1) {\n // When a range starts or ends a soft wrap, many browsers (Chrome, IE,\n // Safari) include an empty rect on the previous or next line. When the\n // text lies in a container whose position is not integral (e.g., from\n // margin: auto), Safari makes these empty rects have width 1 (instead of\n // 0). Having one-pixel-wide characters seems unlikely (and most browsers\n // report widths in subpixel precision anyway) so it's relatively safe to\n // skip over them.\n continue;\n }\n\n minTop = Math.min(minTop, rect.top);\n minBottom = Math.min(minBottom, rect.bottom);\n maxTop = Math.max(maxTop, rect.top);\n maxBottom = Math.max(maxBottom, rect.bottom);\n }\n\n return maxTop <= minBottom && maxTop - minTop < lineHeight && maxBottom - minBottom < lineHeight;\n}\n/**\n * Return the length of a node, as used by Range offsets.\n */\n\n\nfunction getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n\n default:\n return node.childNodes.length;\n }\n}\n/**\n * Given a collapsed range, move the start position backwards as far as\n * possible while the range still spans only a single line.\n */\n\n\nfunction expandRangeToStartOfLine(range) {\n !range.collapsed ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'expandRangeToStartOfLine: Provided range is not collapsed.') : invariant(false) : void 0;\n range = range.cloneRange();\n var containingElement = range.startContainer;\n\n if (containingElement.nodeType !== 1) {\n containingElement = containingElement.parentNode;\n }\n\n var lineHeight = getLineHeightPx(containingElement); // Imagine our text looks like:\n //
    once upon a time, there was a boy\n // who lived under^ the\n // stairs in a small closet.
    \n // where the caret represents the cursor. First, we crawl up the tree until\n // the range spans multiple lines (setting the start point to before\n // \"\", then before \"
    \"), then at each level we do a search to\n // find the latest point which is still on a previous line. We'll find that\n // the break point is inside the span, then inside the , then in its text\n // node child, the actual break point before \"who\".\n\n var bestContainer = range.endContainer;\n var bestOffset = range.endOffset;\n range.setStart(range.startContainer, 0);\n\n while (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) {\n bestContainer = range.startContainer;\n bestOffset = range.startOffset;\n !bestContainer.parentNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Found unexpected detached subtree when traversing.') : invariant(false) : void 0;\n range.setStartBefore(bestContainer);\n\n if (bestContainer.nodeType === 1 && getComputedStyle(bestContainer).display !== 'inline') {\n // The start of the line is never in a different block-level container.\n break;\n }\n } // In the above example, range now spans from \"
    \" to \"under\",\n // bestContainer is
    , and bestOffset is 1 (index of inside
    )].\n // Picking out which child to recurse into here is a special case since we\n // don't want to check past -- once we find that the final range starts\n // in , we can look at all of its children (and all of their children)\n // to find the break point.\n // At all times, (bestContainer, bestOffset) is the latest single-line start\n // point that we know of.\n\n\n var currentContainer = bestContainer;\n var maxIndexToConsider = bestOffset - 1;\n\n do {\n var nodeValue = currentContainer.nodeValue;\n var ii = maxIndexToConsider;\n\n for (; ii >= 0; ii--) {\n if (nodeValue != null && ii > 0 && UnicodeUtils.isSurrogatePair(nodeValue, ii - 1)) {\n // We're in the middle of a surrogate pair -- skip over so we never\n // return a range with an endpoint in the middle of a code point.\n continue;\n }\n\n range.setStart(currentContainer, ii);\n\n if (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) {\n bestContainer = currentContainer;\n bestOffset = ii;\n } else {\n break;\n }\n }\n\n if (ii === -1 || currentContainer.childNodes.length === 0) {\n // If ii === -1, then (bestContainer, bestOffset), which is equal to\n // (currentContainer, 0), was a single-line start point but a start\n // point before currentContainer wasn't, so the line break seems to\n // have occurred immediately after currentContainer's start tag\n //\n // If currentContainer.childNodes.length === 0, we're already at a\n // terminal node (e.g., text node) and should return our current best.\n break;\n }\n\n currentContainer = currentContainer.childNodes[ii];\n maxIndexToConsider = getNodeLength(currentContainer);\n } while (true);\n\n range.setStart(bestContainer, bestOffset);\n return range;\n}\n\nmodule.exports = expandRangeToStartOfLine;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar getSelectionOffsetKeyForNode = require(\"./getSelectionOffsetKeyForNode\");\n/**\n * Get the key from the node's nearest offset-aware ancestor.\n */\n\n\nfunction findAncestorOffsetKey(node) {\n var searchNode = node;\n\n while (searchNode && searchNode !== getCorrectDocumentFromNode(node).documentElement) {\n var key = getSelectionOffsetKeyForNode(searchNode);\n\n if (key != null) {\n return key;\n }\n\n searchNode = searchNode.parentNode;\n }\n\n return null;\n}\n\nmodule.exports = findAncestorOffsetKey;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Search through an array to find contiguous stretches of elements that\n * match a specified filter function.\n *\n * When ranges are found, execute a specified `found` function to supply\n * the values to the caller.\n */\nfunction findRangesImmutable(haystack, areEqualFn, filterFn, foundFn) {\n if (!haystack.size) {\n return;\n }\n\n var cursor = 0;\n haystack.reduce(function (value, nextValue, nextIndex) {\n if (!areEqualFn(value, nextValue)) {\n if (filterFn(value)) {\n foundFn(cursor, nextIndex);\n }\n\n cursor = nextIndex;\n }\n\n return nextValue;\n });\n filterFn(haystack.last()) && foundFn(cursor, haystack.count());\n}\n\nmodule.exports = findRangesImmutable;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar seenKeys = {};\nvar MULTIPLIER = Math.pow(2, 24);\n\nfunction generateRandomKey() {\n var key;\n\n while (key === undefined || seenKeys.hasOwnProperty(key) || !isNaN(+key)) {\n key = Math.floor(Math.random() * MULTIPLIER).toString(32);\n }\n\n seenKeys[key] = true;\n return key;\n}\n\nmodule.exports = generateRandomKey;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftEntitySegments = require(\"./DraftEntitySegments\");\n\nvar getRangesForDraftEntity = require(\"./getRangesForDraftEntity\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n/**\n * Given a SelectionState and a removal direction, determine the entire range\n * that should be removed from a ContentState. This is based on any entities\n * within the target, with their `mutability` values taken into account.\n *\n * For instance, if we are attempting to remove part of an \"immutable\" entity\n * range, the entire entity must be removed. The returned `SelectionState`\n * will be adjusted accordingly.\n */\n\n\nfunction getCharacterRemovalRange(entityMap, startBlock, endBlock, selectionState, direction) {\n var start = selectionState.getStartOffset();\n var end = selectionState.getEndOffset();\n var startEntityKey = startBlock.getEntityAt(start);\n var endEntityKey = endBlock.getEntityAt(end - 1);\n\n if (!startEntityKey && !endEntityKey) {\n return selectionState;\n }\n\n var newSelectionState = selectionState;\n\n if (startEntityKey && startEntityKey === endEntityKey) {\n newSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, true, true);\n } else if (startEntityKey && endEntityKey) {\n var startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true);\n var endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false);\n newSelectionState = newSelectionState.merge({\n anchorOffset: startSelectionState.getAnchorOffset(),\n focusOffset: endSelectionState.getFocusOffset(),\n isBackward: false\n });\n } else if (startEntityKey) {\n var _startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true);\n\n newSelectionState = newSelectionState.merge({\n anchorOffset: _startSelectionState.getStartOffset(),\n isBackward: false\n });\n } else if (endEntityKey) {\n var _endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false);\n\n newSelectionState = newSelectionState.merge({\n focusOffset: _endSelectionState.getEndOffset(),\n isBackward: false\n });\n }\n\n return newSelectionState;\n}\n\nfunction getEntityRemovalRange(entityMap, block, selectionState, direction, entityKey, isEntireSelectionWithinEntity, isEntityAtStart) {\n var start = selectionState.getStartOffset();\n var end = selectionState.getEndOffset();\n\n var entity = entityMap.__get(entityKey);\n\n var mutability = entity.getMutability();\n var sideToConsider = isEntityAtStart ? start : end; // `MUTABLE` entities can just have the specified range of text removed\n // directly. No adjustments are needed.\n\n if (mutability === 'MUTABLE') {\n return selectionState;\n } // Find the entity range that overlaps with our removal range.\n\n\n var entityRanges = getRangesForDraftEntity(block, entityKey).filter(function (range) {\n return sideToConsider <= range.end && sideToConsider >= range.start;\n });\n !(entityRanges.length == 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'There should only be one entity range within this removal range.') : invariant(false) : void 0;\n var entityRange = entityRanges[0]; // For `IMMUTABLE` entity types, we will remove the entire entity range.\n\n if (mutability === 'IMMUTABLE') {\n return selectionState.merge({\n anchorOffset: entityRange.start,\n focusOffset: entityRange.end,\n isBackward: false\n });\n } // For `SEGMENTED` entity types, determine the appropriate segment to\n // remove.\n\n\n if (!isEntireSelectionWithinEntity) {\n if (isEntityAtStart) {\n end = entityRange.end;\n } else {\n start = entityRange.start;\n }\n }\n\n var removalRange = DraftEntitySegments.getRemovalRange(start, end, block.getText().slice(entityRange.start, entityRange.end), entityRange.start, direction);\n return selectionState.merge({\n anchorOffset: removalRange.start,\n focusOffset: removalRange.end,\n isBackward: false\n });\n}\n\nmodule.exports = getCharacterRemovalRange;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nfunction getContentEditableContainer(editor) {\n var editorNode = editor.editorContainer;\n !editorNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing editorNode') : invariant(false) : void 0;\n !isHTMLElement(editorNode.firstChild) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'editorNode.firstChild is not an HTMLElement') : invariant(false) : void 0;\n var htmlElement = editorNode.firstChild;\n return htmlElement;\n}\n\nmodule.exports = getContentEditableContainer;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar randomizeBlockMapKeys = require(\"./randomizeBlockMapKeys\");\n\nvar removeEntitiesAtEdges = require(\"./removeEntitiesAtEdges\");\n\nvar getContentStateFragment = function getContentStateFragment(contentState, selectionState) {\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset(); // Edge entities should be stripped to ensure that we don't preserve\n // invalid partial entities when the fragment is reused. We do, however,\n // preserve entities that are entirely within the selection range.\n\n var contentWithoutEdgeEntities = removeEntitiesAtEdges(contentState, selectionState);\n var blockMap = contentWithoutEdgeEntities.getBlockMap();\n var blockKeys = blockMap.keySeq();\n var startIndex = blockKeys.indexOf(startKey);\n var endIndex = blockKeys.indexOf(endKey) + 1;\n return randomizeBlockMapKeys(blockMap.slice(startIndex, endIndex).map(function (block, blockKey) {\n var text = block.getText();\n var chars = block.getCharacterList();\n\n if (startKey === endKey) {\n return block.merge({\n text: text.slice(startOffset, endOffset),\n characterList: chars.slice(startOffset, endOffset)\n });\n }\n\n if (blockKey === startKey) {\n return block.merge({\n text: text.slice(startOffset),\n characterList: chars.slice(startOffset)\n });\n }\n\n if (blockKey === endKey) {\n return block.merge({\n text: text.slice(0, endOffset),\n characterList: chars.slice(0, endOffset)\n });\n }\n\n return block;\n }));\n};\n\nmodule.exports = getContentStateFragment;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nfunction getCorrectDocumentFromNode(node) {\n if (!node || !node.ownerDocument) {\n return document;\n }\n\n return node.ownerDocument;\n}\n\nmodule.exports = getCorrectDocumentFromNode;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar KeyBindingUtil = require(\"./KeyBindingUtil\");\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar isOSX = UserAgent.isPlatform('Mac OS X'); // Firefox on OSX had a bug resulting in navigation instead of cursor movement.\n// This bug was fixed in Firefox 29. Feature detection is virtually impossible\n// so we just check the version number. See #342765.\n\nvar shouldFixFirefoxMovement = isOSX && UserAgent.isBrowser('Firefox < 29');\nvar hasCommandModifier = KeyBindingUtil.hasCommandModifier,\n isCtrlKeyCommand = KeyBindingUtil.isCtrlKeyCommand;\n\nfunction shouldRemoveWord(e) {\n return isOSX && e.altKey || isCtrlKeyCommand(e);\n}\n/**\n * Get the appropriate undo/redo command for a Z key command.\n */\n\n\nfunction getZCommand(e) {\n if (!hasCommandModifier(e)) {\n return null;\n }\n\n return e.shiftKey ? 'redo' : 'undo';\n}\n\nfunction getDeleteCommand(e) {\n // Allow default \"cut\" behavior for PCs on Shift + Delete.\n if (!isOSX && e.shiftKey) {\n return null;\n }\n\n return shouldRemoveWord(e) ? 'delete-word' : 'delete';\n}\n\nfunction getBackspaceCommand(e) {\n if (hasCommandModifier(e) && isOSX) {\n return 'backspace-to-start-of-line';\n }\n\n return shouldRemoveWord(e) ? 'backspace-word' : 'backspace';\n}\n/**\n * Retrieve a bound key command for the given event.\n */\n\n\nfunction getDefaultKeyBinding(e) {\n switch (e.keyCode) {\n case 66:\n // B\n return hasCommandModifier(e) ? 'bold' : null;\n\n case 68:\n // D\n return isCtrlKeyCommand(e) ? 'delete' : null;\n\n case 72:\n // H\n return isCtrlKeyCommand(e) ? 'backspace' : null;\n\n case 73:\n // I\n return hasCommandModifier(e) ? 'italic' : null;\n\n case 74:\n // J\n return hasCommandModifier(e) ? 'code' : null;\n\n case 75:\n // K\n return isOSX && isCtrlKeyCommand(e) ? 'secondary-cut' : null;\n\n case 77:\n // M\n return isCtrlKeyCommand(e) ? 'split-block' : null;\n\n case 79:\n // O\n return isCtrlKeyCommand(e) ? 'split-block' : null;\n\n case 84:\n // T\n return isOSX && isCtrlKeyCommand(e) ? 'transpose-characters' : null;\n\n case 85:\n // U\n return hasCommandModifier(e) ? 'underline' : null;\n\n case 87:\n // W\n return isOSX && isCtrlKeyCommand(e) ? 'backspace-word' : null;\n\n case 89:\n // Y\n if (isCtrlKeyCommand(e)) {\n return isOSX ? 'secondary-paste' : 'redo';\n }\n\n return null;\n\n case 90:\n // Z\n return getZCommand(e) || null;\n\n case Keys.RETURN:\n return 'split-block';\n\n case Keys.DELETE:\n return getDeleteCommand(e);\n\n case Keys.BACKSPACE:\n return getBackspaceCommand(e);\n // LEFT/RIGHT handlers serve as a workaround for a Firefox bug.\n\n case Keys.LEFT:\n return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-start-of-block' : null;\n\n case Keys.RIGHT:\n return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-end-of-block' : null;\n\n default:\n return null;\n }\n}\n\nmodule.exports = getDefaultKeyBinding;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getDraftEditorSelectionWithNodes = require(\"./getDraftEditorSelectionWithNodes\");\n/**\n * Convert the current selection range to an anchor/focus pair of offset keys\n * and values that can be interpreted by components.\n */\n\n\nfunction getDraftEditorSelection(editorState, root) {\n var selection = root.ownerDocument.defaultView.getSelection();\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset,\n rangeCount = selection.rangeCount;\n\n if ( // No active selection.\n rangeCount === 0 || // No selection, ever. As in, the user hasn't selected anything since\n // opening the document.\n anchorNode == null || focusNode == null) {\n return {\n selectionState: editorState.getSelection().set('hasFocus', false),\n needsRecovery: false\n };\n }\n\n return getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n\nmodule.exports = getDraftEditorSelection;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar getSelectionOffsetKeyForNode = require(\"./getSelectionOffsetKeyForNode\");\n\nvar getUpdatedSelectionState = require(\"./getUpdatedSelectionState\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isElement = require(\"./isElement\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\n/**\n * Convert the current selection range to an anchor/focus pair of offset keys\n * and values that can be interpreted by components.\n */\nfunction getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset) {\n var anchorIsTextNode = anchorNode.nodeType === Node.TEXT_NODE;\n var focusIsTextNode = focusNode.nodeType === Node.TEXT_NODE; // If the selection range lies only on text nodes, the task is simple.\n // Find the nearest offset-aware elements and use the\n // offset values supplied by the selection range.\n\n if (anchorIsTextNode && focusIsTextNode) {\n return {\n selectionState: getUpdatedSelectionState(editorState, nullthrows(findAncestorOffsetKey(anchorNode)), anchorOffset, nullthrows(findAncestorOffsetKey(focusNode)), focusOffset),\n needsRecovery: false\n };\n }\n\n var anchorPoint = null;\n var focusPoint = null;\n var needsRecovery = true; // An element is selected. Convert this selection range into leaf offset\n // keys and offset values for consumption at the component level. This\n // is common in Firefox, where select-all and triple click behavior leads\n // to entire elements being selected.\n //\n // Note that we use the `needsRecovery` parameter in the callback here. This\n // is because when certain elements are selected, the behavior for subsequent\n // cursor movement (e.g. via arrow keys) is uncertain and may not match\n // expectations at the component level. For example, if an entire
    is\n // selected and the user presses the right arrow, Firefox keeps the selection\n // on the
    . If we allow subsequent keypresses to insert characters\n // natively, they will be inserted into a browser-created text node to the\n // right of that
    . This is obviously undesirable.\n //\n // With the `needsRecovery` flag, we inform the caller that it is responsible\n // for manually setting the selection state on the rendered document to\n // ensure proper selection state maintenance.\n\n if (anchorIsTextNode) {\n anchorPoint = {\n key: nullthrows(findAncestorOffsetKey(anchorNode)),\n offset: anchorOffset\n };\n focusPoint = getPointForNonTextNode(root, focusNode, focusOffset);\n } else if (focusIsTextNode) {\n focusPoint = {\n key: nullthrows(findAncestorOffsetKey(focusNode)),\n offset: focusOffset\n };\n anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset);\n } else {\n anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset);\n focusPoint = getPointForNonTextNode(root, focusNode, focusOffset); // If the selection is collapsed on an empty block, don't force recovery.\n // This way, on arrow key selection changes, the browser can move the\n // cursor from a non-zero offset on one block, through empty blocks,\n // to a matching non-zero offset on other text blocks.\n\n if (anchorNode === focusNode && anchorOffset === focusOffset) {\n needsRecovery = !!anchorNode.firstChild && anchorNode.firstChild.nodeName !== 'BR';\n }\n }\n\n return {\n selectionState: getUpdatedSelectionState(editorState, anchorPoint.key, anchorPoint.offset, focusPoint.key, focusPoint.offset),\n needsRecovery: needsRecovery\n };\n}\n/**\n * Identify the first leaf descendant for the given node.\n */\n\n\nfunction getFirstLeaf(node) {\n while (node.firstChild && ( // data-blocks has no offset\n isElement(node.firstChild) && node.firstChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.firstChild))) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Identify the last leaf descendant for the given node.\n */\n\n\nfunction getLastLeaf(node) {\n while (node.lastChild && ( // data-blocks has no offset\n isElement(node.lastChild) && node.lastChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.lastChild))) {\n node = node.lastChild;\n }\n\n return node;\n}\n\nfunction getPointForNonTextNode(editorRoot, startNode, childOffset) {\n var node = startNode;\n var offsetKey = findAncestorOffsetKey(node);\n !(offsetKey != null || editorRoot && (editorRoot === node || editorRoot.firstChild === node)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unknown node in selection range.') : invariant(false) : void 0; // If the editorRoot is the selection, step downward into the content\n // wrapper.\n\n if (editorRoot === node) {\n node = node.firstChild;\n !isElement(node) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid DraftEditorContents node.') : invariant(false) : void 0;\n var castedNode = node; // assignment only added for flow :/\n // otherwise it throws in line 200 saying that node can be null or undefined\n\n node = castedNode;\n !(node.getAttribute('data-contents') === 'true') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid DraftEditorContents structure.') : invariant(false) : void 0;\n\n if (childOffset > 0) {\n childOffset = node.childNodes.length;\n }\n } // If the child offset is zero and we have an offset key, we're done.\n // If there's no offset key because the entire editor is selected,\n // find the leftmost (\"first\") leaf in the tree and use that as the offset\n // key.\n\n\n if (childOffset === 0) {\n var key = null;\n\n if (offsetKey != null) {\n key = offsetKey;\n } else {\n var firstLeaf = getFirstLeaf(node);\n key = nullthrows(getSelectionOffsetKeyForNode(firstLeaf));\n }\n\n return {\n key: key,\n offset: 0\n };\n }\n\n var nodeBeforeCursor = node.childNodes[childOffset - 1];\n var leafKey = null;\n var textLength = null;\n\n if (!getSelectionOffsetKeyForNode(nodeBeforeCursor)) {\n // Our target node may be a leaf or a text node, in which case we're\n // already where we want to be and can just use the child's length as\n // our offset.\n leafKey = nullthrows(offsetKey);\n textLength = getTextContentLength(nodeBeforeCursor);\n } else {\n // Otherwise, we'll look at the child to the left of the cursor and find\n // the last leaf node in its subtree.\n var lastLeaf = getLastLeaf(nodeBeforeCursor);\n leafKey = nullthrows(getSelectionOffsetKeyForNode(lastLeaf));\n textLength = getTextContentLength(lastLeaf);\n }\n\n return {\n key: leafKey,\n offset: textLength\n };\n}\n/**\n * Return the length of a node's textContent, regarding single newline\n * characters as zero-length. This allows us to avoid problems with identifying\n * the correct selection offset for empty blocks in IE, in which we\n * render newlines instead of break tags.\n */\n\n\nfunction getTextContentLength(node) {\n var textContent = node.textContent;\n return textContent === '\\n' ? 0 : textContent.length;\n}\n\nmodule.exports = getDraftEditorSelectionWithNodes;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _require = require(\"./draftKeyUtils\"),\n notEmptyKey = _require.notEmptyKey;\n/**\n * Return the entity key that should be used when inserting text for the\n * specified target selection, only if the entity is `MUTABLE`. `IMMUTABLE`\n * and `SEGMENTED` entities should not be used for insertion behavior.\n */\n\n\nfunction getEntityKeyForSelection(contentState, targetSelection) {\n var entityKey;\n\n if (targetSelection.isCollapsed()) {\n var key = targetSelection.getAnchorKey();\n var offset = targetSelection.getAnchorOffset();\n\n if (offset > 0) {\n entityKey = contentState.getBlockForKey(key).getEntityAt(offset - 1);\n\n if (entityKey !== contentState.getBlockForKey(key).getEntityAt(offset)) {\n return null;\n }\n\n return filterKey(contentState.getEntityMap(), entityKey);\n }\n\n return null;\n }\n\n var startKey = targetSelection.getStartKey();\n var startOffset = targetSelection.getStartOffset();\n var startBlock = contentState.getBlockForKey(startKey);\n entityKey = startOffset === startBlock.getLength() ? null : startBlock.getEntityAt(startOffset);\n return filterKey(contentState.getEntityMap(), entityKey);\n}\n/**\n * Determine whether an entity key corresponds to a `MUTABLE` entity. If so,\n * return it. If not, return null.\n */\n\n\nfunction filterKey(entityMap, entityKey) {\n if (notEmptyKey(entityKey)) {\n var entity = entityMap.__get(entityKey);\n\n return entity.getMutability() === 'MUTABLE' ? entityKey : null;\n }\n\n return null;\n}\n\nmodule.exports = getEntityKeyForSelection;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n\nfunction getFragmentFromSelection(editorState) {\n var selectionState = editorState.getSelection();\n\n if (selectionState.isCollapsed()) {\n return null;\n }\n\n return getContentStateFragment(editorState.getCurrentContent(), selectionState);\n}\n\nmodule.exports = getFragmentFromSelection;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar getNextDelimiterBlockKey = function getNextDelimiterBlockKey(block, blockMap) {\n var isExperimentalTreeBlock = block instanceof ContentBlockNode;\n\n if (!isExperimentalTreeBlock) {\n return null;\n }\n\n var nextSiblingKey = block.getNextSiblingKey();\n\n if (nextSiblingKey) {\n return nextSiblingKey;\n }\n\n var parent = block.getParentKey();\n\n if (!parent) {\n return null;\n }\n\n var nextNonDescendantBlock = blockMap.get(parent);\n\n while (nextNonDescendantBlock && !nextNonDescendantBlock.getNextSiblingKey()) {\n var parentKey = nextNonDescendantBlock.getParentKey();\n nextNonDescendantBlock = parentKey ? blockMap.get(parentKey) : null;\n }\n\n if (!nextNonDescendantBlock) {\n return null;\n }\n\n return nextNonDescendantBlock.getNextSiblingKey();\n};\n\nmodule.exports = getNextDelimiterBlockKey;","\"use strict\";\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * \n * @typechecks\n * @format\n */\n\n/**\n * Retrieve an object's own values as an array. If you want the values in the\n * protoype chain, too, use getObjectValuesIncludingPrototype.\n *\n * If you are looking for a function that creates an Array instance based\n * on an \"Array-like\" object, use createArrayFrom instead.\n *\n * @param {object} obj An object.\n * @return {array} The object's values.\n */\nfunction getOwnObjectValues(obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n}\n\nmodule.exports = getOwnObjectValues;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getRangeClientRects = require(\"./getRangeClientRects\");\n\n/**\n * Like range.getBoundingClientRect() but normalizes for browser bugs.\n */\nfunction getRangeBoundingClientRect(range) {\n // \"Return a DOMRect object describing the smallest rectangle that includes\n // the first rectangle in list and all of the remaining rectangles of which\n // the height or width is not zero.\"\n // http://www.w3.org/TR/cssom-view/#dom-range-getboundingclientrect\n var rects = getRangeClientRects(range);\n var top = 0;\n var right = 0;\n var bottom = 0;\n var left = 0;\n\n if (rects.length) {\n // If the first rectangle has 0 width, we use the second, this is needed\n // because Chrome renders a 0 width rectangle when the selection contains\n // a line break.\n if (rects.length > 1 && rects[0].width === 0) {\n var _rects$ = rects[1];\n top = _rects$.top;\n right = _rects$.right;\n bottom = _rects$.bottom;\n left = _rects$.left;\n } else {\n var _rects$2 = rects[0];\n top = _rects$2.top;\n right = _rects$2.right;\n bottom = _rects$2.bottom;\n left = _rects$2.left;\n }\n\n for (var ii = 1; ii < rects.length; ii++) {\n var rect = rects[ii];\n\n if (rect.height !== 0 && rect.width !== 0) {\n top = Math.min(top, rect.top);\n right = Math.max(right, rect.right);\n bottom = Math.max(bottom, rect.bottom);\n left = Math.min(left, rect.left);\n }\n }\n }\n\n return {\n top: top,\n right: right,\n bottom: bottom,\n left: left,\n width: right - left,\n height: bottom - top\n };\n}\n\nmodule.exports = getRangeBoundingClientRect;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isChrome = UserAgent.isBrowser('Chrome'); // In Chrome, the client rects will include the entire bounds of all nodes that\n// begin (have a start tag) within the selection, even if the selection does\n// not overlap the entire node. To resolve this, we split the range at each\n// start tag and join the client rects together.\n// https://code.google.com/p/chromium/issues/detail?id=324437\n\n/* eslint-disable consistent-return */\n\nfunction getRangeClientRectsChrome(range) {\n var tempRange = range.cloneRange();\n var clientRects = [];\n\n for (var ancestor = range.endContainer; ancestor != null; ancestor = ancestor.parentNode) {\n // If we've climbed up to the common ancestor, we can now use the\n // original start point and stop climbing the tree.\n var atCommonAncestor = ancestor === range.commonAncestorContainer;\n\n if (atCommonAncestor) {\n tempRange.setStart(range.startContainer, range.startOffset);\n } else {\n tempRange.setStart(tempRange.endContainer, 0);\n }\n\n var rects = Array.from(tempRange.getClientRects());\n clientRects.push(rects);\n\n if (atCommonAncestor) {\n var _ref;\n\n clientRects.reverse();\n return (_ref = []).concat.apply(_ref, clientRects);\n }\n\n tempRange.setEndBefore(ancestor);\n }\n\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Found an unexpected detached subtree when getting range client rects.') : invariant(false) : void 0;\n}\n/* eslint-enable consistent-return */\n\n/**\n * Like range.getClientRects() but normalizes for browser bugs.\n */\n\n\nvar getRangeClientRects = isChrome ? getRangeClientRectsChrome : function (range) {\n return Array.from(range.getClientRects());\n};\nmodule.exports = getRangeClientRects;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar invariant = require(\"fbjs/lib/invariant\");\n/**\n * Obtain the start and end positions of the range that has the\n * specified entity applied to it.\n *\n * Entity keys are applied only to contiguous stretches of text, so this\n * method searches for the first instance of the entity key and returns\n * the subsequent range.\n */\n\n\nfunction getRangesForDraftEntity(block, key) {\n var ranges = [];\n block.findEntityRanges(function (c) {\n return c.getEntity() === key;\n }, function (start, end) {\n ranges.push({\n start: start,\n end: end\n });\n });\n !!!ranges.length ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Entity key not found in this range.') : invariant(false) : void 0;\n return ranges;\n}\n\nmodule.exports = getRangesForDraftEntity;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isOldIE = UserAgent.isBrowser('IE <= 9'); // Provides a dom node that will not execute scripts\n// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation.createHTMLDocument\n// https://developer.mozilla.org/en-US/Add-ons/Code_snippets/HTML_to_DOM\n\nfunction getSafeBodyFromHTML(html) {\n var doc;\n var root = null; // Provides a safe context\n\n if (!isOldIE && document.implementation && document.implementation.createHTMLDocument) {\n doc = document.implementation.createHTMLDocument('foo');\n !doc.documentElement ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing doc.documentElement') : invariant(false) : void 0;\n doc.documentElement.innerHTML = html;\n root = doc.getElementsByTagName('body')[0];\n }\n\n return root;\n}\n\nmodule.exports = getSafeBodyFromHTML;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n/**\n * Get offset key from a node or it's child nodes. Return the first offset key\n * found on the DOM tree of given node.\n */\n\nvar isElement = require(\"./isElement\");\n\nfunction getSelectionOffsetKeyForNode(node) {\n if (isElement(node)) {\n var castedNode = node;\n var offsetKey = castedNode.getAttribute('data-offset-key');\n\n if (offsetKey) {\n return offsetKey;\n }\n\n for (var ii = 0; ii < castedNode.childNodes.length; ii++) {\n var childOffsetKey = getSelectionOffsetKeyForNode(castedNode.childNodes[ii]);\n\n if (childOffsetKey) {\n return childOffsetKey;\n }\n }\n }\n\n return null;\n}\n\nmodule.exports = getSelectionOffsetKeyForNode;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar TEXT_CLIPPING_REGEX = /\\.textClipping$/;\nvar TEXT_TYPES = {\n 'text/plain': true,\n 'text/html': true,\n 'text/rtf': true\n}; // Somewhat arbitrary upper bound on text size. Let's not lock up the browser.\n\nvar TEXT_SIZE_UPPER_BOUND = 5000;\n/**\n * Extract the text content from a file list.\n */\n\nfunction getTextContentFromFiles(files, callback) {\n var readCount = 0;\n var results = [];\n files.forEach(function (\n /*blob*/\n file) {\n readFile(file, function (\n /*string*/\n text) {\n readCount++;\n text && results.push(text.slice(0, TEXT_SIZE_UPPER_BOUND));\n\n if (readCount == files.length) {\n callback(results.join('\\r'));\n }\n });\n });\n}\n/**\n * todo isaac: Do work to turn html/rtf into a content fragment.\n */\n\n\nfunction readFile(file, callback) {\n if (!global.FileReader || file.type && !(file.type in TEXT_TYPES)) {\n callback('');\n return;\n }\n\n if (file.type === '') {\n var _contents = ''; // Special-case text clippings, which have an empty type but include\n // `.textClipping` in the file name. `readAsText` results in an empty\n // string for text clippings, so we force the file name to serve\n // as the text value for the file.\n\n if (TEXT_CLIPPING_REGEX.test(file.name)) {\n _contents = file.name.replace(TEXT_CLIPPING_REGEX, '');\n }\n\n callback(_contents);\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function () {\n var result = reader.result;\n !(typeof result === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'We should be calling \"FileReader.readAsText\" which returns a string') : invariant(false) : void 0;\n callback(result);\n };\n\n reader.onerror = function () {\n callback('');\n };\n\n reader.readAsText(file);\n}\n\nmodule.exports = getTextContentFromFiles;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nfunction getUpdatedSelectionState(editorState, anchorKey, anchorOffset, focusKey, focusOffset) {\n var selection = nullthrows(editorState.getSelection());\n\n if (!anchorKey || !focusKey) {\n // If we cannot make sense of the updated selection state, stick to the current one.\n if (process.env.NODE_ENV !== \"production\") {\n /* eslint-disable-next-line */\n console.warn('Invalid selection state.', arguments, editorState.toJS());\n }\n\n return selection;\n }\n\n var anchorPath = DraftOffsetKey.decode(anchorKey);\n var anchorBlockKey = anchorPath.blockKey;\n var anchorLeafBlockTree = editorState.getBlockTree(anchorBlockKey);\n var anchorLeaf = anchorLeafBlockTree && anchorLeafBlockTree.getIn([anchorPath.decoratorKey, 'leaves', anchorPath.leafKey]);\n var focusPath = DraftOffsetKey.decode(focusKey);\n var focusBlockKey = focusPath.blockKey;\n var focusLeafBlockTree = editorState.getBlockTree(focusBlockKey);\n var focusLeaf = focusLeafBlockTree && focusLeafBlockTree.getIn([focusPath.decoratorKey, 'leaves', focusPath.leafKey]);\n\n if (!anchorLeaf || !focusLeaf) {\n // If we cannot make sense of the updated selection state, stick to the current one.\n if (process.env.NODE_ENV !== \"production\") {\n /* eslint-disable-next-line */\n console.warn('Invalid selection state.', arguments, editorState.toJS());\n }\n\n return selection;\n }\n\n var anchorLeafStart = anchorLeaf.get('start');\n var focusLeafStart = focusLeaf.get('start');\n var anchorBlockOffset = anchorLeaf ? anchorLeafStart + anchorOffset : null;\n var focusBlockOffset = focusLeaf ? focusLeafStart + focusOffset : null;\n var areEqual = selection.getAnchorKey() === anchorBlockKey && selection.getAnchorOffset() === anchorBlockOffset && selection.getFocusKey() === focusBlockKey && selection.getFocusOffset() === focusBlockOffset;\n\n if (areEqual) {\n return selection;\n }\n\n var isBackward = false;\n\n if (anchorBlockKey === focusBlockKey) {\n var anchorLeafEnd = anchorLeaf.get('end');\n var focusLeafEnd = focusLeaf.get('end');\n\n if (focusLeafStart === anchorLeafStart && focusLeafEnd === anchorLeafEnd) {\n isBackward = focusOffset < anchorOffset;\n } else {\n isBackward = focusLeafStart < anchorLeafStart;\n }\n } else {\n var startKey = editorState.getCurrentContent().getBlockMap().keySeq().skipUntil(function (v) {\n return v === anchorBlockKey || v === focusBlockKey;\n }).first();\n isBackward = startKey === focusBlockKey;\n }\n\n return selection.merge({\n anchorKey: anchorBlockKey,\n anchorOffset: anchorBlockOffset,\n focusKey: focusBlockKey,\n focusOffset: focusBlockOffset,\n isBackward: isBackward\n });\n}\n\nmodule.exports = getUpdatedSelectionState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getRangeBoundingClientRect = require(\"./getRangeBoundingClientRect\");\n/**\n * Return the bounding ClientRect for the visible DOM selection, if any.\n * In cases where there are no selected ranges or the bounding rect is\n * temporarily invalid, return null.\n *\n * When using from an iframe, you should pass the iframe window object\n */\n\n\nfunction getVisibleSelectionRect(global) {\n var selection = global.getSelection();\n\n if (!selection.rangeCount) {\n return null;\n }\n\n var range = selection.getRangeAt(0);\n var boundingRect = getRangeBoundingClientRect(range);\n var top = boundingRect.top,\n right = boundingRect.right,\n bottom = boundingRect.bottom,\n left = boundingRect.left; // When a re-render leads to a node being removed, the DOM selection will\n // temporarily be placed on an ancestor node, which leads to an invalid\n // bounding rect. Discard this state.\n\n if (top === 0 && right === 0 && bottom === 0 && left === 0) {\n return null;\n }\n\n return boundingRect;\n}\n\nmodule.exports = getVisibleSelectionRect;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nfunction getWindowForNode(node) {\n if (!node || !node.ownerDocument || !node.ownerDocument.defaultView) {\n return window;\n }\n\n return node.ownerDocument.defaultView;\n}\n\nmodule.exports = getWindowForNode;","/**\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 * @format\n * \n */\n'use strict';\n\nmodule.exports = function (name) {\n if (typeof window !== 'undefined' && window.__DRAFT_GKX) {\n return !!window.__DRAFT_GKX[name];\n }\n\n return false;\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar Immutable = require(\"immutable\");\n\nvar insertIntoList = require(\"./insertIntoList\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar randomizeBlockMapKeys = require(\"./randomizeBlockMapKeys\");\n\nvar List = Immutable.List;\n\nvar updateExistingBlock = function updateExistingBlock(contentState, selectionState, blockMap, fragmentBlock, targetKey, targetOffset) {\n var mergeBlockData = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'REPLACE_WITH_NEW_DATA';\n var targetBlock = blockMap.get(targetKey);\n var text = targetBlock.getText();\n var chars = targetBlock.getCharacterList();\n var finalKey = targetKey;\n var finalOffset = targetOffset + fragmentBlock.getText().length;\n var data = null;\n\n switch (mergeBlockData) {\n case 'MERGE_OLD_DATA_TO_NEW_DATA':\n data = fragmentBlock.getData().merge(targetBlock.getData());\n break;\n\n case 'REPLACE_WITH_NEW_DATA':\n data = fragmentBlock.getData();\n break;\n }\n\n var type = targetBlock.getType();\n\n if (text && type === 'unstyled') {\n type = fragmentBlock.getType();\n }\n\n var newBlock = targetBlock.merge({\n text: text.slice(0, targetOffset) + fragmentBlock.getText() + text.slice(targetOffset),\n characterList: insertIntoList(chars, fragmentBlock.getCharacterList(), targetOffset),\n type: type,\n data: data\n });\n return contentState.merge({\n blockMap: blockMap.set(targetKey, newBlock),\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: finalKey,\n anchorOffset: finalOffset,\n focusKey: finalKey,\n focusOffset: finalOffset,\n isBackward: false\n })\n });\n};\n/**\n * Appends text/characterList from the fragment first block to\n * target block.\n */\n\n\nvar updateHead = function updateHead(block, targetOffset, fragment) {\n var text = block.getText();\n var chars = block.getCharacterList(); // Modify head portion of block.\n\n var headText = text.slice(0, targetOffset);\n var headCharacters = chars.slice(0, targetOffset);\n var appendToHead = fragment.first();\n return block.merge({\n text: headText + appendToHead.getText(),\n characterList: headCharacters.concat(appendToHead.getCharacterList()),\n type: headText ? block.getType() : appendToHead.getType(),\n data: appendToHead.getData()\n });\n};\n/**\n * Appends offset text/characterList from the target block to the last\n * fragment block.\n */\n\n\nvar updateTail = function updateTail(block, targetOffset, fragment) {\n // Modify tail portion of block.\n var text = block.getText();\n var chars = block.getCharacterList(); // Modify head portion of block.\n\n var blockSize = text.length;\n var tailText = text.slice(targetOffset, blockSize);\n var tailCharacters = chars.slice(targetOffset, blockSize);\n var prependToTail = fragment.last();\n return prependToTail.merge({\n text: prependToTail.getText() + tailText,\n characterList: prependToTail.getCharacterList().concat(tailCharacters),\n data: prependToTail.getData()\n });\n};\n\nvar getRootBlocks = function getRootBlocks(block, blockMap) {\n var headKey = block.getKey();\n var rootBlock = block;\n var rootBlocks = []; // sometimes the fragment head block will not be part of the blockMap itself this can happen when\n // the fragment head is used to update the target block, however when this does not happen we need\n // to make sure that we include it on the rootBlocks since the first block of a fragment is always a\n // fragment root block\n\n if (blockMap.get(headKey)) {\n rootBlocks.push(headKey);\n }\n\n while (rootBlock && rootBlock.getNextSiblingKey()) {\n var lastSiblingKey = rootBlock.getNextSiblingKey();\n\n if (!lastSiblingKey) {\n break;\n }\n\n rootBlocks.push(lastSiblingKey);\n rootBlock = blockMap.get(lastSiblingKey);\n }\n\n return rootBlocks;\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockMap, targetBlock, fragmentHeadBlock) {\n return blockMap.withMutations(function (blockMapState) {\n var targetKey = targetBlock.getKey();\n var headKey = fragmentHeadBlock.getKey();\n var targetNextKey = targetBlock.getNextSiblingKey();\n var targetParentKey = targetBlock.getParentKey();\n var fragmentRootBlocks = getRootBlocks(fragmentHeadBlock, blockMap);\n var lastRootFragmentBlockKey = fragmentRootBlocks[fragmentRootBlocks.length - 1];\n\n if (blockMapState.get(headKey)) {\n // update the fragment head when it is part of the blockMap otherwise\n blockMapState.setIn([targetKey, 'nextSibling'], headKey);\n blockMapState.setIn([headKey, 'prevSibling'], targetKey);\n } else {\n // update the target block that had the fragment head contents merged into it\n blockMapState.setIn([targetKey, 'nextSibling'], fragmentHeadBlock.getNextSiblingKey());\n blockMapState.setIn([fragmentHeadBlock.getNextSiblingKey(), 'prevSibling'], targetKey);\n } // update the last root block fragment\n\n\n blockMapState.setIn([lastRootFragmentBlockKey, 'nextSibling'], targetNextKey); // update the original target next block\n\n if (targetNextKey) {\n blockMapState.setIn([targetNextKey, 'prevSibling'], lastRootFragmentBlockKey);\n } // update fragment parent links\n\n\n fragmentRootBlocks.forEach(function (blockKey) {\n return blockMapState.setIn([blockKey, 'parent'], targetParentKey);\n }); // update targetBlock parent child links\n\n if (targetParentKey) {\n var targetParent = blockMap.get(targetParentKey);\n var originalTargetParentChildKeys = targetParent.getChildKeys();\n var targetBlockIndex = originalTargetParentChildKeys.indexOf(targetKey);\n var insertionIndex = targetBlockIndex + 1;\n var newChildrenKeysArray = originalTargetParentChildKeys.toArray(); // insert fragment children\n\n newChildrenKeysArray.splice.apply(newChildrenKeysArray, [insertionIndex, 0].concat(fragmentRootBlocks));\n blockMapState.setIn([targetParentKey, 'children'], List(newChildrenKeysArray));\n }\n });\n};\n\nvar insertFragment = function insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset) {\n var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode;\n var newBlockArr = [];\n var fragmentSize = fragment.size;\n var target = blockMap.get(targetKey);\n var head = fragment.first();\n var tail = fragment.last();\n var finalOffset = tail.getLength();\n var finalKey = tail.getKey();\n var shouldNotUpdateFromFragmentBlock = isTreeBasedBlockMap && (!target.getChildKeys().isEmpty() || !head.getChildKeys().isEmpty());\n blockMap.forEach(function (block, blockKey) {\n if (blockKey !== targetKey) {\n newBlockArr.push(block);\n return;\n }\n\n if (shouldNotUpdateFromFragmentBlock) {\n newBlockArr.push(block);\n } else {\n newBlockArr.push(updateHead(block, targetOffset, fragment));\n } // Insert fragment blocks after the head and before the tail.\n\n\n fragment // when we are updating the target block with the head fragment block we skip the first fragment\n // head since its contents have already been merged with the target block otherwise we include\n // the whole fragment\n .slice(shouldNotUpdateFromFragmentBlock ? 0 : 1, fragmentSize - 1).forEach(function (fragmentBlock) {\n return newBlockArr.push(fragmentBlock);\n }); // update tail\n\n newBlockArr.push(updateTail(block, targetOffset, fragment));\n });\n var updatedBlockMap = BlockMapBuilder.createFromArray(newBlockArr);\n\n if (isTreeBasedBlockMap) {\n updatedBlockMap = updateBlockMapLinks(updatedBlockMap, blockMap, target, head);\n }\n\n return contentState.merge({\n blockMap: updatedBlockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: finalKey,\n anchorOffset: finalOffset,\n focusKey: finalKey,\n focusOffset: finalOffset,\n isBackward: false\n })\n });\n};\n\nvar insertFragmentIntoContentState = function insertFragmentIntoContentState(contentState, selectionState, fragmentBlockMap) {\n var mergeBlockData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'REPLACE_WITH_NEW_DATA';\n !selectionState.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`insertFragment` should only be called with a collapsed selection state.') : invariant(false) : void 0;\n var blockMap = contentState.getBlockMap();\n var fragment = randomizeBlockMapKeys(fragmentBlockMap);\n var targetKey = selectionState.getStartKey();\n var targetOffset = selectionState.getStartOffset();\n var targetBlock = blockMap.get(targetKey);\n\n if (targetBlock instanceof ContentBlockNode) {\n !targetBlock.getChildKeys().isEmpty() ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`insertFragment` should not be called when a container node is selected.') : invariant(false) : void 0;\n } // When we insert a fragment with a single block we simply update the target block\n // with the contents of the inserted fragment block\n\n\n if (fragment.size === 1) {\n return updateExistingBlock(contentState, selectionState, blockMap, fragment.first(), targetKey, targetOffset, mergeBlockData);\n }\n\n return insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset);\n};\n\nmodule.exports = insertFragmentIntoContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Maintain persistence for target list when appending and prepending.\n */\nfunction insertIntoList(targetListArg, toInsert, offset) {\n var targetList = targetListArg;\n\n if (offset === targetList.count()) {\n toInsert.forEach(function (c) {\n targetList = targetList.push(c);\n });\n } else if (offset === 0) {\n toInsert.reverse().forEach(function (c) {\n targetList = targetList.unshift(c);\n });\n } else {\n var head = targetList.slice(0, offset);\n var tail = targetList.slice(offset);\n targetList = head.concat(toInsert, tail).toList();\n }\n\n return targetList;\n}\n\nmodule.exports = insertIntoList;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Immutable = require(\"immutable\");\n\nvar insertIntoList = require(\"./insertIntoList\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar Repeat = Immutable.Repeat;\n\nfunction insertTextIntoContentState(contentState, selectionState, text, characterMetadata) {\n !selectionState.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`insertText` should only be called with a collapsed range.') : invariant(false) : void 0;\n var len = null;\n\n if (text != null) {\n len = text.length;\n }\n\n if (len == null || len === 0) {\n return contentState;\n }\n\n var blockMap = contentState.getBlockMap();\n var key = selectionState.getStartKey();\n var offset = selectionState.getStartOffset();\n var block = blockMap.get(key);\n var blockText = block.getText();\n var newBlock = block.merge({\n text: blockText.slice(0, offset) + text + blockText.slice(offset, block.getLength()),\n characterList: insertIntoList(block.getCharacterList(), Repeat(characterMetadata, len).toList(), offset)\n });\n var newOffset = offset + len;\n return contentState.merge({\n blockMap: blockMap.set(key, newBlock),\n selectionAfter: selectionState.merge({\n anchorOffset: newOffset,\n focusOffset: newOffset\n })\n });\n}\n\nmodule.exports = insertTextIntoContentState;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nfunction isElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return node.nodeType === Node.ELEMENT_NODE;\n}\n\nmodule.exports = isElement;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Utility method for determining whether or not the value returned\n * from a handler indicates that it was handled.\n */\nfunction isEventHandled(value) {\n return value === 'handled' || value === true;\n}\n\nmodule.exports = isEventHandled;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = require(\"./isElement\");\n\nfunction isHTMLAnchorElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'A';\n}\n\nmodule.exports = isHTMLAnchorElement;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = require(\"./isElement\");\n\nfunction isHTMLBRElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'BR';\n}\n\nmodule.exports = isHTMLBRElement;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nfunction isHTMLElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n if (!node.ownerDocument.defaultView) {\n return node instanceof HTMLElement;\n }\n\n if (node instanceof node.ownerDocument.defaultView.HTMLElement) {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isHTMLElement;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = require(\"./isElement\");\n\nfunction isHTMLImageElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'IMG';\n}\n\nmodule.exports = isHTMLImageElement;","\"use strict\";\n\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 * @format\n * \n * @emails oncall+draft_js\n */\nfunction isInstanceOfNode(target) {\n // we changed the name because of having duplicate module provider (fbjs)\n if (!target || !('ownerDocument' in target)) {\n return false;\n }\n\n if ('ownerDocument' in target) {\n var node = target;\n\n if (!node.ownerDocument.defaultView) {\n return node instanceof Node;\n }\n\n if (node instanceof node.ownerDocument.defaultView.Node) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = isInstanceOfNode;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction isSelectionAtLeafStart(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var blockTree = editorState.getBlockTree(anchorKey);\n var offset = selection.getStartOffset();\n var isAtStart = false;\n blockTree.some(function (leafSet) {\n if (offset === leafSet.get('start')) {\n isAtStart = true;\n return true;\n }\n\n if (offset < leafSet.get('end')) {\n return leafSet.get('leaves').some(function (leaf) {\n var leafStart = leaf.get('start');\n\n if (offset === leafStart) {\n isAtStart = true;\n return true;\n }\n\n return false;\n });\n }\n\n return false;\n });\n return isAtStart;\n}\n\nmodule.exports = isSelectionAtLeafStart;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nfunction isSoftNewlineEvent(e) {\n return e.which === Keys.RETURN && (e.getModifierState('Shift') || e.getModifierState('Alt') || e.getModifierState('Control'));\n}\n\nmodule.exports = isSoftNewlineEvent;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar expandRangeToStartOfLine = require(\"./expandRangeToStartOfLine\");\n\nvar getDraftEditorSelectionWithNodes = require(\"./getDraftEditorSelectionWithNodes\");\n\nvar moveSelectionBackward = require(\"./moveSelectionBackward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n\nfunction keyCommandBackspaceToStartOfLine(editorState, e) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n\n if (selection.isCollapsed() && selection.getAnchorOffset() === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n\n var ownerDocument = e.currentTarget.ownerDocument;\n var domSelection = ownerDocument.defaultView.getSelection(); // getRangeAt can technically throw if there's no selection, but we know\n // there is one here because text editor has focus (the cursor is a\n // selection of length 0). Therefore, we don't need to wrap this in a\n // try-catch block.\n\n var range = domSelection.getRangeAt(0);\n range = expandRangeToStartOfLine(range);\n return getDraftEditorSelectionWithNodes(strategyState, null, range.endContainer, range.endOffset, range.startContainer, range.startOffset).selectionState;\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandBackspaceToStartOfLine;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftRemovableWord = require(\"./DraftRemovableWord\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar moveSelectionBackward = require(\"./moveSelectionBackward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Delete the word that is left of the cursor, as well as any spaces or\n * punctuation after the word.\n */\n\n\nfunction keyCommandBackspaceWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset(); // If there are no words before the cursor, remove the preceding newline.\n\n if (offset === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(0, offset);\n var toRemove = DraftRemovableWord.getBackward(text);\n return moveSelectionBackward(strategyState, toRemove.length || 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandBackspaceWord;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftRemovableWord = require(\"./DraftRemovableWord\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar moveSelectionForward = require(\"./moveSelectionForward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Delete the word that is right of the cursor, as well as any spaces or\n * punctuation before the word.\n */\n\n\nfunction keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text); // If there are no words in front of the cursor, remove the newline.\n\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandDeleteWord;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nfunction keyCommandInsertNewline(editorState) {\n var contentState = DraftModifier.splitBlock(editorState.getCurrentContent(), editorState.getSelection());\n return EditorState.push(editorState, contentState, 'split-block');\n}\n\nmodule.exports = keyCommandInsertNewline;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n/**\n * See comment for `moveSelectionToStartOfBlock`.\n */\n\n\nfunction keyCommandMoveSelectionToEndOfBlock(editorState) {\n var selection = editorState.getSelection();\n var endKey = selection.getEndKey();\n var content = editorState.getCurrentContent();\n var textLength = content.getBlockForKey(endKey).getLength();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: endKey,\n anchorOffset: textLength,\n focusKey: endKey,\n focusOffset: textLength,\n isBackward: false\n }),\n forceSelection: true\n });\n}\n\nmodule.exports = keyCommandMoveSelectionToEndOfBlock;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n/**\n * Collapse selection at the start of the first selected block. This is used\n * for Firefox versions that attempt to navigate forward/backward instead of\n * moving the cursor. Other browsers are able to move the cursor natively.\n */\n\n\nfunction keyCommandMoveSelectionToStartOfBlock(editorState) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: startKey,\n anchorOffset: 0,\n focusKey: startKey,\n focusOffset: 0,\n isBackward: false\n }),\n forceSelection: true\n });\n}\n\nmodule.exports = keyCommandMoveSelectionToStartOfBlock;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar moveSelectionBackward = require(\"./moveSelectionBackward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Remove the selected range. If the cursor is collapsed, remove the preceding\n * character. This operation is Unicode-aware, so removing a single character\n * will remove a surrogate pair properly as well.\n */\n\n\nfunction keyCommandPlainBackspace(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charBehind = content.getBlockForKey(key).getText()[offset - 1];\n return moveSelectionBackward(strategyState, charBehind ? UnicodeUtils.getUTF16Length(charBehind, 0) : 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'backspace-character' : 'remove-range');\n}\n\nmodule.exports = keyCommandPlainBackspace;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar moveSelectionForward = require(\"./moveSelectionForward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Remove the selected range. If the cursor is collapsed, remove the following\n * character. This operation is Unicode-aware, so removing a single character\n * will remove a surrogate pair properly as well.\n */\n\n\nfunction keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}\n\nmodule.exports = keyCommandPlainDelete;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n/**\n * Transpose the characters on either side of a collapsed cursor, or\n * if the cursor is at the end of the block, transpose the last two\n * characters.\n */\n\n\nfunction keyCommandTransposeCharacters(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed()) {\n return editorState;\n }\n\n var offset = selection.getAnchorOffset();\n\n if (offset === 0) {\n return editorState;\n }\n\n var blockKey = selection.getAnchorKey();\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(blockKey);\n var length = block.getLength(); // Nothing to transpose if there aren't two characters.\n\n if (length <= 1) {\n return editorState;\n }\n\n var removalRange;\n var finalSelection;\n\n if (offset === length) {\n // The cursor is at the end of the block. Swap the last two characters.\n removalRange = selection.set('anchorOffset', offset - 1);\n finalSelection = selection;\n } else {\n removalRange = selection.set('focusOffset', offset + 1);\n finalSelection = removalRange.set('anchorOffset', offset + 1);\n } // Extract the character to move as a fragment. This preserves its\n // styling and entity, if any.\n\n\n var movedFragment = getContentStateFragment(content, removalRange);\n var afterRemoval = DraftModifier.removeRange(content, removalRange, 'backward'); // After the removal, the insertion target is one character back.\n\n var selectionAfter = afterRemoval.getSelectionAfter();\n var targetOffset = selectionAfter.getAnchorOffset() - 1;\n var targetRange = selectionAfter.merge({\n anchorOffset: targetOffset,\n focusOffset: targetOffset\n });\n var afterInsert = DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment);\n var newEditorState = EditorState.push(editorState, afterInsert, 'insert-fragment');\n return EditorState.acceptSelection(newEditorState, finalSelection);\n}\n\nmodule.exports = keyCommandTransposeCharacters;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nfunction keyCommandUndo(e, editorState, updateFn) {\n var undoneState = EditorState.undo(editorState); // If the last change to occur was a spellcheck change, allow the undo\n // event to fall through to the browser. This allows the browser to record\n // the unwanted change, which should soon lead it to learn not to suggest\n // the correction again.\n\n if (editorState.getLastChangeType() === 'spellcheck-change') {\n var nativelyRenderedContent = undoneState.getCurrentContent();\n updateFn(EditorState.set(undoneState, {\n nativelyRenderedContent: nativelyRenderedContent\n }));\n return;\n } // Otheriwse, manage the undo behavior manually.\n\n\n e.preventDefault();\n\n if (!editorState.getNativelyRenderedContent()) {\n updateFn(undoneState);\n return;\n } // Trigger a re-render with the current content state to ensure that the\n // component tree has up-to-date props for comparison.\n\n\n updateFn(EditorState.set(editorState, {\n nativelyRenderedContent: null\n })); // Wait to ensure that the re-render has occurred before performing\n // the undo action.\n\n setTimeout(function () {\n updateFn(undoneState);\n }, 0);\n}\n\nmodule.exports = keyCommandUndo;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Immutable = require(\"immutable\");\n\nvar Map = Immutable.Map;\n\nfunction modifyBlockForContentState(contentState, selectionState, operation) {\n var startKey = selectionState.getStartKey();\n var endKey = selectionState.getEndKey();\n var blockMap = contentState.getBlockMap();\n var newBlocks = blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat(Map([[endKey, blockMap.get(endKey)]])).map(operation);\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = modifyBlockForContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar getNextDelimiterBlockKey = require(\"./getNextDelimiterBlockKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar OrderedMap = Immutable.OrderedMap,\n List = Immutable.List;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockToBeMoved, originalTargetBlock, insertionMode, isExperimentalTreeBlock) {\n if (!isExperimentalTreeBlock) {\n return blockMap;\n } // possible values of 'insertionMode' are: 'after', 'before'\n\n\n var isInsertedAfterTarget = insertionMode === 'after';\n var originalBlockKey = originalBlockToBeMoved.getKey();\n var originalTargetKey = originalTargetBlock.getKey();\n var originalParentKey = originalBlockToBeMoved.getParentKey();\n var originalNextSiblingKey = originalBlockToBeMoved.getNextSiblingKey();\n var originalPrevSiblingKey = originalBlockToBeMoved.getPrevSiblingKey();\n var newParentKey = originalTargetBlock.getParentKey();\n var newNextSiblingKey = isInsertedAfterTarget ? originalTargetBlock.getNextSiblingKey() : originalTargetKey;\n var newPrevSiblingKey = isInsertedAfterTarget ? originalTargetKey : originalTargetBlock.getPrevSiblingKey();\n return blockMap.withMutations(function (blocks) {\n // update old parent\n transformBlock(originalParentKey, blocks, function (block) {\n var parentChildrenList = block.getChildKeys();\n return block.merge({\n children: parentChildrenList[\"delete\"](parentChildrenList.indexOf(originalBlockKey))\n });\n }); // update old prev\n\n transformBlock(originalPrevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: originalNextSiblingKey\n });\n }); // update old next\n\n transformBlock(originalNextSiblingKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalPrevSiblingKey\n });\n }); // update new next\n\n transformBlock(newNextSiblingKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalBlockKey\n });\n }); // update new prev\n\n transformBlock(newPrevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: originalBlockKey\n });\n }); // update new parent\n\n transformBlock(newParentKey, blocks, function (block) {\n var newParentChildrenList = block.getChildKeys();\n var targetBlockIndex = newParentChildrenList.indexOf(originalTargetKey);\n var insertionIndex = isInsertedAfterTarget ? targetBlockIndex + 1 : targetBlockIndex !== 0 ? targetBlockIndex - 1 : 0;\n var newChildrenArray = newParentChildrenList.toArray();\n newChildrenArray.splice(insertionIndex, 0, originalBlockKey);\n return block.merge({\n children: List(newChildrenArray)\n });\n }); // update block\n\n transformBlock(originalBlockKey, blocks, function (block) {\n return block.merge({\n nextSibling: newNextSiblingKey,\n prevSibling: newPrevSiblingKey,\n parent: newParentKey\n });\n });\n });\n};\n\nvar moveBlockInContentState = function moveBlockInContentState(contentState, blockToBeMoved, targetBlock, insertionMode) {\n !(insertionMode !== 'replace') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Replacing blocks is not supported.') : invariant(false) : void 0;\n var targetKey = targetBlock.getKey();\n var blockKey = blockToBeMoved.getKey();\n !(blockKey !== targetKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Block cannot be moved next to itself.') : invariant(false) : void 0;\n var blockMap = contentState.getBlockMap();\n var isExperimentalTreeBlock = blockToBeMoved instanceof ContentBlockNode;\n var blocksToBeMoved = [blockToBeMoved];\n var blockMapWithoutBlocksToBeMoved = blockMap[\"delete\"](blockKey);\n\n if (isExperimentalTreeBlock) {\n blocksToBeMoved = [];\n blockMapWithoutBlocksToBeMoved = blockMap.withMutations(function (blocks) {\n var nextSiblingKey = blockToBeMoved.getNextSiblingKey();\n var nextDelimiterBlockKey = getNextDelimiterBlockKey(blockToBeMoved, blocks);\n blocks.toSeq().skipUntil(function (block) {\n return block.getKey() === blockKey;\n }).takeWhile(function (block) {\n var key = block.getKey();\n var isBlockToBeMoved = key === blockKey;\n var hasNextSiblingAndIsNotNextSibling = nextSiblingKey && key !== nextSiblingKey;\n var doesNotHaveNextSiblingAndIsNotDelimiter = !nextSiblingKey && block.getParentKey() && (!nextDelimiterBlockKey || key !== nextDelimiterBlockKey);\n return !!(isBlockToBeMoved || hasNextSiblingAndIsNotNextSibling || doesNotHaveNextSiblingAndIsNotDelimiter);\n }).forEach(function (block) {\n blocksToBeMoved.push(block);\n blocks[\"delete\"](block.getKey());\n });\n });\n }\n\n var blocksBefore = blockMapWithoutBlocksToBeMoved.toSeq().takeUntil(function (v) {\n return v === targetBlock;\n });\n var blocksAfter = blockMapWithoutBlocksToBeMoved.toSeq().skipUntil(function (v) {\n return v === targetBlock;\n }).skip(1);\n var slicedBlocks = blocksToBeMoved.map(function (block) {\n return [block.getKey(), block];\n });\n var newBlocks = OrderedMap();\n\n if (insertionMode === 'before') {\n var blockBefore = contentState.getBlockBefore(targetKey);\n !(!blockBefore || blockBefore.getKey() !== blockToBeMoved.getKey()) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Block cannot be moved next to itself.') : invariant(false) : void 0;\n newBlocks = blocksBefore.concat([].concat(slicedBlocks, [[targetKey, targetBlock]]), blocksAfter).toOrderedMap();\n } else if (insertionMode === 'after') {\n var blockAfter = contentState.getBlockAfter(targetKey);\n !(!blockAfter || blockAfter.getKey() !== blockKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Block cannot be moved next to itself.') : invariant(false) : void 0;\n newBlocks = blocksBefore.concat([[targetKey, targetBlock]].concat(slicedBlocks), blocksAfter).toOrderedMap();\n }\n\n return contentState.merge({\n blockMap: updateBlockMapLinks(newBlocks, blockToBeMoved, targetBlock, insertionMode, isExperimentalTreeBlock),\n selectionBefore: contentState.getSelectionAfter(),\n selectionAfter: contentState.getSelectionAfter().merge({\n anchorKey: blockKey,\n focusKey: blockKey\n })\n });\n};\n\nmodule.exports = moveBlockInContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar warning = require(\"fbjs/lib/warning\");\n/**\n * Given a collapsed selection, move the focus `maxDistance` backward within\n * the selected block. If the selection will go beyond the start of the block,\n * move focus to the end of the previous block, but no further.\n *\n * This function is not Unicode-aware, so surrogate pairs will be treated\n * as having length 2.\n */\n\n\nfunction moveSelectionBackward(editorState, maxDistance) {\n var selection = editorState.getSelection(); // Should eventually make this an invariant\n\n process.env.NODE_ENV !== \"production\" ? warning(selection.isCollapsed(), 'moveSelectionBackward should only be called with a collapsed SelectionState') : void 0;\n var content = editorState.getCurrentContent();\n var key = selection.getStartKey();\n var offset = selection.getStartOffset();\n var focusKey = key;\n var focusOffset = 0;\n\n if (maxDistance > offset) {\n var keyBefore = content.getKeyBefore(key);\n\n if (keyBefore == null) {\n focusKey = key;\n } else {\n focusKey = keyBefore;\n var blockBefore = content.getBlockForKey(keyBefore);\n focusOffset = blockBefore.getText().length;\n }\n } else {\n focusOffset = offset - maxDistance;\n }\n\n return selection.merge({\n focusKey: focusKey,\n focusOffset: focusOffset,\n isBackward: true\n });\n}\n\nmodule.exports = moveSelectionBackward;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar warning = require(\"fbjs/lib/warning\");\n/**\n * Given a collapsed selection, move the focus `maxDistance` forward within\n * the selected block. If the selection will go beyond the end of the block,\n * move focus to the start of the next block, but no further.\n *\n * This function is not Unicode-aware, so surrogate pairs will be treated\n * as having length 2.\n */\n\n\nfunction moveSelectionForward(editorState, maxDistance) {\n var selection = editorState.getSelection(); // Should eventually make this an invariant\n\n process.env.NODE_ENV !== \"production\" ? warning(selection.isCollapsed(), 'moveSelectionForward should only be called with a collapsed SelectionState') : void 0;\n var key = selection.getStartKey();\n var offset = selection.getStartOffset();\n var content = editorState.getCurrentContent();\n var focusKey = key;\n var focusOffset;\n var block = content.getBlockForKey(key);\n\n if (maxDistance > block.getText().length - offset) {\n focusKey = content.getKeyAfter(key);\n focusOffset = 0;\n } else {\n focusOffset = offset + maxDistance;\n }\n\n return selection.merge({\n focusKey: focusKey,\n focusOffset: focusOffset\n });\n}\n\nmodule.exports = moveSelectionForward;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar OrderedMap = Immutable.OrderedMap;\n\nvar randomizeContentBlockNodeKeys = function randomizeContentBlockNodeKeys(blockMap) {\n var newKeysRef = {}; // we keep track of root blocks in order to update subsequent sibling links\n\n var lastRootBlock;\n return OrderedMap(blockMap.withMutations(function (blockMapState) {\n blockMapState.forEach(function (block, index) {\n var oldKey = block.getKey();\n var nextKey = block.getNextSiblingKey();\n var prevKey = block.getPrevSiblingKey();\n var childrenKeys = block.getChildKeys();\n var parentKey = block.getParentKey(); // new key that we will use to build linking\n\n var key = generateRandomKey(); // we will add it here to re-use it later\n\n newKeysRef[oldKey] = key;\n\n if (nextKey) {\n var nextBlock = blockMapState.get(nextKey);\n\n if (nextBlock) {\n blockMapState.setIn([nextKey, 'prevSibling'], key);\n } else {\n // this can happen when generating random keys for fragments\n blockMapState.setIn([oldKey, 'nextSibling'], null);\n }\n }\n\n if (prevKey) {\n var prevBlock = blockMapState.get(prevKey);\n\n if (prevBlock) {\n blockMapState.setIn([prevKey, 'nextSibling'], key);\n } else {\n // this can happen when generating random keys for fragments\n blockMapState.setIn([oldKey, 'prevSibling'], null);\n }\n }\n\n if (parentKey && blockMapState.get(parentKey)) {\n var parentBlock = blockMapState.get(parentKey);\n var parentChildrenList = parentBlock.getChildKeys();\n blockMapState.setIn([parentKey, 'children'], parentChildrenList.set(parentChildrenList.indexOf(block.getKey()), key));\n } else {\n // blocks will then be treated as root block nodes\n blockMapState.setIn([oldKey, 'parent'], null);\n\n if (lastRootBlock) {\n blockMapState.setIn([lastRootBlock.getKey(), 'nextSibling'], key);\n blockMapState.setIn([oldKey, 'prevSibling'], newKeysRef[lastRootBlock.getKey()]);\n }\n\n lastRootBlock = blockMapState.get(oldKey);\n }\n\n childrenKeys.forEach(function (childKey) {\n var childBlock = blockMapState.get(childKey);\n\n if (childBlock) {\n blockMapState.setIn([childKey, 'parent'], key);\n } else {\n blockMapState.setIn([oldKey, 'children'], block.getChildKeys().filter(function (child) {\n return child !== childKey;\n }));\n }\n });\n });\n }).toArray().map(function (block) {\n return [newKeysRef[block.getKey()], block.set('key', newKeysRef[block.getKey()])];\n }));\n};\n\nvar randomizeContentBlockKeys = function randomizeContentBlockKeys(blockMap) {\n return OrderedMap(blockMap.toArray().map(function (block) {\n var key = generateRandomKey();\n return [key, block.set('key', key)];\n }));\n};\n\nvar randomizeBlockMapKeys = function randomizeBlockMapKeys(blockMap) {\n var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode;\n\n if (!isTreeBasedBlockMap) {\n return randomizeContentBlockKeys(blockMap);\n }\n\n return randomizeContentBlockNodeKeys(blockMap);\n};\n\nmodule.exports = randomizeBlockMapKeys;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nfunction removeEntitiesAtEdges(contentState, selectionState) {\n var blockMap = contentState.getBlockMap();\n var entityMap = contentState.getEntityMap();\n var updatedBlocks = {};\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var startBlock = blockMap.get(startKey);\n var updatedStart = removeForBlock(entityMap, startBlock, startOffset);\n\n if (updatedStart !== startBlock) {\n updatedBlocks[startKey] = updatedStart;\n }\n\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var endBlock = blockMap.get(endKey);\n\n if (startKey === endKey) {\n endBlock = updatedStart;\n }\n\n var updatedEnd = removeForBlock(entityMap, endBlock, endOffset);\n\n if (updatedEnd !== endBlock) {\n updatedBlocks[endKey] = updatedEnd;\n }\n\n if (!Object.keys(updatedBlocks).length) {\n return contentState.set('selectionAfter', selectionState);\n }\n\n return contentState.merge({\n blockMap: blockMap.merge(updatedBlocks),\n selectionAfter: selectionState\n });\n}\n/**\n * Given a list of characters and an offset that is in the middle of an entity,\n * returns the start and end of the entity that is overlapping the offset.\n * Note: This method requires that the offset be in an entity range.\n */\n\n\nfunction getRemovalRange(characters, entityKey, offset) {\n var removalRange; // Iterates through a list looking for ranges of matching items\n // based on the 'isEqual' callback.\n // Then instead of returning the result, call the 'found' callback\n // with each range.\n // Then filters those ranges based on the 'filter' callback\n //\n // Here we use it to find ranges of characters with the same entity key.\n\n findRangesImmutable(characters, // the list to iterate through\n function (a, b) {\n return a.getEntity() === b.getEntity();\n }, // 'isEqual' callback\n function (element) {\n return element.getEntity() === entityKey;\n }, // 'filter' callback\n function (start, end) {\n // 'found' callback\n if (start <= offset && end >= offset) {\n // this entity overlaps the offset index\n removalRange = {\n start: start,\n end: end\n };\n }\n });\n !(typeof removalRange === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Removal range must exist within character list.') : invariant(false) : void 0;\n return removalRange;\n}\n\nfunction removeForBlock(entityMap, block, offset) {\n var chars = block.getCharacterList();\n var charBefore = offset > 0 ? chars.get(offset - 1) : undefined;\n var charAfter = offset < chars.count() ? chars.get(offset) : undefined;\n var entityBeforeCursor = charBefore ? charBefore.getEntity() : undefined;\n var entityAfterCursor = charAfter ? charAfter.getEntity() : undefined;\n\n if (entityAfterCursor && entityAfterCursor === entityBeforeCursor) {\n var entity = entityMap.__get(entityAfterCursor);\n\n if (entity.getMutability() !== 'MUTABLE') {\n var _getRemovalRange = getRemovalRange(chars, entityAfterCursor, offset),\n start = _getRemovalRange.start,\n end = _getRemovalRange.end;\n\n var current;\n\n while (start < end) {\n current = chars.get(start);\n chars = chars.set(start, CharacterMetadata.applyEntity(current, null));\n start++;\n }\n\n return block.set('characterList', chars);\n }\n }\n\n return block;\n}\n\nmodule.exports = removeEntitiesAtEdges;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar getNextDelimiterBlockKey = require(\"./getNextDelimiterBlockKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Map = Immutable.Map;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n/**\n * Ancestors needs to be preserved when there are non selected\n * children to make sure we do not leave any orphans behind\n */\n\n\nvar getAncestorsKeys = function getAncestorsKeys(blockKey, blockMap) {\n var parents = [];\n\n if (!blockKey) {\n return parents;\n }\n\n var blockNode = blockMap.get(blockKey);\n\n while (blockNode && blockNode.getParentKey()) {\n var parentKey = blockNode.getParentKey();\n\n if (parentKey) {\n parents.push(parentKey);\n }\n\n blockNode = parentKey ? blockMap.get(parentKey) : null;\n }\n\n return parents;\n};\n/**\n * Get all next delimiter keys until we hit a root delimiter and return\n * an array of key references\n */\n\n\nvar getNextDelimitersBlockKeys = function getNextDelimitersBlockKeys(block, blockMap) {\n var nextDelimiters = [];\n\n if (!block) {\n return nextDelimiters;\n }\n\n var nextDelimiter = getNextDelimiterBlockKey(block, blockMap);\n\n while (nextDelimiter && blockMap.get(nextDelimiter)) {\n var _block = blockMap.get(nextDelimiter);\n\n nextDelimiters.push(nextDelimiter); // we do not need to keep checking all root node siblings, just the first occurance\n\n nextDelimiter = _block.getParentKey() ? getNextDelimiterBlockKey(_block, blockMap) : null;\n }\n\n return nextDelimiters;\n};\n\nvar getNextValidSibling = function getNextValidSibling(block, blockMap, originalBlockMap) {\n if (!block) {\n return null;\n } // note that we need to make sure we refer to the original block since this\n // function is called within a withMutations\n\n\n var nextValidSiblingKey = originalBlockMap.get(block.getKey()).getNextSiblingKey();\n\n while (nextValidSiblingKey && !blockMap.get(nextValidSiblingKey)) {\n nextValidSiblingKey = originalBlockMap.get(nextValidSiblingKey).getNextSiblingKey() || null;\n }\n\n return nextValidSiblingKey;\n};\n\nvar getPrevValidSibling = function getPrevValidSibling(block, blockMap, originalBlockMap) {\n if (!block) {\n return null;\n } // note that we need to make sure we refer to the original block since this\n // function is called within a withMutations\n\n\n var prevValidSiblingKey = originalBlockMap.get(block.getKey()).getPrevSiblingKey();\n\n while (prevValidSiblingKey && !blockMap.get(prevValidSiblingKey)) {\n prevValidSiblingKey = originalBlockMap.get(prevValidSiblingKey).getPrevSiblingKey() || null;\n }\n\n return prevValidSiblingKey;\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, startBlock, endBlock, originalBlockMap) {\n return blockMap.withMutations(function (blocks) {\n // update start block if its retained\n transformBlock(startBlock.getKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update endblock if its retained\n\n transformBlock(endBlock.getKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update start block parent ancestors\n\n getAncestorsKeys(startBlock.getKey(), originalBlockMap).forEach(function (parentKey) {\n return transformBlock(parentKey, blocks, function (block) {\n return block.merge({\n children: block.getChildKeys().filter(function (key) {\n return blocks.get(key);\n }),\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // update start block next - can only happen if startBlock == endBlock\n\n transformBlock(startBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: startBlock.getPrevSiblingKey()\n });\n }); // update start block prev\n\n transformBlock(startBlock.getPrevSiblingKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap)\n });\n }); // update end block next\n\n transformBlock(endBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update end block prev\n\n transformBlock(endBlock.getPrevSiblingKey(), blocks, function (block) {\n return block.merge({\n nextSibling: endBlock.getNextSiblingKey()\n });\n }); // update end block parent ancestors\n\n getAncestorsKeys(endBlock.getKey(), originalBlockMap).forEach(function (parentKey) {\n transformBlock(parentKey, blocks, function (block) {\n return block.merge({\n children: block.getChildKeys().filter(function (key) {\n return blocks.get(key);\n }),\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // update next delimiters all the way to a root delimiter\n\n getNextDelimitersBlockKeys(endBlock, originalBlockMap).forEach(function (delimiterKey) {\n return transformBlock(delimiterKey, blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // if parent (startBlock) was deleted\n\n if (blockMap.get(startBlock.getKey()) == null && blockMap.get(endBlock.getKey()) != null && endBlock.getParentKey() === startBlock.getKey() && endBlock.getPrevSiblingKey() == null) {\n var prevSiblingKey = startBlock.getPrevSiblingKey(); // endBlock becomes next sibling of parent's prevSibling\n\n transformBlock(endBlock.getKey(), blocks, function (block) {\n return block.merge({\n prevSibling: prevSiblingKey\n });\n });\n transformBlock(prevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: endBlock.getKey()\n });\n }); // Update parent for previous parent's children, and children for that parent\n\n var prevSibling = prevSiblingKey ? blockMap.get(prevSiblingKey) : null;\n var newParentKey = prevSibling ? prevSibling.getParentKey() : null;\n startBlock.getChildKeys().forEach(function (childKey) {\n transformBlock(childKey, blocks, function (block) {\n return block.merge({\n parent: newParentKey // set to null if there is no parent\n\n });\n });\n });\n\n if (newParentKey != null) {\n var newParent = blockMap.get(newParentKey);\n transformBlock(newParentKey, blocks, function (block) {\n return block.merge({\n children: newParent.getChildKeys().concat(startBlock.getChildKeys())\n });\n });\n } // last child of deleted parent should point to next sibling\n\n\n transformBlock(startBlock.getChildKeys().find(function (key) {\n var block = blockMap.get(key);\n return block.getNextSiblingKey() === null;\n }), blocks, function (block) {\n return block.merge({\n nextSibling: startBlock.getNextSiblingKey()\n });\n });\n }\n });\n};\n\nvar removeRangeFromContentState = function removeRangeFromContentState(contentState, selectionState) {\n if (selectionState.isCollapsed()) {\n return contentState;\n }\n\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var startBlock = blockMap.get(startKey);\n var endBlock = blockMap.get(endKey); // we assume that ContentBlockNode and ContentBlocks are not mixed together\n\n var isExperimentalTreeBlock = startBlock instanceof ContentBlockNode; // used to retain blocks that should not be deleted to avoid orphan children\n\n var parentAncestors = [];\n\n if (isExperimentalTreeBlock) {\n var endBlockchildrenKeys = endBlock.getChildKeys();\n var endBlockAncestors = getAncestorsKeys(endKey, blockMap); // endBlock has unselected siblings so we can not remove its ancestors parents\n\n if (endBlock.getNextSiblingKey()) {\n parentAncestors = parentAncestors.concat(endBlockAncestors);\n } // endBlock has children so can not remove this block or any of its ancestors\n\n\n if (!endBlockchildrenKeys.isEmpty()) {\n parentAncestors = parentAncestors.concat(endBlockAncestors.concat([endKey]));\n } // we need to retain all ancestors of the next delimiter block\n\n\n parentAncestors = parentAncestors.concat(getAncestorsKeys(getNextDelimiterBlockKey(endBlock, blockMap), blockMap));\n }\n\n var characterList;\n\n if (startBlock === endBlock) {\n characterList = removeFromList(startBlock.getCharacterList(), startOffset, endOffset);\n } else {\n characterList = startBlock.getCharacterList().slice(0, startOffset).concat(endBlock.getCharacterList().slice(endOffset));\n }\n\n var modifiedStart = startBlock.merge({\n text: startBlock.getText().slice(0, startOffset) + endBlock.getText().slice(endOffset),\n characterList: characterList\n }); // If cursor (collapsed) is at the start of the first child, delete parent\n // instead of child\n\n var shouldDeleteParent = isExperimentalTreeBlock && startOffset === 0 && endOffset === 0 && endBlock.getParentKey() === startKey && endBlock.getPrevSiblingKey() == null;\n var newBlocks = shouldDeleteParent ? Map([[startKey, null]]) : blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).filter(function (_, k) {\n return parentAncestors.indexOf(k) === -1;\n }).concat(Map([[endKey, null]])).map(function (_, k) {\n return k === startKey ? modifiedStart : null;\n });\n var updatedBlockMap = blockMap.merge(newBlocks).filter(function (block) {\n return !!block;\n }); // Only update tree block pointers if the range is across blocks\n\n if (isExperimentalTreeBlock && startBlock !== endBlock) {\n updatedBlockMap = updateBlockMapLinks(updatedBlockMap, startBlock, endBlock, blockMap);\n }\n\n return contentState.merge({\n blockMap: updatedBlockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: startKey,\n anchorOffset: startOffset,\n focusKey: startKey,\n focusOffset: startOffset,\n isBackward: false\n })\n });\n};\n/**\n * Maintain persistence for target list when removing characters on the\n * head and tail of the character list.\n */\n\n\nvar removeFromList = function removeFromList(targetList, startOffset, endOffset) {\n if (startOffset === 0) {\n while (startOffset < endOffset) {\n targetList = targetList.shift();\n startOffset++;\n }\n } else if (endOffset === targetList.count()) {\n while (endOffset > startOffset) {\n targetList = targetList.pop();\n endOffset--;\n }\n } else {\n var head = targetList.slice(0, startOffset);\n var tail = targetList.slice(endOffset);\n targetList = head.concat(tail).toList();\n }\n\n return targetList;\n};\n\nmodule.exports = removeRangeFromContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar gkx = require(\"./gkx\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\n/**\n * For a collapsed selection state, remove text based on the specified strategy.\n * If the selection state is not collapsed, remove the entire selected range.\n */\n\nfunction removeTextWithStrategy(editorState, strategy, direction) {\n var selection = editorState.getSelection();\n var content = editorState.getCurrentContent();\n var target = selection;\n var anchorKey = selection.getAnchorKey();\n var focusKey = selection.getFocusKey();\n var anchorBlock = content.getBlockForKey(anchorKey);\n\n if (experimentalTreeDataSupport) {\n if (direction === 'forward') {\n if (anchorKey !== focusKey) {\n // For now we ignore forward delete across blocks,\n // if there is demand for this we will implement it.\n return content;\n }\n }\n }\n\n if (selection.isCollapsed()) {\n if (direction === 'forward') {\n if (editorState.isSelectionAtEndOfContent()) {\n return content;\n }\n\n if (experimentalTreeDataSupport) {\n var isAtEndOfBlock = selection.getAnchorOffset() === content.getBlockForKey(anchorKey).getLength();\n\n if (isAtEndOfBlock) {\n var anchorBlockSibling = content.getBlockForKey(anchorBlock.nextSibling);\n\n if (!anchorBlockSibling || anchorBlockSibling.getLength() === 0) {\n // For now we ignore forward delete at the end of a block,\n // if there is demand for this we will implement it.\n return content;\n }\n }\n }\n } else if (editorState.isSelectionAtStartOfContent()) {\n return content;\n }\n\n target = strategy(editorState);\n\n if (target === selection) {\n return content;\n }\n }\n\n return DraftModifier.removeRange(content, target, direction);\n}\n\nmodule.exports = removeTextWithStrategy;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar REGEX_BLOCK_DELIMITER = new RegExp('\\r', 'g');\n\nfunction sanitizeDraftText(input) {\n return input.replace(REGEX_BLOCK_DELIMITER, '');\n}\n\nmodule.exports = sanitizeDraftText;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftEffects = require(\"./DraftEffects\");\n\nvar DraftJsDebugLogging = require(\"./DraftJsDebugLogging\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar containsNode = require(\"fbjs/lib/containsNode\");\n\nvar getActiveElement = require(\"fbjs/lib/getActiveElement\");\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isElement = require(\"./isElement\");\n\nvar isIE = UserAgent.isBrowser('IE');\n\nfunction getAnonymizedDOM(node, getNodeLabels) {\n if (!node) {\n return '[empty]';\n }\n\n var anonymized = anonymizeTextWithin(node, getNodeLabels);\n\n if (anonymized.nodeType === Node.TEXT_NODE) {\n return anonymized.textContent;\n }\n\n !isElement(anonymized) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Node must be an Element if it is not a text node.') : invariant(false) : void 0;\n var castedElement = anonymized;\n return castedElement.outerHTML;\n}\n\nfunction anonymizeTextWithin(node, getNodeLabels) {\n var labels = getNodeLabels !== undefined ? getNodeLabels(node) : [];\n\n if (node.nodeType === Node.TEXT_NODE) {\n var length = node.textContent.length;\n return getCorrectDocumentFromNode(node).createTextNode('[text ' + length + (labels.length ? ' | ' + labels.join(', ') : '') + ']');\n }\n\n var clone = node.cloneNode();\n\n if (clone.nodeType === 1 && labels.length) {\n clone.setAttribute('data-labels', labels.join(', '));\n }\n\n var childNodes = node.childNodes;\n\n for (var ii = 0; ii < childNodes.length; ii++) {\n clone.appendChild(anonymizeTextWithin(childNodes[ii], getNodeLabels));\n }\n\n return clone;\n}\n\nfunction getAnonymizedEditorDOM(node, getNodeLabels) {\n // grabbing the DOM content of the Draft editor\n var currentNode = node; // this should only be used after checking with isElement\n\n var castedNode = currentNode;\n\n while (currentNode) {\n if (isElement(currentNode) && castedNode.hasAttribute('contenteditable')) {\n // found the Draft editor container\n return getAnonymizedDOM(currentNode, getNodeLabels);\n } else {\n currentNode = currentNode.parentNode;\n castedNode = currentNode;\n }\n }\n\n return 'Could not find contentEditable parent of node';\n}\n\nfunction getNodeLength(node) {\n return node.nodeValue === null ? node.childNodes.length : node.nodeValue.length;\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n */\n\n\nfunction setDraftEditorSelection(selectionState, node, blockKey, nodeStart, nodeEnd) {\n // It's possible that the editor has been removed from the DOM but\n // our selection code doesn't know it yet. Forcing selection in\n // this case may lead to errors, so just bail now.\n var documentObject = getCorrectDocumentFromNode(node);\n\n if (!containsNode(documentObject.documentElement, node)) {\n return;\n }\n\n var selection = documentObject.defaultView.getSelection();\n var anchorKey = selectionState.getAnchorKey();\n var anchorOffset = selectionState.getAnchorOffset();\n var focusKey = selectionState.getFocusKey();\n var focusOffset = selectionState.getFocusOffset();\n var isBackward = selectionState.getIsBackward(); // IE doesn't support backward selection. Swap key/offset pairs.\n\n if (!selection.extend && isBackward) {\n var tempKey = anchorKey;\n var tempOffset = anchorOffset;\n anchorKey = focusKey;\n anchorOffset = focusOffset;\n focusKey = tempKey;\n focusOffset = tempOffset;\n isBackward = false;\n }\n\n var hasAnchor = anchorKey === blockKey && nodeStart <= anchorOffset && nodeEnd >= anchorOffset;\n var hasFocus = focusKey === blockKey && nodeStart <= focusOffset && nodeEnd >= focusOffset; // If the selection is entirely bound within this node, set the selection\n // and be done.\n\n if (hasAnchor && hasFocus) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState);\n return;\n }\n\n if (!isBackward) {\n // If the anchor is within this node, set the range start.\n if (hasAnchor) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n } // If the focus is within this node, we can assume that we have\n // already set the appropriate start range on the selection, and\n // can simply extend the selection.\n\n\n if (hasFocus) {\n addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState);\n }\n } else {\n // If this node has the focus, set the selection range to be a\n // collapsed range beginning here. Later, when we encounter the anchor,\n // we'll use this information to extend the selection.\n if (hasFocus) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, focusOffset - nodeStart, selectionState);\n } // If this node has the anchor, we may assume that the correct\n // focus information is already stored on the selection object.\n // We keep track of it, reset the selection range, and extend it\n // back to the focus point.\n\n\n if (hasAnchor) {\n var storedFocusNode = selection.focusNode;\n var storedFocusOffset = selection.focusOffset;\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n addFocusToSelection(selection, storedFocusNode, storedFocusOffset, selectionState);\n }\n }\n}\n/**\n * Extend selection towards focus point.\n */\n\n\nfunction addFocusToSelection(selection, node, offset, selectionState) {\n var activeElement = getActiveElement();\n var extend = selection.extend; // containsNode returns false if node is null.\n // Let's refine the type of this value out here so flow knows.\n\n if (extend && node != null && containsNode(activeElement, node)) {\n // If `extend` is called while another element has focus, an error is\n // thrown. We therefore disable `extend` if the active element is somewhere\n // other than the node we are selecting. This should only occur in Firefox,\n // since it is the only browser to support multiple selections.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=921444.\n // logging to catch bug that is being reported in t16250795\n if (offset > getNodeLength(node)) {\n // the call to 'selection.extend' is about to throw\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node),\n extraParams: JSON.stringify({\n offset: offset\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n } // logging to catch bug that is being reported in t18110632\n\n\n var nodeWasFocus = node === selection.focusNode;\n\n try {\n // Fixes some reports of \"InvalidStateError: Failed to execute 'extend' on\n // 'Selection': This Selection object doesn't have any Ranges.\"\n // Note: selection.extend does not exist in IE.\n if (selection.rangeCount > 0 && selection.extend) {\n selection.extend(node, offset);\n }\n } catch (e) {\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node, function (n) {\n var labels = [];\n\n if (n === activeElement) {\n labels.push('active element');\n }\n\n if (n === selection.anchorNode) {\n labels.push('selection anchor node');\n }\n\n if (n === selection.focusNode) {\n labels.push('selection focus node');\n }\n\n return labels;\n }),\n extraParams: JSON.stringify({\n activeElementName: activeElement ? activeElement.nodeName : null,\n nodeIsFocus: node === selection.focusNode,\n nodeWasFocus: nodeWasFocus,\n selectionRangeCount: selection.rangeCount,\n selectionAnchorNodeName: selection.anchorNode ? selection.anchorNode.nodeName : null,\n selectionAnchorOffset: selection.anchorOffset,\n selectionFocusNodeName: selection.focusNode ? selection.focusNode.nodeName : null,\n selectionFocusOffset: selection.focusOffset,\n message: e ? '' + e : null,\n offset: offset\n }, null, 2),\n selectionState: JSON.stringify(selectionState.toJS(), null, 2)\n }); // allow the error to be thrown -\n // better than continuing in a broken state\n\n throw e;\n }\n } else {\n // IE doesn't support extend. This will mean no backward selection.\n // Extract the existing selection range and add focus to it.\n // Additionally, clone the selection range. IE11 throws an\n // InvalidStateError when attempting to access selection properties\n // after the range is detached.\n if (node && selection.rangeCount > 0) {\n var range = selection.getRangeAt(0);\n range.setEnd(node, offset);\n selection.addRange(range.cloneRange());\n }\n }\n}\n\nfunction addPointToSelection(selection, node, offset, selectionState) {\n var range = getCorrectDocumentFromNode(node).createRange(); // logging to catch bug that is being reported in t16250795\n\n if (offset > getNodeLength(node)) {\n // in this case we know that the call to 'range.setStart' is about to throw\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node),\n extraParams: JSON.stringify({\n offset: offset\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n DraftEffects.handleExtensionCausedError();\n }\n\n range.setStart(node, offset); // IE sometimes throws Unspecified Error when trying to addRange\n\n if (isIE) {\n try {\n selection.addRange(range);\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n /* eslint-disable-next-line no-console */\n console.warn('Call to selection.addRange() threw exception: ', e);\n }\n }\n } else {\n selection.addRange(range);\n }\n}\n\nmodule.exports = {\n setDraftEditorSelection: setDraftEditorSelection,\n addFocusToSelection: addFocusToSelection\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar modifyBlockForContentState = require(\"./modifyBlockForContentState\");\n\nvar List = Immutable.List,\n Map = Immutable.Map;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlock, belowBlock) {\n return blockMap.withMutations(function (blocks) {\n var originalBlockKey = originalBlock.getKey();\n var belowBlockKey = belowBlock.getKey(); // update block parent\n\n transformBlock(originalBlock.getParentKey(), blocks, function (block) {\n var parentChildrenList = block.getChildKeys();\n var insertionIndex = parentChildrenList.indexOf(originalBlockKey) + 1;\n var newChildrenArray = parentChildrenList.toArray();\n newChildrenArray.splice(insertionIndex, 0, belowBlockKey);\n return block.merge({\n children: List(newChildrenArray)\n });\n }); // update original next block\n\n transformBlock(originalBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: belowBlockKey\n });\n }); // update original block\n\n transformBlock(originalBlockKey, blocks, function (block) {\n return block.merge({\n nextSibling: belowBlockKey\n });\n }); // update below block\n\n transformBlock(belowBlockKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalBlockKey\n });\n });\n });\n};\n\nvar splitBlockInContentState = function splitBlockInContentState(contentState, selectionState) {\n !selectionState.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Selection range must be collapsed.') : invariant(false) : void 0;\n var key = selectionState.getAnchorKey();\n var blockMap = contentState.getBlockMap();\n var blockToSplit = blockMap.get(key);\n var text = blockToSplit.getText();\n\n if (!text) {\n var blockType = blockToSplit.getType();\n\n if (blockType === 'unordered-list-item' || blockType === 'ordered-list-item') {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n type: 'unstyled',\n depth: 0\n });\n });\n }\n }\n\n var offset = selectionState.getAnchorOffset();\n var chars = blockToSplit.getCharacterList();\n var keyBelow = generateRandomKey();\n var isExperimentalTreeBlock = blockToSplit instanceof ContentBlockNode;\n var blockAbove = blockToSplit.merge({\n text: text.slice(0, offset),\n characterList: chars.slice(0, offset)\n });\n var blockBelow = blockAbove.merge({\n key: keyBelow,\n text: text.slice(offset),\n characterList: chars.slice(offset),\n data: Map()\n });\n var blocksBefore = blockMap.toSeq().takeUntil(function (v) {\n return v === blockToSplit;\n });\n var blocksAfter = blockMap.toSeq().skipUntil(function (v) {\n return v === blockToSplit;\n }).rest();\n var newBlocks = blocksBefore.concat([[key, blockAbove], [keyBelow, blockBelow]], blocksAfter).toOrderedMap();\n\n if (isExperimentalTreeBlock) {\n !blockToSplit.getChildKeys().isEmpty() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'ContentBlockNode must not have children') : invariant(false) : void 0;\n newBlocks = updateBlockMapLinks(newBlocks, blockAbove, blockBelow);\n }\n\n return contentState.merge({\n blockMap: newBlocks,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: keyBelow,\n anchorOffset: 0,\n focusKey: keyBelow,\n focusOffset: 0,\n isBackward: false\n })\n });\n};\n\nmodule.exports = splitBlockInContentState;","/**\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 * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar NEWLINE_REGEX = /\\r\\n?|\\n/g;\n\nfunction splitTextIntoTextBlocks(text) {\n return text.split(NEWLINE_REGEX);\n}\n\nmodule.exports = splitTextIntoTextBlocks;","\"use strict\";\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @typechecks\n * \n * @format\n */\n\n/*eslint-disable no-bitwise */\n\n/**\n * Based on the rfc4122-compliant solution posted at\n * http://stackoverflow.com/questions/105034\n */\nfunction uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n\nmodule.exports = uuid;","/**\n * Copyright (c) 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(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.Immutable = factory();\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n\n\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = { value: false };\n var DID_ALTER = { value: false };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step > 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n findEntry: function(predicate, context) {\n var found;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findLastEntry: function(predicate, context) {\n return this.toSeq().reverse().findEntry(predicate, context);\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n // Temporary warning about using length\n (function () {\n try {\n Object.defineProperty(IterablePrototype, 'length', {\n get: function () {\n if (!Iterable.noLengthWarning) {\n var stack;\n try {\n throw new Error();\n } catch (error) {\n stack = error.stack;\n }\n if (stack.indexOf('_wrapObject') === -1) {\n console && console.warn && console.warn(\n 'iterable.length has been deprecated, '+\n 'use iterable.size or iterable.count(). '+\n 'This warning will become a silent error in a future version. ' +\n stack\n );\n return this.size;\n }\n }\n }\n });\n } catch (e) {}\n })();\n\n\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLastKey: function(predicate, context) {\n return this.toSeq().reverse().findKey(predicate, context);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n lastKeyOf: function(searchValue) {\n return this.findLastKey(function(value ) {return is(value, searchValue)});\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.toKeyedSeq().keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.toKeyedSeq().reverse().keyOf(searchValue);\n return key === undefined ? -1 : key;\n\n // var index =\n // return this.toSeq().reverse().indexOf(searchValue);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var key = this.toKeyedSeq().findLastKey(predicate, context);\n return key === undefined ? -1 : key;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : value;\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\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\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 * @typechecks\n */\nvar PhotosMimeType = require(\"./PhotosMimeType\");\n\nvar createArrayFromMixed = require(\"./createArrayFromMixed\");\n\nvar emptyFunction = require(\"./emptyFunction\");\n\nvar CR_LF_REGEX = new RegExp(\"\\r\\n\", 'g');\nvar LF_ONLY = \"\\n\";\nvar RICH_TEXT_TYPES = {\n 'text/rtf': 1,\n 'text/html': 1\n};\n/**\n * If DataTransferItem is a file then return the Blob of data.\n *\n * @param {object} item\n * @return {?blob}\n */\n\nfunction getFileFromDataTransfer(item) {\n if (item.kind == 'file') {\n return item.getAsFile();\n }\n}\n\nvar DataTransfer =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {object} data\n */\n function DataTransfer(data) {\n this.data = data; // Types could be DOMStringList or array\n\n this.types = data.types ? createArrayFromMixed(data.types) : [];\n }\n /**\n * Is this likely to be a rich text data transfer?\n *\n * @return {boolean}\n */\n\n\n var _proto = DataTransfer.prototype;\n\n _proto.isRichText = function isRichText() {\n // If HTML is available, treat this data as rich text. This way, we avoid\n // using a pasted image if it is packaged with HTML -- this may occur with\n // pastes from MS Word, for example. However this is only rich text if\n // there's accompanying text.\n if (this.getHTML() && this.getText()) {\n return true;\n } // When an image is copied from a preview window, you end up with two\n // DataTransferItems one of which is a file's metadata as text. Skip those.\n\n\n if (this.isImage()) {\n return false;\n }\n\n return this.types.some(function (type) {\n return RICH_TEXT_TYPES[type];\n });\n };\n /**\n * Get raw text.\n *\n * @return {?string}\n */\n\n\n _proto.getText = function getText() {\n var text;\n\n if (this.data.getData) {\n if (!this.types.length) {\n text = this.data.getData('Text');\n } else if (this.types.indexOf('text/plain') != -1) {\n text = this.data.getData('text/plain');\n }\n }\n\n return text ? text.replace(CR_LF_REGEX, LF_ONLY) : null;\n };\n /**\n * Get HTML paste data\n *\n * @return {?string}\n */\n\n\n _proto.getHTML = function getHTML() {\n if (this.data.getData) {\n if (!this.types.length) {\n return this.data.getData('Text');\n } else if (this.types.indexOf('text/html') != -1) {\n return this.data.getData('text/html');\n }\n }\n };\n /**\n * Is this a link data transfer?\n *\n * @return {boolean}\n */\n\n\n _proto.isLink = function isLink() {\n return this.types.some(function (type) {\n return type.indexOf('Url') != -1 || type.indexOf('text/uri-list') != -1 || type.indexOf('text/x-moz-url');\n });\n };\n /**\n * Get a link url.\n *\n * @return {?string}\n */\n\n\n _proto.getLink = function getLink() {\n if (this.data.getData) {\n if (this.types.indexOf('text/x-moz-url') != -1) {\n var url = this.data.getData('text/x-moz-url').split('\\n');\n return url[0];\n }\n\n return this.types.indexOf('text/uri-list') != -1 ? this.data.getData('text/uri-list') : this.data.getData('url');\n }\n\n return null;\n };\n /**\n * Is this an image data transfer?\n *\n * @return {boolean}\n */\n\n\n _proto.isImage = function isImage() {\n var isImage = this.types.some(function (type) {\n // Firefox will have a type of application/x-moz-file for images during\n // dragging\n return type.indexOf('application/x-moz-file') != -1;\n });\n\n if (isImage) {\n return true;\n }\n\n var items = this.getFiles();\n\n for (var i = 0; i < items.length; i++) {\n var type = items[i].type;\n\n if (!PhotosMimeType.isImage(type)) {\n return false;\n }\n }\n\n return true;\n };\n\n _proto.getCount = function getCount() {\n if (this.data.hasOwnProperty('items')) {\n return this.data.items.length;\n } else if (this.data.hasOwnProperty('mozItemCount')) {\n return this.data.mozItemCount;\n } else if (this.data.files) {\n return this.data.files.length;\n }\n\n return null;\n };\n /**\n * Get files.\n *\n * @return {array}\n */\n\n\n _proto.getFiles = function getFiles() {\n if (this.data.items) {\n // createArrayFromMixed doesn't properly handle DataTransferItemLists.\n return Array.prototype.slice.call(this.data.items).map(getFileFromDataTransfer).filter(emptyFunction.thatReturnsArgument);\n } else if (this.data.files) {\n return Array.prototype.slice.call(this.data.files);\n } else {\n return [];\n }\n };\n /**\n * Are there any files to fetch?\n *\n * @return {boolean}\n */\n\n\n _proto.hasFiles = function hasFiles() {\n return this.getFiles().length > 0;\n };\n\n return DataTransfer;\n}();\n\nmodule.exports = DataTransfer;","\"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 */\nmodule.exports = {\n BACKSPACE: 8,\n TAB: 9,\n RETURN: 13,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46,\n COMMA: 188,\n PERIOD: 190,\n A: 65,\n Z: 90,\n ZERO: 48,\n NUMPAD_0: 96,\n NUMPAD_9: 105\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 */\nvar PhotosMimeType = {\n isImage: function isImage(mimeString) {\n return getParts(mimeString)[0] === 'image';\n },\n isJpeg: function isJpeg(mimeString) {\n var parts = getParts(mimeString);\n return PhotosMimeType.isImage(mimeString) && ( // see http://fburl.com/10972194\n parts[1] === 'jpeg' || parts[1] === 'pjpeg');\n }\n};\n\nfunction getParts(mimeString) {\n return mimeString.split('/');\n}\n\nmodule.exports = PhotosMimeType;","\"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/**\n * @param {DOMElement} element\n * @param {DOMDocument} doc\n * @return {boolean}\n */\nfunction _isViewportScrollElement(element, doc) {\n return !!doc && (element === doc.documentElement || element === doc.body);\n}\n/**\n * Scroll Module. This class contains 4 simple static functions\n * to be used to access Element.scrollTop/scrollLeft properties.\n * To solve the inconsistencies between browsers when either\n * document.body or document.documentElement is supplied,\n * below logic will be used to alleviate the issue:\n *\n * 1. If 'element' is either 'document.body' or 'document.documentElement,\n * get whichever element's 'scroll{Top,Left}' is larger.\n * 2. If 'element' is either 'document.body' or 'document.documentElement',\n * set the 'scroll{Top,Left}' on both elements.\n */\n\n\nvar Scroll = {\n /**\n * @param {DOMElement} element\n * @return {number}\n */\n getTop: function getTop(element) {\n var doc = element.ownerDocument;\n return _isViewportScrollElement(element, doc) ? // In practice, they will either both have the same value,\n // or one will be zero and the other will be the scroll position\n // of the viewport. So we can use `X || Y` instead of `Math.max(X, Y)`\n doc.body.scrollTop || doc.documentElement.scrollTop : element.scrollTop;\n },\n\n /**\n * @param {DOMElement} element\n * @param {number} newTop\n */\n setTop: function setTop(element, newTop) {\n var doc = element.ownerDocument;\n\n if (_isViewportScrollElement(element, doc)) {\n doc.body.scrollTop = doc.documentElement.scrollTop = newTop;\n } else {\n element.scrollTop = newTop;\n }\n },\n\n /**\n * @param {DOMElement} element\n * @return {number}\n */\n getLeft: function getLeft(element) {\n var doc = element.ownerDocument;\n return _isViewportScrollElement(element, doc) ? doc.body.scrollLeft || doc.documentElement.scrollLeft : element.scrollLeft;\n },\n\n /**\n * @param {DOMElement} element\n * @param {number} newLeft\n */\n setLeft: function setLeft(element, newLeft) {\n var doc = element.ownerDocument;\n\n if (_isViewportScrollElement(element, doc)) {\n doc.body.scrollLeft = doc.documentElement.scrollLeft = newLeft;\n } else {\n element.scrollLeft = newLeft;\n }\n }\n};\nmodule.exports = Scroll;","\"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 * @typechecks\n */\nvar getStyleProperty = require(\"./getStyleProperty\");\n/**\n * @param {DOMNode} element [description]\n * @param {string} name Overflow style property name.\n * @return {boolean} True if the supplied ndoe is scrollable.\n */\n\n\nfunction _isNodeScrollable(element, name) {\n var overflow = Style.get(element, name);\n return overflow === 'auto' || overflow === 'scroll';\n}\n/**\n * Utilities for querying and mutating style properties.\n */\n\n\nvar Style = {\n /**\n * Gets the style property for the supplied node. This will return either the\n * computed style, if available, or the declared style.\n *\n * @param {DOMNode} node\n * @param {string} name Style property name.\n * @return {?string} Style property value.\n */\n get: getStyleProperty,\n\n /**\n * Determines the nearest ancestor of a node that is scrollable.\n *\n * NOTE: This can be expensive if used repeatedly or on a node nested deeply.\n *\n * @param {?DOMNode} node Node from which to start searching.\n * @return {?DOMWindow|DOMElement} Scroll parent of the supplied node.\n */\n getScrollParent: function getScrollParent(node) {\n if (!node) {\n return null;\n }\n\n var ownerDocument = node.ownerDocument;\n\n while (node && node !== ownerDocument.body) {\n if (_isNodeScrollable(node, 'overflow') || _isNodeScrollable(node, 'overflowY') || _isNodeScrollable(node, 'overflowX')) {\n return node;\n }\n\n node = node.parentNode;\n }\n\n return ownerDocument.defaultView || ownerDocument.parentWindow;\n }\n};\nmodule.exports = Style;","/**\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 * @typechecks\n * @stub\n * \n */\n'use strict'; // \\u00a1-\\u00b1\\u00b4-\\u00b8\\u00ba\\u00bb\\u00bf\n// is latin supplement punctuation except fractions and superscript\n// numbers\n// \\u2010-\\u2027\\u2030-\\u205e\n// is punctuation from the general punctuation block:\n// weird quotes, commas, bullets, dashes, etc.\n// \\u30fb\\u3001\\u3002\\u3008-\\u3011\\u3014-\\u301f\n// is CJK punctuation\n// \\uff1a-\\uff1f\\uff01-\\uff0f\\uff3b-\\uff40\\uff5b-\\uff65\n// is some full-width/half-width punctuation\n// \\u2E2E\\u061f\\u066a-\\u066c\\u061b\\u060c\\u060d\\uFD3e\\uFD3F\n// is some Arabic punctuation marks\n// \\u1801\\u0964\\u104a\\u104b\n// is misc. other language punctuation marks\n\nvar PUNCTUATION = '[.,+*?$|#{}()\\'\\\\^\\\\-\\\\[\\\\]\\\\\\\\\\\\/!@%\"~=<>_:;' + \"\\u30FB\\u3001\\u3002\\u3008-\\u3011\\u3014-\\u301F\\uFF1A-\\uFF1F\\uFF01-\\uFF0F\" + \"\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\u2E2E\\u061F\\u066A-\\u066C\\u061B\\u060C\\u060D\" + \"\\uFD3E\\uFD3F\\u1801\\u0964\\u104A\\u104B\\u2010-\\u2027\\u2030-\\u205E\" + \"\\xA1-\\xB1\\xB4-\\xB8\\xBA\\xBB\\xBF]\";\nmodule.exports = {\n getPunctuation: function getPunctuation() {\n return PUNCTUATION;\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\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar URI =\n/*#__PURE__*/\nfunction () {\n function URI(uri) {\n _defineProperty(this, \"_uri\", void 0);\n\n this._uri = uri;\n }\n\n var _proto = URI.prototype;\n\n _proto.toString = function toString() {\n return this._uri;\n };\n\n return URI;\n}();\n\nmodule.exports = URI;","/**\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 * @typechecks\n * \n */\n\n/**\n * Basic (stateless) API for text direction detection\n *\n * Part of our implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n'use strict';\n\nvar UnicodeBidiDirection = require(\"./UnicodeBidiDirection\");\n\nvar invariant = require(\"./invariant\");\n\n/**\n * RegExp ranges of characters with a *Strong* Bidi_Class value.\n *\n * Data is based on DerivedBidiClass.txt in UCD version 7.0.0.\n *\n * NOTE: For performance reasons, we only support Unicode's\n * Basic Multilingual Plane (BMP) for now.\n */\nvar RANGE_BY_BIDI_TYPE = {\n L: \"A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u01BA\\u01BB\" + \"\\u01BC-\\u01BF\\u01C0-\\u01C3\\u01C4-\\u0293\\u0294\\u0295-\\u02AF\\u02B0-\\u02B8\" + \"\\u02BB-\\u02C1\\u02D0-\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376-\\u0377\" + \"\\u037A\\u037B-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\" + \"\\u03A3-\\u03F5\\u03F7-\\u0481\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559\" + \"\\u055A-\\u055F\\u0561-\\u0587\\u0589\\u0903\\u0904-\\u0939\\u093B\\u093D\" + \"\\u093E-\\u0940\\u0949-\\u094C\\u094E-\\u094F\\u0950\\u0958-\\u0961\\u0964-\\u0965\" + \"\\u0966-\\u096F\\u0970\\u0971\\u0972-\\u0980\\u0982-\\u0983\\u0985-\\u098C\" + \"\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\" + \"\\u09BE-\\u09C0\\u09C7-\\u09C8\\u09CB-\\u09CC\\u09CE\\u09D7\\u09DC-\\u09DD\" + \"\\u09DF-\\u09E1\\u09E6-\\u09EF\\u09F0-\\u09F1\\u09F4-\\u09F9\\u09FA\\u0A03\" + \"\\u0A05-\\u0A0A\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32-\\u0A33\" + \"\\u0A35-\\u0A36\\u0A38-\\u0A39\\u0A3E-\\u0A40\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\" + \"\\u0A72-\\u0A74\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\" + \"\\u0AB2-\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0ABE-\\u0AC0\\u0AC9\\u0ACB-\\u0ACC\\u0AD0\" + \"\\u0AE0-\\u0AE1\\u0AE6-\\u0AEF\\u0AF0\\u0B02-\\u0B03\\u0B05-\\u0B0C\\u0B0F-\\u0B10\" + \"\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32-\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B3E\\u0B40\" + \"\\u0B47-\\u0B48\\u0B4B-\\u0B4C\\u0B57\\u0B5C-\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\" + \"\\u0B70\\u0B71\\u0B72-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\" + \"\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\" + \"\\u0BBE-\\u0BBF\\u0BC1-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD0\\u0BD7\" + \"\\u0BE6-\\u0BEF\\u0BF0-\\u0BF2\\u0C01-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\" + \"\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C41-\\u0C44\\u0C58-\\u0C59\\u0C60-\\u0C61\" + \"\\u0C66-\\u0C6F\\u0C7F\\u0C82-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\" + \"\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CBE\\u0CBF\\u0CC0-\\u0CC4\\u0CC6\" + \"\\u0CC7-\\u0CC8\\u0CCA-\\u0CCB\\u0CD5-\\u0CD6\\u0CDE\\u0CE0-\\u0CE1\\u0CE6-\\u0CEF\" + \"\\u0CF1-\\u0CF2\\u0D02-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\" + \"\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D4E\\u0D57\\u0D60-\\u0D61\" + \"\\u0D66-\\u0D6F\\u0D70-\\u0D75\\u0D79\\u0D7A-\\u0D7F\\u0D82-\\u0D83\\u0D85-\\u0D96\" + \"\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\" + \"\\u0DE6-\\u0DEF\\u0DF2-\\u0DF3\\u0DF4\\u0E01-\\u0E30\\u0E32-\\u0E33\\u0E40-\\u0E45\" + \"\\u0E46\\u0E4F\\u0E50-\\u0E59\\u0E5A-\\u0E5B\\u0E81-\\u0E82\\u0E84\\u0E87-\\u0E88\" + \"\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\" + \"\\u0EAA-\\u0EAB\\u0EAD-\\u0EB0\\u0EB2-\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\" + \"\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F01-\\u0F03\\u0F04-\\u0F12\\u0F13\\u0F14\" + \"\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F20-\\u0F29\\u0F2A-\\u0F33\\u0F34\\u0F36\\u0F38\" + \"\\u0F3E-\\u0F3F\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\" + \"\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FCF\\u0FD0-\\u0FD4\\u0FD5-\\u0FD8\" + \"\\u0FD9-\\u0FDA\\u1000-\\u102A\\u102B-\\u102C\\u1031\\u1038\\u103B-\\u103C\\u103F\" + \"\\u1040-\\u1049\\u104A-\\u104F\\u1050-\\u1055\\u1056-\\u1057\\u105A-\\u105D\\u1061\" + \"\\u1062-\\u1064\\u1065-\\u1066\\u1067-\\u106D\\u106E-\\u1070\\u1075-\\u1081\" + \"\\u1083-\\u1084\\u1087-\\u108C\\u108E\\u108F\\u1090-\\u1099\\u109A-\\u109C\" + \"\\u109E-\\u109F\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FB\\u10FC\" + \"\\u10FD-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\" + \"\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\" + \"\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u1368\" + \"\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166D-\\u166E\" + \"\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EB-\\u16ED\\u16EE-\\u16F0\" + \"\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1735-\\u1736\" + \"\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\" + \"\\u17C7-\\u17C8\\u17D4-\\u17D6\\u17D7\\u17D8-\\u17DA\\u17DC\\u17E0-\\u17E9\" + \"\\u1810-\\u1819\\u1820-\\u1842\\u1843\\u1844-\\u1877\\u1880-\\u18A8\\u18AA\" + \"\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930-\\u1931\" + \"\\u1933-\\u1938\\u1946-\\u194F\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\" + \"\\u19B0-\\u19C0\\u19C1-\\u19C7\\u19C8-\\u19C9\\u19D0-\\u19D9\\u19DA\\u1A00-\\u1A16\" + \"\\u1A19-\\u1A1A\\u1A1E-\\u1A1F\\u1A20-\\u1A54\\u1A55\\u1A57\\u1A61\\u1A63-\\u1A64\" + \"\\u1A6D-\\u1A72\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AA6\\u1AA7\\u1AA8-\\u1AAD\" + \"\\u1B04\\u1B05-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B44\\u1B45-\\u1B4B\" + \"\\u1B50-\\u1B59\\u1B5A-\\u1B60\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1B82\\u1B83-\\u1BA0\" + \"\\u1BA1\\u1BA6-\\u1BA7\\u1BAA\\u1BAE-\\u1BAF\\u1BB0-\\u1BB9\\u1BBA-\\u1BE5\\u1BE7\" + \"\\u1BEA-\\u1BEC\\u1BEE\\u1BF2-\\u1BF3\\u1BFC-\\u1BFF\\u1C00-\\u1C23\\u1C24-\\u1C2B\" + \"\\u1C34-\\u1C35\\u1C3B-\\u1C3F\\u1C40-\\u1C49\\u1C4D-\\u1C4F\\u1C50-\\u1C59\" + \"\\u1C5A-\\u1C77\\u1C78-\\u1C7D\\u1C7E-\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u1CE1\" + \"\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF2-\\u1CF3\\u1CF5-\\u1CF6\\u1D00-\\u1D2B\" + \"\\u1D2C-\\u1D6A\\u1D6B-\\u1D77\\u1D78\\u1D79-\\u1D9A\\u1D9B-\\u1DBF\\u1E00-\\u1F15\" + \"\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\" + \"\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\" + \"\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\" + \"\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\" + \"\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2134\\u2135-\\u2138\\u2139\" + \"\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2182\\u2183-\\u2184\" + \"\\u2185-\\u2188\\u2336-\\u237A\\u2395\\u249C-\\u24E9\\u26AC\\u2800-\\u28FF\" + \"\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C7B\\u2C7C-\\u2C7D\\u2C7E-\\u2CE4\" + \"\\u2CEB-\\u2CEE\\u2CF2-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\" + \"\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\" + \"\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005\\u3006\\u3007\" + \"\\u3021-\\u3029\\u302E-\\u302F\\u3031-\\u3035\\u3038-\\u303A\\u303B\\u303C\" + \"\\u3041-\\u3096\\u309D-\\u309E\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FE\\u30FF\" + \"\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u3191\\u3192-\\u3195\\u3196-\\u319F\" + \"\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3200-\\u321C\\u3220-\\u3229\\u322A-\\u3247\" + \"\\u3248-\\u324F\\u3260-\\u327B\\u327F\\u3280-\\u3289\\u328A-\\u32B0\\u32C0-\\u32CB\" + \"\\u32D0-\\u32FE\\u3300-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DB5\" + \"\\u4E00-\\u9FCC\\uA000-\\uA014\\uA015\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA4F8-\\uA4FD\" + \"\\uA4FE-\\uA4FF\\uA500-\\uA60B\\uA60C\\uA610-\\uA61F\\uA620-\\uA629\\uA62A-\\uA62B\" + \"\\uA640-\\uA66D\\uA66E\\uA680-\\uA69B\\uA69C-\\uA69D\\uA6A0-\\uA6E5\\uA6E6-\\uA6EF\" + \"\\uA6F2-\\uA6F7\\uA722-\\uA76F\\uA770\\uA771-\\uA787\\uA789-\\uA78A\\uA78B-\\uA78E\" + \"\\uA790-\\uA7AD\\uA7B0-\\uA7B1\\uA7F7\\uA7F8-\\uA7F9\\uA7FA\\uA7FB-\\uA801\" + \"\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA823-\\uA824\\uA827\\uA830-\\uA835\" + \"\\uA836-\\uA837\\uA840-\\uA873\\uA880-\\uA881\\uA882-\\uA8B3\\uA8B4-\\uA8C3\" + \"\\uA8CE-\\uA8CF\\uA8D0-\\uA8D9\\uA8F2-\\uA8F7\\uA8F8-\\uA8FA\\uA8FB\\uA900-\\uA909\" + \"\\uA90A-\\uA925\\uA92E-\\uA92F\\uA930-\\uA946\\uA952-\\uA953\\uA95F\\uA960-\\uA97C\" + \"\\uA983\\uA984-\\uA9B2\\uA9B4-\\uA9B5\\uA9BA-\\uA9BB\\uA9BD-\\uA9C0\\uA9C1-\\uA9CD\" + \"\\uA9CF\\uA9D0-\\uA9D9\\uA9DE-\\uA9DF\\uA9E0-\\uA9E4\\uA9E6\\uA9E7-\\uA9EF\" + \"\\uA9F0-\\uA9F9\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA2F-\\uAA30\\uAA33-\\uAA34\" + \"\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA5F\\uAA60-\\uAA6F\" + \"\\uAA70\\uAA71-\\uAA76\\uAA77-\\uAA79\\uAA7A\\uAA7B\\uAA7D\\uAA7E-\\uAAAF\\uAAB1\" + \"\\uAAB5-\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADC\\uAADD\\uAADE-\\uAADF\" + \"\\uAAE0-\\uAAEA\\uAAEB\\uAAEE-\\uAAEF\\uAAF0-\\uAAF1\\uAAF2\\uAAF3-\\uAAF4\\uAAF5\" + \"\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\" + \"\\uAB30-\\uAB5A\\uAB5B\\uAB5C-\\uAB5F\\uAB64-\\uAB65\\uABC0-\\uABE2\\uABE3-\\uABE4\" + \"\\uABE6-\\uABE7\\uABE9-\\uABEA\\uABEB\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\" + \"\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uE000-\\uF8FF\\uF900-\\uFA6D\\uFA70-\\uFAD9\" + \"\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFF6F\\uFF70\" + \"\\uFF71-\\uFF9D\\uFF9E-\\uFF9F\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\" + \"\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\",\n R: \"\\u0590\\u05BE\\u05C0\\u05C3\\u05C6\\u05C8-\\u05CF\\u05D0-\\u05EA\\u05EB-\\u05EF\" + \"\\u05F0-\\u05F2\\u05F3-\\u05F4\\u05F5-\\u05FF\\u07C0-\\u07C9\\u07CA-\\u07EA\" + \"\\u07F4-\\u07F5\\u07FA\\u07FB-\\u07FF\\u0800-\\u0815\\u081A\\u0824\\u0828\" + \"\\u082E-\\u082F\\u0830-\\u083E\\u083F\\u0840-\\u0858\\u085C-\\u085D\\u085E\" + \"\\u085F-\\u089F\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB37\\uFB38-\\uFB3C\" + \"\\uFB3D\\uFB3E\\uFB3F\\uFB40-\\uFB41\\uFB42\\uFB43-\\uFB44\\uFB45\\uFB46-\\uFB4F\",\n AL: \"\\u0608\\u060B\\u060D\\u061B\\u061C\\u061D\\u061E-\\u061F\\u0620-\\u063F\\u0640\" + \"\\u0641-\\u064A\\u066D\\u066E-\\u066F\\u0671-\\u06D3\\u06D4\\u06D5\\u06E5-\\u06E6\" + \"\\u06EE-\\u06EF\\u06FA-\\u06FC\\u06FD-\\u06FE\\u06FF\\u0700-\\u070D\\u070E\\u070F\" + \"\\u0710\\u0712-\\u072F\\u074B-\\u074C\\u074D-\\u07A5\\u07B1\\u07B2-\\u07BF\" + \"\\u08A0-\\u08B2\\u08B3-\\u08E3\\uFB50-\\uFBB1\\uFBB2-\\uFBC1\\uFBC2-\\uFBD2\" + \"\\uFBD3-\\uFD3D\\uFD40-\\uFD4F\\uFD50-\\uFD8F\\uFD90-\\uFD91\\uFD92-\\uFDC7\" + \"\\uFDC8-\\uFDCF\\uFDF0-\\uFDFB\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFE74\\uFE75\" + \"\\uFE76-\\uFEFC\\uFEFD-\\uFEFE\"\n};\nvar REGEX_STRONG = new RegExp('[' + RANGE_BY_BIDI_TYPE.L + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']');\nvar REGEX_RTL = new RegExp('[' + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']');\n/**\n * Returns the first strong character (has Bidi_Class value of L, R, or AL).\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @return A character with strong bidi direction, or null if not found\n */\n\nfunction firstStrongChar(str) {\n var match = REGEX_STRONG.exec(str);\n return match == null ? null : match[0];\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL).\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @return The resolved direction\n */\n\n\nfunction firstStrongCharDir(str) {\n var strongChar = firstStrongChar(str);\n\n if (strongChar == null) {\n return UnicodeBidiDirection.NEUTRAL;\n }\n\n return REGEX_RTL.exec(strongChar) ? UnicodeBidiDirection.RTL : UnicodeBidiDirection.LTR;\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL), or a fallback\n * direction, if no strong character is found.\n *\n * This function is supposed to be used in respect to Higher-Level Protocol\n * rule HL1. (http://www.unicode.org/reports/tr9/#HL1)\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @param fallback Fallback direction, used if no strong direction detected\n * for the block (default = NEUTRAL)\n * @return The resolved direction\n */\n\n\nfunction resolveBlockDir(str, fallback) {\n fallback = fallback || UnicodeBidiDirection.NEUTRAL;\n\n if (!str.length) {\n return fallback;\n }\n\n var blockDir = firstStrongCharDir(str);\n return blockDir === UnicodeBidiDirection.NEUTRAL ? fallback : blockDir;\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL), or a fallback\n * direction, if no strong character is found.\n *\n * NOTE: This function is similar to resolveBlockDir(), but uses the global\n * direction as the fallback, so it *always* returns a Strong direction,\n * making it useful for integration in places that you need to make the final\n * decision, like setting some CSS class.\n *\n * This function is supposed to be used in respect to Higher-Level Protocol\n * rule HL1. (http://www.unicode.org/reports/tr9/#HL1)\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return The resolved Strong direction\n */\n\n\nfunction getDirection(str, strongFallback) {\n if (!strongFallback) {\n strongFallback = UnicodeBidiDirection.getGlobalDir();\n }\n\n !UnicodeBidiDirection.isStrong(strongFallback) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Fallback direction must be a strong direction') : invariant(false) : void 0;\n return resolveBlockDir(str, strongFallback);\n}\n/**\n * Returns true if getDirection(arguments...) returns LTR.\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return True if the resolved direction is LTR\n */\n\n\nfunction isDirectionLTR(str, strongFallback) {\n return getDirection(str, strongFallback) === UnicodeBidiDirection.LTR;\n}\n/**\n * Returns true if getDirection(arguments...) returns RTL.\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return True if the resolved direction is RTL\n */\n\n\nfunction isDirectionRTL(str, strongFallback) {\n return getDirection(str, strongFallback) === UnicodeBidiDirection.RTL;\n}\n\nvar UnicodeBidi = {\n firstStrongChar: firstStrongChar,\n firstStrongCharDir: firstStrongCharDir,\n resolveBlockDir: resolveBlockDir,\n getDirection: getDirection,\n isDirectionLTR: isDirectionLTR,\n isDirectionRTL: isDirectionRTL\n};\nmodule.exports = UnicodeBidi;","/**\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 * @typechecks\n * \n */\n\n/**\n * Constants to represent text directionality\n *\n * Also defines a *global* direciton, to be used in bidi algorithms as a\n * default fallback direciton, when no better direction is found or provided.\n *\n * NOTE: Use `setGlobalDir()`, or update `initGlobalDir()`, to set the initial\n * global direction value based on the application.\n *\n * Part of the implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n'use strict';\n\nvar invariant = require(\"./invariant\");\n\nvar NEUTRAL = 'NEUTRAL'; // No strong direction\n\nvar LTR = 'LTR'; // Left-to-Right direction\n\nvar RTL = 'RTL'; // Right-to-Left direction\n\nvar globalDir = null; // == Helpers ==\n\n/**\n * Check if a directionality value is a Strong one\n */\n\nfunction isStrong(dir) {\n return dir === LTR || dir === RTL;\n}\n/**\n * Get string value to be used for `dir` HTML attribute or `direction` CSS\n * property.\n */\n\n\nfunction getHTMLDir(dir) {\n !isStrong(dir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`dir` must be a strong direction to be converted to HTML Direction') : invariant(false) : void 0;\n return dir === LTR ? 'ltr' : 'rtl';\n}\n/**\n * Get string value to be used for `dir` HTML attribute or `direction` CSS\n * property, but returns null if `dir` has same value as `otherDir`.\n * `null`.\n */\n\n\nfunction getHTMLDirIfDifferent(dir, otherDir) {\n !isStrong(dir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`dir` must be a strong direction to be converted to HTML Direction') : invariant(false) : void 0;\n !isStrong(otherDir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`otherDir` must be a strong direction to be converted to HTML Direction') : invariant(false) : void 0;\n return dir === otherDir ? null : getHTMLDir(dir);\n} // == Global Direction ==\n\n/**\n * Set the global direction.\n */\n\n\nfunction setGlobalDir(dir) {\n globalDir = dir;\n}\n/**\n * Initialize the global direction\n */\n\n\nfunction initGlobalDir() {\n setGlobalDir(LTR);\n}\n/**\n * Get the global direction\n */\n\n\nfunction getGlobalDir() {\n if (!globalDir) {\n this.initGlobalDir();\n }\n\n !globalDir ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Global direction not set.') : invariant(false) : void 0;\n return globalDir;\n}\n\nvar UnicodeBidiDirection = {\n // Values\n NEUTRAL: NEUTRAL,\n LTR: LTR,\n RTL: RTL,\n // Helpers\n isStrong: isStrong,\n getHTMLDir: getHTMLDir,\n getHTMLDirIfDifferent: getHTMLDirIfDifferent,\n // Global Direction\n setGlobalDir: setGlobalDir,\n initGlobalDir: initGlobalDir,\n getGlobalDir: getGlobalDir\n};\nmodule.exports = UnicodeBidiDirection;","/**\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 * @typechecks\n * \n */\n\n/**\n * Stateful API for text direction detection\n *\n * This class can be used in applications where you need to detect the\n * direction of a sequence of text blocks, where each direction shall be used\n * as the fallback direction for the next one.\n *\n * NOTE: A default direction, if not provided, is set based on the global\n * direction, as defined by `UnicodeBidiDirection`.\n *\n * == Example ==\n * ```\n * var UnicodeBidiService = require('UnicodeBidiService');\n *\n * var bidiService = new UnicodeBidiService();\n *\n * ...\n *\n * bidiService.reset();\n * for (var para in paragraphs) {\n * var dir = bidiService.getDirection(para);\n * ...\n * }\n * ```\n *\n * Part of our implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar UnicodeBidi = require(\"./UnicodeBidi\");\n\nvar UnicodeBidiDirection = require(\"./UnicodeBidiDirection\");\n\nvar invariant = require(\"./invariant\");\n\nvar UnicodeBidiService =\n/*#__PURE__*/\nfunction () {\n /**\n * Stateful class for paragraph direction detection\n *\n * @param defaultDir Default direction of the service\n */\n function UnicodeBidiService(defaultDir) {\n _defineProperty(this, \"_defaultDir\", void 0);\n\n _defineProperty(this, \"_lastDir\", void 0);\n\n if (!defaultDir) {\n defaultDir = UnicodeBidiDirection.getGlobalDir();\n } else {\n !UnicodeBidiDirection.isStrong(defaultDir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Default direction must be a strong direction (LTR or RTL)') : invariant(false) : void 0;\n }\n\n this._defaultDir = defaultDir;\n this.reset();\n }\n /**\n * Reset the internal state\n *\n * Instead of creating a new instance, you can just reset() your instance\n * everytime you start a new loop.\n */\n\n\n var _proto = UnicodeBidiService.prototype;\n\n _proto.reset = function reset() {\n this._lastDir = this._defaultDir;\n };\n /**\n * Returns the direction of a block of text, and remembers it as the\n * fall-back direction for the next paragraph.\n *\n * @param str A text block, e.g. paragraph, table cell, tag\n * @return The resolved direction\n */\n\n\n _proto.getDirection = function getDirection(str) {\n this._lastDir = UnicodeBidi.getDirection(str, this._lastDir);\n return this._lastDir;\n };\n\n return UnicodeBidiService;\n}();\n\nmodule.exports = UnicodeBidiService;","/**\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 * @typechecks\n */\n\n/**\n * Unicode-enabled replacesments for basic String functions.\n *\n * All the functions in this module assume that the input string is a valid\n * UTF-16 encoding of a Unicode sequence. If it's not the case, the behavior\n * will be undefined.\n *\n * WARNING: Since this module is typechecks-enforced, you may find new bugs\n * when replacing normal String functions with ones provided here.\n */\n'use strict';\n\nvar invariant = require(\"./invariant\"); // These two ranges are consecutive so anything in [HIGH_START, LOW_END] is a\n// surrogate code unit.\n\n\nvar SURROGATE_HIGH_START = 0xD800;\nvar SURROGATE_HIGH_END = 0xDBFF;\nvar SURROGATE_LOW_START = 0xDC00;\nvar SURROGATE_LOW_END = 0xDFFF;\nvar SURROGATE_UNITS_REGEX = /[\\uD800-\\uDFFF]/;\n/**\n * @param {number} codeUnit A Unicode code-unit, in range [0, 0x10FFFF]\n * @return {boolean} Whether code-unit is in a surrogate (hi/low) range\n */\n\nfunction isCodeUnitInSurrogateRange(codeUnit) {\n return SURROGATE_HIGH_START <= codeUnit && codeUnit <= SURROGATE_LOW_END;\n}\n/**\n * Returns whether the two characters starting at `index` form a surrogate pair.\n * For example, given the string s = \"\\uD83D\\uDE0A\", (s, 0) returns true and\n * (s, 1) returns false.\n *\n * @param {string} str\n * @param {number} index\n * @return {boolean}\n */\n\n\nfunction isSurrogatePair(str, index) {\n !(0 <= index && index < str.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'isSurrogatePair: Invalid index %s for string length %s.', index, str.length) : invariant(false) : void 0;\n\n if (index + 1 === str.length) {\n return false;\n }\n\n var first = str.charCodeAt(index);\n var second = str.charCodeAt(index + 1);\n return SURROGATE_HIGH_START <= first && first <= SURROGATE_HIGH_END && SURROGATE_LOW_START <= second && second <= SURROGATE_LOW_END;\n}\n/**\n * @param {string} str Non-empty string\n * @return {boolean} True if the input includes any surrogate code units\n */\n\n\nfunction hasSurrogateUnit(str) {\n return SURROGATE_UNITS_REGEX.test(str);\n}\n/**\n * Return the length of the original Unicode character at given position in the\n * String by looking into the UTF-16 code unit; that is equal to 1 for any\n * non-surrogate characters in BMP ([U+0000..U+D7FF] and [U+E000, U+FFFF]); and\n * returns 2 for the hi/low surrogates ([U+D800..U+DFFF]), which are in fact\n * representing non-BMP characters ([U+10000..U+10FFFF]).\n *\n * Examples:\n * - '\\u0020' => 1\n * - '\\u3020' => 1\n * - '\\uD835' => 2\n * - '\\uD835\\uDDEF' => 2\n * - '\\uDDEF' => 2\n *\n * @param {string} str Non-empty string\n * @param {number} pos Position in the string to look for one code unit\n * @return {number} Number 1 or 2\n */\n\n\nfunction getUTF16Length(str, pos) {\n return 1 + isCodeUnitInSurrogateRange(str.charCodeAt(pos));\n}\n/**\n * Fully Unicode-enabled replacement for String#length\n *\n * @param {string} str Valid Unicode string\n * @return {number} The number of Unicode characters in the string\n */\n\n\nfunction strlen(str) {\n // Call the native functions if there's no surrogate char\n if (!hasSurrogateUnit(str)) {\n return str.length;\n }\n\n var len = 0;\n\n for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {\n len++;\n }\n\n return len;\n}\n/**\n * Fully Unicode-enabled replacement for String#substr()\n *\n * @param {string} str Valid Unicode string\n * @param {number} start Location in Unicode sequence to begin extracting\n * @param {?number} length The number of Unicode characters to extract\n * (default: to the end of the string)\n * @return {string} Extracted sub-string\n */\n\n\nfunction substr(str, start, length) {\n start = start || 0;\n length = length === undefined ? Infinity : length || 0; // Call the native functions if there's no surrogate char\n\n if (!hasSurrogateUnit(str)) {\n return str.substr(start, length);\n } // Obvious cases\n\n\n var size = str.length;\n\n if (size <= 0 || start > size || length <= 0) {\n return '';\n } // Find the actual starting position\n\n\n var posA = 0;\n\n if (start > 0) {\n for (; start > 0 && posA < size; start--) {\n posA += getUTF16Length(str, posA);\n }\n\n if (posA >= size) {\n return '';\n }\n } else if (start < 0) {\n for (posA = size; start < 0 && 0 < posA; start++) {\n posA -= getUTF16Length(str, posA - 1);\n }\n\n if (posA < 0) {\n posA = 0;\n }\n } // Find the actual ending position\n\n\n var posB = size;\n\n if (length < size) {\n for (posB = posA; length > 0 && posB < size; length--) {\n posB += getUTF16Length(str, posB);\n }\n }\n\n return str.substring(posA, posB);\n}\n/**\n * Fully Unicode-enabled replacement for String#substring()\n *\n * @param {string} str Valid Unicode string\n * @param {number} start Location in Unicode sequence to begin extracting\n * @param {?number} end Location in Unicode sequence to end extracting\n * (default: end of the string)\n * @return {string} Extracted sub-string\n */\n\n\nfunction substring(str, start, end) {\n start = start || 0;\n end = end === undefined ? Infinity : end || 0;\n\n if (start < 0) {\n start = 0;\n }\n\n if (end < 0) {\n end = 0;\n }\n\n var length = Math.abs(end - start);\n start = start < end ? start : end;\n return substr(str, start, length);\n}\n/**\n * Get a list of Unicode code-points from a String\n *\n * @param {string} str Valid Unicode string\n * @return {array} A list of code-points in [0..0x10FFFF]\n */\n\n\nfunction getCodePoints(str) {\n var codePoints = [];\n\n for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {\n codePoints.push(str.codePointAt(pos));\n }\n\n return codePoints;\n}\n\nvar UnicodeUtils = {\n getCodePoints: getCodePoints,\n getUTF16Length: getUTF16Length,\n hasSurrogateUnit: hasSurrogateUnit,\n isCodeUnitInSurrogateRange: isCodeUnitInSurrogateRange,\n isSurrogatePair: isSurrogatePair,\n strlen: strlen,\n substring: substring,\n substr: substr\n};\nmodule.exports = UnicodeUtils;","/**\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 UserAgentData = require(\"./UserAgentData\");\n\nvar VersionRange = require(\"./VersionRange\");\n\nvar mapObject = require(\"./mapObject\");\n\nvar memoizeStringOnly = require(\"./memoizeStringOnly\");\n/**\n * Checks to see whether `name` and `version` satisfy `query`.\n *\n * @param {string} name Name of the browser, device, engine or platform\n * @param {?string} version Version of the browser, engine or platform\n * @param {string} query Query of form \"Name [range expression]\"\n * @param {?function} normalizer Optional pre-processor for range expression\n * @return {boolean}\n */\n\n\nfunction compare(name, version, query, normalizer) {\n // check for exact match with no version\n if (name === query) {\n return true;\n } // check for non-matching names\n\n\n if (!query.startsWith(name)) {\n return false;\n } // full comparison with version\n\n\n var range = query.slice(name.length);\n\n if (version) {\n range = normalizer ? normalizer(range) : range;\n return VersionRange.contains(range, version);\n }\n\n return false;\n}\n/**\n * Normalizes `version` by stripping any \"NT\" prefix, but only on the Windows\n * platform.\n *\n * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class.\n *\n * @param {string} version\n * @return {string}\n */\n\n\nfunction normalizePlatformVersion(version) {\n if (UserAgentData.platformName === 'Windows') {\n return version.replace(/^\\s*NT/, '');\n }\n\n return version;\n}\n/**\n * Provides client-side access to the authoritative PHP-generated User Agent\n * information supplied by the server.\n */\n\n\nvar UserAgent = {\n /**\n * Check if the User Agent browser matches `query`.\n *\n * `query` should be a string like \"Chrome\" or \"Chrome > 33\".\n *\n * Valid browser names include:\n *\n * - ACCESS NetFront\n * - AOL\n * - Amazon Silk\n * - Android\n * - BlackBerry\n * - BlackBerry PlayBook\n * - Chrome\n * - Chrome for iOS\n * - Chrome frame\n * - Facebook PHP SDK\n * - Facebook for iOS\n * - Firefox\n * - IE\n * - IE Mobile\n * - Mobile Safari\n * - Motorola Internet Browser\n * - Nokia\n * - Openwave Mobile Browser\n * - Opera\n * - Opera Mini\n * - Opera Mobile\n * - Safari\n * - UIWebView\n * - Unknown\n * - webOS\n * - etc...\n *\n * An authoritative list can be found in the PHP `BrowserDetector` class and\n * related classes in the same file (see calls to `new UserAgentBrowser` here:\n * https://fburl.com/50728104).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isBrowser: function isBrowser(query) {\n return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query);\n },\n\n /**\n * Check if the User Agent browser uses a 32 or 64 bit architecture.\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"32\" or \"64\".\n * @return {boolean}\n */\n isBrowserArchitecture: function isBrowserArchitecture(query) {\n return compare(UserAgentData.browserArchitecture, null, query);\n },\n\n /**\n * Check if the User Agent device matches `query`.\n *\n * `query` should be a string like \"iPhone\" or \"iPad\".\n *\n * Valid device names include:\n *\n * - Kindle\n * - Kindle Fire\n * - Unknown\n * - iPad\n * - iPhone\n * - iPod\n * - etc...\n *\n * An authoritative list can be found in the PHP `DeviceDetector` class and\n * related classes in the same file (see calls to `new UserAgentDevice` here:\n * https://fburl.com/50728332).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name\"\n * @return {boolean}\n */\n isDevice: function isDevice(query) {\n return compare(UserAgentData.deviceName, null, query);\n },\n\n /**\n * Check if the User Agent rendering engine matches `query`.\n *\n * `query` should be a string like \"WebKit\" or \"WebKit >= 537\".\n *\n * Valid engine names include:\n *\n * - Gecko\n * - Presto\n * - Trident\n * - WebKit\n * - etc...\n *\n * An authoritative list can be found in the PHP `RenderingEngineDetector`\n * class related classes in the same file (see calls to `new\n * UserAgentRenderingEngine` here: https://fburl.com/50728617).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isEngine: function isEngine(query) {\n return compare(UserAgentData.engineName, UserAgentData.engineVersion, query);\n },\n\n /**\n * Check if the User Agent platform matches `query`.\n *\n * `query` should be a string like \"Windows\" or \"iOS 5 - 6\".\n *\n * Valid platform names include:\n *\n * - Android\n * - BlackBerry OS\n * - Java ME\n * - Linux\n * - Mac OS X\n * - Mac OS X Calendar\n * - Mac OS X Internet Account\n * - Symbian\n * - SymbianOS\n * - Windows\n * - Windows Mobile\n * - Windows Phone\n * - iOS\n * - iOS Facebook Integration Account\n * - iOS Facebook Social Sharing UI\n * - webOS\n * - Chrome OS\n * - etc...\n *\n * An authoritative list can be found in the PHP `PlatformDetector` class and\n * related classes in the same file (see calls to `new UserAgentPlatform`\n * here: https://fburl.com/50729226).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isPlatform: function isPlatform(query) {\n return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion);\n },\n\n /**\n * Check if the User Agent platform is a 32 or 64 bit architecture.\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"32\" or \"64\".\n * @return {boolean}\n */\n isPlatformArchitecture: function isPlatformArchitecture(query) {\n return compare(UserAgentData.platformArchitecture, null, query);\n }\n};\nmodule.exports = mapObject(UserAgent, memoizeStringOnly);","/**\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/**\n * Usage note:\n * This module makes a best effort to export the same data we would internally.\n * At Facebook we use a server-generated module that does the parsing and\n * exports the data for the client to use. We can't rely on a server-side\n * implementation in open source so instead we make use of an open source\n * library to do the heavy lifting and then make some adjustments as necessary.\n * It's likely there will be some differences. Some we can smooth over.\n * Others are going to be harder.\n */\n'use strict';\n\nvar UAParser = require(\"ua-parser-js\");\n\nvar UNKNOWN = 'Unknown';\nvar PLATFORM_MAP = {\n 'Mac OS': 'Mac OS X'\n};\n/**\n * Convert from UAParser platform name to what we expect.\n */\n\nfunction convertPlatformName(name) {\n return PLATFORM_MAP[name] || name;\n}\n/**\n * Get the version number in parts. This is very naive. We actually get major\n * version as a part of UAParser already, which is generally good enough, but\n * let's get the minor just in case.\n */\n\n\nfunction getBrowserVersion(version) {\n if (!version) {\n return {\n major: '',\n minor: ''\n };\n }\n\n var parts = version.split('.');\n return {\n major: parts[0],\n minor: parts[1]\n };\n}\n/**\n * Get the UA data fom UAParser and then convert it to the format we're\n * expecting for our APIS.\n */\n\n\nvar parser = new UAParser();\nvar results = parser.getResult(); // Do some conversion first.\n\nvar browserVersionData = getBrowserVersion(results.browser.version);\nvar uaData = {\n browserArchitecture: results.cpu.architecture || UNKNOWN,\n browserFullVersion: results.browser.version || UNKNOWN,\n browserMinorVersion: browserVersionData.minor || UNKNOWN,\n browserName: results.browser.name || UNKNOWN,\n browserVersion: results.browser.major || UNKNOWN,\n deviceName: results.device.model || UNKNOWN,\n engineName: results.engine.name || UNKNOWN,\n engineVersion: results.engine.version || UNKNOWN,\n platformArchitecture: results.cpu.architecture || UNKNOWN,\n platformName: convertPlatformName(results.os.name) || UNKNOWN,\n platformVersion: results.os.version || UNKNOWN,\n platformFullVersion: results.os.version || UNKNOWN\n};\nmodule.exports = uaData;","/**\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 invariant = require(\"./invariant\");\n\nvar componentRegex = /\\./;\nvar orRegex = /\\|\\|/;\nvar rangeRegex = /\\s+\\-\\s+/;\nvar modifierRegex = /^(<=|<|=|>=|~>|~|>|)?\\s*(.+)/;\nvar numericRegex = /^(\\d*)(.*)/;\n/**\n * Splits input `range` on \"||\" and returns true if any subrange matches\n * `version`.\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\nfunction checkOrExpression(range, version) {\n var expressions = range.split(orRegex);\n\n if (expressions.length > 1) {\n return expressions.some(function (range) {\n return VersionRange.contains(range, version);\n });\n } else {\n range = expressions[0].trim();\n return checkRangeExpression(range, version);\n }\n}\n/**\n * Splits input `range` on \" - \" (the surrounding whitespace is required) and\n * returns true if version falls between the two operands.\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\n\nfunction checkRangeExpression(range, version) {\n var expressions = range.split(rangeRegex);\n !(expressions.length > 0 && expressions.length <= 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'the \"-\" operator expects exactly 2 operands') : invariant(false) : void 0;\n\n if (expressions.length === 1) {\n return checkSimpleExpression(expressions[0], version);\n } else {\n var startVersion = expressions[0],\n endVersion = expressions[1];\n !(isSimpleVersion(startVersion) && isSimpleVersion(endVersion)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'operands to the \"-\" operator must be simple (no modifiers)') : invariant(false) : void 0;\n return checkSimpleExpression('>=' + startVersion, version) && checkSimpleExpression('<=' + endVersion, version);\n }\n}\n/**\n * Checks if `range` matches `version`. `range` should be a \"simple\" range (ie.\n * not a compound range using the \" - \" or \"||\" operators).\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\n\nfunction checkSimpleExpression(range, version) {\n range = range.trim();\n\n if (range === '') {\n return true;\n }\n\n var versionComponents = version.split(componentRegex);\n\n var _getModifierAndCompon = getModifierAndComponents(range),\n modifier = _getModifierAndCompon.modifier,\n rangeComponents = _getModifierAndCompon.rangeComponents;\n\n switch (modifier) {\n case '<':\n return checkLessThan(versionComponents, rangeComponents);\n\n case '<=':\n return checkLessThanOrEqual(versionComponents, rangeComponents);\n\n case '>=':\n return checkGreaterThanOrEqual(versionComponents, rangeComponents);\n\n case '>':\n return checkGreaterThan(versionComponents, rangeComponents);\n\n case '~':\n case '~>':\n return checkApproximateVersion(versionComponents, rangeComponents);\n\n default:\n return checkEqual(versionComponents, rangeComponents);\n }\n}\n/**\n * Checks whether `a` is less than `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkLessThan(a, b) {\n return compareComponents(a, b) === -1;\n}\n/**\n * Checks whether `a` is less than or equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkLessThanOrEqual(a, b) {\n var result = compareComponents(a, b);\n return result === -1 || result === 0;\n}\n/**\n * Checks whether `a` is equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkEqual(a, b) {\n return compareComponents(a, b) === 0;\n}\n/**\n * Checks whether `a` is greater than or equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkGreaterThanOrEqual(a, b) {\n var result = compareComponents(a, b);\n return result === 1 || result === 0;\n}\n/**\n * Checks whether `a` is greater than `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkGreaterThan(a, b) {\n return compareComponents(a, b) === 1;\n}\n/**\n * Checks whether `a` is \"reasonably close\" to `b` (as described in\n * https://www.npmjs.org/doc/misc/semver.html). For example, if `b` is \"1.3.1\"\n * then \"reasonably close\" is defined as \">= 1.3.1 and < 1.4\".\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkApproximateVersion(a, b) {\n var lowerBound = b.slice();\n var upperBound = b.slice();\n\n if (upperBound.length > 1) {\n upperBound.pop();\n }\n\n var lastIndex = upperBound.length - 1;\n var numeric = parseInt(upperBound[lastIndex], 10);\n\n if (isNumber(numeric)) {\n upperBound[lastIndex] = numeric + 1 + '';\n }\n\n return checkGreaterThanOrEqual(a, lowerBound) && checkLessThan(a, upperBound);\n}\n/**\n * Extracts the optional modifier (<, <=, =, >=, >, ~, ~>) and version\n * components from `range`.\n *\n * For example, given `range` \">= 1.2.3\" returns an object with a `modifier` of\n * `\">=\"` and `components` of `[1, 2, 3]`.\n *\n * @param {string} range\n * @returns {object}\n */\n\n\nfunction getModifierAndComponents(range) {\n var rangeComponents = range.split(componentRegex);\n var matches = rangeComponents[0].match(modifierRegex);\n !matches ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'expected regex to match but it did not') : invariant(false) : void 0;\n return {\n modifier: matches[1],\n rangeComponents: [matches[2]].concat(rangeComponents.slice(1))\n };\n}\n/**\n * Determines if `number` is a number.\n *\n * @param {mixed} number\n * @returns {boolean}\n */\n\n\nfunction isNumber(number) {\n return !isNaN(number) && isFinite(number);\n}\n/**\n * Tests whether `range` is a \"simple\" version number without any modifiers\n * (\">\", \"~\" etc).\n *\n * @param {string} range\n * @returns {boolean}\n */\n\n\nfunction isSimpleVersion(range) {\n return !getModifierAndComponents(range).modifier;\n}\n/**\n * Zero-pads array `array` until it is at least `length` long.\n *\n * @param {array} array\n * @param {number} length\n */\n\n\nfunction zeroPad(array, length) {\n for (var i = array.length; i < length; i++) {\n array[i] = '0';\n }\n}\n/**\n * Normalizes `a` and `b` in preparation for comparison by doing the following:\n *\n * - zero-pads `a` and `b`\n * - marks any \"x\", \"X\" or \"*\" component in `b` as equivalent by zero-ing it out\n * in both `a` and `b`\n * - marks any final \"*\" component in `b` as a greedy wildcard by zero-ing it\n * and all of its successors in `a`\n *\n * @param {array} a\n * @param {array} b\n * @returns {array>}\n */\n\n\nfunction normalizeVersions(a, b) {\n a = a.slice();\n b = b.slice();\n zeroPad(a, b.length); // mark \"x\" and \"*\" components as equal\n\n for (var i = 0; i < b.length; i++) {\n var matches = b[i].match(/^[x*]$/i);\n\n if (matches) {\n b[i] = a[i] = '0'; // final \"*\" greedily zeros all remaining components\n\n if (matches[0] === '*' && i === b.length - 1) {\n for (var j = i; j < a.length; j++) {\n a[j] = '0';\n }\n }\n }\n }\n\n zeroPad(b, a.length);\n return [a, b];\n}\n/**\n * Returns the numerical -- not the lexicographical -- ordering of `a` and `b`.\n *\n * For example, `10-alpha` is greater than `2-beta`.\n *\n * @param {string} a\n * @param {string} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compareNumeric(a, b) {\n var aPrefix = a.match(numericRegex)[1];\n var bPrefix = b.match(numericRegex)[1];\n var aNumeric = parseInt(aPrefix, 10);\n var bNumeric = parseInt(bPrefix, 10);\n\n if (isNumber(aNumeric) && isNumber(bNumeric) && aNumeric !== bNumeric) {\n return compare(aNumeric, bNumeric);\n } else {\n return compare(a, b);\n }\n}\n/**\n * Returns the ordering of `a` and `b`.\n *\n * @param {string|number} a\n * @param {string|number} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compare(a, b) {\n !(typeof a === typeof b) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '\"a\" and \"b\" must be of the same type') : invariant(false) : void 0;\n\n if (a > b) {\n return 1;\n } else if (a < b) {\n return -1;\n } else {\n return 0;\n }\n}\n/**\n * Compares arrays of version components.\n *\n * @param {array} a\n * @param {array} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compareComponents(a, b) {\n var _normalizeVersions = normalizeVersions(a, b),\n aNormalized = _normalizeVersions[0],\n bNormalized = _normalizeVersions[1];\n\n for (var i = 0; i < bNormalized.length; i++) {\n var result = compareNumeric(aNormalized[i], bNormalized[i]);\n\n if (result) {\n return result;\n }\n }\n\n return 0;\n}\n\nvar VersionRange = {\n /**\n * Checks whether `version` satisfies the `range` specification.\n *\n * We support a subset of the expressions defined in\n * https://www.npmjs.org/doc/misc/semver.html:\n *\n * version Must match version exactly\n * =version Same as just version\n * >version Must be greater than version\n * >=version Must be greater than or equal to version\n * = 1.2.3 and < 1.3\"\n * ~>version Equivalent to ~version\n * 1.2.x Must match \"1.2.x\", where \"x\" is a wildcard that matches\n * anything\n * 1.2.* Similar to \"1.2.x\", but \"*\" in the trailing position is a\n * \"greedy\" wildcard, so will match any number of additional\n * components:\n * \"1.2.*\" will match \"1.2.1\", \"1.2.1.1\", \"1.2.1.1.1\" etc\n * * Any version\n * \"\" (Empty string) Same as *\n * v1 - v2 Equivalent to \">= v1 and <= v2\"\n * r1 || r2 Passes if either r1 or r2 are satisfied\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n contains: function contains(range, version) {\n return checkOrExpression(range.trim(), version.trim());\n }\n};\nmodule.exports = VersionRange;","\"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 * @typechecks\n */\nvar _hyphenPattern = /-(.)/g;\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;","\"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 */\nvar isTextNode = require(\"./isTextNode\");\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\n\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;","\"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 * @typechecks\n */\nvar invariant = require(\"./invariant\");\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\n\n\nfunction toArray(obj) {\n var length = obj.length; // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n !(typeof length === 'number') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {// IE < 9 does not support Array#slice on collections objects\n }\n } // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n\n\n var ret = Array(length);\n\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n\n return ret;\n}\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\n\n\nfunction hasArrayNature(obj) {\n return (// not null/false\n !!obj && ( // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') && // quacks like an array\n 'length' in obj && // not window\n !('setInterval' in obj) && // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && ( // a real array\n Array.isArray(obj) || // arguments\n 'callee' in obj || // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\n\n\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;","\"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/**\n * This function is used to mark string literals representing CSS class names\n * so that they can be transformed statically. This allows for modularization\n * and minification of CSS class names.\n *\n * In static_upstream, this function is actually implemented, but it should\n * eventually be replaced with something more descriptive, and the transform\n * that is used in the main stack should be ported for use elsewhere.\n *\n * @param string|object className to modularize, or an object of key/values.\n * In the object case, the values are conditions that\n * determine if the className keys should be included.\n * @param [string ...] Variable list of classNames in the string case.\n * @return string Renderable space-separated CSS className.\n */\nfunction cx(classNames) {\n if (typeof classNames == 'object') {\n return Object.keys(classNames).filter(function (className) {\n return classNames[className];\n }).map(replace).join(' ');\n }\n\n return Array.prototype.map.call(arguments, replace).join(' ');\n}\n\nfunction replace(str) {\n return str.replace(/\\//g, '-');\n}\n\nmodule.exports = cx;","\"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 */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\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 */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","\"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 * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\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 {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc)\n/*?DOMElement*/\n{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nmodule.exports = getActiveElement;","/**\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 * @typechecks\n */\n'use strict';\n\nvar isWebkit = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('AppleWebKit') > -1;\n/**\n * Gets the element with the document scroll properties such as `scrollLeft` and\n * `scrollHeight`. This may differ across different browsers.\n *\n * NOTE: The return value can be null if the DOM is not yet ready.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\n\nfunction getDocumentScrollElement(doc) {\n doc = doc || document;\n\n if (doc.scrollingElement) {\n return doc.scrollingElement;\n }\n\n return !isWebkit && doc.compatMode === 'CSS1Compat' ? doc.documentElement : doc.body;\n}\n\nmodule.exports = getDocumentScrollElement;","\"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 * @typechecks\n */\nvar getElementRect = require(\"./getElementRect\");\n/**\n * Gets an element's position in pixels relative to the viewport. The returned\n * object represents the position of the element's top left corner.\n *\n * @param {DOMElement} element\n * @return {object}\n */\n\n\nfunction getElementPosition(element) {\n var rect = getElementRect(element);\n return {\n x: rect.left,\n y: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n}\n\nmodule.exports = getElementPosition;","\"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 * @typechecks\n */\nvar containsNode = require(\"./containsNode\");\n/**\n * Gets an element's bounding rect in pixels relative to the viewport.\n *\n * @param {DOMElement} elem\n * @return {object}\n */\n\n\nfunction getElementRect(elem) {\n var docElem = elem.ownerDocument.documentElement; // FF 2, Safari 3 and Opera 9.5- do not support getBoundingClientRect().\n // IE9- will throw if the element is not in the document.\n\n if (!('getBoundingClientRect' in elem) || !containsNode(docElem, elem)) {\n return {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n } // Subtracts clientTop/Left because IE8- added a 2px border to the\n // element (see http://fburl.com/1493213). IE 7 in\n // Quicksmode does not report clientLeft/clientTop so there\n // will be an unaccounted offset of 2px when in quirksmode\n\n\n var rect = elem.getBoundingClientRect();\n return {\n left: Math.round(rect.left) - docElem.clientLeft,\n right: Math.round(rect.right) - docElem.clientLeft,\n top: Math.round(rect.top) - docElem.clientTop,\n bottom: Math.round(rect.bottom) - docElem.clientTop\n };\n}\n\nmodule.exports = getElementRect;","/**\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 * @typechecks\n */\n'use strict';\n\nvar getDocumentScrollElement = require(\"./getDocumentScrollElement\");\n\nvar getUnboundedScrollPosition = require(\"./getUnboundedScrollPosition\");\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are bounded. This means that if the scroll position is\n * negative or exceeds the element boundaries (which is possible using inertial\n * scrolling), you will get zero or the maximum scroll position, respectively.\n *\n * If you need the unbound scroll position, use `getUnboundedScrollPosition`.\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\n\nfunction getScrollPosition(scrollable) {\n var documentScrollElement = getDocumentScrollElement(scrollable.ownerDocument || scrollable.document);\n\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n scrollable = documentScrollElement;\n }\n\n var scrollPosition = getUnboundedScrollPosition(scrollable);\n var viewport = scrollable === documentScrollElement ? scrollable.ownerDocument.documentElement : scrollable;\n var xMax = scrollable.scrollWidth - viewport.clientWidth;\n var yMax = scrollable.scrollHeight - viewport.clientHeight;\n scrollPosition.x = Math.max(0, Math.min(scrollPosition.x, xMax));\n scrollPosition.y = Math.max(0, Math.min(scrollPosition.y, yMax));\n return scrollPosition;\n}\n\nmodule.exports = getScrollPosition;","\"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 * @typechecks\n */\nvar camelize = require(\"./camelize\");\n\nvar hyphenate = require(\"./hyphenate\");\n\nfunction asString(value)\n/*?string*/\n{\n return value == null ? value : String(value);\n}\n\nfunction getStyleProperty(\n/*DOMNode*/\nnode,\n/*string*/\nname)\n/*?string*/\n{\n var computedStyle; // W3C Standard\n\n if (window.getComputedStyle) {\n // In certain cases such as within an iframe in FF3, this returns null.\n computedStyle = window.getComputedStyle(node, null);\n\n if (computedStyle) {\n return asString(computedStyle.getPropertyValue(hyphenate(name)));\n }\n } // Safari\n\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n computedStyle = document.defaultView.getComputedStyle(node, null); // A Safari bug causes this to return null for `display: none` elements.\n\n if (computedStyle) {\n return asString(computedStyle.getPropertyValue(hyphenate(name)));\n }\n\n if (name === 'display') {\n return 'none';\n }\n } // Internet Explorer\n\n\n if (node.currentStyle) {\n if (name === 'float') {\n return asString(node.currentStyle.cssFloat || node.currentStyle.styleFloat);\n }\n\n return asString(node.currentStyle[camelize(name)]);\n }\n\n return asString(node.style && node.style[camelize(name)]);\n}\n\nmodule.exports = getStyleProperty;","/**\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 * @typechecks\n */\n'use strict';\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are unbounded, unlike `getScrollPosition`. This means they\n * may be negative or exceed the element boundaries (which is possible using\n * inertial scrolling).\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\nfunction getUnboundedScrollPosition(scrollable) {\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n return {\n x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,\n y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop\n };\n }\n\n return {\n x: scrollable.scrollLeft,\n y: scrollable.scrollTop\n };\n}\n\nmodule.exports = getUnboundedScrollPosition;","\"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 * @typechecks\n */\nfunction getViewportWidth() {\n var width;\n\n if (document.documentElement) {\n width = document.documentElement.clientWidth;\n }\n\n if (!width && document.body) {\n width = document.body.clientWidth;\n }\n\n return width || 0;\n}\n\nfunction getViewportHeight() {\n var height;\n\n if (document.documentElement) {\n height = document.documentElement.clientHeight;\n }\n\n if (!height && document.body) {\n height = document.body.clientHeight;\n }\n\n return height || 0;\n}\n/**\n * Gets the viewport dimensions including any scrollbars.\n */\n\n\nfunction getViewportDimensions() {\n return {\n width: window.innerWidth || getViewportWidth(),\n height: window.innerHeight || getViewportHeight()\n };\n}\n/**\n * Gets the viewport dimensions excluding any scrollbars.\n */\n\n\ngetViewportDimensions.withoutScrollbars = function () {\n return {\n width: getViewportWidth(),\n height: getViewportHeight()\n };\n};\n\nmodule.exports = getViewportDimensions;","\"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 * @typechecks\n */\nvar _uppercasePattern = /([A-Z])/g;\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nmodule.exports = hyphenate;","/**\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 validateFormat = process.env.NODE_ENV !== \"production\" ? function (format) {\n if (format === undefined) {\n throw new Error('invariant(...): Second argument must be a string.');\n }\n} : function (format) {};\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 to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\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 argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","\"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 * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\n\nmodule.exports = isNode;","\"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 * @typechecks\n */\nvar isNode = require(\"./isNode\");\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\n\n\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\n\nmodule.exports = isTextNode;","/**\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 * @typechecks static-only\n */\n'use strict';\n/**\n * Combines multiple className strings into one.\n */\n\nfunction joinClasses(className) {\n var newClassName = className || '';\n var argLength = arguments.length;\n\n if (argLength > 1) {\n for (var index = 1; index < argLength; index++) {\n var nextClass = arguments[index];\n\n if (nextClass) {\n newClassName = (newClassName ? newClassName + ' ' : '') + nextClass;\n }\n }\n }\n\n return newClassName;\n}\n\nmodule.exports = joinClasses;","/**\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 hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Executes the provided `callback` once for each enumerable own property in the\n * object and constructs a new object from the results. The `callback` is\n * invoked with three arguments:\n *\n * - the property value\n * - the property name\n * - the object being traversed\n *\n * Properties that are added after the call to `mapObject` will not be visited\n * by `callback`. If the values of existing properties are changed, the value\n * passed to `callback` will be the value at the time `mapObject` visits them.\n * Properties that are deleted before being visited are not visited.\n *\n * @grep function objectMap()\n * @grep function objMap()\n *\n * @param {?object} object\n * @param {function} callback\n * @param {*} context\n * @return {?object}\n */\n\nfunction mapObject(object, callback, context) {\n if (!object) {\n return null;\n }\n\n var result = {};\n\n for (var name in object) {\n if (hasOwnProperty.call(object, name)) {\n result[name] = callback.call(context, object[name], name, object);\n }\n }\n\n return result;\n}\n\nmodule.exports = mapObject;","/**\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 * @typechecks static-only\n */\n'use strict';\n/**\n * Memoizes the return value of a function that accepts one string argument.\n */\n\nfunction memoizeStringOnly(callback) {\n var cache = {};\n return function (string) {\n if (!cache.hasOwnProperty(string)) {\n cache[string] = callback.call(this, string);\n }\n\n return cache[string];\n };\n}\n\nmodule.exports = memoizeStringOnly;","\"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 */\nvar nullthrows = function nullthrows(x) {\n if (x != null) {\n return x;\n }\n\n throw new Error(\"Got unexpected null or undefined\");\n};\n\nmodule.exports = nullthrows;","/**\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'; // setimmediate adds setImmediate to the global. We want to make sure we export\n// the actual function.\n\nrequire(\"setimmediate\");\n\nmodule.exports = global.setImmediate;","/**\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\nvar emptyFunction = require(\"./emptyFunction\");\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\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new 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\n if (typeof console !== 'undefined') {\n console.error(message);\n }\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\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {unknown} thing\n * Thing to check (typically `Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`).\n * If a node is passed it must be a `Text` node, whose `value` field is\n * checked.\n */\nexport function whitespace(thing) {\n /** @type {string} */\n const value =\n // @ts-expect-error looks like a node.\n thing && typeof thing === 'object' && thing.type === 'text'\n ? // @ts-expect-error looks like a text.\n thing.value || ''\n : thing\n\n // HTML whitespace expression.\n // See .\n return typeof value === 'string' && value.replace(/[ \\t\\n\\f\\r]/g, '') === ''\n}\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\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 */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\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 return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\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 */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction 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\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\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","import e from\"void-elements\";var t=/\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g;function n(n){var r={type:\"tag\",name:\"\",voidElement:!1,attrs:{},children:[]},i=n.match(/<\\/?([^\\s]+?)[/\\s>]/);if(i&&(r.name=i[1],(e[i[1]]||\"/\"===n.charAt(n.length-2))&&(r.voidElement=!0),r.name.startsWith(\"!--\"))){var s=n.indexOf(\"--\\x3e\");return{type:\"comment\",comment:-1!==s?n.slice(4,s):\"\"}}for(var a=new RegExp(t),c=null;null!==(c=a.exec(n));)if(c[0].trim())if(c[1]){var o=c[1].trim(),l=[o,\"\"];o.indexOf(\"=\")>-1&&(l=o.split(\"=\")),r.attrs[l[0]]=l[1],a.lastIndex--}else c[2]&&(r.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return r}var r=/<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g,i=/^\\s*$/,s=Object.create(null);function a(e,t){switch(t.type){case\"text\":return e+t.content;case\"tag\":return e+=\"<\"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'=\"'+e[n]+'\"');return t.length?\" \"+t.join(\" \"):\"\"}(t.attrs):\"\")+(t.voidElement?\"/>\":\">\"),t.voidElement?e:e+t.children.reduce(a,\"\")+\"\";case\"comment\":return e+\"\\x3c!--\"+t.comment+\"--\\x3e\"}}var c={parse:function(e,t){t||(t={}),t.components||(t.components=s);var a,c=[],o=[],l=-1,m=!1;if(0!==e.indexOf(\"<\")){var u=e.indexOf(\"<\");c.push({type:\"text\",content:-1===u?e:e.substring(0,u)})}return e.replace(r,function(r,s){if(m){if(r!==\"\")return;m=!1}var u,f=\"/\"!==r.charAt(1),h=r.startsWith(\"\\x3c!--\"),p=s+r.length,d=e.charAt(p);if(h){var v=n(r);return l<0?(c.push(v),c):((u=o[l]).children.push(v),c)}if(f&&(l++,\"tag\"===(a=n(r)).type&&t.components[a.name]&&(a.type=\"component\",m=!0),a.voidElement||m||!d||\"<\"===d||a.children.push({type:\"text\",content:e.slice(p,e.indexOf(\"<\",p))}),0===l&&c.push(a),(u=o[l-1])&&u.children.push(a),o[l]=a),(!f||a.voidElement)&&(l>-1&&(a.voidElement||a.name===r.slice(2,-1))&&(l--,a=-1===l?c:o[l]),!m&&\"<\"!==d&&d)){u=-1===l?c:o[l].children;var x=e.indexOf(\"<\",p),g=e.slice(p,-1===x?void 0:x);i.test(g)&&(g=\" \"),(x>-1&&l+u.length>=0||\" \"!==g)&&u.push({type:\"text\",content:g})}}),c},stringify:function(e){return e.reduce(function(e,t){return e+a(\"\",t)},\"\")}};export default c;\n//# sourceMappingURL=html-parse-stringify.module.js.map\n","'use strict';\n\nvar Response = require('./response');\nvar extractResponseProps = require('./utils/extractResponseProps');\nvar extend = require('xtend');\n\nfunction RequestError(message, props) {\n var err = new Error(message);\n err.name = 'RequestError';\n this.name = err.name;\n this.message = err.message;\n if (err.stack) {\n this.stack = err.stack;\n }\n\n this.toString = function() {\n return this.message;\n };\n\n for (var k in props) {\n if (props.hasOwnProperty(k)) {\n this[k] = props[k];\n }\n }\n}\n\nRequestError.prototype = extend(Error.prototype);\nRequestError.prototype.constructor = RequestError;\n\nRequestError.create = function(message, req, props) {\n var err = new RequestError(message, props);\n Response.call(err, extractResponseProps(req));\n return err;\n};\n\nmodule.exports = RequestError;\n","'use strict';\n\nvar\n cleanURL = require('../plugins/cleanurl'),\n XHR = require('./xhr'),\n delay = require('./utils/delay'),\n RequestError = require('./error'),\n Response = require('./response'),\n Request = require('./request'),\n extend = require('xtend'),\n once = require('./utils/once');\n\nvar i,\n createError = RequestError.create;\n\nfunction factory(defaults, plugins) {\n defaults = defaults || {};\n plugins = plugins || [];\n\n function http(req, cb) {\n var xhr, plugin, done, k, timeoutId, supportsLoadAndErrorEvents;\n\n req = new Request(extend(defaults, req));\n\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.processRequest) {\n plugin.processRequest(req);\n }\n }\n\n // Give the plugins a chance to create the XHR object\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.createXHR) {\n xhr = plugin.createXHR(req);\n break; // First come, first serve\n }\n }\n xhr = xhr || new XHR();\n\n req.xhr = xhr;\n\n // Use a single completion callback. This can be called with or without\n // an error. If no error is passed, the request will be examined to see\n // if it was successful.\n done = once(delay(function(rawError) {\n clearTimeout(timeoutId);\n xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = xhr.ontimeout = xhr.onprogress = null;\n\n var err = getError(req, rawError);\n\n var res = err || Response.fromRequest(req);\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.processResponse) {\n plugin.processResponse(res);\n }\n }\n\n // Invoke callbacks\n if (err && req.onerror) req.onerror(err);\n if (!err && req.onload) req.onload(res);\n if (cb) cb(err, err ? undefined : res);\n\n }));\n\n supportsLoadAndErrorEvents = ('onload' in xhr) && ('onerror' in xhr);\n xhr.onload = function() { done(); };\n xhr.onerror = done;\n xhr.onabort = function() { done(); };\n\n // We'd rather use `onload`, `onerror`, and `onabort` since they're the\n // only way to reliably detect successes and failures but, if they\n // aren't available, we fall back to using `onreadystatechange`.\n xhr.onreadystatechange = function() {\n if (xhr.readyState !== 4) return;\n\n if (req.aborted) return done();\n\n if (!supportsLoadAndErrorEvents) {\n // Assume a status of 0 is an error. This could be a false\n // positive, but there's no way to tell when using\n // `onreadystatechange` ):\n // See matthewwithanm/react-inlinesvg#10.\n\n // Some browsers don't like you reading XHR properties when the\n // XHR has been aborted. In case we've gotten here as a result\n // of that (either our calling `about()` in the timeout handler\n // or the user calling it directly even though they shouldn't),\n // be careful about accessing it.\n var status;\n try {\n status = xhr.status;\n } catch (err) {}\n var err = status === 0 ? new Error('Internal XHR Error') : null;\n return done(err);\n }\n };\n\n // IE sometimes fails if you don't specify every handler.\n // See http://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment\n xhr.ontimeout = function() { /* noop */ };\n xhr.onprogress = function() { /* noop */ };\n\n xhr.open(req.method, req.url);\n\n if (req.timeout) {\n // If we use the normal XHR timeout mechanism (`xhr.timeout` and\n // `xhr.ontimeout`), `onreadystatechange` will be triggered before\n // `ontimeout`. There's no way to recognize that it was triggered by\n // a timeout, and we'd be unable to dispatch the right error.\n timeoutId = setTimeout(function() {\n req.timedOut = true;\n done();\n try {\n xhr.abort();\n } catch (err) {}\n }, req.timeout);\n }\n\n for (k in req.headers) {\n if (req.headers.hasOwnProperty(k)) {\n xhr.setRequestHeader(k, req.headers[k]);\n }\n }\n\n xhr.send(req.body);\n\n return req;\n }\n\n var method,\n methods = ['get', 'post', 'put', 'head', 'patch', 'delete'],\n verb = function(method) {\n return function(req, cb) {\n req = new Request(req);\n req.method = method;\n return http(req, cb);\n };\n };\n for (i = 0; i < methods.length; i++) {\n method = methods[i];\n http[method] = verb(method);\n }\n\n http.plugins = function() {\n return plugins;\n };\n\n http.defaults = function(newValues) {\n if (newValues) {\n return factory(extend(defaults, newValues), plugins);\n }\n return defaults;\n };\n\n http.use = function() {\n var newPlugins = Array.prototype.slice.call(arguments, 0);\n return factory(defaults, plugins.concat(newPlugins));\n };\n\n http.bare = function() {\n return factory();\n };\n\n http.Request = Request;\n http.Response = Response;\n http.RequestError = RequestError;\n\n return http;\n}\n\nmodule.exports = factory({}, [cleanURL]);\n\n/**\n * Analyze the request to see if it represents an error. If so, return it! An\n * original error object can be passed as a hint.\n */\nfunction getError(req, err) {\n if (req.aborted) return createError('Request aborted', req, {name: 'Abort'});\n\n if (req.timedOut) return createError('Request timeout', req, {name: 'Timeout'});\n\n var xhr = req.xhr;\n var type = Math.floor(xhr.status / 100);\n\n var kind;\n switch (type) {\n case 0:\n case 2:\n // These don't represent errors unless the function was passed an\n // error object explicitly.\n if (!err) return;\n return createError(err.message, req);\n case 4:\n // Sometimes 4XX statuses aren't errors.\n if (xhr.status === 404 && !req.errorOn404) return;\n kind = 'Client';\n break;\n case 5:\n kind = 'Server';\n break;\n default:\n kind = 'HTTP';\n }\n var msg = kind + ' Error: ' +\n 'The server returned a status of ' + xhr.status +\n ' for the request \"' +\n req.method.toUpperCase() + ' ' + req.url + '\"';\n return createError(msg, req);\n}\n","'use strict';\n\nfunction Request(optsOrUrl) {\n var opts = typeof optsOrUrl === 'string' ? {url: optsOrUrl} : optsOrUrl || {};\n this.method = opts.method ? opts.method.toUpperCase() : 'GET';\n this.url = opts.url;\n this.headers = opts.headers || {};\n this.body = opts.body;\n this.timeout = opts.timeout || 0;\n this.errorOn404 = opts.errorOn404 != null ? opts.errorOn404 : true;\n this.onload = opts.onload;\n this.onerror = opts.onerror;\n}\n\nRequest.prototype.abort = function() {\n if (this.aborted) return;\n this.aborted = true;\n this.xhr.abort();\n return this;\n};\n\nRequest.prototype.header = function(name, value) {\n var k;\n for (k in this.headers) {\n if (this.headers.hasOwnProperty(k)) {\n if (name.toLowerCase() === k.toLowerCase()) {\n if (arguments.length === 1) {\n return this.headers[k];\n }\n\n delete this.headers[k];\n break;\n }\n }\n }\n if (value != null) {\n this.headers[name] = value;\n return value;\n }\n};\n\n\nmodule.exports = Request;\n","'use strict';\n\nvar Request = require('./request');\nvar extractResponseProps = require('./utils/extractResponseProps');\n\nfunction Response(props) {\n this.request = props.request;\n this.xhr = props.xhr;\n this.headers = props.headers || {};\n this.status = props.status || 0;\n this.text = props.text;\n this.body = props.body;\n this.contentType = props.contentType;\n this.isHttpError = props.status >= 400;\n}\n\nResponse.prototype.header = Request.prototype.header;\n\nResponse.fromRequest = function(req) {\n return new Response(extractResponseProps(req));\n};\n\n\nmodule.exports = Response;\n","'use strict';\n\n// Wrap a function in a `setTimeout` call. This is used to guarantee async\n// behavior, which can avoid unexpected errors.\n\nmodule.exports = function(fn) {\n return function() {\n var\n args = Array.prototype.slice.call(arguments, 0),\n newFunc = function() {\n return fn.apply(null, args);\n };\n setTimeout(newFunc, 0);\n };\n};\n","'use strict';\n\nvar extend = require('xtend');\n\nmodule.exports = function(req) {\n var xhr = req.xhr;\n var props = {request: req, xhr: xhr};\n\n // Try to create the response from the request. If the request was aborted,\n // accesssing properties of the XHR may throw an error, so we wrap in a\n // try/catch.\n try {\n var lines, i, m, headers = {};\n if (xhr.getAllResponseHeaders) {\n lines = xhr.getAllResponseHeaders().split('\\n');\n for (i = 0; i < lines.length; i++) {\n if ((m = lines[i].match(/\\s*([^\\s]+):\\s+([^\\s]+)/))) {\n headers[m[1]] = m[2];\n }\n }\n }\n\n props = extend(props, {\n status: xhr.status,\n contentType: xhr.contentType || (xhr.getResponseHeader && xhr.getResponseHeader('Content-Type')),\n headers: headers,\n text: xhr.responseText,\n body: xhr.response || xhr.responseText\n });\n } catch (err) {}\n\n return props;\n};\n","'use strict';\n\n// A \"once\" utility.\nmodule.exports = function(fn) {\n var result, called = false;\n return function() {\n if (!called) {\n called = true;\n result = fn.apply(this, arguments);\n }\n return result;\n };\n};\n","module.exports = window.XMLHttpRequest;\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n req.url = req.url.replace(/[^%]+/g, function(s) {\n return encodeURI(s);\n });\n }\n};\n","'use strict';\n\nvar\n urllite = require('urllite/lib/core'),\n once = require('../lib/utils/once');\n\nvar warningShown = false;\n\nvar supportsXHR = once(function() {\n return (\n typeof window !== 'undefined' &&\n window !== null &&\n window.XMLHttpRequest &&\n 'withCredentials' in new window.XMLHttpRequest()\n );\n});\n\n// This plugin creates a Microsoft `XDomainRequest` in supporting browsers when\n// the URL being requested is on a different domain. This is necessary to\n// support IE9, which only supports CORS via its proprietary `XDomainRequest`\n// object. We need to check the URL because `XDomainRequest` *doesn't* work for\n// same domain requests (unless your server sends CORS headers).\n// `XDomainRequest` also has other limitations (no custom headers), so we try to\n// catch those and error.\nmodule.exports = {\n createXHR: function(req) {\n var a, b, k;\n\n if (typeof window === 'undefined' || window === null) {\n return;\n }\n\n a = urllite(req.url);\n b = urllite(window.location.href);\n\n // Don't do anything for same-domain requests.\n if (!a.host) {\n return;\n }\n if (a.protocol === b.protocol && a.host === b.host && a.port === b.port) {\n return;\n }\n\n // Show a warning if there are custom headers. We do this even in\n // browsers that won't use XDomainRequest so that users know there's an\n // issue right away, instead of if/when they test in IE9.\n if (!warningShown && req.headers) {\n for (k in req.headers) {\n if (req.headers.hasOwnProperty(k)) {\n warningShown = true;\n if (window && window.console && window.console.warn) {\n window.console.warn('Request headers are ignored in old IE when using the oldiexdomain plugin.');\n }\n break;\n }\n }\n }\n\n // Don't do anything if we can't do anything (:\n // Don't do anything if the browser supports proper XHR.\n if (window.XDomainRequest && !supportsXHR()) {\n // We've come this far. Might as well make an XDomainRequest.\n var xdr = new window.XDomainRequest();\n xdr.setRequestHeader = function() {}; // Ignore request headers.\n return xdr;\n }\n }\n};\n","import _typeof from '@babel/runtime/helpers/esm/typeof';\nimport _objectSpread from '@babel/runtime/helpers/esm/objectSpread';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';\nimport _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\n\nvar consoleLogger = {\n type: 'logger',\n log: function log(args) {\n this.output('log', args);\n },\n warn: function warn(args) {\n this.output('warn', args);\n },\n error: function error(args) {\n this.output('error', args);\n },\n output: function output(type, args) {\n if (console && console[type]) console[type].apply(console, args);\n }\n};\n\nvar Logger = function () {\n function Logger(concreteLogger) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Logger);\n\n this.init(concreteLogger, options);\n }\n\n _createClass(Logger, [{\n key: \"init\",\n value: function init(concreteLogger) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n }, {\n key: \"setDebug\",\n value: function setDebug(bool) {\n this.debug = bool;\n }\n }, {\n key: \"log\",\n value: function log() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.forward(args, 'log', '', true);\n }\n }, {\n key: \"warn\",\n value: function warn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return this.forward(args, 'warn', '', true);\n }\n }, {\n key: \"error\",\n value: function error() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return this.forward(args, 'error', '');\n }\n }, {\n key: \"deprecate\",\n value: function deprecate() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n }, {\n key: \"forward\",\n value: function forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (typeof args[0] === 'string') args[0] = \"\".concat(prefix).concat(this.prefix, \" \").concat(args[0]);\n return this.logger[lvl](args);\n }\n }, {\n key: \"create\",\n value: function create(moduleName) {\n return new Logger(this.logger, _objectSpread({}, {\n prefix: \"\".concat(this.prefix, \":\").concat(moduleName, \":\")\n }, this.options));\n }\n }]);\n\n return Logger;\n}();\n\nvar baseLogger = new Logger();\n\nvar EventEmitter = function () {\n function EventEmitter() {\n _classCallCheck(this, EventEmitter);\n\n this.observers = {};\n }\n\n _createClass(EventEmitter, [{\n key: \"on\",\n value: function on(events, listener) {\n var _this = this;\n\n events.split(' ').forEach(function (event) {\n _this.observers[event] = _this.observers[event] || [];\n\n _this.observers[event].push(listener);\n });\n return this;\n }\n }, {\n key: \"off\",\n value: function off(event, listener) {\n if (!this.observers[event]) return;\n\n if (!listener) {\n delete this.observers[event];\n return;\n }\n\n this.observers[event] = this.observers[event].filter(function (l) {\n return l !== listener;\n });\n }\n }, {\n key: \"emit\",\n value: function emit(event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (this.observers[event]) {\n var cloned = [].concat(this.observers[event]);\n cloned.forEach(function (observer) {\n observer.apply(void 0, args);\n });\n }\n\n if (this.observers['*']) {\n var _cloned = [].concat(this.observers['*']);\n\n _cloned.forEach(function (observer) {\n observer.apply(observer, [event].concat(args));\n });\n }\n }\n }]);\n\n return EventEmitter;\n}();\n\nfunction defer() {\n var res;\n var rej;\n var promise = new Promise(function (resolve, reject) {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n}\nfunction makeString(object) {\n if (object == null) return '';\n return '' + object;\n}\nfunction copy(a, s, t) {\n a.forEach(function (m) {\n if (s[m]) t[m] = s[m];\n });\n}\n\nfunction getLastOfPath(object, path, Empty) {\n function cleanKey(key) {\n return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n }\n\n function canNotTraverseDeeper() {\n return !object || typeof object === 'string';\n }\n\n var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n\n while (stack.length > 1) {\n if (canNotTraverseDeeper()) return {};\n var key = cleanKey(stack.shift());\n if (!object[key] && Empty) object[key] = new Empty();\n\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n }\n\n if (canNotTraverseDeeper()) return {};\n return {\n obj: object,\n k: cleanKey(stack.shift())\n };\n}\n\nfunction setPath(object, path, newValue) {\n var _getLastOfPath = getLastOfPath(object, path, Object),\n obj = _getLastOfPath.obj,\n k = _getLastOfPath.k;\n\n obj[k] = newValue;\n}\nfunction pushPath(object, path, newValue, concat) {\n var _getLastOfPath2 = getLastOfPath(object, path, Object),\n obj = _getLastOfPath2.obj,\n k = _getLastOfPath2.k;\n\n obj[k] = obj[k] || [];\n if (concat) obj[k] = obj[k].concat(newValue);\n if (!concat) obj[k].push(newValue);\n}\nfunction getPath(object, path) {\n var _getLastOfPath3 = getLastOfPath(object, path),\n obj = _getLastOfPath3.obj,\n k = _getLastOfPath3.k;\n\n if (!obj) return undefined;\n return obj[k];\n}\nfunction getPathWithDefaults(data, defaultData, key) {\n var value = getPath(data, key);\n\n if (value !== undefined) {\n return value;\n }\n\n return getPath(defaultData, key);\n}\nfunction deepExtend(target, source, overwrite) {\n for (var prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n\n return target;\n}\nfunction regexEscape(str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\nvar _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nfunction escape(data) {\n if (typeof data === 'string') {\n return data.replace(/[&<>\"'\\/]/g, function (s) {\n return _entityMap[s];\n });\n }\n\n return data;\n}\nvar isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;\n\nfunction deepFind(obj, path) {\n var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';\n if (!obj) return undefined;\n if (obj[path]) return obj[path];\n var paths = path.split(keySeparator);\n var current = obj;\n\n for (var i = 0; i < paths.length; ++i) {\n if (!current) return undefined;\n\n if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {\n return undefined;\n }\n\n if (current[paths[i]] === undefined) {\n var j = 2;\n var p = paths.slice(i, i + j).join(keySeparator);\n var mix = current[p];\n\n while (mix === undefined && paths.length > i + j) {\n j++;\n p = paths.slice(i, i + j).join(keySeparator);\n mix = current[p];\n }\n\n if (mix === undefined) return undefined;\n if (typeof mix === 'string') return mix;\n if (p && typeof mix[p] === 'string') return mix[p];\n var joinedPath = paths.slice(i + j).join(keySeparator);\n if (joinedPath) return deepFind(mix, joinedPath, keySeparator);\n return undefined;\n }\n\n current = current[paths[i]];\n }\n\n return current;\n}\n\nvar ResourceStore = function (_EventEmitter) {\n _inherits(ResourceStore, _EventEmitter);\n\n function ResourceStore(data) {\n var _this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n ns: ['translation'],\n defaultNS: 'translation'\n };\n\n _classCallCheck(this, ResourceStore);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n _this.data = data || {};\n _this.options = options;\n\n if (_this.options.keySeparator === undefined) {\n _this.options.keySeparator = '.';\n }\n\n if (_this.options.ignoreJSONStructure === undefined) {\n _this.options.ignoreJSONStructure = true;\n }\n\n return _this;\n }\n\n _createClass(ResourceStore, [{\n key: \"addNamespaces\",\n value: function addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n }, {\n key: \"removeNamespaces\",\n value: function removeNamespaces(ns) {\n var index = this.options.ns.indexOf(ns);\n\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n }, {\n key: \"getResource\",\n value: function getResource(lng, ns, key) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n var path = [lng, ns];\n if (key && typeof key !== 'string') path = path.concat(key);\n if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n }\n\n var result = getPath(this.data, path);\n if (result || !ignoreJSONStructure || typeof key !== 'string') return result;\n return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);\n }\n }, {\n key: \"addResource\",\n value: function addResource(lng, ns, key, value) {\n var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n silent: false\n };\n var keySeparator = this.options.keySeparator;\n if (keySeparator === undefined) keySeparator = '.';\n var path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n }, {\n key: \"addResources\",\n value: function addResources(lng, ns, resources) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n silent: false\n };\n\n for (var m in resources) {\n if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n }, {\n key: \"addResourceBundle\",\n value: function addResourceBundle(lng, ns, resources, deep, overwrite) {\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n silent: false\n };\n var path = [lng, ns];\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n\n this.addNamespaces(ns);\n var pack = getPath(this.data, path) || {};\n\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = _objectSpread({}, pack, resources);\n }\n\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n }, {\n key: \"removeResourceBundle\",\n value: function removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n }, {\n key: \"hasResourceBundle\",\n value: function hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n }, {\n key: \"getResourceBundle\",\n value: function getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n if (this.options.compatibilityAPI === 'v1') return _objectSpread({}, {}, this.getResource(lng, ns));\n return this.getResource(lng, ns);\n }\n }, {\n key: \"getDataByLanguage\",\n value: function getDataByLanguage(lng) {\n return this.data[lng];\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return this.data;\n }\n }]);\n\n return ResourceStore;\n}(EventEmitter);\n\nvar postProcessor = {\n processors: {},\n addPostProcessor: function addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle: function handle(processors, value, key, options, translator) {\n var _this = this;\n\n processors.forEach(function (processor) {\n if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);\n });\n return value;\n }\n};\n\nvar checkedLoadedFor = {};\n\nvar Translator = function (_EventEmitter) {\n _inherits(Translator, _EventEmitter);\n\n function Translator(services) {\n var _this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Translator);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized(_this));\n _this.options = options;\n\n if (_this.options.keySeparator === undefined) {\n _this.options.keySeparator = '.';\n }\n\n _this.logger = baseLogger.create('translator');\n return _this;\n }\n\n _createClass(Translator, [{\n key: \"changeLanguage\",\n value: function changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n }, {\n key: \"exists\",\n value: function exists(key) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n interpolation: {}\n };\n\n if (key === undefined || key === null) {\n return false;\n }\n\n var resolved = this.resolve(key, options);\n return resolved && resolved.res !== undefined;\n }\n }, {\n key: \"extractFromKey\",\n value: function extractFromKey(key, options) {\n var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n var namespaces = options.ns || this.options.defaultNS;\n\n if (nsSeparator && key.indexOf(nsSeparator) > -1) {\n var m = key.match(this.interpolator.nestingRegexp);\n\n if (m && m.length > 0) {\n return {\n key: key,\n namespaces: namespaces\n };\n }\n\n var parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n\n if (typeof namespaces === 'string') namespaces = [namespaces];\n return {\n key: key,\n namespaces: namespaces\n };\n }\n }, {\n key: \"translate\",\n value: function translate(keys, options, lastKey) {\n var _this2 = this;\n\n if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {\n options = this.options.overloadTranslationOptionHandler(arguments);\n }\n\n if (!options) options = {};\n if (keys === undefined || keys === null) return '';\n if (!Array.isArray(keys)) keys = [String(keys)];\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n\n var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),\n key = _this$extractFromKey.key,\n namespaces = _this$extractFromKey.namespaces;\n\n var namespace = namespaces[namespaces.length - 1];\n var lng = options.lng || this.language;\n var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n\n if (lng && lng.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n var nsSeparator = options.nsSeparator || this.options.nsSeparator;\n return namespace + nsSeparator + key;\n }\n\n return key;\n }\n\n var resolved = this.resolve(keys, options);\n var res = resolved && resolved.res;\n var resUsedKey = resolved && resolved.usedKey || key;\n var resExactUsedKey = resolved && resolved.exactUsedKey || key;\n var resType = Object.prototype.toString.apply(res);\n var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;\n var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';\n\n if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {\n if (!options.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n\n return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, _objectSpread({}, options, {\n ns: namespaces\n })) : \"key '\".concat(key, \" (\").concat(this.language, \")' returned an object instead of string.\");\n }\n\n if (keySeparator) {\n var resTypeIsArray = resType === '[object Array]';\n var copy = resTypeIsArray ? [] : {};\n var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n\n for (var m in res) {\n if (Object.prototype.hasOwnProperty.call(res, m)) {\n var deepKey = \"\".concat(newKeyToUse).concat(keySeparator).concat(m);\n copy[m] = this.translate(deepKey, _objectSpread({}, options, {\n joinArrays: false,\n ns: namespaces\n }));\n if (copy[m] === deepKey) copy[m] = res[m];\n }\n }\n\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, options, lastKey);\n } else {\n var usedDefault = false;\n var usedKey = false;\n var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n var hasDefaultValue = Translator.hasDefaultValue(options);\n var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count) : '';\n var defaultValue = options[\"defaultValue\".concat(defaultValueSuffix)] || options.defaultValue;\n\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n\n var missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n\n if (keySeparator) {\n var fk = this.resolve(key, _objectSpread({}, options, {\n keySeparator: false\n }));\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n\n var lngs = [];\n var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);\n\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (var i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);\n } else {\n lngs.push(options.lng || this.language);\n }\n\n var send = function send(l, k, fallbackValue) {\n if (_this2.options.missingKeyHandler) {\n _this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);\n } else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {\n _this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);\n }\n\n _this2.emit('missingKey', l, namespace, k, res);\n };\n\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(function (language) {\n _this2.pluralResolver.getSuffixes(language).forEach(function (suffix) {\n send([language], key + suffix, options[\"defaultValue\".concat(suffix)] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n\n res = this.extendTranslation(res, keys, options, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = \"\".concat(namespace, \":\").concat(key);\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);\n }\n\n return res;\n }\n }, {\n key: \"extendTranslation\",\n value: function extendTranslation(res, key, options, resolved, lastKey) {\n var _this3 = this;\n\n if (this.i18nFormat && this.i18nFormat.parse) {\n res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved: resolved\n });\n } else if (!options.skipInterpolation) {\n if (options.interpolation) this.interpolator.init(_objectSpread({}, options, {\n interpolation: _objectSpread({}, this.options.interpolation, options.interpolation)\n }));\n var skipOnVariables = options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;\n var nestBef;\n\n if (skipOnVariables) {\n var nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n\n var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;\n if (this.options.interpolation.defaultVariables) data = _objectSpread({}, this.options.interpolation.defaultVariables, data);\n res = this.interpolator.interpolate(res, data, options.lng || this.language, options);\n\n if (skipOnVariables) {\n var na = res.match(this.interpolator.nestingRegexp);\n var nestAft = na && na.length;\n if (nestBef < nestAft) options.nest = false;\n }\n\n if (options.nest !== false) res = this.interpolator.nest(res, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (lastKey && lastKey[0] === args[0] && !options.context) {\n _this3.logger.warn(\"It seems you are nesting recursively key: \".concat(args[0], \" in key: \").concat(key[0]));\n\n return null;\n }\n\n return _this3.translate.apply(_this3, args.concat([key]));\n }, options);\n if (options.interpolation) this.interpolator.reset();\n }\n\n var postProcess = options.postProcess || this.options.postProcess;\n var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;\n\n if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? _objectSpread({\n i18nResolved: resolved\n }, options) : options, this);\n }\n\n return res;\n }\n }, {\n key: \"resolve\",\n value: function resolve(keys) {\n var _this4 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var found;\n var usedKey;\n var exactUsedKey;\n var usedLng;\n var usedNS;\n if (typeof keys === 'string') keys = [keys];\n keys.forEach(function (k) {\n if (_this4.isValidLookup(found)) return;\n\n var extracted = _this4.extractFromKey(k, options);\n\n var key = extracted.key;\n usedKey = key;\n var namespaces = extracted.namespaces;\n if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);\n var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n var needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';\n var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);\n namespaces.forEach(function (ns) {\n if (_this4.isValidLookup(found)) return;\n usedNS = ns;\n\n if (!checkedLoadedFor[\"\".concat(codes[0], \"-\").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[\"\".concat(codes[0], \"-\").concat(ns)] = true;\n\n _this4.logger.warn(\"key \\\"\".concat(usedKey, \"\\\" for languages \\\"\").concat(codes.join(', '), \"\\\" won't get resolved as namespace \\\"\").concat(usedNS, \"\\\" was not yet loaded\"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n\n codes.forEach(function (code) {\n if (_this4.isValidLookup(found)) return;\n usedLng = code;\n var finalKey = key;\n var finalKeys = [finalKey];\n\n if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {\n _this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);\n } else {\n var pluralSuffix;\n if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);\n if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);\n if (needsContextHandling) finalKeys.push(finalKey += \"\".concat(_this4.options.contextSeparator).concat(options.context));\n if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);\n }\n\n var possibleKey;\n\n while (possibleKey = finalKeys.pop()) {\n if (!_this4.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = _this4.getResource(code, ns, possibleKey, options);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey: usedKey,\n exactUsedKey: exactUsedKey,\n usedLng: usedLng,\n usedNS: usedNS\n };\n }\n }, {\n key: \"isValidLookup\",\n value: function isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n }, {\n key: \"getResource\",\n value: function getResource(code, ns, key) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n }], [{\n key: \"hasDefaultValue\",\n value: function hasDefaultValue(options) {\n var prefix = 'defaultValue';\n\n for (var option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n\n return false;\n }\n }]);\n\n return Translator;\n}(EventEmitter);\n\nfunction capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar LanguageUtil = function () {\n function LanguageUtil(options) {\n _classCallCheck(this, LanguageUtil);\n\n this.options = options;\n this.whitelist = this.options.supportedLngs || false;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n\n _createClass(LanguageUtil, [{\n key: \"getScriptPartFromCode\",\n value: function getScriptPartFromCode(code) {\n if (!code || code.indexOf('-') < 0) return null;\n var p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n }, {\n key: \"getLanguagePartFromCode\",\n value: function getLanguagePartFromCode(code) {\n if (!code || code.indexOf('-') < 0) return code;\n var p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n }, {\n key: \"formatLanguageCode\",\n value: function formatLanguageCode(code) {\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];\n var p = code.split('-');\n\n if (this.options.lowerCaseLng) {\n p = p.map(function (part) {\n return part.toLowerCase();\n });\n } else if (p.length === 2) {\n p[0] = p[0].toLowerCase();\n p[1] = p[1].toUpperCase();\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n } else if (p.length === 3) {\n p[0] = p[0].toLowerCase();\n if (p[1].length === 2) p[1] = p[1].toUpperCase();\n if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());\n }\n\n return p.join('-');\n }\n\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n }, {\n key: \"isWhitelisted\",\n value: function isWhitelisted(code) {\n this.logger.deprecate('languageUtils.isWhitelisted', 'function \"isWhitelisted\" will be renamed to \"isSupportedCode\" in the next major - please make sure to rename it\\'s usage asap.');\n return this.isSupportedCode(code);\n }\n }, {\n key: \"isSupportedCode\",\n value: function isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n }, {\n key: \"getBestMatchFromCodes\",\n value: function getBestMatchFromCodes(codes) {\n var _this = this;\n\n if (!codes) return null;\n var found;\n codes.forEach(function (code) {\n if (found) return;\n\n var cleanedLng = _this.formatLanguageCode(code);\n\n if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n\n if (!found && this.options.supportedLngs) {\n codes.forEach(function (code) {\n if (found) return;\n\n var lngOnly = _this.getLanguagePartFromCode(code);\n\n if (_this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = _this.options.supportedLngs.find(function (supportedLng) {\n if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;\n });\n });\n }\n\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n }, {\n key: \"getFallbackCodes\",\n value: function getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (typeof fallbacks === 'string') fallbacks = [fallbacks];\n if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;\n if (!code) return fallbacks[\"default\"] || [];\n var found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks[\"default\"];\n return found || [];\n }\n }, {\n key: \"toResolveHierarchy\",\n value: function toResolveHierarchy(code, fallbackCode) {\n var _this2 = this;\n\n var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);\n var codes = [];\n\n var addCode = function addCode(c) {\n if (!c) return;\n\n if (_this2.isSupportedCode(c)) {\n codes.push(c);\n } else {\n _this2.logger.warn(\"rejecting language code not found in supportedLngs: \".concat(c));\n }\n };\n\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (typeof code === 'string') {\n addCode(this.formatLanguageCode(code));\n }\n\n fallbackCodes.forEach(function (fc) {\n if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));\n });\n return codes;\n }\n }]);\n\n return LanguageUtil;\n}();\n\nvar sets = [{\n lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],\n nr: [1, 2],\n fc: 1\n}, {\n lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],\n nr: [1, 2],\n fc: 2\n}, {\n lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],\n nr: [1],\n fc: 3\n}, {\n lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],\n nr: [1, 2, 5],\n fc: 4\n}, {\n lngs: ['ar'],\n nr: [0, 1, 2, 3, 11, 100],\n fc: 5\n}, {\n lngs: ['cs', 'sk'],\n nr: [1, 2, 5],\n fc: 6\n}, {\n lngs: ['csb', 'pl'],\n nr: [1, 2, 5],\n fc: 7\n}, {\n lngs: ['cy'],\n nr: [1, 2, 3, 8],\n fc: 8\n}, {\n lngs: ['fr'],\n nr: [1, 2],\n fc: 9\n}, {\n lngs: ['ga'],\n nr: [1, 2, 3, 7, 11],\n fc: 10\n}, {\n lngs: ['gd'],\n nr: [1, 2, 3, 20],\n fc: 11\n}, {\n lngs: ['is'],\n nr: [1, 2],\n fc: 12\n}, {\n lngs: ['jv'],\n nr: [0, 1],\n fc: 13\n}, {\n lngs: ['kw'],\n nr: [1, 2, 3, 4],\n fc: 14\n}, {\n lngs: ['lt'],\n nr: [1, 2, 10],\n fc: 15\n}, {\n lngs: ['lv'],\n nr: [1, 2, 0],\n fc: 16\n}, {\n lngs: ['mk'],\n nr: [1, 2],\n fc: 17\n}, {\n lngs: ['mnk'],\n nr: [0, 1, 2],\n fc: 18\n}, {\n lngs: ['mt'],\n nr: [1, 2, 11, 20],\n fc: 19\n}, {\n lngs: ['or'],\n nr: [2, 1],\n fc: 2\n}, {\n lngs: ['ro'],\n nr: [1, 2, 20],\n fc: 20\n}, {\n lngs: ['sl'],\n nr: [5, 1, 2, 3],\n fc: 21\n}, {\n lngs: ['he', 'iw'],\n nr: [1, 2, 20, 21],\n fc: 22\n}];\nvar _rulesPluralsTypes = {\n 1: function _(n) {\n return Number(n > 1);\n },\n 2: function _(n) {\n return Number(n != 1);\n },\n 3: function _(n) {\n return 0;\n },\n 4: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 5: function _(n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);\n },\n 6: function _(n) {\n return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);\n },\n 7: function _(n) {\n return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 8: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);\n },\n 9: function _(n) {\n return Number(n >= 2);\n },\n 10: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);\n },\n 11: function _(n) {\n return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);\n },\n 12: function _(n) {\n return Number(n % 10 != 1 || n % 100 == 11);\n },\n 13: function _(n) {\n return Number(n !== 0);\n },\n 14: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);\n },\n 15: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 16: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);\n },\n 17: function _(n) {\n return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);\n },\n 18: function _(n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : 2);\n },\n 19: function _(n) {\n return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);\n },\n 20: function _(n) {\n return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);\n },\n 21: function _(n) {\n return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);\n },\n 22: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);\n }\n};\n\nfunction createRules() {\n var rules = {};\n sets.forEach(function (set) {\n set.lngs.forEach(function (l) {\n rules[l] = {\n numbers: set.nr,\n plurals: _rulesPluralsTypes[set.fc]\n };\n });\n });\n return rules;\n}\n\nvar PluralResolver = function () {\n function PluralResolver(languageUtils) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, PluralResolver);\n\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.rules = createRules();\n }\n\n _createClass(PluralResolver, [{\n key: \"addRule\",\n value: function addRule(lng, obj) {\n this.rules[lng] = obj;\n }\n }, {\n key: \"getRule\",\n value: function getRule(code) {\n return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];\n }\n }, {\n key: \"needsPlural\",\n value: function needsPlural(code) {\n var rule = this.getRule(code);\n return rule && rule.numbers.length > 1;\n }\n }, {\n key: \"getPluralFormsOfKey\",\n value: function getPluralFormsOfKey(code, key) {\n return this.getSuffixes(code).map(function (suffix) {\n return key + suffix;\n });\n }\n }, {\n key: \"getSuffixes\",\n value: function getSuffixes(code) {\n var _this = this;\n\n var rule = this.getRule(code);\n\n if (!rule) {\n return [];\n }\n\n return rule.numbers.map(function (number) {\n return _this.getSuffix(code, number);\n });\n }\n }, {\n key: \"getSuffix\",\n value: function getSuffix(code, count) {\n var _this2 = this;\n\n var rule = this.getRule(code);\n\n if (rule) {\n var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));\n var suffix = rule.numbers[idx];\n\n if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n if (suffix === 2) {\n suffix = 'plural';\n } else if (suffix === 1) {\n suffix = '';\n }\n }\n\n var returnSuffix = function returnSuffix() {\n return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();\n };\n\n if (this.options.compatibilityJSON === 'v1') {\n if (suffix === 1) return '';\n if (typeof suffix === 'number') return \"_plural_\".concat(suffix.toString());\n return returnSuffix();\n } else if (this.options.compatibilityJSON === 'v2') {\n return returnSuffix();\n } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n return returnSuffix();\n }\n\n return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();\n }\n\n this.logger.warn(\"no plural rule found for: \".concat(code));\n return '';\n }\n }]);\n\n return PluralResolver;\n}();\n\nvar Interpolator = function () {\n function Interpolator() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Interpolator);\n\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n\n this.format = options.interpolation && options.interpolation.format || function (value) {\n return value;\n };\n\n this.init(options);\n }\n\n _createClass(Interpolator, [{\n key: \"init\",\n value: function init() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n var iOpts = options.interpolation;\n this.escape = iOpts.escape !== undefined ? iOpts.escape : escape;\n this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;\n this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;\n this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';\n this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';\n this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';\n this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';\n this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';\n this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;\n this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;\n this.resetRegExp();\n }\n }, {\n key: \"reset\",\n value: function reset() {\n if (this.options) this.init(this.options);\n }\n }, {\n key: \"resetRegExp\",\n value: function resetRegExp() {\n var regexpStr = \"\".concat(this.prefix, \"(.+?)\").concat(this.suffix);\n this.regexp = new RegExp(regexpStr, 'g');\n var regexpUnescapeStr = \"\".concat(this.prefix).concat(this.unescapePrefix, \"(.+?)\").concat(this.unescapeSuffix).concat(this.suffix);\n this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');\n var nestingRegexpStr = \"\".concat(this.nestingPrefix, \"(.+?)\").concat(this.nestingSuffix);\n this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');\n }\n }, {\n key: \"interpolate\",\n value: function interpolate(str, data, lng, options) {\n var _this = this;\n\n var match;\n var value;\n var replaces;\n var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n\n function regexSafe(val) {\n return val.replace(/\\$/g, '$$$$');\n }\n\n var handleFormat = function handleFormat(key) {\n if (key.indexOf(_this.formatSeparator) < 0) {\n var path = getPathWithDefaults(data, defaultData, key);\n return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread({}, options, data, {\n interpolationkey: key\n })) : path;\n }\n\n var p = key.split(_this.formatSeparator);\n var k = p.shift().trim();\n var f = p.join(_this.formatSeparator).trim();\n return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, _objectSpread({}, options, data, {\n interpolationkey: k\n }));\n };\n\n this.resetRegExp();\n var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;\n var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;\n var todos = [{\n regex: this.regexpUnescape,\n safeValue: function safeValue(val) {\n return regexSafe(val);\n }\n }, {\n regex: this.regexp,\n safeValue: function safeValue(val) {\n return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);\n }\n }];\n todos.forEach(function (todo) {\n replaces = 0;\n\n while (match = todo.regex.exec(str)) {\n value = handleFormat(match[1].trim());\n\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n var temp = missingInterpolationHandler(str, match, options);\n value = typeof temp === 'string' ? temp : '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n _this.logger.warn(\"missed to pass in variable \".concat(match[1], \" for interpolating \").concat(str));\n\n value = '';\n }\n } else if (typeof value !== 'string' && !_this.useRawValueToEscape) {\n value = makeString(value);\n }\n\n var safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n\n if (skipOnVariables) {\n todo.regex.lastIndex += safeValue.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n\n replaces++;\n\n if (replaces >= _this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n }, {\n key: \"nest\",\n value: function nest(str, fc) {\n var _this2 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var match;\n var value;\n\n var clonedOptions = _objectSpread({}, options);\n\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n\n function handleHasOptions(key, inheritedOptions) {\n var sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n var c = key.split(new RegExp(\"\".concat(sep, \"[ ]*{\")));\n var optionsString = \"{\".concat(c[1]);\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n optionsString = optionsString.replace(/'/g, '\"');\n\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = _objectSpread({}, inheritedOptions, clonedOptions);\n } catch (e) {\n this.logger.warn(\"failed parsing options string in nesting for key \".concat(key), e);\n return \"\".concat(key).concat(sep).concat(optionsString);\n }\n\n delete clonedOptions.defaultValue;\n return key;\n }\n\n while (match = this.nestingRegexp.exec(str)) {\n var formatters = [];\n var doReduce = false;\n\n if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {\n var r = match[1].split(this.formatSeparator).map(function (elem) {\n return elem.trim();\n });\n match[1] = r.shift();\n formatters = r;\n doReduce = true;\n }\n\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && typeof value !== 'string') return value;\n if (typeof value !== 'string') value = makeString(value);\n\n if (!value) {\n this.logger.warn(\"missed to resolve \".concat(match[1], \" for nesting \").concat(str));\n value = '';\n }\n\n if (doReduce) {\n value = formatters.reduce(function (v, f) {\n return _this2.format(v, f, options.lng, _objectSpread({}, options, {\n interpolationkey: match[1].trim()\n }));\n }, value.trim());\n }\n\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n\n return str;\n }\n }]);\n\n return Interpolator;\n}();\n\nfunction remove(arr, what) {\n var found = arr.indexOf(what);\n\n while (found !== -1) {\n arr.splice(found, 1);\n found = arr.indexOf(what);\n }\n}\n\nvar Connector = function (_EventEmitter) {\n _inherits(Connector, _EventEmitter);\n\n function Connector(backend, store, services) {\n var _this;\n\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, Connector);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n _this.backend = backend;\n _this.store = store;\n _this.services = services;\n _this.languageUtils = services.languageUtils;\n _this.options = options;\n _this.logger = baseLogger.create('backendConnector');\n _this.state = {};\n _this.queue = [];\n\n if (_this.backend && _this.backend.init) {\n _this.backend.init(services, options.backend, options);\n }\n\n return _this;\n }\n\n _createClass(Connector, [{\n key: \"queueLoad\",\n value: function queueLoad(languages, namespaces, options, callback) {\n var _this2 = this;\n\n var toLoad = [];\n var pending = [];\n var toLoadLanguages = [];\n var toLoadNamespaces = [];\n languages.forEach(function (lng) {\n var hasAllNamespaces = true;\n namespaces.forEach(function (ns) {\n var name = \"\".concat(lng, \"|\").concat(ns);\n\n if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {\n _this2.state[name] = 2;\n } else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {\n if (pending.indexOf(name) < 0) pending.push(name);\n } else {\n _this2.state[name] = 1;\n hasAllNamespaces = false;\n if (pending.indexOf(name) < 0) pending.push(name);\n if (toLoad.indexOf(name) < 0) toLoad.push(name);\n if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);\n }\n });\n if (!hasAllNamespaces) toLoadLanguages.push(lng);\n });\n\n if (toLoad.length || pending.length) {\n this.queue.push({\n pending: pending,\n loaded: {},\n errors: [],\n callback: callback\n });\n }\n\n return {\n toLoad: toLoad,\n pending: pending,\n toLoadLanguages: toLoadLanguages,\n toLoadNamespaces: toLoadNamespaces\n };\n }\n }, {\n key: \"loaded\",\n value: function loaded(name, err, data) {\n var s = name.split('|');\n var lng = s[0];\n var ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n\n if (data) {\n this.store.addResourceBundle(lng, ns, data);\n }\n\n this.state[name] = err ? -1 : 2;\n var loaded = {};\n this.queue.forEach(function (q) {\n pushPath(q.loaded, [lng], ns);\n remove(q.pending, name);\n if (err) q.errors.push(err);\n\n if (q.pending.length === 0 && !q.done) {\n Object.keys(q.loaded).forEach(function (l) {\n if (!loaded[l]) loaded[l] = [];\n\n if (q.loaded[l].length) {\n q.loaded[l].forEach(function (ns) {\n if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);\n });\n }\n });\n q.done = true;\n\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(function (q) {\n return !q.done;\n });\n }\n }, {\n key: \"read\",\n value: function read(lng, ns, fcName) {\n var _this3 = this;\n\n var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 350;\n var callback = arguments.length > 5 ? arguments[5] : undefined;\n if (!lng.length) return callback(null, {});\n return this.backend[fcName](lng, ns, function (err, data) {\n if (err && data && tried < 5) {\n setTimeout(function () {\n _this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n\n callback(err, data);\n });\n }\n }, {\n key: \"prepareLoading\",\n value: function prepareLoading(languages, namespaces) {\n var _this4 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var callback = arguments.length > 3 ? arguments[3] : undefined;\n\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n\n if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);\n if (typeof namespaces === 'string') namespaces = [namespaces];\n var toLoad = this.queueLoad(languages, namespaces, options, callback);\n\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n\n toLoad.toLoad.forEach(function (name) {\n _this4.loadOne(name);\n });\n }\n }, {\n key: \"load\",\n value: function load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n }, {\n key: \"reload\",\n value: function reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n }, {\n key: \"loadOne\",\n value: function loadOne(name) {\n var _this5 = this;\n\n var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var s = name.split('|');\n var lng = s[0];\n var ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, function (err, data) {\n if (err) _this5.logger.warn(\"\".concat(prefix, \"loading namespace \").concat(ns, \" for language \").concat(lng, \" failed\"), err);\n if (!err && data) _this5.logger.log(\"\".concat(prefix, \"loaded namespace \").concat(ns, \" for language \").concat(lng), data);\n\n _this5.loaded(name, err, data);\n });\n }\n }, {\n key: \"saveMissing\",\n value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n\n if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {\n this.logger.warn(\"did not save key \\\"\".concat(key, \"\\\" as the namespace \\\"\").concat(namespace, \"\\\" was not yet loaded\"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n\n if (key === undefined || key === null || key === '') return;\n\n if (this.backend && this.backend.create) {\n this.backend.create(languages, namespace, key, fallbackValue, null, _objectSpread({}, options, {\n isUpdate: isUpdate\n }));\n }\n\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n }]);\n\n return Connector;\n}(EventEmitter);\n\nfunction get() {\n return {\n debug: false,\n initImmediate: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n whitelist: false,\n nonExplicitWhitelist: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: true,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: function handle(args) {\n var ret = {};\n if (_typeof(args[1]) === 'object') ret = args[1];\n if (typeof args[1] === 'string') ret.defaultValue = args[1];\n if (typeof args[2] === 'string') ret.tDescription = args[2];\n\n if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {\n var options = args[3] || args[2];\n Object.keys(options).forEach(function (key) {\n ret[key] = options[key];\n });\n }\n\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: function format(value, _format, lng, options) {\n return value;\n },\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: false\n }\n };\n}\nfunction transformOptions(options) {\n if (typeof options.ns === 'string') options.ns = [options.ns];\n if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];\n if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];\n\n if (options.whitelist) {\n if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {\n options.whitelist = options.whitelist.concat(['cimode']);\n }\n\n options.supportedLngs = options.whitelist;\n }\n\n if (options.nonExplicitWhitelist) {\n options.nonExplicitSupportedLngs = options.nonExplicitWhitelist;\n }\n\n if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n\n return options;\n}\n\nfunction noop() {}\n\nvar I18n = function (_EventEmitter) {\n _inherits(I18n, _EventEmitter);\n\n function I18n() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 ? arguments[1] : undefined;\n\n _classCallCheck(this, I18n);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));\n\n if (isIE10) {\n EventEmitter.call(_assertThisInitialized(_this));\n }\n\n _this.options = transformOptions(options);\n _this.services = {};\n _this.logger = baseLogger;\n _this.modules = {\n external: []\n };\n\n if (callback && !_this.isInitialized && !options.isClone) {\n if (!_this.options.initImmediate) {\n _this.init(options, callback);\n\n return _possibleConstructorReturn(_this, _assertThisInitialized(_this));\n }\n\n setTimeout(function () {\n _this.init(options, callback);\n }, 0);\n }\n\n return _this;\n }\n\n _createClass(I18n, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 ? arguments[1] : undefined;\n\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n if (options.whitelist && !options.supportedLngs) {\n this.logger.deprecate('whitelist', 'option \"whitelist\" will be renamed to \"supportedLngs\" in the next major - please make sure to rename this option asap.');\n }\n\n if (options.nonExplicitWhitelist && !options.nonExplicitSupportedLngs) {\n this.logger.deprecate('whitelist', 'options \"nonExplicitWhitelist\" will be renamed to \"nonExplicitSupportedLngs\" in the next major - please make sure to rename this option asap.');\n }\n\n this.options = _objectSpread({}, get(), this.options, transformOptions(options));\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n\n function createClassOnDemand(ClassOrObject) {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n }\n\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n\n var lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n var s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n compatibilityJSON: this.options.compatibilityJSON,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', function (event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n _this2.emit.apply(_this2, [event].concat(args));\n });\n\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n s.languageDetector.init(s, this.options.detection, this.options);\n }\n\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this2.emit.apply(_this2, [event].concat(args));\n });\n this.modules.external.forEach(function (m) {\n if (m.init) m.init(_this2);\n });\n }\n\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n\n var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(function (fcName) {\n _this2[fcName] = function () {\n var _this2$store;\n\n return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);\n };\n });\n var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(function (fcName) {\n _this2[fcName] = function () {\n var _this2$store2;\n\n (_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);\n\n return _this2;\n };\n });\n var deferred = defer();\n\n var load = function load() {\n var finish = function finish(err, t) {\n if (_this2.isInitialized && !_this2.initializedStoreOnce) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');\n _this2.isInitialized = true;\n if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);\n\n _this2.emit('initialized', _this2.options);\n\n deferred.resolve(t);\n callback(err, t);\n };\n\n if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));\n\n _this2.changeLanguage(_this2.options.lng, finish);\n };\n\n if (this.options.resources || !this.options.initImmediate) {\n load();\n } else {\n setTimeout(load, 0);\n }\n\n return deferred;\n }\n }, {\n key: \"loadResources\",\n value: function loadResources(language) {\n var _this3 = this;\n\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n var usedCallback = callback;\n var usedLng = typeof language === 'string' ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();\n var toLoad = [];\n\n var append = function append(lng) {\n if (!lng) return;\n\n var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);\n\n lngs.forEach(function (l) {\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n\n if (!usedLng) {\n var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(function (l) {\n return append(l);\n });\n } else {\n append(usedLng);\n }\n\n if (this.options.preload) {\n this.options.preload.forEach(function (l) {\n return append(l);\n });\n }\n\n this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);\n } else {\n usedCallback(null);\n }\n }\n }, {\n key: \"reloadResources\",\n value: function reloadResources(lngs, ns, callback) {\n var deferred = defer();\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, function (err) {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n }, {\n key: \"use\",\n value: function use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n\n return this;\n }\n }, {\n key: \"changeLanguage\",\n value: function changeLanguage(lng, callback) {\n var _this4 = this;\n\n this.isLanguageChangingTo = lng;\n var deferred = defer();\n this.emit('languageChanging', lng);\n\n var done = function done(err, l) {\n if (l) {\n _this4.language = l;\n _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n\n _this4.translator.changeLanguage(l);\n\n _this4.isLanguageChangingTo = undefined;\n\n _this4.emit('languageChanged', l);\n\n _this4.logger.log('languageChanged', l);\n } else {\n _this4.isLanguageChangingTo = undefined;\n }\n\n deferred.resolve(function () {\n return _this4.t.apply(_this4, arguments);\n });\n if (callback) callback(err, function () {\n return _this4.t.apply(_this4, arguments);\n });\n };\n\n var setLng = function setLng(lngs) {\n if (!lng && !lngs && _this4.services.languageDetector) lngs = [];\n var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);\n\n if (l) {\n if (!_this4.language) {\n _this4.language = l;\n _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n }\n\n if (!_this4.translator.language) _this4.translator.changeLanguage(l);\n if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);\n }\n\n _this4.loadResources(l, function (err) {\n done(err, l);\n });\n };\n\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n this.services.languageDetector.detect(setLng);\n } else {\n setLng(lng);\n }\n\n return deferred;\n }\n }, {\n key: \"getFixedT\",\n value: function getFixedT(lng, ns, keyPrefix) {\n var _this5 = this;\n\n var fixedT = function fixedT(key, opts) {\n var options;\n\n if (_typeof(opts) !== 'object') {\n for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n rest[_key3 - 2] = arguments[_key3];\n }\n\n options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n options = _objectSpread({}, opts);\n }\n\n options.lng = options.lng || fixedT.lng;\n options.lngs = options.lngs || fixedT.lngs;\n options.ns = options.ns || fixedT.ns;\n var keySeparator = _this5.options.keySeparator || '.';\n var resultKey = keyPrefix ? \"\".concat(keyPrefix).concat(keySeparator).concat(key) : key;\n return _this5.t(resultKey, options);\n };\n\n if (typeof lng === 'string') {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n }, {\n key: \"t\",\n value: function t() {\n var _this$translator;\n\n return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);\n }\n }, {\n key: \"exists\",\n value: function exists() {\n var _this$translator2;\n\n return this.translator && (_this$translator2 = this.translator).exists.apply(_this$translator2, arguments);\n }\n }, {\n key: \"setDefaultNamespace\",\n value: function setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n }, {\n key: \"hasLoadedNamespace\",\n value: function hasLoadedNamespace(ns) {\n var _this6 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n\n var lng = this.languages[0];\n var fallbackLng = this.options ? this.options.fallbackLng : false;\n var lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n\n var loadNotPending = function loadNotPending(l, n) {\n var loadState = _this6.services.backendConnector.state[\"\".concat(l, \"|\").concat(n)];\n\n return loadState === -1 || loadState === 2;\n };\n\n if (options.precheck) {\n var preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n }, {\n key: \"loadNamespaces\",\n value: function loadNamespaces(ns, callback) {\n var _this7 = this;\n\n var deferred = defer();\n\n if (!this.options.ns) {\n callback && callback();\n return Promise.resolve();\n }\n\n if (typeof ns === 'string') ns = [ns];\n ns.forEach(function (n) {\n if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);\n });\n this.loadResources(function (err) {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n }, {\n key: \"loadLanguages\",\n value: function loadLanguages(lngs, callback) {\n var deferred = defer();\n if (typeof lngs === 'string') lngs = [lngs];\n var preloaded = this.options.preload || [];\n var newLngs = lngs.filter(function (lng) {\n return preloaded.indexOf(lng) < 0;\n });\n\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(function (err) {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n }, {\n key: \"dir\",\n value: function dir(lng) {\n if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;\n if (!lng) return 'rtl';\n var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];\n return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';\n }\n }, {\n key: \"createInstance\",\n value: function createInstance() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 ? arguments[1] : undefined;\n return new I18n(options, callback);\n }\n }, {\n key: \"cloneInstance\",\n value: function cloneInstance() {\n var _this8 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n\n var mergedOptions = _objectSpread({}, this.options, options, {\n isClone: true\n });\n\n var clone = new I18n(mergedOptions);\n var membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(function (m) {\n clone[m] = _this8[m];\n });\n clone.services = _objectSpread({}, this.services);\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n clone.translator = new Translator(clone.services, clone.options);\n clone.translator.on('*', function (event) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n clone.emit.apply(clone, [event].concat(args));\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = clone.options;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages\n };\n }\n }]);\n\n return I18n;\n}(EventEmitter);\n\nvar i18next = new I18n();\n\nexport default i18next;\n","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 _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\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\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default 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}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import defineProperty from \"./defineProperty.js\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","var invariant = require('invariant');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar splice = Array.prototype.splice;\n\nvar toString = Object.prototype.toString\nvar type = function(obj) {\n return toString.call(obj).slice(8, -1);\n}\n\nvar assign = Object.assign || /* istanbul ignore next */ function assign(target, source) {\n getAllKeys(source).forEach(function(key) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n });\n return target;\n};\n\nvar getAllKeys = typeof Object.getOwnPropertySymbols === 'function' ?\n function(obj) { return Object.keys(obj).concat(Object.getOwnPropertySymbols(obj)) } :\n /* istanbul ignore next */ function(obj) { return Object.keys(obj) };\n\n/* istanbul ignore next */\nfunction copy(object) {\n if (Array.isArray(object)) {\n return assign(object.constructor(object.length), object)\n } else if (type(object) === 'Map') {\n return new Map(object)\n } else if (type(object) === 'Set') {\n return new Set(object)\n } else if (object && typeof object === 'object') {\n var prototype = Object.getPrototypeOf(object);\n return assign(Object.create(prototype), object);\n } else {\n return object;\n }\n}\n\nfunction newContext() {\n var commands = assign({}, defaultCommands);\n update.extend = function(directive, fn) {\n commands[directive] = fn;\n };\n update.isEquals = function(a, b) { return a === b; };\n\n return update;\n\n function update(object, spec) {\n if (typeof spec === 'function') {\n spec = { $apply: spec };\n }\n\n if (!(Array.isArray(object) && Array.isArray(spec))) {\n invariant(\n !Array.isArray(spec),\n 'update(): You provided an invalid spec to update(). The spec may ' +\n 'not contain an array except as the value of $set, $push, $unshift, ' +\n '$splice or any custom command allowing an array value.'\n );\n }\n\n invariant(\n typeof spec === 'object' && spec !== null,\n 'update(): You provided an invalid spec to update(). The spec and ' +\n 'every included key path must be plain objects containing one of the ' +\n 'following commands: %s.',\n Object.keys(commands).join(', ')\n );\n\n var nextObject = object;\n var index, key;\n getAllKeys(spec).forEach(function(key) {\n if (hasOwnProperty.call(commands, key)) {\n var objectWasNextObject = object === nextObject;\n nextObject = commands[key](spec[key], nextObject, spec, object);\n if (objectWasNextObject && update.isEquals(nextObject, object)) {\n nextObject = object;\n }\n } else {\n var nextValueForKey =\n type(object) === 'Map'\n ? update(object.get(key), spec[key])\n : update(object[key], spec[key]);\n var nextObjectValue =\n type(nextObject) === 'Map'\n ? nextObject.get(key)\n : nextObject[key];\n if (!update.isEquals(nextValueForKey, nextObjectValue) || typeof nextValueForKey === 'undefined' && !hasOwnProperty.call(object, key)) {\n if (nextObject === object) {\n nextObject = copy(object);\n }\n if (type(nextObject) === 'Map') {\n nextObject.set(key, nextValueForKey);\n } else {\n nextObject[key] = nextValueForKey;\n }\n }\n }\n })\n return nextObject;\n }\n\n}\n\nvar defaultCommands = {\n $push: function(value, nextObject, spec) {\n invariantPushAndUnshift(nextObject, spec, '$push');\n return value.length ? nextObject.concat(value) : nextObject;\n },\n $unshift: function(value, nextObject, spec) {\n invariantPushAndUnshift(nextObject, spec, '$unshift');\n return value.length ? value.concat(nextObject) : nextObject;\n },\n $splice: function(value, nextObject, spec, originalObject) {\n invariantSplices(nextObject, spec);\n value.forEach(function(args) {\n invariantSplice(args);\n if (nextObject === originalObject && args.length) nextObject = copy(originalObject);\n splice.apply(nextObject, args);\n });\n return nextObject;\n },\n $set: function(value, nextObject, spec) {\n invariantSet(spec);\n return value;\n },\n $toggle: function(targets, nextObject) {\n invariantSpecArray(targets, '$toggle');\n var nextObjectCopy = targets.length ? copy(nextObject) : nextObject;\n\n targets.forEach(function(target) {\n nextObjectCopy[target] = !nextObject[target];\n });\n\n return nextObjectCopy;\n },\n $unset: function(value, nextObject, spec, originalObject) {\n invariantSpecArray(value, '$unset');\n value.forEach(function(key) {\n if (Object.hasOwnProperty.call(nextObject, key)) {\n if (nextObject === originalObject) nextObject = copy(originalObject);\n delete nextObject[key];\n }\n });\n return nextObject;\n },\n $add: function(value, nextObject, spec, originalObject) {\n invariantMapOrSet(nextObject, '$add');\n invariantSpecArray(value, '$add');\n if (type(nextObject) === 'Map') {\n value.forEach(function(pair) {\n var key = pair[0];\n var value = pair[1];\n if (nextObject === originalObject && nextObject.get(key) !== value) nextObject = copy(originalObject);\n nextObject.set(key, value);\n });\n } else {\n value.forEach(function(value) {\n if (nextObject === originalObject && !nextObject.has(value)) nextObject = copy(originalObject);\n nextObject.add(value);\n });\n }\n return nextObject;\n },\n $remove: function(value, nextObject, spec, originalObject) {\n invariantMapOrSet(nextObject, '$remove');\n invariantSpecArray(value, '$remove');\n value.forEach(function(key) {\n if (nextObject === originalObject && nextObject.has(key)) nextObject = copy(originalObject);\n nextObject.delete(key);\n });\n return nextObject;\n },\n $merge: function(value, nextObject, spec, originalObject) {\n invariantMerge(nextObject, value);\n getAllKeys(value).forEach(function(key) {\n if (value[key] !== nextObject[key]) {\n if (nextObject === originalObject) nextObject = copy(originalObject);\n nextObject[key] = value[key];\n }\n });\n return nextObject;\n },\n $apply: function(value, original) {\n invariantApply(value);\n return value(original);\n }\n};\n\nvar contextForExport = newContext();\n\nmodule.exports = contextForExport;\nmodule.exports.default = contextForExport;\nmodule.exports.newContext = newContext;\n\n// invariants\n\nfunction invariantPushAndUnshift(value, spec, command) {\n invariant(\n Array.isArray(value),\n 'update(): expected target of %s to be an array; got %s.',\n command,\n value\n );\n invariantSpecArray(spec[command], command)\n}\n\nfunction invariantSpecArray(spec, command) {\n invariant(\n Array.isArray(spec),\n 'update(): expected spec of %s to be an array; got %s. ' +\n 'Did you forget to wrap your parameter in an array?',\n command,\n spec\n );\n}\n\nfunction invariantSplices(value, spec) {\n invariant(\n Array.isArray(value),\n 'Expected $splice target to be an array; got %s',\n value\n );\n invariantSplice(spec['$splice']);\n}\n\nfunction invariantSplice(value) {\n invariant(\n Array.isArray(value),\n 'update(): expected spec of $splice to be an array of arrays; got %s. ' +\n 'Did you forget to wrap your parameters in an array?',\n value\n );\n}\n\nfunction invariantApply(fn) {\n invariant(\n typeof fn === 'function',\n 'update(): expected spec of $apply to be a function; got %s.',\n fn\n );\n}\n\nfunction invariantSet(spec) {\n invariant(\n Object.keys(spec).length === 1,\n 'Cannot have more than one key in an object with $set'\n );\n}\n\nfunction invariantMerge(target, specValue) {\n invariant(\n specValue && typeof specValue === 'object',\n 'update(): $merge expects a spec of type \\'object\\'; got %s',\n specValue\n );\n invariant(\n target && typeof target === 'object',\n 'update(): $merge expects a target of type \\'object\\'; got %s',\n target\n );\n}\n\nfunction invariantMapOrSet(target, command) {\n var typeOfTarget = type(target);\n invariant(\n typeOfTarget === 'Map' || typeOfTarget === 'Set',\n 'update(): %s expects a target of type Set or Map; got %s',\n command,\n typeOfTarget\n );\n}\n","/**\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(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.Immutable = factory());\n}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;\n\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n\n\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n\n\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n\n\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = { value: false };\n var DID_ALTER = { value: false };\n\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n\n function returnTrue() {\n return true;\n }\n\n function wholeSlice(begin, end, size) {\n return (begin === 0 || (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size));\n }\n\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ?\n defaultIndex :\n index < 0 ?\n Math.max(0, size + index) :\n size === undefined ?\n index :\n Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\n\n function Iterator(next) {\n this.next = next;\n }\n\n Iterator.prototype.toString = function() {\n return '[Iterator]';\n };\n\n\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n\n Iterator.prototype.inspect =\n Iterator.prototype.toSource = function () { return this.toString(); }\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n\n\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {\n value: value, done: false\n });\n return iteratorResult;\n }\n\n function iteratorDone() {\n return { value: undefined, done: true };\n }\n\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (\n (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]\n );\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() :\n isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n\n Seq.of = function(/*...values*/) {\n return Seq(arguments);\n };\n\n Seq.prototype.toSeq = function() {\n return this;\n };\n\n Seq.prototype.toString = function() {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n\n\n\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ?\n emptySequence().toKeyedSeq() :\n isIterable(value) ?\n (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :\n keyedSeqFromValue(value);\n }\n\n KeyedSeq.prototype.toKeyedSeq = function() {\n return this;\n };\n\n\n\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n\n IndexedSeq.of = function(/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function() {\n return this;\n };\n\n IndexedSeq.prototype.toString = function() {\n return this.__toString('Seq [', ']');\n };\n\n IndexedSeq.prototype.__iterate = function(fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n\n IndexedSeq.prototype.__iterator = function(type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n\n\n\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (\n value === null || value === undefined ? emptySequence() :\n !isIterable(value) ? indexedSeqFromValue(value) :\n isKeyed(value) ? value.entrySeq() : value\n ).toSetSeq();\n }\n\n SetSeq.of = function(/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function() {\n return this;\n };\n\n\n\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n\n\n\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n ArraySeq.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function(fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ArraySeq.prototype.__iterator = function(type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function() \n {return ii > maxIndex ?\n iteratorDone() :\n iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}\n );\n };\n\n\n\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n ObjectSeq.prototype.get = function(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function(key) {\n return this._object.hasOwnProperty(key);\n };\n\n ObjectSeq.prototype.__iterate = function(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n ObjectSeq.prototype.__iterator = function(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, key, object[key]);\n });\n };\n\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n\n IterableSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n IterableSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n\n\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n\n IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n\n IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function() {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n\n\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n\n var EMPTY_SEQ;\n\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n\n function keyedSeqFromValue(value) {\n var seq =\n Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :\n isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :\n hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :\n typeof value === 'object' ? new ObjectSeq(value) :\n undefined;\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of [k, v] entries, '+\n 'or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values: ' + value\n );\n }\n return seq;\n }\n\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) ||\n (typeof value === 'object' && new ObjectSeq(value));\n if (!seq) {\n throw new TypeError(\n 'Expected Array or iterable object of values, or keyed object: ' + value\n );\n }\n return seq;\n }\n\n function maybeIndexedSeqFromValue(value) {\n return (\n isArrayLike(value) ? new ArraySeq(value) :\n isIterator(value) ? new IteratorSeq(value) :\n hasIterator(value) ? new IterableSeq(value) :\n undefined\n );\n }\n\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function() {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ?\n iteratorDone() :\n iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n\n function fromJS(json, converter) {\n return converter ?\n fromJSWith(converter, json, '', {'': json}) :\n fromJSDefault(json);\n }\n\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)}));\n }\n return json;\n }\n\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' &&\n typeof valueB.equals === 'function' &&\n valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isIterable(b) ||\n a.size !== undefined && b.size !== undefined && a.size !== b.size ||\n a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function(v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function(v, k) {\n if (notAssociative ? !a.has(v) :\n flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n }\n\n createClass(Repeat, IndexedSeq);\n\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n Repeat.prototype.toString = function() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function(searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this :\n new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n\n Repeat.prototype.reverse = function() {\n return this;\n };\n\n Repeat.prototype.indexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function(fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n\n Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;\n var ii = 0;\n return new Iterator(function() \n {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}\n );\n };\n\n Repeat.prototype.equals = function(other) {\n return other instanceof Repeat ?\n is(this._value, other._value) :\n deepEqual(other);\n };\n\n\n var EMPTY_REPEAT;\n\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n\n createClass(Range, IndexedSeq);\n\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n Range.prototype.toString = function() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' +\n this._start + '...' + this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]';\n };\n\n Range.prototype.get = function(index, notSetValue) {\n return this.has(index) ?\n this._start + wrapIndex(this, index) * this._step :\n notSetValue;\n };\n\n Range.prototype.includes = function(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex);\n };\n\n Range.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n\n Range.prototype.indexOf = function(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function(searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function(fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n\n Range.prototype.__iterator = function(type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function() {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n\n Range.prototype.equals = function(other) {\n return other instanceof Range ?\n this._start === other._start &&\n this._end === other._end &&\n this._step === other._step :\n deepEqual(this, other);\n };\n\n\n var EMPTY_RANGE;\n\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n\n\n createClass(KeyedCollection, Collection);function KeyedCollection() {}\n\n createClass(IndexedCollection, Collection);function IndexedCollection() {}\n\n createClass(SetCollection, Collection);function SetCollection() {}\n\n\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n\n var imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?\n Math.imul :\n function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);\n }\n\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n if (o !== o || o === Infinity) {\n return 0;\n }\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function() {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = (function() {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }());\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n\n var objHashUID = 0;\n\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n\n function assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n }\n\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() :\n isMap(value) && !isOrdered(value) ? value :\n emptyMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n Map.of = function() {var keyValues = SLICE$0.call(arguments, 0);\n return emptyMap().withMutations(function(map ) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function(k, notSetValue) {\n return this._root ?\n this._root.get(0, undefined, k, notSetValue) :\n notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function(k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.setIn = function(keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function() {return v});\n };\n\n Map.prototype.remove = function(k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteIn = function(keyPath) {\n return this.updateIn(keyPath, function() {return NOT_SET});\n };\n\n Map.prototype.update = function(k, notSetValue, updater) {\n return arguments.length === 1 ?\n k(this) :\n this.updateIn([k], notSetValue, updater);\n };\n\n Map.prototype.updateIn = function(keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(\n this,\n forceIterator(keyPath),\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n\n Map.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function(/*...iters*/) {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n\n Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n\n Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.merge === 'function' ?\n m.merge.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n\n Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n\n Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(\n keyPath,\n emptyMap(),\n function(m ) {return typeof m.mergeDeep === 'function' ?\n m.mergeDeep.apply(m, iters) :\n iters[iters.length - 1]}\n );\n };\n\n Map.prototype.sort = function(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n\n Map.prototype.asMutable = function() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n\n Map.prototype.asImmutable = function() {\n return this.__ensureOwner();\n };\n\n Map.prototype.wasAltered = function() {\n return this.__altered;\n };\n\n Map.prototype.__iterator = function(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function(entry ) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n\n Map.isMap = isMap;\n\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n\n // #pragma Trie Nodes\n\n\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n\n ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n };\n\n\n\n\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n\n BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue :\n this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n\n BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ?\n setIn(nodes, idx, newNode, isEditable) :\n spliceOut(nodes, idx, isEditable) :\n spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n\n\n\n\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n\n HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n\n HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n\n\n\n\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n\n HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n\n HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n\n\n\n\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n\n ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n\n ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate =\n HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n }\n\n BitmapIndexedNode.prototype.iterate =\n HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n }\n\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n }\n\n createClass(MapIterator, Iterator);\n\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n MapIterator.prototype.next = function() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes = idx1 === idx2 ?\n [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :\n ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n }\n\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ?\n existing.mergeDeep(value) :\n is(existing, value) ? existing : value;\n }\n\n function deepMergerWith(merger) {\n return function(existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function(collection ) {\n var mergeIntoMap = merger ?\n function(value, key) {\n collection.update(key, NOT_SET, function(existing )\n {return existing === NOT_SET ? value : merger(existing, value, key)}\n );\n } :\n function(value, key) {\n collection.set(key, value);\n }\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(\n isNotSet || (existing && existing.set),\n 'invalid keyPath'\n );\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(\n nextExisting,\n keyPathIter,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting ? existing :\n nextUpdated === NOT_SET ? existing.remove(key) :\n (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n\n function popCount(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function(list ) {\n list.setSize(size);\n iter.forEach(function(v, i) {return list.set(i, v)});\n });\n }\n\n List.of = function(/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function(index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function(index) {\n return !this.has(index) ? this :\n index === 0 ? this.shift() :\n index === this.size - 1 ? this.pop() :\n this.splice(index, 1);\n };\n\n List.prototype.insert = function(index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function(/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function(list ) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function() {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function(/*...values*/) {\n var values = arguments;\n return this.withMutations(function(list ) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function(/*...iters*/) {\n return mergeIntoListWith(this, undefined, arguments);\n };\n\n List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n\n List.prototype.mergeDeep = function(/*...iters*/) {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n\n List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n\n List.prototype.setSize = function(size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function(type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function() {\n var value = values();\n return value === DONE ?\n iteratorDone() :\n iteratorValue(type, index++, value);\n });\n };\n\n List.prototype.__iterate = function(fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n\n\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n\n List.isList = isList;\n\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn =\n ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function(ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n\n VNode.prototype.removeAfter = function(ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n\n\n\n var DONE = {};\n\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ?\n iterateLeaf(node, offset) :\n iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function() {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx], level - SHIFT, offset + (idx << level)\n );\n } while (true);\n };\n }\n }\n\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function(list ) {\n index < 0 ?\n setListBounds(list, index).set(0, value) :\n setListBounds(list, 0, index + 1).set(index, value)\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n SetRef(didAlter);\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ?\n listNodeFor(list, newCapacity - 1) :\n newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function(v ) {return fromJS(v)});\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n\n function getTailOffset(size) {\n return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);\n }\n\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() :\n isOrderedMap(value) ? value :\n emptyOrderedMap().withMutations(function(map ) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v, k) {return map.set(k, v)});\n });\n }\n\n OrderedMap.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function(k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.wasAltered = function() {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n\n OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._list.__iterate(\n function(entry ) {return entry && fn(entry[1], entry[0], this$0)},\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n\n OrderedMap.isOrderedMap = isOrderedMap;\n\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\n\n\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) { // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx});\n newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n ToKeyedSequence.prototype.get = function(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function(key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function() {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function() {var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()};\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)};\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var ii;\n return this._iter.__iterate(\n this._useKeys ?\n function(v, k) {return fn(v, k, this$0)} :\n ((ii = reverse ? resolveSize(this) : 0),\n function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),\n reverse\n );\n };\n\n ToKeyedSequence.prototype.__iterator = function(type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToIndexedSequence.prototype.includes = function(value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);\n };\n\n ToIndexedSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, iterations++, step.value, step)\n });\n };\n\n\n\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n ToSetSequence.prototype.has = function(key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n return step.done ? step :\n iteratorValue(type, step.value, step.value, step);\n });\n };\n\n\n\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n FromEntriesSequence.prototype.entrySeq = function() {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._iter.__iterate(function(entry ) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(\n indexedIterable ? entry.get(1) : entry[1],\n indexedIterable ? entry.get(0) : entry[0],\n this$0\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(\n type,\n indexedIterable ? entry.get(0) : entry[0],\n indexedIterable ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n\n ToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\n\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function() {return iterable};\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function() {return iterable.reverse()};\n return reversedSequence;\n };\n flipSequence.has = function(key ) {return iterable.includes(key)};\n flipSequence.includes = function(key ) {return iterable.has(key)};\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse);\n }\n flipSequence.__iteratorUncached = function(type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n }\n return flipSequence;\n }\n\n\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function(key ) {return iterable.has(key)};\n mappedSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ?\n notSetValue :\n mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(\n function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false},\n reverse\n );\n }\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function() {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, iterable),\n step\n );\n });\n }\n return mappedSequence;\n }\n\n\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function() {return iterable};\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function() {return iterable.flip()};\n return flipSequence;\n };\n }\n reversedSequence.get = function(key, notSetValue) \n {return iterable.get(useKeys ? key : -1 - key, notSetValue)};\n reversedSequence.has = function(key )\n {return iterable.has(useKeys ? key : -1 - key)};\n reversedSequence.includes = function(value ) {return iterable.includes(value)};\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;\n return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse);\n };\n reversedSequence.__iterator =\n function(type, reverse) {return iterable.__iterator(type, !reverse)};\n return reversedSequence;\n }\n\n\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function(key ) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function(key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ?\n v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function() {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n }\n return filterSequence;\n }\n\n\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n 0,\n function(a ) {return a + 1}\n );\n });\n return groups.asImmutable();\n }\n\n\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function(v, k) {\n groups.update(\n grouper.call(context, v, k, iterable),\n function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)}\n );\n });\n var coerce = iterableClass(iterable);\n return groups.map(function(arr ) {return reify(iterable, coerce(arr))});\n }\n\n\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n if (end === Infinity) {\n end = originalSize;\n } else {\n end = end | 0;\n }\n }\n\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ?\n iterable.get(index + resolvedBegin, notSetValue) :\n notSetValue;\n }\n }\n\n sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&\n iterations !== sliceSize;\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function(type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function() {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n }\n\n return sliceSeq;\n }\n\n\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function(v, k, c) \n {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function() {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n\n\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function(v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function() {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step :\n iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n\n\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function(v ) {\n if (!isIterable(v)) {\n v = isKeyedIterable ?\n keyedSeqFromValue(v) :\n indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function(v ) {return v.size !== 0});\n\n if (iters.length === 0) {\n return iterable;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable ||\n isKeyedIterable && isKeyed(singleton) ||\n isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(\n function(sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n },\n 0\n );\n return concatSeq;\n }\n\n\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function(fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {var this$0 = this;\n iter.__iterate(function(v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n }\n flatSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function() {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n }\n return flatSequence;\n }\n\n\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(\n function(v, k) {return coerce(mapper.call(context, v, k, iterable))}\n ).flatten(true);\n }\n\n\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 -1;\n interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function(v, k) \n {return (!iterations || fn(separator, iterations++, this$0) !== false) &&\n fn(v, iterations++, this$0) !== false},\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function(type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function() {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ?\n iteratorValue(type, iterations++, separator) :\n iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n\n\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(\n function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}\n ).toArray();\n entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach(\n isKeyedIterable ?\n function(v, i) { entries[i].length = 2; } :\n function(v, i) { entries[i] = v[1]; }\n );\n return isKeyedIterable ? KeyedSeq(entries) :\n isIndexed(iterable) ? IndexedSeq(entries) :\n SetSeq(entries);\n }\n\n\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq()\n .map(function(v, k) {return [v, mapper(v, k, iterable)]})\n .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a});\n return entry && entry[0];\n } else {\n return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a});\n }\n }\n\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;\n }\n\n\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function(fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function(type, reverse) {\n var iterators = iters.map(function(i )\n {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function() {\n var steps;\n if (!isDone) {\n steps = iterators.map(function(i ) {return i.next()});\n isDone = steps.some(function(s ) {return s.done});\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(null, steps.map(function(s ) {return s.value}))\n );\n });\n };\n return zipSequence\n }\n\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable :\n isIndexed(iterable) ? IndexedIterable :\n SetIterable;\n }\n\n function makeSequence(iterable) {\n return Object.create(\n (\n isKeyed(iterable) ? KeyedSeq :\n isIndexed(iterable) ? IndexedSeq :\n SetSeq\n ).prototype\n );\n }\n\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n\n createClass(Record, KeyedCollection);\n\n function Record(defaultValues, name) {\n var hasInitialized;\n\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n\n return RecordType;\n }\n\n Record.prototype.toString = function() {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function(k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n\n Record.prototype.get = function(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function() {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n\n Record.prototype.set = function(k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n if (this._map && !this._map.has(k)) {\n var defaultVal = this._defaultValues[k];\n if (v === defaultVal) {\n return this;\n }\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.remove = function(k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n\n Record.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Record.prototype.__iterator = function(type, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse);\n };\n\n Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse);\n };\n\n Record.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n\n\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn =\n RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n\n\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function() {\n return this.get(name);\n },\n set: function(value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() :\n isSet(value) && !isOrdered(value) ? value :\n emptySet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n Set.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n Set.prototype.toString = function() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function(value) {\n return updateSet(this, this._map.set(value, true));\n };\n\n Set.prototype.remove = function(value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function(x ) {return x.size !== 0});\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function(set ) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});\n }\n });\n };\n\n Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (!iters.every(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function(iter ) {return SetIterable(iter)});\n var originalSet = this;\n return this.withMutations(function(set ) {\n originalSet.forEach(function(value ) {\n if (iters.some(function(iter ) {return iter.includes(value)})) {\n set.remove(value);\n }\n });\n });\n };\n\n Set.prototype.merge = function() {\n return this.union.apply(this, arguments);\n };\n\n Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n\n Set.prototype.sort = function(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function() {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;\n return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse);\n };\n\n Set.prototype.__iterator = function(type, reverse) {\n return this._map.map(function(_, k) {return k}).__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n\n Set.isSet = isSet;\n\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set :\n newMap.size === 0 ? set.__empty() :\n set.__make(newMap);\n }\n\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() :\n isOrderedSet(value) ? value :\n emptyOrderedSet().withMutations(function(set ) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function(v ) {return set.add(v)});\n });\n }\n\n OrderedSet.of = function(/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function(value) {\n return this(KeyedIterable(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function() {\n return this.__toString('OrderedSet {', '}');\n };\n\n\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n\n OrderedSet.isOrderedSet = isOrderedSet;\n\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() :\n isStack(value) ? value :\n emptyStack().unshiftAll(value);\n }\n\n Stack.of = function(/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function(/*...values*/) {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function(iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function(value ) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function() {\n return this.slice(1);\n };\n\n Stack.prototype.unshift = function(/*...values*/) {\n return this.push.apply(this, arguments);\n };\n\n Stack.prototype.unshiftAll = function(iter) {\n return this.pushAll(iter);\n };\n\n Stack.prototype.shift = function() {\n return this.pop.apply(this, arguments);\n };\n\n Stack.prototype.clear = function() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function(fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function(type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function() {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n\n Stack.isStack = isStack;\n\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n\n\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n\n Iterable.Iterator = Iterator;\n\n mixin(Iterable, {\n\n // ### Conversion to other types\n\n toArray: function() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function(v, i) { array[i] = v; });\n return array;\n },\n\n toIndexedSeq: function() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}\n ).__toJS();\n },\n\n toJSON: function() {\n return this.toSeq().map(\n function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}\n ).__toJS();\n },\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: function() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function(v, k) { object[k] = v; });\n return object;\n },\n\n toOrderedMap: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function() {\n return new ToSetSequence(this);\n },\n\n toSeq: function() {\n return isIndexed(this) ? this.toIndexedSeq() :\n isKeyed(this) ? this.toKeyedSeq() :\n this.toSetSeq();\n },\n\n toStack: function() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n\n // ### Common JavaScript methods and properties\n\n toString: function() {\n return '[Iterable]';\n },\n\n __toString: function(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function() {var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n\n includes: function(searchValue) {\n return this.some(function(value ) {return is(value, searchValue)});\n },\n\n entries: function() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function(v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n find: function(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function(v ) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function(reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function(v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n\n reduceRight: function(reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function(predicate, context) {\n return !this.every(not(predicate), context);\n },\n\n sort: function(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n\n // ### More sequential methods\n\n butLast: function() {\n return this.slice(0, -1);\n },\n\n isEmpty: function() {\n return this.size !== undefined ? this.size === 0 : !this.some(function() {return true});\n },\n\n count: function(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function() {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function() {return iterable.toSeq()};\n return entriesSequence;\n },\n\n filterNot: function(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function(v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n findLastEntry: function(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n\n first: function() {\n return this.find(returnTrue);\n },\n\n flatMap: function(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function() {\n return new FromEntriesSequence(this);\n },\n\n get: function(searchKey, notSetValue) {\n return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue);\n },\n\n getIn: function(searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n\n groupBy: function(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: function(searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n\n isSubset: function(iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function(value ) {return iter.includes(value)});\n },\n\n isSuperset: function(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function(searchValue) {\n return this.findKey(function(value ) {return is(value, searchValue)});\n },\n\n keySeq: function() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function() {\n return this.toSeq().reverse().first();\n },\n\n lastKeyOf: function(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n\n max: function(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n\n minBy: function(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n\n rest: function() {\n return this.slice(1);\n },\n\n skip: function(amount) {\n return this.slice(Math.max(0, amount));\n },\n\n skipLast: function(amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function(amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n\n takeWhile: function(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n valueSeq: function() {\n return this.toIndexedSeq();\n },\n\n\n // ### Hashable Object\n\n hashCode: function() {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect =\n IterablePrototype.toSource = function() { return this.toString(); };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n\n mixin(KeyedIterable, {\n\n // ### More sequential methods\n\n flip: function() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function(mapper, context) {var this$0 = this;\n var iterations = 0;\n return reify(this,\n this.toSeq().map(\n function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)}\n ).fromEntrySeq()\n );\n },\n\n mapKeys: function(mapper, context) {var this$0 = this;\n return reify(this,\n this.toSeq().flip().map(\n function(k, v) {return mapper.call(context, k, v, this$0)}\n ).flip()\n );\n }\n\n });\n\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)};\n\n\n\n mixin(IndexedIterable, {\n\n // ### Conversion to other types\n\n toKeyedSeq: function() {\n return new ToKeyedSequence(this, false);\n },\n\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1 ?\n spliced :\n spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n\n // ### More collection methods\n\n findLastIndex: function(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function() {\n return this.get(0);\n },\n\n flatten: function(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function(index, notSetValue) {\n index = wrapIndex(this, index);\n return (index < 0 || (this.size === Infinity ||\n (this.size !== undefined && index > this.size))) ?\n notSetValue :\n this.find(function(_, key) {return key === index}, undefined, notSetValue);\n },\n\n has: function(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ?\n this.size === Infinity || index < this.size :\n this.indexOf(index) !== -1\n );\n },\n\n interpose: function(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function(/*...iterables*/) {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function() {\n return Range(0, this.size);\n },\n\n last: function() {\n return this.get(-1);\n },\n\n skipWhile: function(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function(/*, ...iterables */) {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n\n zipWith: function(zipper/*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n\n });\n\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n\n\n\n mixin(SetIterable, {\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function(value) {\n return this.has(value);\n },\n\n\n // ### More sequential methods\n\n keySeq: function() {\n return this.valueSeq();\n }\n\n });\n\n SetIterable.prototype.has = IterablePrototype.includes;\n SetIterable.prototype.contains = SetIterable.prototype.includes;\n\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n\n function entryMapper(v, k) {\n return [k, v];\n }\n\n function not(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n }\n }\n\n function neg(predicate) {\n return function() {\n return -predicate.apply(this, arguments);\n }\n }\n\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n }\n\n function defaultZipper() {\n return arrCopy(arguments);\n }\n\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(\n keyed ?\n ordered ?\n function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :\n function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } :\n ordered ?\n function(v ) { h = 31 * h + hash(v) | 0; } :\n function(v ) { h = h + hash(v) | 0; }\n );\n return murmurHashOfSize(size, h);\n }\n\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n\n var Immutable = {\n\n Iterable: Iterable,\n\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS\n\n };\n\n return Immutable;\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","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(value);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\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","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isBatchMeta(meta) {\n return Boolean(meta && (meta.op ||\n meta['batch-key']));\n}\nexports.isBatchMeta = isBatchMeta;\nfunction isBatchAction(val) {\n return 'action' in val;\n}\nexports.isBatchAction = isBatchAction;\nfunction isSuccess(document) {\n return document.data !== undefined;\n}\nexports.isSuccess = isSuccess;\nfunction hasLinks(document) {\n return document.links !== undefined;\n}\nexports.hasLinks = hasLinks;\nfunction hasIncluded(document) {\n return document.included !== undefined;\n}\nexports.hasIncluded = hasIncluded;\nfunction hasRelated(links) {\n return links.related !== undefined;\n}\nexports.hasRelated = hasRelated;\nfunction hasRelationships(data) {\n return data.relationships !== undefined;\n}\nexports.hasRelationships = hasRelationships;\n//# sourceMappingURL=index.js.map","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \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 reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n 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 * 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 `_.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 */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\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 `_.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 * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\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 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 */\nfunction 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 */\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 * 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 */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\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 * 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/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\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/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\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/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\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 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 */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) ||\n objectToString.call(value) != objectTag || isHostObject(value)) {\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' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\nmodule.exports = isPlainObject;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\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 == 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// 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\nmodule.exports = Hash;\n","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\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 */\nfunction 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// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nmodule.exports = LazyWrapper;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\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 == 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// 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\nmodule.exports = ListCache;\n","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\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 */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nmodule.exports = LodashWrapper;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\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 == 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// 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\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\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 */\nfunction 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// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\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 var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\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\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\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 */\nfunction 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\nmodule.exports = apply;\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 == 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\nmodule.exports = arrayEach;\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 */\nfunction 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\nmodule.exports = arrayFilter;\n","var baseIndexOf = require('./_baseIndexOf');\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 */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\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 */\nfunction 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\nmodule.exports = arrayIncludesWith;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 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\nmodule.exports = arrayLikeKeys;\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 == 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\nmodule.exports = arrayMap;\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\nmodule.exports = arrayPush;\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 */\nfunction 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\nmodule.exports = arraySome;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 */\nfunction 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\nmodule.exports = assignMergeValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var eq = require('./eq');\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\nmodule.exports = assocIndexOf;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\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\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\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 */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\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 */\nfunction 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\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 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/** 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/**\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 */\nfunction 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\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\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 */\nvar 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\nmodule.exports = baseCreate;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\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 */\nfunction 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\nmodule.exports = baseDifference;\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 */\nfunction 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\nmodule.exports = baseFindIndex;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\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 */\nfunction 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\nmodule.exports = baseFlatten;\n","var createBaseFor = require('./_createBaseFor');\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 */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\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 */\nfunction 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\nmodule.exports = baseGet;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\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\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\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 */\nfunction 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\nmodule.exports = baseGetTag;\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 */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\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 */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\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 */\nfunction 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\nmodule.exports = baseIntersection;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\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 */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\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 */\nfunction 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\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 */\nfunction 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\nmodule.exports = baseIsEqualDeep;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\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 */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\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 */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\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 detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\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/** 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/**\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) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\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 */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\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 mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\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/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\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 */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 */\nfunction 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\nmodule.exports = baseKeysIn;\n","/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nmodule.exports = baseLodash;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\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 */\nfunction 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\nmodule.exports = baseMerge;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\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 */\nfunction 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\nmodule.exports = baseMergeDeep;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\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 */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\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 */\nfunction 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\nmodule.exports = basePickBy;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\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 */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\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 */\nfunction 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\nmodule.exports = baseSet;\n","var identity = require('./identity'),\n metaMap = require('./_metaMap');\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 */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nmodule.exports = baseSetData;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\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 */\nvar 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\nmodule.exports = baseSetToString;\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 */\nfunction 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\nmodule.exports = baseSlice;\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\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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 * 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 (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\nmodule.exports = baseToString;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\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 */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\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 */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var castPath = require('./_castPath'),\n last = require('./last'),\n parent = require('./_parent'),\n toKey = require('./_toKey');\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 */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nmodule.exports = baseUnset;\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 */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var isArrayLikeObject = require('./isArrayLikeObject');\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 */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\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 */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var Uint8Array = require('./_Uint8Array');\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\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\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 length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\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\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\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\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\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 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\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\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\nmodule.exports = cloneTypedArray;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\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 */\nfunction 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\nmodule.exports = composeArgs;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\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 */\nfunction 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\nmodule.exports = composeArgsRight;\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\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\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 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\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\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 */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\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 */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\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 */\nfunction 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\nmodule.exports = countHolders;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\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 */\nfunction 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\nmodule.exports = createAssigner;\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 */\nfunction 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\nmodule.exports = createBaseFor;\n","var createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\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 */\nfunction 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\nmodule.exports = createBind;\n","var baseCreate = require('./_baseCreate'),\n isObject = require('./isObject');\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 */\nfunction 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\nmodule.exports = createCtor;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n createHybrid = require('./_createHybrid'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\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 */\nfunction 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\nmodule.exports = createCurry;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n countHolders = require('./_countHolders'),\n createCtor = require('./_createCtor'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n reorder = require('./_reorder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\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 */\nfunction 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\nmodule.exports = createHybrid;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\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 */\nfunction 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\nmodule.exports = createPartial;\n","var isLaziable = require('./_isLaziable'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\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 */\nfunction 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\nmodule.exports = createRecurry;\n","var baseSetData = require('./_baseSetData'),\n createBind = require('./_createBind'),\n createCurry = require('./_createCurry'),\n createHybrid = require('./_createHybrid'),\n createPartial = require('./_createPartial'),\n getData = require('./_getData'),\n mergeData = require('./_mergeData'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString'),\n toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\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 */\nfunction 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\nmodule.exports = createWrap;\n","var isPlainObject = require('./isPlainObject');\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 */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\n\nmodule.exports = customOmitClone;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\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 */\nfunction 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\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\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 * 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 */\nfunction 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\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 */\nfunction 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\nmodule.exports = equalObjects;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\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 */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\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\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\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 */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var metaMap = require('./_metaMap'),\n noop = require('./noop');\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 */\nvar getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n};\n\nmodule.exports = getData;\n","var realNames = require('./_realNames');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 */\nfunction 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\nmodule.exports = getFuncName;\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 */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nmodule.exports = getHolder;\n","var isKeyable = require('./_isKeyable');\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\nmodule.exports = getMapData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\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\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\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 */\nfunction 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\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\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 */\nvar 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\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\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 */\nvar 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\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\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/**\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 and promises in Node.js < 6.\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 = 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\nmodule.exports = getTag;\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\nmodule.exports = getValue;\n","/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\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 */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nmodule.exports = getWrapDetails;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\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 */\nfunction 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\nmodule.exports = hasPath;\n","var nativeCreate = require('./_nativeCreate');\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 this.size = 0;\n}\n\nmodule.exports = hashClear;\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 var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 = 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\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\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 * 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 */\nfunction 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\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\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\nmodule.exports = initCloneObject;\n","/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\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 */\nfunction 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\nmodule.exports = insertWrapDetails;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\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 */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\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 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\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\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 */\nfunction 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\nmodule.exports = isIterateeCall;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\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 */\nfunction 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\nmodule.exports = isKey;\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\nmodule.exports = isKeyable;\n","var LazyWrapper = require('./_LazyWrapper'),\n getData = require('./_getData'),\n getFuncName = require('./_getFuncName'),\n lodash = require('./wrapperLodash');\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 */\nfunction 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\nmodule.exports = isLaziable;\n","var coreJsData = require('./_coreJsData');\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/**\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\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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\nmodule.exports = isPrototype;\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 this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\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 --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\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\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\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 ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\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.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\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 var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\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\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\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 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\nmodule.exports = mapCacheSet;\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\nmodule.exports = mapToArray;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\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 */\nfunction 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\nmodule.exports = memoizeCapped;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n replaceHolders = require('./_replaceHolders');\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\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 */\nfunction 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\nmodule.exports = mergeData;\n","var WeakMap = require('./_WeakMap');\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\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 */\nfunction 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\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\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/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar 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\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\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 nativeObjectToString = objectProto.toString;\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 */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\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\nmodule.exports = overArg;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\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 */\nfunction 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\nmodule.exports = overRest;\n","var baseGet = require('./_baseGet'),\n baseSlice = require('./_baseSlice');\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 */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nmodule.exports = parent;\n","/** Used to lookup unminified function names. */\nvar realNames = {};\n\nmodule.exports = realNames;\n","var copyArray = require('./_copyArray'),\n isIndex = require('./_isIndex');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\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 */\nfunction 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\nmodule.exports = reorder;\n","/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\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 */\nfunction 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\nmodule.exports = replaceHolders;\n","var freeGlobal = require('./_freeGlobal');\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\nmodule.exports = root;\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 */\nfunction 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\nmodule.exports = safeGet;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\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 */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var baseSetData = require('./_baseSetData'),\n shortOut = require('./_shortOut');\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 */\nvar setData = shortOut(baseSetData);\n\nmodule.exports = setData;\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\nmodule.exports = setToArray;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\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 */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var getWrapDetails = require('./_getWrapDetails'),\n insertWrapDetails = require('./_insertWrapDetails'),\n setToString = require('./_setToString'),\n updateWrapDetails = require('./_updateWrapDetails');\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 */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nmodule.exports = setWrapToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\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 */\nfunction 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\nmodule.exports = shortOut;\n","var ListCache = require('./_ListCache');\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 this.size = 0;\n}\n\nmodule.exports = stackClear;\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 var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\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\nmodule.exports = stackGet;\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\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\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 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\nmodule.exports = stackSet;\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 */\nfunction 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\nmodule.exports = strictIndexOf;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\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 = 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\nmodule.exports = stringToPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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\nmodule.exports = toKey;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\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 */\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\nmodule.exports = toSource;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\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 */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var arrayEach = require('./_arrayEach'),\n arrayIncludes = require('./_arrayIncludes');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\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 to associate wrap methods with their bit flags. */\nvar 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/**\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 */\nfunction 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\nmodule.exports = updateWrapDetails;\n","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n copyArray = require('./_copyArray');\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 */\nfunction 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\nmodule.exports = wrapperClone;\n","var assignValue = require('./_assignValue'),\n copyObject = require('./_copyObject'),\n createAssigner = require('./_createAssigner'),\n isArrayLike = require('./isArrayLike'),\n isPrototype = require('./_isPrototype'),\n keys = require('./keys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 */\nvar 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\nmodule.exports = assign;\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 */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\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\nmodule.exports = eq;\n","var baseFlatten = require('./_baseFlatten');\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 */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var baseGet = require('./_baseGet');\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 */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\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 */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\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 */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\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 */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nmodule.exports = intersection;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\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 */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\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\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\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\nmodule.exports = isArrayLike;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\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\nmodule.exports = isArrayLikeObject;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\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\nmodule.exports = isBuffer;\n","var baseIsEqual = require('./_baseIsEqual');\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 */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\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 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\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\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\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\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 */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\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 */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nmodule.exports = isNumber;\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 != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\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 != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\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/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\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 */\nfunction 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\nmodule.exports = isPlainObject;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\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 */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\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 */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\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) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\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 */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\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\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\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 */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\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 */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 */\nfunction 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`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\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 */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\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 */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var arrayMap = require('./_arrayMap'),\n baseClone = require('./_baseClone'),\n baseUnset = require('./_baseUnset'),\n castPath = require('./_castPath'),\n copyObject = require('./_copyObject'),\n customOmitClone = require('./_customOmitClone'),\n flatRest = require('./_flatRest'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 */\nvar 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\nmodule.exports = omit;\n","var baseRest = require('./_baseRest'),\n createWrap = require('./_createWrap'),\n getHolder = require('./_getHolder'),\n replaceHolders = require('./_replaceHolders');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_PARTIAL_RIGHT_FLAG = 64;\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 */\nvar 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// Assign default placeholders.\npartialRight.placeholder = {};\n\nmodule.exports = partialRight;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\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 */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","var baseSet = require('./_baseSet');\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 */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\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\nmodule.exports = stubArray;\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 = stubFalse;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\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 */\nfunction 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\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\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 */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\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 */\nfunction 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\nmodule.exports = toNumber;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\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 */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var baseToString = require('./_baseToString');\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 */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\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 */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n baseLodash = require('./_baseLodash'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike'),\n wrapperClone = require('./_wrapperClone');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\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 */\nfunction 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// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nmodule.exports = lodash;\n","var TRAILING_WHITESPACE = /[ \\u0020\\t\\n]*$/; // This escapes some markdown but there's a few cases that are TODO -\n// - List items\n// - Back tics (see https://github.com/Rosey/markdown-draft-js/issues/52#issuecomment-388458017)\n// - Complex markdown, like links or images. Not sure it's even worth it, because if you're typing\n// that into draft chances are you know its markdown and maybe expect it convert? :/\n\nvar MARKDOWN_STYLE_CHARACTERS = ['*', '_', '~', '`'];\nvar MARKDOWN_STYLE_CHARACTER_REGXP = /(\\*|_|~|\\\\|`)/g; // I hate this a bit, being outside of the function’s scope\n// but can’t think of a better way to keep track of how many ordered list\n// items were are on, as draft doesn’t explicitly tell us in the raw object 😢.\n// This is a hash that will be assigned values based on depth, so like\n// orderedListNumber[0] = 1 would mean that ordered list at depth 0 is on number 1.\n// orderedListNumber[0] = 2 would mean that ordered list at depth 0 is on number 2.\n// This is so we have the right number of numbers when doing a list, eg\n// 1. Item One\n// 2. Item two\n// 3. Item three\n// And so on.\n\nvar orderedListNumber = {},\n previousOrderedListDepth = 0; // A map of draftjs block types -> markdown open and close characters\n// Both the open and close methods must exist, even if they simply return an empty string.\n// They should always return a string.\n\nvar StyleItems = {\n // BLOCK LEVEL\n 'unordered-list-item': {\n open: function open() {\n return '- ';\n },\n close: function close() {\n return '';\n }\n },\n 'ordered-list-item': {\n open: function open(block) {\n var number = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return \"\".concat(number, \". \");\n },\n close: function close() {\n return '';\n }\n },\n 'blockquote': {\n open: function open() {\n return '> ';\n },\n close: function close() {\n return '';\n }\n },\n 'header-one': {\n open: function open() {\n return '# ';\n },\n close: function close() {\n return '';\n }\n },\n 'header-two': {\n open: function open() {\n return '## ';\n },\n close: function close() {\n return '';\n }\n },\n 'header-three': {\n open: function open() {\n return '### ';\n },\n close: function close() {\n return '';\n }\n },\n 'header-four': {\n open: function open() {\n return '#### ';\n },\n close: function close() {\n return '';\n }\n },\n 'header-five': {\n open: function open() {\n return '##### ';\n },\n close: function close() {\n return '';\n }\n },\n 'header-six': {\n open: function open() {\n return '###### ';\n },\n close: function close() {\n return '';\n }\n },\n 'code-block': {\n open: function open(block) {\n return '```' + (block.data.language || '') + '\\n';\n },\n close: function close() {\n return '\\n```';\n }\n },\n // INLINE LEVEL\n 'BOLD': {\n open: function open() {\n return '**';\n },\n close: function close() {\n return '**';\n }\n },\n 'ITALIC': {\n open: function open() {\n return '_';\n },\n close: function close() {\n return '_';\n }\n },\n 'STRIKETHROUGH': {\n open: function open() {\n return '~~';\n },\n close: function close() {\n return '~~';\n }\n },\n 'CODE': {\n open: function open() {\n return '`';\n },\n close: function close() {\n return '`';\n }\n }\n}; // A map of draftjs entity types -> markdown open and close characters\n// entities are different from block types because they have additional data attached to them.\n// an entity object is passed in to both open and close, in case it's needed for string generation.\n//\n// Both the open and close methods must exist, even if they simply return an empty string.\n// They should always return a string.\n\nvar EntityItems = {\n 'LINK': {\n open: function open(entity) {\n return '[';\n },\n close: function close(entity) {\n return \"](\".concat(entity.data.url || entity.data.href, \")\");\n }\n }\n}; // Bit of a hack - we normally want a double newline after a block,\n// but for list items we just want one (unless it's the _last_ list item in a group.)\n\nvar SingleNewlineAfterBlock = ['unordered-list-item', 'ordered-list-item'];\n\nfunction isEmptyBlock(block) {\n return block.text.length === 0 && block.entityRanges.length === 0 && Object.keys(block.data || {}).length === 0;\n}\n/**\n * Generate markdown for a single block javascript object\n * DraftJS raw object contains an array of blocks, which is the main \"structure\"\n * of the text. Each block = a new line.\n *\n * @param {Object} block - block to generate markdown for\n * @param {Number} index - index of the block in the blocks array\n * @param {Object} rawDraftObject - entire raw draft object (needed for accessing the entityMap)\n * @param {Object} options - additional options passed in by the user calling this method.\n *\n * @return {String} markdown string\n**/\n\n\nfunction renderBlock(block, index, rawDraftObject, options) {\n var openInlineStyles = [],\n markdownToAdd = [];\n var markdownString = '',\n customStyleItems = options.styleItems || {},\n customEntityItems = options.entityItems || {},\n escapeMarkdownCharacters = options.hasOwnProperty('escapeMarkdownCharacters') ? options.escapeMarkdownCharacters : true;\n var type = block.type;\n var markdownStyleCharactersToEscape = []; // draft-js emits empty blocks that have type set… don’t style them unless the user wants to preserve new lines\n // (if newlines are preserved each empty line should be \"styled\" eg in case of blockquote we want to see a blockquote.)\n // but if newlines aren’t preserved then we'd end up having double or triple or etc markdown characters, which is a bug.\n\n if (isEmptyBlock(block) && !options.preserveNewlines) {\n type = 'unstyled';\n } // Render main block wrapping element\n\n\n if (customStyleItems[type] || StyleItems[type]) {\n if (type === 'unordered-list-item' || type === 'ordered-list-item') {\n markdownString += ' '.repeat(block.depth * 4);\n }\n\n if (type === 'ordered-list-item') {\n orderedListNumber[block.depth] = orderedListNumber[block.depth] || 1;\n markdownString += (customStyleItems[type] || StyleItems[type]).open(block, orderedListNumber[block.depth]);\n orderedListNumber[block.depth]++; // Have to reset the number for orderedListNumber if we are breaking out of a list so that if\n // there's another nested list at the same level further down, it starts at 1 again.\n // COMPLICATED 😭\n\n if (previousOrderedListDepth > block.depth) {\n orderedListNumber[previousOrderedListDepth] = 1;\n }\n\n previousOrderedListDepth = block.depth;\n } else {\n orderedListNumber = {};\n markdownString += (customStyleItems[type] || StyleItems[type]).open(block);\n }\n } else {\n orderedListNumber = {};\n } // A stack to keep track of open tags\n\n\n var openTags = [];\n\n function openTag(tag) {\n openTags.push(tag);\n\n if (tag.style) {\n // Open inline tag\n if (customStyleItems[tag.style] || StyleItems[tag.style]) {\n var styleToAdd = (customStyleItems[tag.style] || StyleItems[tag.style]).open();\n markdownToAdd.push({\n type: 'style',\n style: tag,\n value: styleToAdd\n });\n }\n } else {\n // Open entity tag\n var entity = rawDraftObject.entityMap[tag.key];\n\n if (customEntityItems[entity.type] || EntityItems[entity.type]) {\n var entityToAdd = (customEntityItems[entity.type] || EntityItems[entity.type]).open(entity, block);\n markdownToAdd.push({\n type: 'entity',\n value: entityToAdd\n });\n }\n }\n }\n\n function closeTag(tag) {\n var popped = openTags.pop();\n\n if (tag !== popped) {\n throw new Error('Invariant violation: Cannot close a tag before all inner tags have been closed');\n }\n\n if (tag.style) {\n // Close inline tag\n if (customStyleItems[tag.style] || StyleItems[tag.style]) {\n // Have to trim whitespace first and then re-add after because markdown can't handle leading/trailing whitespace\n var trailingWhitespace = TRAILING_WHITESPACE.exec(markdownString);\n markdownString = markdownString.slice(0, markdownString.length - trailingWhitespace[0].length);\n markdownString += (customStyleItems[tag.style] || StyleItems[tag.style]).close();\n markdownString += trailingWhitespace[0];\n }\n } else {\n // Close entity tag\n var entity = rawDraftObject.entityMap[tag.key];\n\n if (customEntityItems[entity.type] || EntityItems[entity.type]) {\n markdownString += (customEntityItems[entity.type] || EntityItems[entity.type]).close(entity, block);\n }\n }\n }\n\n var compareTagsLastCloseFirst = function compareTagsLastCloseFirst(a, b) {\n return b.offset + b.length - (a.offset + a.length);\n }; // reverse array without mutating the original\n\n\n var reverse = function reverse(array) {\n return array.concat().reverse();\n }; // Render text within content, along with any inline styles/entities\n\n\n Array.from(block.text).some(function (character, characterIndex) {\n // Close any tags that need closing, starting from top of the stack\n reverse(openTags).forEach(function (tag) {\n if (tag.offset + tag.length === characterIndex) {\n // Take all tags stacked on top of the current one, meaning they opened after it.\n // Since they have not been popped, they'll close only later. So we need to split them.\n var tagsToSplit = openTags.slice(openTags.indexOf(tag) + 1); // Close in reverse order as they were opened\n\n reverse(tagsToSplit).forEach(closeTag); // Now we can close the current tag\n\n closeTag(tag); // Reopen split tags, ordered so that tags that close last open first\n\n tagsToSplit.sort(compareTagsLastCloseFirst).forEach(openTag);\n }\n }); // Open any tags that need opening, using the correct nesting order.\n\n var inlineTagsToOpen = block.inlineStyleRanges.filter(function (tag) {\n return tag.offset === characterIndex;\n });\n var entityTagsToOpen = block.entityRanges.filter(function (tag) {\n return tag.offset === characterIndex;\n });\n inlineTagsToOpen.concat(entityTagsToOpen).sort(compareTagsLastCloseFirst).forEach(openTag); // These are all the opening entity and style types being added to the markdown string for this loop\n // we store in an array and add here because if the character is WS character, we want to hang onto it and not apply it until the next non-whitespace\n // character before adding the markdown, since markdown doesn’t play nice with leading whitespace (eg '** bold**' is no good, whereas ' **bold**' is good.)\n\n if (character !== ' ' && markdownToAdd.length) {\n markdownString += markdownToAdd.map(function (item) {\n return item.value;\n }).join('');\n markdownToAdd = [];\n }\n\n if (block.type !== 'code-block' && escapeMarkdownCharacters) {\n var insideInlineCodeStyle = openTags.find(function (style) {\n return style.style === 'CODE';\n });\n\n if (insideInlineCodeStyle) {// Todo - The syntax to escape backtics when inside backtic code already is to use MORE backtics wrapping.\n // So we need to see how many backtics in a row we have and then when converting to markdown, use that # + 1\n // EG ``Test ` Hllo ``\n // OR ```Test `` Hello```\n // OR ````Test ``` Hello ````\n // Similar work has to be done for codeblocks.\n } else {\n // Special escape logic for blockquotes and heading characters\n if (characterIndex === 0 && character === '#' && block.text[1] && block.text[1] === ' ') {\n character = character.replace('#', '\\\\#');\n } else if (characterIndex === 0 && character === '>') {\n character = character.replace('>', '\\\\>');\n } // Escaping inline markdown characters\n // 🧹 If someone can think of a more elegant solution, I would love that.\n // orginally this was just a little char replace using a simple regular expression, but there’s lots of cases where\n // a markdown character does not actually get converted to markdown, like this case: http://google.com/i_am_a_link\n // so this code now tries to be smart and keeps track of potential “opening” characters as well as potential “closing”\n // characters, and only escapes if both opening and closing exist, and they have the correct whitepace-before-open, whitespace-or-end-of-string-after-close pattern\n\n\n if (MARKDOWN_STYLE_CHARACTERS.includes(character)) {\n var openingStyle = markdownStyleCharactersToEscape.find(function (item) {\n return item.character === character;\n });\n\n if (!openingStyle && block.text[characterIndex - 1] === ' ' && block.text[characterIndex + 1] !== ' ') {\n markdownStyleCharactersToEscape.push({\n character: character,\n index: characterIndex,\n markdownStringIndexStart: markdownString.length + character.length - 1,\n markdownStringIndexEnd: markdownString.length + character.length\n });\n } else if (openingStyle && block.text[characterIndex - 1] === character && characterIndex === openingStyle.index + 1) {\n openingStyle.markdownStringIndexEnd += 1;\n } else if (openingStyle) {\n var openingStyleLength = openingStyle.markdownStringIndexEnd - openingStyle.markdownStringIndexStart;\n var escapeCharacter = false;\n var popOpeningStyle = false;\n\n if (openingStyleLength === 1 && (block.text[characterIndex + 1] === ' ' || !block.text[characterIndex + 1])) {\n popOpeningStyle = true;\n escapeCharacter = true;\n }\n\n if (openingStyleLength === 2 && block.text[characterIndex + 1] === character) {\n escapeCharacter = true;\n }\n\n if (openingStyleLength === 2 && block.text[characterIndex - 1] === character && (block.text[characterIndex + 1] === ' ' || !block.text[characterIndex + 1])) {\n popOpeningStyle = true;\n escapeCharacter = true;\n }\n\n if (popOpeningStyle) {\n markdownStyleCharactersToEscape.splice(markdownStyleCharactersToEscape.indexOf(openingStyle), 1);\n var replacementString = markdownString.slice(openingStyle.markdownStringIndexStart, openingStyle.markdownStringIndexEnd);\n replacementString = replacementString.replace(MARKDOWN_STYLE_CHARACTER_REGXP, '\\\\$1');\n markdownString = markdownString.slice(0, openingStyle.markdownStringIndexStart) + replacementString + markdownString.slice(openingStyle.markdownStringIndexEnd);\n }\n\n if (escapeCharacter) {\n character = \"\\\\\".concat(character);\n }\n }\n }\n }\n }\n\n if (character === '\\n' && type === 'blockquote') {\n markdownString += '\\n> ';\n } else {\n markdownString += character;\n }\n }); // Finally, close all remaining open tags\n\n reverse(openTags).forEach(closeTag); // Close block level item\n\n if (customStyleItems[type] || StyleItems[type]) {\n markdownString += (customStyleItems[type] || StyleItems[type]).close(block);\n } // Determine how many newlines to add - generally we want 2, but for list items we just want one when they are succeeded by another list item.\n\n\n if (SingleNewlineAfterBlock.indexOf(type) !== -1 && rawDraftObject.blocks[index + 1] && SingleNewlineAfterBlock.indexOf(rawDraftObject.blocks[index + 1].type) !== -1) {\n markdownString += '\\n';\n } else if (rawDraftObject.blocks[index + 1]) {\n if (rawDraftObject.blocks[index].text) {\n if (SingleNewlineAfterBlock.indexOf(type) !== -1 && SingleNewlineAfterBlock.indexOf(rawDraftObject.blocks[index + 1].type) === -1) {\n markdownString += '\\n\\n';\n } else if (!options.preserveNewlines) {\n // 2 newlines if not preserving\n markdownString += '\\n\\n';\n } else {\n markdownString += '\\n';\n }\n } else if (options.preserveNewlines) {\n markdownString += '\\n';\n }\n }\n\n return markdownString;\n}\n/**\n * Generate markdown for a raw draftjs object\n * DraftJS raw object contains an array of blocks, which is the main \"structure\"\n * of the text. Each block = a new line.\n *\n * @param {Object} rawDraftObject - draftjs object to generate markdown for\n * @param {Object} options - optional additional data, see readme for what options can be passed in.\n *\n * @return {String} markdown string\n**/\n\n\nfunction draftToMarkdown(rawDraftObject, options) {\n options = options || {};\n var markdownString = '';\n rawDraftObject.blocks.forEach(function (block, index) {\n markdownString += renderBlock(block, index, rawDraftObject, options);\n });\n orderedListNumber = {}; // See variable definitions at the top of the page to see why we have to do this sad hack.\n\n return markdownString;\n}\n\nexport default draftToMarkdown;","export { default as draftToMarkdown } from './draft-to-markdown';\nexport { default as markdownToDraft } from './markdown-to-draft';","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { 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\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { Remarkable } from 'remarkable';\nvar TRAILING_NEW_LINE = /\\n$/; // In DraftJS, string lengths are calculated differently than in JS itself (due\n// to surrogate pairs). Instead of importing the entire UnicodeUtils file from\n// FBJS, we use a simpler alternative, in the form of `Array.from`.\n//\n// Alternative: const { strlen } = require('fbjs/lib/UnicodeUtils');\n\nfunction strlen(str) {\n return Array.from(str).length;\n} // Block level items, key is Remarkable's key for them, value returned is\n// A function that generates the raw draftjs key and block data.\n//\n// Why a function? Because in some cases (headers) we need additional information\n// before we can determine the exact key to return. And blocks may also return data\n\n\nvar DefaultBlockTypes = {\n paragraph_open: function paragraph_open(item) {\n return {\n type: 'unstyled',\n text: '',\n entityRanges: [],\n inlineStyleRanges: []\n };\n },\n blockquote_open: function blockquote_open(item) {\n return {\n type: 'blockquote',\n text: ''\n };\n },\n ordered_list_item_open: function ordered_list_item_open() {\n return {\n type: 'ordered-list-item',\n text: ''\n };\n },\n unordered_list_item_open: function unordered_list_item_open() {\n return {\n type: 'unordered-list-item',\n text: ''\n };\n },\n fence: function fence(item) {\n return {\n type: 'code-block',\n data: {\n language: item.params || ''\n },\n text: (item.content || '').replace(TRAILING_NEW_LINE, ''),\n // remarkable seems to always append an erronious trailing newline to its codeblock content, so we need to trim it out.\n entityRanges: [],\n inlineStyleRanges: []\n };\n },\n heading_open: function heading_open(item) {\n var type = 'header-' + {\n 1: 'one',\n 2: 'two',\n 3: 'three',\n 4: 'four',\n 5: 'five',\n 6: 'six'\n }[item.hLevel];\n return {\n type: type,\n text: ''\n };\n }\n}; // Entity types. These are things like links or images that require\n// additional data and will be added to the `entityMap`\n// again. In this case, key is remarkable key, value is\n// meethod that returns the draftjs key + any data needed.\n\nvar DefaultBlockEntities = {\n link_open: function link_open(item) {\n return {\n type: 'LINK',\n mutability: 'MUTABLE',\n data: {\n url: item.href,\n href: item.href\n }\n };\n }\n}; // Entity styles. Simple Inline styles that aren't added to entityMap\n// key is remarkable key, value is draftjs raw key\n\nvar DefaultBlockStyles = {\n strong_open: 'BOLD',\n em_open: 'ITALIC',\n code: 'CODE',\n del_open: 'STRIKETHROUGH'\n}; // Key generator for entityMap items\n\nvar idCounter = -1;\n\nfunction generateUniqueKey() {\n idCounter++;\n return idCounter;\n}\n/*\n * Handle inline content in a block level item\n * parses for BlockEntities (links, images) and BlockStyles (em, strong)\n * doesn't handle block level items (blockquote, ordered list, etc)\n *\n * @param inlineItem - single object from remarkable data representation of markdown\n * @param BlockEntities - key-value object of mappable block entity items. Passed in as param so users can include their own custom stuff\n * @param BlockStyles - key-value object of mappable block styles items. Passed in as param so users can include their own custom stuff\n *\n * @return \n * content: Entire text content for the inline item,\n * blockEntities: New block eneities to be added to global block entity map\n * blockEntityRanges: block-level representation of block entities including key to access the block entity from the global map\n * blockStyleRanges: block-level representation of styles (eg strong, em)\n*/\n\n\nfunction parseInline(inlineItem, BlockEntities, BlockStyles) {\n var content = '',\n blockEntities = {},\n blockEntityRanges = [],\n blockInlineStyleRanges = [];\n inlineItem.children.forEach(function (child) {\n if (child.type === 'text') {\n content += child.content;\n } else if (child.type === 'softbreak') {\n content += '\\n';\n } else if (child.type === 'hardbreak') {\n content += '\\n';\n } else if (BlockStyles[child.type]) {\n var key = generateUniqueKey();\n var styleBlock = {\n offset: strlen(content) || 0,\n length: 0,\n style: BlockStyles[child.type]\n }; // Edge case hack because code items don't have inline content or open/close, unlike everything else\n // sub and sup are also special :)\n\n if (child.type === 'code' || child.type === 'sub' || child.type === 'sup') {\n styleBlock.length = strlen(child.content);\n content += child.content;\n }\n\n blockInlineStyleRanges.push(styleBlock);\n } else if (BlockEntities[child.type]) {\n var key = generateUniqueKey();\n blockEntities[key] = BlockEntities[child.type](child);\n blockEntityRanges.push({\n offset: strlen(content) || 0,\n length: 0,\n key: key\n });\n } else if (child.type.indexOf('_close') !== -1 && BlockEntities[child.type.replace('_close', '_open')]) {\n blockEntityRanges[blockEntityRanges.length - 1].length = strlen(content) - blockEntityRanges[blockEntityRanges.length - 1].offset;\n } else if (child.type.indexOf('_close') !== -1 && BlockStyles[child.type.replace('_close', '_open')]) {\n var type = BlockStyles[child.type.replace('_close', '_open')];\n blockInlineStyleRanges = blockInlineStyleRanges.map(function (style) {\n if (style.length === 0 && style.style === type) {\n style.length = strlen(content) - style.offset;\n }\n\n return style;\n });\n }\n });\n return {\n content: content,\n blockEntities: blockEntities,\n blockEntityRanges: blockEntityRanges,\n blockInlineStyleRanges: blockInlineStyleRanges\n };\n}\n/**\n * Convert markdown into raw draftjs object\n *\n * @param {String} markdown - markdown to convert into raw draftjs object\n * @param {Object} options - optional additional data, see readme for what options can be passed in.\n *\n * @return {Object} rawDraftObject\n**/\n\n\nfunction markdownToDraft(string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var remarkablePreset = options.remarkablePreset || options.remarkableOptions;\n var remarkableOptions = _typeof(options.remarkableOptions) === 'object' ? options.remarkableOptions : null;\n var md = new Remarkable(remarkablePreset, remarkableOptions); // if tables are not explicitly enabled, disable them by default\n\n if (!remarkableOptions || !remarkableOptions.enable || !remarkableOptions.enable.block || remarkableOptions.enable.block !== 'table' || remarkableOptions.enable.block.includes('table') === false) {\n md.block.ruler.disable('table');\n } // disable the specified rules\n\n\n if (remarkableOptions && remarkableOptions.disable) {\n for (var _i = 0, _Object$entries = Object.entries(remarkableOptions.disable); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n key = _Object$entries$_i[0],\n value = _Object$entries$_i[1];\n\n md[key].ruler.disable(value);\n }\n } // enable the specified rules\n\n\n if (remarkableOptions && remarkableOptions.enable) {\n for (var _i2 = 0, _Object$entries2 = Object.entries(remarkableOptions.enable); _i2 < _Object$entries2.length; _i2++) {\n var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),\n _key = _Object$entries2$_i[0],\n _value = _Object$entries2$_i[1];\n\n md[_key].ruler.enable(_value);\n }\n } // If users want to define custom remarkable plugins for custom markdown, they can be added here\n\n\n if (options.remarkablePlugins) {\n options.remarkablePlugins.forEach(function (plugin) {\n md.use(plugin, {});\n });\n }\n\n var blocks = []; // blocks will be returned as part of the final draftjs raw object\n\n var entityMap = {}; // entitymap will be returned as part of the final draftjs raw object\n\n var parsedData = md.parse(string, {}); // remarkable js takes markdown and makes it an array of style objects for us to easily parse\n\n var currentListType = null; // Because of how remarkable's data is formatted, we need to cache what kind of list we're currently dealing with\n\n var previousBlockEndingLine = 0; // Allow user to define custom BlockTypes and Entities if they so wish\n\n var BlockTypes = Object.assign({}, DefaultBlockTypes, options.blockTypes || {});\n var BlockEntities = Object.assign({}, DefaultBlockEntities, options.blockEntities || {});\n var BlockStyles = Object.assign({}, DefaultBlockStyles, options.blockStyles || {});\n parsedData.forEach(function (item) {\n // Because of how remarkable's data is formatted, we need to cache what kind of list we're currently dealing with\n if (item.type === 'bullet_list_open') {\n currentListType = 'unordered_list_item_open';\n } else if (item.type === 'ordered_list_open') {\n currentListType = 'ordered_list_item_open';\n }\n\n var itemType = item.type;\n\n if (itemType === 'list_item_open') {\n itemType = currentListType;\n }\n\n if (itemType === 'inline') {\n // Parse inline content and apply it to the most recently created block level item,\n // which is where the inline content will belong.\n var _parseInline = parseInline(item, BlockEntities, BlockStyles),\n content = _parseInline.content,\n blockEntities = _parseInline.blockEntities,\n blockEntityRanges = _parseInline.blockEntityRanges,\n blockInlineStyleRanges = _parseInline.blockInlineStyleRanges;\n\n var blockToModify = blocks[blocks.length - 1];\n blockToModify.text = content;\n blockToModify.inlineStyleRanges = blockInlineStyleRanges;\n blockToModify.entityRanges = blockEntityRanges; // The entity map is a master object separate from the block so just add any entities created for this block to the master object\n\n Object.assign(entityMap, blockEntities);\n } else if ((itemType.indexOf('_open') !== -1 || itemType === 'fence' || itemType === 'hr' || itemType === 'htmlblock') && BlockTypes[itemType]) {\n var depth = 0;\n var block;\n\n if (item.level > 0) {\n depth = Math.floor(item.level / 2);\n } // Draftjs only supports 1 level of blocks, hence the item.level === 0 check\n // List items will always be at least `level==1` though so we need a separate check for that\n // If there’s nested block level items deeper than that, we need to make sure we capture this by cloning the topmost block\n // otherwise we’ll accidentally overwrite its text. (eg if there's a blockquote with 3 nested paragraphs with inline text, without this check, only the last paragraph would be reflected)\n\n\n if (item.level === 0 || item.type === 'list_item_open') {\n block = Object.assign({\n depth: depth\n }, BlockTypes[itemType](item));\n } else if (item.level > 0 && blocks[blocks.length - 1].text) {\n block = Object.assign({}, blocks[blocks.length - 1]);\n }\n\n if (block && options.preserveNewlines) {\n // Re: previousBlockEndingLine.... omg.\n // So remarkable strips out empty newlines and doesn't make any entities to parse to restore them\n // the only solution I could find is that there's a 2-value array on each block item called \"lines\" which is the start and end line of the block element.\n // by keeping track of the PREVIOUS block element ending line and the NEXT block element starting line, we can find the difference between the new lines and insert\n // an appropriate number of extra paragraphs to re-create those newlines in draftjs.\n // This is probably my least favourite thing in this file, but not sure what could be better.\n var totalEmptyParagraphsToCreate = item.lines[0] - previousBlockEndingLine;\n\n for (var i = 0; i < totalEmptyParagraphsToCreate; i++) {\n blocks.push(DefaultBlockTypes.paragraph_open());\n }\n }\n\n if (block) {\n previousBlockEndingLine = item.lines[1]; // reserve one line after list block\n\n if (block.type === 'unordered-list-item' || block.type === 'ordered-list-item') {\n previousBlockEndingLine += 1;\n }\n\n blocks.push(block);\n }\n }\n }); // EditorState.createWithContent will error if there's no blocks defined\n // Remarkable returns an empty array though. So we have to generate a 'fake'\n // empty block in this case. 😑\n\n if (!blocks.length) {\n blocks.push(DefaultBlockTypes.paragraph_open());\n }\n\n return {\n entityMap: entityMap,\n blocks: blocks\n };\n}\n\nexport default markdownToDraft;","/**\n * @typedef Options\n * Configuration (optional).\n * @property {string|null|Array} [align]\n * One style for all columns, or styles for their respective columns.\n * Each style is either `'l'` (left), `'r'` (right), or `'c'` (center).\n * Other values are treated as `''`, which doesn’t place the colon in the\n * alignment row but does align left.\n * *Only the lowercased first character is used, so `Right` is fine.*\n * @property {boolean} [padding=true]\n * Whether to add a space of padding between delimiters and cells.\n *\n * When `true`, there is padding:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there is no padding:\n *\n * ```markdown\n * |Alpha|B |\n * |-----|-----|\n * |C |Delta|\n * ```\n * @property {boolean} [delimiterStart=true]\n * Whether to begin each row with the delimiter.\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are starting delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no starting delimiters:\n *\n * ```markdown\n * Alpha | B |\n * ----- | ----- |\n * C | Delta |\n * ```\n * @property {boolean} [delimiterEnd=true]\n * Whether to end each row with the delimiter.\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are ending delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no ending delimiters:\n *\n * ```markdown\n * | Alpha | B\n * | ----- | -----\n * | C | Delta\n * ```\n * @property {boolean} [alignDelimiters=true]\n * Whether to align the delimiters.\n * By default, they are aligned:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * Pass `false` to make them staggered:\n *\n * ```markdown\n * | Alpha | B |\n * | - | - |\n * | C | Delta |\n * ```\n * @property {(value: string) => number} [stringLength]\n * Function to detect the length of table cell content.\n * This is used when aligning the delimiters (`|`) between table cells.\n * Full-width characters and emoji mess up delimiter alignment when viewing\n * the markdown source.\n * To fix this, you can pass this function, which receives the cell content\n * and returns its “visible” size.\n * Note that what is and isn’t visible depends on where the text is displayed.\n *\n * Without such a function, the following:\n *\n * ```js\n * markdownTable([\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ])\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | - | - |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n *\n * With [`string-width`](https://github.com/sindresorhus/string-width):\n *\n * ```js\n * import stringWidth from 'string-width'\n *\n * markdownTable(\n * [\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ],\n * {stringLength: stringWidth}\n * )\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | ----- | ------- |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n */\n\n/**\n * @typedef {Options} MarkdownTableOptions\n * @todo\n * Remove next major.\n */\n\n/**\n * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..\n *\n * @param {Array>} table\n * Table data (matrix of strings).\n * @param {Options} [options]\n * Configuration (optional).\n * @returns {string}\n */\nexport function markdownTable(table, options = {}) {\n const align = (options.align || []).concat()\n const stringLength = options.stringLength || defaultStringLength\n /** @type {Array} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array>} Cells per row. */\n const cellMatrix = []\n /** @type {Array>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array} */\n const longestCellByColumn = []\n let mostCellsPerRow = 0\n let rowIndex = -1\n\n // This is a superfluous loop if we don’t align delimiters, but otherwise we’d\n // do superfluous work when aligning, so optimize for aligning.\n while (++rowIndex < table.length) {\n /** @type {Array} */\n const row = []\n /** @type {Array} */\n const sizes = []\n let columnIndex = -1\n\n if (table[rowIndex].length > mostCellsPerRow) {\n mostCellsPerRow = table[rowIndex].length\n }\n\n while (++columnIndex < table[rowIndex].length) {\n const cell = serialize(table[rowIndex][columnIndex])\n\n if (options.alignDelimiters !== false) {\n const size = stringLength(cell)\n sizes[columnIndex] = size\n\n if (\n longestCellByColumn[columnIndex] === undefined ||\n size > longestCellByColumn[columnIndex]\n ) {\n longestCellByColumn[columnIndex] = size\n }\n }\n\n row.push(cell)\n }\n\n cellMatrix[rowIndex] = row\n sizeMatrix[rowIndex] = sizes\n }\n\n // Figure out which alignments to use.\n let columnIndex = -1\n\n if (typeof align === 'object' && 'length' in align) {\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = toAlignment(align[columnIndex])\n }\n } else {\n const code = toAlignment(align)\n\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = code\n }\n }\n\n // Inject the alignment row.\n columnIndex = -1\n /** @type {Array} */\n const row = []\n /** @type {Array} */\n const sizes = []\n\n while (++columnIndex < mostCellsPerRow) {\n const code = alignments[columnIndex]\n let before = ''\n let after = ''\n\n if (code === 99 /* `c` */) {\n before = ':'\n after = ':'\n } else if (code === 108 /* `l` */) {\n before = ':'\n } else if (code === 114 /* `r` */) {\n after = ':'\n }\n\n // There *must* be at least one hyphen-minus in each alignment cell.\n let size =\n options.alignDelimiters === false\n ? 1\n : Math.max(\n 1,\n longestCellByColumn[columnIndex] - before.length - after.length\n )\n\n const cell = before + '-'.repeat(size) + after\n\n if (options.alignDelimiters !== false) {\n size = before.length + size + after.length\n\n if (size > longestCellByColumn[columnIndex]) {\n longestCellByColumn[columnIndex] = size\n }\n\n sizes[columnIndex] = size\n }\n\n row[columnIndex] = cell\n }\n\n // Inject the alignment row.\n cellMatrix.splice(1, 0, row)\n sizeMatrix.splice(1, 0, sizes)\n\n rowIndex = -1\n /** @type {Array} */\n const lines = []\n\n while (++rowIndex < cellMatrix.length) {\n const row = cellMatrix[rowIndex]\n const sizes = sizeMatrix[rowIndex]\n columnIndex = -1\n /** @type {Array} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (options.alignDelimiters !== false) {\n const size =\n longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)\n const code = alignments[columnIndex]\n\n if (code === 114 /* `r` */) {\n before = ' '.repeat(size)\n } else if (code === 99 /* `c` */) {\n if (size % 2) {\n before = ' '.repeat(size / 2 + 0.5)\n after = ' '.repeat(size / 2 - 0.5)\n } else {\n before = ' '.repeat(size / 2)\n after = before\n }\n } else {\n after = ' '.repeat(size)\n }\n }\n\n if (options.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n options.padding !== false &&\n // Don’t add the opening space if we’re not aligning and the cell is\n // empty: there will be a closing space.\n !(options.alignDelimiters === false && cell === '') &&\n (options.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (options.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (options.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (options.padding !== false) {\n line.push(' ')\n }\n\n if (\n options.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n options.delimiterEnd === false\n ? line.join('').replace(/ +$/, '')\n : line.join('')\n )\n }\n\n return lines.join('\\n')\n}\n\n/**\n * @param {string|null|undefined} [value]\n * @returns {string}\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string} value\n * @returns {number}\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * @param {string|null|undefined} value\n * @returns {number}\n */\nfunction toAlignment(value) {\n const code = typeof value === 'string' ? value.codePointAt(0) : 0\n\n return code === 67 /* `C` */ || code === 99 /* `c` */\n ? 99 /* `c` */\n : code === 76 /* `L` */ || code === 108 /* `l` */\n ? 108 /* `l` */\n : code === 82 /* `R` */ || code === 114 /* `r` */\n ? 114 /* `r` */\n : 0\n}\n","var Mexp=require('./postfix_evaluator.js');\r\nMexp.prototype.formulaEval = function () {\r\n\t\"use strict\";\r\n\tvar stack=[],pop1,pop2,pop3;\r\n\tvar disp=[];\r\n\tvar temp='';\r\n\tvar arr=this.value;\r\n\tfor(var i=0;i\"+pop2.value+\"\"+arr[i].show+\"\"+pop1.value+\"\",type:10});\r\n\t\t\telse disp.push({value:(pop2.type!=1?\"(\":\"\")+pop2.value+(pop2.type!=1?\")\":\"\")+\"\"+pop1.value+\"\",type:1});\r\n\t\t}\r\n\t\telse if(arr[i].type===2||arr[i].type===9){\r\n\t\t\tpop1=disp.pop();\r\n\t\t\tpop2=disp.pop();\r\n\t\t\tdisp.push({value:(pop2.type!=1?\"(\":\"\")+pop2.value+(pop2.type!=1?\")\":\"\")+arr[i].show+(pop1.type!=1?\"(\":\"\")+pop1.value+(pop1.type!=1?\")\":\"\"),type:arr[i].type});\r\n\t\t}\r\n\t\telse if(arr[i].type===12){\r\n\t\t\tpop1=disp.pop();\r\n\t\t\tpop2=disp.pop();\r\n\t\t\tpop3=disp.pop();\r\n\t\t\tdisp.push({value:arr[i].show+\"(\"+pop3.value+\",\"+pop2.value+\",\"+pop1.value+\")\",type:12});\r\n\t\t}\r\n\t}\r\n\treturn disp[0].value;\r\n};\r\nmodule.exports=Mexp;","'use strict'\r\nvar Mexp = require('./math_function.js')\r\nfunction inc (arr, val) {\r\n for (var i = 0; i < arr.length; i++) {\r\n arr[i] += val\r\n }\r\n return arr\r\n}\r\nvar token = [\r\n 'sin',\r\n 'cos',\r\n 'tan',\r\n 'pi',\r\n '(',\r\n ')',\r\n 'P',\r\n 'C',\r\n ' ',\r\n 'asin',\r\n 'acos',\r\n 'atan',\r\n '7',\r\n '8',\r\n '9',\r\n 'int',\r\n 'cosh',\r\n 'acosh',\r\n 'ln',\r\n '^',\r\n 'root',\r\n '4',\r\n '5',\r\n '6',\r\n '/',\r\n '!',\r\n 'tanh',\r\n 'atanh',\r\n 'Mod',\r\n '1',\r\n '2',\r\n '3',\r\n '*',\r\n 'sinh',\r\n 'asinh',\r\n 'e',\r\n 'log',\r\n '0',\r\n '.',\r\n '+',\r\n '-',\r\n ',',\r\n 'Sigma',\r\n 'n',\r\n 'Pi',\r\n 'pow',\r\n '&'\r\n]\r\nvar show = [\r\n 'sin',\r\n 'cos',\r\n 'tan',\r\n 'π',\r\n '(',\r\n ')',\r\n 'P',\r\n 'C',\r\n ' ',\r\n 'asin',\r\n 'acos',\r\n 'atan',\r\n '7',\r\n '8',\r\n '9',\r\n 'Int',\r\n 'cosh',\r\n 'acosh',\r\n ' ln',\r\n '^',\r\n 'root',\r\n '4',\r\n '5',\r\n '6',\r\n '÷',\r\n '!',\r\n 'tanh',\r\n 'atanh',\r\n ' Mod ',\r\n '1',\r\n '2',\r\n '3',\r\n '×',\r\n 'sinh',\r\n 'asinh',\r\n 'e',\r\n ' log',\r\n '0',\r\n '.',\r\n '+',\r\n '-',\r\n ',',\r\n 'Σ',\r\n 'n',\r\n 'Π',\r\n 'pow',\r\n '&'\r\n]\r\nvar eva = [\r\n Mexp.math.sin,\r\n Mexp.math.cos,\r\n Mexp.math.tan,\r\n 'PI',\r\n '(',\r\n ')',\r\n Mexp.math.P,\r\n Mexp.math.C,\r\n ' '.anchor,\r\n Mexp.math.asin,\r\n Mexp.math.acos,\r\n Mexp.math.atan,\r\n '7',\r\n '8',\r\n '9',\r\n Math.floor,\r\n Mexp.math.cosh,\r\n Mexp.math.acosh,\r\n Math.log,\r\n Math.pow,\r\n Math.sqrt,\r\n '4',\r\n '5',\r\n '6',\r\n Mexp.math.div,\r\n Mexp.math.fact,\r\n Mexp.math.tanh,\r\n Mexp.math.atanh,\r\n Mexp.math.mod,\r\n '1',\r\n '2',\r\n '3',\r\n Mexp.math.mul,\r\n Mexp.math.sinh,\r\n Mexp.math.asinh,\r\n 'E',\r\n Mexp.math.log,\r\n '0',\r\n '.',\r\n Mexp.math.add,\r\n Mexp.math.sub,\r\n ',',\r\n Mexp.math.sigma,\r\n 'n',\r\n Mexp.math.Pi,\r\n Math.pow,\r\n Mexp.math.and\r\n]\r\nvar preced = {\r\n 0: 11,\r\n 1: 0,\r\n 2: 3,\r\n 3: 0,\r\n 4: 0,\r\n 5: 0,\r\n 6: 0,\r\n 7: 11,\r\n 8: 11,\r\n 9: 1,\r\n 10: 10,\r\n 11: 0,\r\n 12: 11,\r\n 13: 0,\r\n 14: -1 // will be filtered after lexer\r\n} // stores precedence by types\r\nvar type = [\r\n 0, 0, 0, 3, 4, 5, 10, 10, 14, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 10, 0, 1, 1, 1, 2, 7, 0, 0, 2, 1, 1,\r\n 1, 2, 0, 0, 3, 0, 1, 6, 9, 9, 11, 12, 13, 12, 8, 9\r\n]\r\n/*\r\n0 : function with syntax function_name(Maths_exp)\r\n1 : numbers\r\n2 : binary operators like * / Mod left associate and same precedence\r\n3 : Math constant values like e,pi,Cruncher ans\r\n4 : opening bracket\r\n5 : closing bracket\r\n6 : decimal\r\n7 : function with syntax (Math_exp)function_name\r\n8: function with syntax function_name(Math_exp1,Math_exp2)\r\n9 : binary operator like +,-\r\n10: binary operator like P C or ^\r\n11: ,\r\n12: function with , seperated three parameters and third parameter is a string that will be mexp string\r\n13: variable of Sigma function\r\n*/\r\nvar type0 = {\r\n 0: true,\r\n 1: true,\r\n 3: true,\r\n 4: true,\r\n 6: true,\r\n 8: true,\r\n 9: true,\r\n 12: true,\r\n 13: true,\r\n 14: true\r\n} // type2:true,type4:true,type9:true,type11:true,type21:true,type22\r\nvar type1 = {\r\n 0: true,\r\n 1: true,\r\n 2: true,\r\n 3: true,\r\n 4: true,\r\n 5: true,\r\n 6: true,\r\n 7: true,\r\n 8: true,\r\n 9: true,\r\n 10: true,\r\n 11: true,\r\n 12: true,\r\n 13: true\r\n} // type3:true,type5:true,type7:true,type23\r\nvar type1Asterick = {\r\n 0: true,\r\n 3: true,\r\n 4: true,\r\n 8: true,\r\n 12: true,\r\n 13: true\r\n}\r\nvar empty = {}\r\nvar type3Asterick = {\r\n 0: true,\r\n 1: true,\r\n 3: true,\r\n 4: true,\r\n 6: true,\r\n 8: true,\r\n 12: true,\r\n 13: true\r\n} // type_5:true,type_7:true,type_23\r\nvar type6 = {\r\n 1: true\r\n}\r\nvar newAr = [\r\n [],\r\n [\r\n '1',\r\n '2',\r\n '3',\r\n '7',\r\n '8',\r\n '9',\r\n '4',\r\n '5',\r\n '6',\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '(',\r\n ')',\r\n '^',\r\n '!',\r\n 'P',\r\n 'C',\r\n 'e',\r\n '0',\r\n '.',\r\n ',',\r\n 'n',\r\n ' ',\r\n '&'\r\n ],\r\n ['pi', 'ln', 'Pi'],\r\n ['sin', 'cos', 'tan', 'Del', 'int', 'Mod', 'log', 'pow'],\r\n ['asin', 'acos', 'atan', 'cosh', 'root', 'tanh', 'sinh'],\r\n ['acosh', 'atanh', 'asinh', 'Sigma']\r\n]\r\n\r\nfunction match (str1, str2, i, x) {\r\n for (var f = 0; f < x; f++) {\r\n if (str1[i + f] !== str2[f]) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\nMexp.addToken = function (tokens) {\r\n for (var i = 0; i < tokens.length; i++) {\r\n var x = tokens[i].token.length\r\n var temp = -1\r\n\r\n // newAr is a specially designed data structure index of 1d array = length of tokens\r\n newAr[x] = newAr[x] || []\r\n for (var y = 0; y < newAr[x].length; y++) {\r\n if (tokens[i].token === newAr[x][y]) {\r\n temp = token.indexOf(newAr[x][y])\r\n break\r\n }\r\n }\r\n if (temp === -1) {\r\n token.push(tokens[i].token)\r\n type.push(tokens[i].type)\r\n if (newAr.length <= tokens[i].token.length) {\r\n newAr[tokens[i].token.length] = []\r\n }\r\n newAr[tokens[i].token.length].push(tokens[i].token)\r\n eva.push(tokens[i].value)\r\n show.push(tokens[i].show)\r\n } else {\r\n // overwrite\r\n token[temp] = tokens[i].token\r\n type[temp] = tokens[i].type\r\n eva[temp] = tokens[i].value\r\n show[temp] = tokens[i].show\r\n }\r\n }\r\n}\r\n\r\nfunction tokenize (string) {\r\n var nodes = []\r\n var length = string.length\r\n var key, x, y\r\n for (var i = 0; i < length; i++) {\r\n if (i < length - 1 && string[i] === ' ' && string[i + 1] === ' ') {\r\n continue\r\n }\r\n key = ''\r\n for (\r\n x = string.length - i > newAr.length - 2 ? newAr.length - 1 : string.length - i;\r\n x > 0;\r\n x--\r\n ) {\r\n if (newAr[x] === undefined) continue\r\n for (y = 0; y < newAr[x].length; y++) {\r\n if (match(string, newAr[x][y], i, x)) {\r\n key = newAr[x][y]\r\n y = newAr[x].length\r\n x = 0\r\n }\r\n }\r\n }\r\n i += key.length - 1\r\n if (key === '') {\r\n throw new Mexp.Exception(\"Can't understand after \" + string.slice(i))\r\n }\r\n var index = token.indexOf(key)\r\n nodes.push({\r\n index: index,\r\n token: key,\r\n type: type[index],\r\n eval: eva[index],\r\n precedence: preced[type[index]],\r\n show: show[index]\r\n })\r\n }\r\n return nodes\r\n}\r\n\r\nMexp.lex = function (inp, tokens) {\r\n 'use strict'\r\n\r\n var changeSignObj = {\r\n value: Mexp.math.changeSign,\r\n type: 0,\r\n pre: 21,\r\n show: '-'\r\n }\r\n var closingParObj = {\r\n value: ')',\r\n show: ')',\r\n type: 5,\r\n pre: 0\r\n }\r\n var openingParObj = {\r\n value: '(',\r\n type: 4,\r\n pre: 0,\r\n show: '('\r\n }\r\n var str = [openingParObj]\r\n\r\n var ptc = [] // Parenthesis to close at the beginning is after one token\r\n var inpStr = inp\r\n var allowed = type0\r\n var bracToClose = 0\r\n var asterick = empty\r\n var prevKey = ''\r\n var i\r\n if (typeof tokens !== 'undefined') {\r\n Mexp.addToken(tokens)\r\n }\r\n var obj = {}\r\n var nodes = tokenize(inpStr)\r\n for (i = 0; i < nodes.length; i++) {\r\n var node = nodes[i]\r\n if (node.type === 14) {\r\n if (\r\n i > 0 &&\r\n i < nodes.length - 1 &&\r\n nodes[i + 1].type === 1 &&\r\n (nodes[i - 1].type === 1 || nodes[i - 1].type === 6)\r\n ) { throw new Mexp.Exception('Unexpected Space') }\r\n continue\r\n }\r\n var cToken = node.token\r\n var cType = node.type\r\n var cEv = node.eval\r\n var cPre = node.precedence\r\n var cShow = node.show\r\n var pre = str[str.length - 1]\r\n var j\r\n for (j = ptc.length; j--;) {\r\n // loop over ptc\r\n if (ptc[j] === 0) {\r\n if ([0, 2, 3, 4, 5, 9, 11, 12, 13].indexOf(cType) !== -1) {\r\n if (allowed[cType] !== true) {\r\n throw new Mexp.Exception(cToken + ' is not allowed after ' + prevKey)\r\n }\r\n str.push(closingParObj)\r\n allowed = type1\r\n asterick = type3Asterick\r\n ptc.pop()\r\n }\r\n } else break\r\n }\r\n if (allowed[cType] !== true) {\r\n throw new Mexp.Exception(cToken + ' is not allowed after ' + prevKey)\r\n }\r\n if (asterick[cType] === true) {\r\n cType = 2\r\n cEv = Mexp.math.mul\r\n cShow = '×'\r\n cPre = 3\r\n i = i - 1\r\n }\r\n obj = {\r\n value: cEv,\r\n type: cType,\r\n pre: cPre,\r\n show: cShow\r\n }\r\n if (cType === 0) {\r\n allowed = type0\r\n asterick = empty\r\n inc(ptc, 2)\r\n str.push(obj)\r\n if (nodes[i + 1].type !== 4) {\r\n str.push(openingParObj)\r\n ptc.push(2)\r\n }\r\n // bracToClose++\r\n } else if (cType === 1) {\r\n if (pre.type === 1) {\r\n pre.value += cEv\r\n inc(ptc, 1)\r\n } else {\r\n str.push(obj)\r\n }\r\n allowed = type1\r\n asterick = type1Asterick\r\n } else if (cType === 2) {\r\n allowed = type0\r\n asterick = empty\r\n inc(ptc, 2)\r\n str.push(obj)\r\n } else if (cType === 3) {\r\n // constant\r\n str.push(obj)\r\n allowed = type1\r\n asterick = type3Asterick\r\n } else if (cType === 4) {\r\n inc(ptc, 1)\r\n bracToClose++\r\n allowed = type0\r\n asterick = empty\r\n str.push(obj)\r\n } else if (cType === 5) {\r\n if (!bracToClose) {\r\n throw new Mexp.Exception('Closing parenthesis are more than opening one, wait What!!!')\r\n }\r\n bracToClose--\r\n allowed = type1\r\n asterick = type3Asterick\r\n str.push(obj)\r\n inc(ptc, 1)\r\n } else if (cType === 6) {\r\n if (pre.hasDec) {\r\n throw new Mexp.Exception('Two decimals are not allowed in one number')\r\n }\r\n if (pre.type !== 1) {\r\n pre = {\r\n value: 0,\r\n type: 1,\r\n pre: 0\r\n } // pre needs to be changed as it will the last value now to be safe in later code\r\n str.push(pre)\r\n // inc(ptc, 1)\r\n }\r\n allowed = type6\r\n inc(ptc, 1)\r\n asterick = empty\r\n pre.value += cEv\r\n pre.hasDec = true\r\n } else if (cType === 7) {\r\n allowed = type1\r\n asterick = type3Asterick\r\n inc(ptc, 1)\r\n str.push(obj)\r\n }\r\n if (cType === 8) {\r\n allowed = type0\r\n asterick = empty\r\n inc(ptc, 4)\r\n str.push(obj)\r\n // str.push(openingParObj)\r\n if (nodes[i + 1].type !== 4) {\r\n str.push(openingParObj)\r\n ptc.push(4)\r\n }\r\n } else if (cType === 9) {\r\n if (pre.type === 9) {\r\n if (pre.value === Mexp.math.add) {\r\n pre.value = cEv\r\n pre.show = cShow\r\n inc(ptc, 1)\r\n } else if (pre.value === Mexp.math.sub && cShow === '-') {\r\n pre.value = Mexp.math.add\r\n pre.show = '+'\r\n inc(ptc, 1)\r\n }\r\n } else if (\r\n pre.type !== 5 &&\r\n pre.type !== 7 &&\r\n pre.type !== 1 &&\r\n pre.type !== 3 &&\r\n pre.type !== 13\r\n ) {\r\n // changesign only when negative is found\r\n if (cToken === '-') {\r\n // do nothing for + token\r\n // don't add with the above if statement as that will run the else statement of parent if on Ctoken +\r\n allowed = type0\r\n asterick = empty\r\n inc(ptc, 2).push(2)\r\n str.push(changeSignObj)\r\n str.push(openingParObj)\r\n }\r\n } else {\r\n str.push(obj)\r\n inc(ptc, 2)\r\n }\r\n allowed = type0\r\n asterick = empty\r\n } else if (cType === 10) {\r\n allowed = type0\r\n asterick = empty\r\n inc(ptc, 2)\r\n str.push(obj)\r\n } else if (cType === 11) {\r\n allowed = type0\r\n asterick = empty\r\n str.push(obj)\r\n } else if (cType === 12) {\r\n allowed = type0\r\n asterick = empty\r\n inc(ptc, 6)\r\n str.push(obj)\r\n if (nodes[i + 1].type !== 4) {\r\n str.push(openingParObj)\r\n ptc.push(6)\r\n }\r\n } else if (cType === 13) {\r\n allowed = type1\r\n asterick = type3Asterick\r\n str.push(obj)\r\n }\r\n inc(ptc, -1)\r\n prevKey = cToken\r\n\r\n }\r\n for (j = ptc.length; j--;) {\r\n // loop over ptc\r\n str.push(closingParObj)\r\n }\r\n if (allowed[5] !== true) {\r\n throw new Mexp.Exception('complete the expression')\r\n }\r\n while (bracToClose--) {\r\n str.push(closingParObj)\r\n }\r\n\r\n str.push(closingParObj)\r\n // console.log(str);\r\n return new Mexp(str)\r\n}\r\nmodule.exports = Mexp\r\n","\"use strict\";\r\nvar Mexp = function (parsed) {\r\n this.value = parsed\r\n}\r\n\r\nMexp.math = {\r\n isDegree: true, // mode of calculator\r\n acos: function (x) {\r\n return (Mexp.math.isDegree ? 180 / Math.PI * Math.acos(x) : Math.acos(x))\r\n },\r\n add: function (a, b) {\r\n return a + b\r\n },\r\n asin: function (x) {\r\n return (Mexp.math.isDegree ? 180 / Math.PI * Math.asin(x) : Math.asin(x))\r\n },\r\n atan: function (x) {\r\n return (Mexp.math.isDegree ? 180 / Math.PI * Math.atan(x) : Math.atan(x))\r\n },\r\n acosh: function (x) {\r\n return Math.log(x + Math.sqrt(x * x - 1))\r\n },\r\n asinh: function (x) {\r\n return Math.log(x + Math.sqrt(x * x + 1))\r\n },\r\n atanh: function (x) {\r\n return Math.log((1 + x) / (1 - x))\r\n },\r\n C: function (n, r) {\r\n var pro = 1\r\n var other = n - r\r\n var choice = r\r\n if (choice < other) {\r\n choice = other\r\n other = r\r\n }\r\n for (var i = choice + 1; i <= n; i++) {\r\n pro *= i\r\n }\r\n return pro / Mexp.math.fact(other)\r\n },\r\n changeSign: function (x) {\r\n return -x\r\n },\r\n cos: function (x) {\r\n if (Mexp.math.isDegree) x = Mexp.math.toRadian(x)\r\n return Math.cos(x)\r\n },\r\n cosh: function (x) {\r\n return (Math.pow(Math.E, x) + Math.pow(Math.E, -1 * x)) / 2\r\n },\r\n div: function (a, b) {\r\n return a / b\r\n },\r\n fact: function (n) {\r\n if (n % 1 !== 0) return 'NaN'\r\n var pro = 1\r\n for (var i = 2; i <= n; i++) {\r\n pro *= i\r\n }\r\n return pro\r\n },\r\n inverse: function (x) {\r\n return 1 / x\r\n },\r\n log: function (i) {\r\n return Math.log(i) / Math.log(10)\r\n },\r\n mod: function (a, b) {\r\n return a % b\r\n },\r\n mul: function (a, b) {\r\n return a * b\r\n },\r\n P: function (n, r) {\r\n var pro = 1\r\n for (var i = Math.floor(n) - Math.floor(r) + 1; i <= Math.floor(n); i++) {\r\n pro *= i\r\n }\r\n return pro\r\n },\r\n Pi: function (low, high, ex) {\r\n var pro = 1\r\n for (var i = low; i <= high; i++) {\r\n pro *= Number(ex.postfixEval({\r\n n: i\r\n }))\r\n }\r\n return pro\r\n },\r\n pow10x: function (e) {\r\n var x = 1\r\n while (e--) {\r\n x *= 10\r\n }\r\n return x\r\n },\r\n sigma: function (low, high, ex) {\r\n var sum = 0\r\n for (var i = low; i <= high; i++) {\r\n sum += Number(ex.postfixEval({\r\n n: i\r\n }))\r\n }\r\n return sum\r\n },\r\n sin: function (x) {\r\n if (Mexp.math.isDegree) x = Mexp.math.toRadian(x)\r\n return Math.sin(x)\r\n },\r\n sinh: function (x) {\r\n return (Math.pow(Math.E, x) - Math.pow(Math.E, -1 * x)) / 2\r\n },\r\n sub: function (a, b) {\r\n return a - b\r\n },\r\n tan: function (x) {\r\n if (Mexp.math.isDegree) x = Mexp.math.toRadian(x)\r\n return Math.tan(x)\r\n },\r\n tanh: function (x) {\r\n return Mexp.sinha(x) / Mexp.cosha(x)\r\n },\r\n toRadian: function (x) {\r\n return x * Math.PI / 180\r\n },\r\n and: function (a, b) {\r\n return a & b\r\n }\r\n}\r\nMexp.Exception = function (message) {\r\n this.message = message\r\n}\r\nmodule.exports = Mexp\r\n","\r\nvar Mexp = require('./lexer.js');\r\n\r\nMexp.prototype.toPostfix = function () {\r\n\t'use strict';\r\n\tvar post = [], elem, popped, prep, pre, ele;\r\n\tvar stack = [{ value: \"(\", type: 4, pre: 0 }];\r\n\tvar arr = this.value;\r\n\tfor (var i = 1; i < arr.length; i++) {\r\n\t\tif (arr[i].type === 1 || arr[i].type === 3 || arr[i].type === 13) {\t//if token is number,constant,or n(which is also a special constant in our case)\r\n\t\t\tif (arr[i].type === 1)\r\n\t\t\t\tarr[i].value = Number(arr[i].value);\r\n\t\t\tpost.push(arr[i]);\r\n\t\t}\r\n\t\telse if (arr[i].type === 4) {\r\n\t\t\tstack.push(arr[i]);\r\n\t\t}\r\n\t\telse if (arr[i].type === 5) {\r\n\t\t\twhile ((popped = stack.pop()).type !== 4) {\r\n\t\t\t\tpost.push(popped);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (arr[i].type === 11) {\r\n\t\t\twhile ((popped = stack.pop()).type !== 4) {\r\n\t\t\t\tpost.push(popped);\r\n\t\t\t}\r\n\t\t\tstack.push(popped);\r\n\t\t}\r\n\t\telse {\r\n\t\t\telem = arr[i];\r\n\t\t\tpre = elem.pre;\r\n\t\t\tele = stack[stack.length - 1];\r\n\t\t\tprep = ele.pre;\r\n\t\t\tvar flag = ele.value == 'Math.pow' && elem.value == 'Math.pow';\r\n\t\t\tif (pre > prep) stack.push(elem);\r\n\t\t\telse {\r\n\t\t\t\twhile (prep >= pre && !flag || flag && pre < prep) {\r\n\t\t\t\t\tpopped = stack.pop();\r\n\t\t\t\t\tele = stack[stack.length - 1];\r\n\t\t\t\t\tpost.push(popped);\r\n\t\t\t\t\tprep = ele.pre;\r\n\t\t\t\t\tflag = elem.value == 'Math.pow' && ele.value == 'Math.pow';\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(elem);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn new Mexp(post);\r\n};\r\nmodule.exports = Mexp;","var Mexp=require('./postfix.js');\r\nMexp.prototype.postfixEval = function (UserDefined) {\r\n\t'use strict';\r\n\tUserDefined=UserDefined||{};\r\n\tUserDefined.PI=Math.PI;\r\n\tUserDefined.E=Math.E;\r\n\tvar stack=[],pop1,pop2,pop3;\r\n\tvar disp=[];\r\n\tvar temp='';\r\n\tvar arr=this.value;\r\n\tvar bool=(typeof UserDefined.n!==\"undefined\");\r\n\tfor(var i=0;i1) {\r\n\t\tthrow(new Mexp.Exception(\"Uncaught Syntax error\"));\r\n\t}\r\n\treturn stack[0].value>1000000000000000?\"Infinity\":parseFloat(stack[0].value.toFixed(15));\r\n};\r\nMexp.eval=function(str,tokens,obj){\r\n\tif (typeof tokens===\"undefined\") {\r\n\t\treturn this.lex(str).toPostfix().postfixEval();\r\n\t}\r\n\telse if (typeof obj===\"undefined\") {\r\n\t\tif (typeof tokens.length!==\"undefined\") \r\n\t\t\treturn this.lex(str,tokens).toPostfix().postfixEval();\r\n\t\telse\r\n\t\t\treturn this.lex(str).toPostfix().postfixEval(tokens);\r\n\t}\r\n\telse\r\n\t\treturn this.lex(str,tokens).toPostfix().postfixEval(obj);\r\n};\r\nmodule.exports=Mexp;","/**\n * @typedef {import('./lib/index.js').GetDefinition} GetDefinition\n */\n\nexport {definitions} from './lib/index.js'\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Definition} Definition\n */\n\n/**\n * @typedef {Root | Content} Node\n *\n * @callback GetDefinition\n * Get a definition by identifier.\n * @param {string | null | undefined} [identifier]\n * Identifier of definition.\n * @returns {Definition | null}\n * Definition corresponding to `identifier` or `null`.\n */\n\nimport {visit} from 'unist-util-visit'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Find definitions in `tree`.\n *\n * Uses CommonMark precedence, which means that earlier definitions are\n * preferred over duplicate later definitions.\n *\n * @param {Node} tree\n * Tree to check.\n * @returns {GetDefinition}\n * Getter.\n */\nexport function definitions(tree) {\n /** @type {Record} */\n const cache = Object.create(null)\n\n if (!tree || !tree.type) {\n throw new Error('mdast-util-definitions expected node')\n }\n\n visit(tree, 'definition', (definition) => {\n const id = clean(definition.identifier)\n if (id && !own.call(cache, id)) {\n cache[id] = definition\n }\n })\n\n return definition\n\n /** @type {GetDefinition} */\n function definition(identifier) {\n const id = clean(identifier)\n // To do: next major: return `undefined` when not found.\n return id && own.call(cache, id) ? cache[id] : null\n }\n}\n\n/**\n * @param {string | null | undefined} [value]\n * @returns {string}\n */\nfunction clean(value) {\n return String(value || '').toUpperCase()\n}\n","/**\n * @typedef Options Configuration.\n * @property {Test} [ignore] `unist-util-is` test used to assert parents\n *\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').Text} Text\n * @typedef {Content|Root} Node\n * @typedef {Extract} Parent\n *\n * @typedef {import('unist-util-visit-parents').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n *\n * @typedef RegExpMatchObject\n * @property {number} index\n * @property {string} input\n *\n * @typedef {string|RegExp} Find\n * @typedef {string|ReplaceFunction} Replace\n *\n * @typedef {[Find, Replace]} FindAndReplaceTuple\n * @typedef {Object.} FindAndReplaceSchema\n * @typedef {Array.} FindAndReplaceList\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * @typedef {Array.} Pairs\n */\n\n/**\n * @callback ReplaceFunction\n * @param {...any} parameters\n * @returns {Array.|PhrasingContent|string|false|undefined|null}\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\nconst own = {}.hasOwnProperty\n\n/**\n * @param tree mdast tree\n * @param find Value to find and remove. When `string`, escaped and made into a global `RegExp`\n * @param [replace] Value to insert.\n * * When `string`, turned into a Text node.\n * * When `Function`, called with the results of calling `RegExp.exec` as\n * arguments, in which case it can return a single or a list of `Node`,\n * a `string` (which is wrapped in a `Text` node), or `false` to not replace\n * @param [options] Configuration.\n */\nexport const findAndReplace =\n /**\n * @type {(\n * ((tree: Node, find: Find, replace?: Replace, options?: Options) => Node) &\n * ((tree: Node, schema: FindAndReplaceSchema|FindAndReplaceList, options?: Options) => Node)\n * )}\n **/\n (\n /**\n * @param {Node} tree\n * @param {Find|FindAndReplaceSchema|FindAndReplaceList} find\n * @param {Replace|Options} [replace]\n * @param {Options} [options]\n */\n function (tree, find, replace, options) {\n /** @type {Options|undefined} */\n let settings\n /** @type {FindAndReplaceSchema|FindAndReplaceList} */\n let schema\n\n if (typeof find === 'string' || find instanceof RegExp) {\n // @ts-expect-error don’t expect options twice.\n schema = [[find, replace]]\n settings = options\n } else {\n schema = find\n // @ts-expect-error don’t expect replace twice.\n settings = replace\n }\n\n if (!settings) {\n settings = {}\n }\n\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(schema)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n return tree\n\n /** @type {import('unist-util-visit-parents').Visitor} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parent|undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = /** @type {Parent} */ (parents[index])\n\n if (\n ignored(\n parent,\n // @ts-expect-error mdast vs. unist parent.\n grandparent ? grandparent.children.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, grandparent)\n }\n }\n\n /**\n * @param {Text} node\n * @param {Parent} parent\n * @returns {VisitorResult}\n */\n function handler(node, parent) {\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n // @ts-expect-error: TS is wrong, some of these children can be text.\n let index = parent.children.indexOf(node)\n /** @type {Array.} */\n let nodes = []\n /** @type {number|undefined} */\n let position\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n position = match.index\n // @ts-expect-error this is perfectly fine, typescript.\n let value = replace(...match, {\n index: match.index,\n input: match.input\n })\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n if (value !== false) {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (position === undefined) {\n nodes = [node]\n index--\n } else {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n }\n\n return index + nodes.length + 1\n }\n }\n )\n\n/**\n * @param {FindAndReplaceSchema|FindAndReplaceList} schema\n * @returns {Pairs}\n */\nfunction toPairs(schema) {\n /** @type {Pairs} */\n const result = []\n\n if (typeof schema !== 'object') {\n throw new TypeError('Expected array or object as schema')\n }\n\n if (Array.isArray(schema)) {\n let index = -1\n\n while (++index < schema.length) {\n result.push([\n toExpression(schema[index][0]),\n toFunction(schema[index][1])\n ])\n }\n } else {\n /** @type {string} */\n let key\n\n for (key in schema) {\n if (own.call(schema, key)) {\n result.push([toExpression(key), toFunction(schema[key])])\n }\n }\n }\n\n return result\n}\n\n/**\n * @param {Find} find\n * @returns {RegExp}\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * @param {Replace} replace\n * @returns {ReplaceFunction}\n */\nfunction toFunction(replace) {\n return typeof replace === 'function' ? replace : () => replace\n}\n","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return d\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n */\n\n/**\n * @typedef {CONTINUE|SKIP|EXIT} Action Union of the action types\n * @typedef {number} Index Move to the sibling at index next (after node itself is completely traversed). Useful if mutating the tree, such as removing the node the visitor is currently on, or any of its previous siblings (or next siblings, in case of reverse) Results less than 0 or greater than or equal to children.length stop traversing the parent\n * @typedef {[(Action|null|undefined|void)?, (Index|null|undefined)?]} ActionTuple List with one or two values, the first an action, the second an index.\n * @typedef {null|undefined|Action|Index|ActionTuple|void} VisitorResult Any value that can be returned from a visitor\n */\n\n/**\n * Invoked when a node (matching test, if given) is found.\n * Visitors are free to transform node.\n * They can also transform the parent of node (the last of ancestors).\n * Replacing node itself, if `SKIP` is not returned, still causes its descendants to be visited.\n * If adding or removing previous siblings (or next siblings, in case of reverse) of node,\n * visitor should return a new index (number) to specify the sibling to traverse after node is traversed.\n * Adding or removing next siblings of node (or previous siblings, in case of reverse)\n * is handled as expected without needing to return a new index.\n * Removing the children property of an ancestor still results in them being traversed.\n *\n * @template {Node} V\n * @callback Visitor\n * @param {V} node Found node\n * @param {Array.} ancestors Ancestors of node\n * @returns {VisitorResult}\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from './color.js'\n\n/**\n * Continue traversing as normal\n */\nexport const CONTINUE = true\n/**\n * Do not traverse this node’s children\n */\nexport const SKIP = 'skip'\n/**\n * Stop traversing immediately\n */\nexport const EXIT = false\n\nexport const visitParents =\n /**\n * @type {(\n * ((tree: Node, test: T['type']|Partial|import('unist-util-is').TestFunctionPredicate|Array.|import('unist-util-is').TestFunctionPredicate>, visitor: Visitor, reverse?: boolean) => void) &\n * ((tree: Node, test: Test, visitor: Visitor, reverse?: boolean) => void) &\n * ((tree: Node, visitor: Visitor, reverse?: boolean) => void)\n * )}\n */\n (\n /**\n * Visit children of tree which pass a test\n *\n * @param {Node} tree Abstract syntax tree to walk\n * @param {Test} test test Test node\n * @param {Visitor} visitor Function to run for each node\n * @param {boolean} [reverse] Fisit the tree in reverse, defaults to false\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-ignore no visitor given, so `visitor` is test.\n visitor = test\n test = null\n }\n\n var is = convert(test)\n var step = reverse ? -1 : 1\n\n factory(tree, null, [])()\n\n /**\n * @param {Node} node\n * @param {number?} index\n * @param {Array.} parents\n */\n function factory(node, index, parents) {\n /** @type {Object.} */\n var value = typeof node === 'object' && node !== null ? node : {}\n /** @type {string} */\n var name\n\n if (typeof value.type === 'string') {\n name =\n typeof value.tagName === 'string'\n ? value.tagName\n : typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' +\n color(value.type + (name ? '<' + name + '>' : '')) +\n ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {ActionTuple} */\n var result = []\n /** @type {ActionTuple} */\n var subresult\n /** @type {number} */\n var offset\n /** @type {Array.} */\n var grandparents\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 // @ts-ignore looks like a parent.\n offset = (reverse ? node.children.length : -1) + step\n // @ts-ignore looks like a parent.\n grandparents = parents.concat(node)\n\n // @ts-ignore looks like a parent.\n while (offset > -1 && offset < node.children.length) {\n subresult = factory(node.children[offset], offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n\n return result\n }\n }\n }\n )\n\n/**\n * @param {VisitorResult} value\n * @returns {ActionTuple}\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return [value]\n}\n","// Note: types exported from `index.d.ts`.\nexport {fromMarkdown} from './lib/index.js'\n","/**\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').HTML} HTML\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Root | Content} Node\n * @typedef {Extract} Parent\n *\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | undefined | null | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(key: Key) => CompileData[Key]} getData\n * Get data from the key/value store.\n * @property {(key: Key, value?: CompileData[Key]) => void} setData\n * Set data into the key/value store.\n * @property {(this: CompileContext) => void} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter\n * Enter a token.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit\n * Exit a token.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\n */\n\n// To do: micromark: create a registry of tokens?\n// To do: next major: don’t return given `Node` from `enter`.\n// To do: next major: remove setter/getter.\n\nimport {toString} from 'mdast-util-to-string'\nimport {parse} from 'micromark/lib/parse.js'\nimport {preprocess} from 'micromark/lib/preprocess.js'\nimport {postprocess} from 'micromark/lib/postprocess.js'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {decodeString} from 'micromark-util-decode-string'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {stringifyPosition} from 'unist-util-stringify-position'\nconst own = {}.hasOwnProperty\n\n/**\n * @param value\n * Markdown to parse.\n * @param encoding\n * Character encoding for when `value` is `Buffer`.\n * @param options\n * Configuration.\n * @returns\n * mdast tree.\n */\nexport const fromMarkdown =\n /**\n * @type {(\n * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &\n * ((value: Value, options?: Options | null | undefined) => Root)\n * )}\n */\n\n /**\n * @param {Value} value\n * @param {Encoding | Options | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n */\n function (value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n return compiler(options)(\n postprocess(\n parse(options).document().write(preprocess()(value, encoding, true))\n )\n )\n }\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n }\n configure(config, (options || {}).mdastExtensions || [])\n\n /** @type {CompileData} */\n const data = {}\n return compile\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n }\n /** @type {Omit} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n setData,\n getData\n }\n /** @type {Array} */\n const listStack = []\n let index = -1\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n const tail = listStack.pop()\n index = prepareList(events, tail, index)\n }\n }\n }\n index = -1\n while (++index < events.length) {\n const handler = config[events[index][0]]\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n Object.assign(\n {\n sliceSerialize: events[index][2].sliceSerialize\n },\n context\n ),\n events[index][1]\n )\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1]\n const handler = tail[1] || defaultOnError\n handler.call(context, undefined, tail[0])\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length > 0\n ? events[0][1].start\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n ),\n end: point(\n events.length > 0\n ? events[events.length - 2][1].end\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n )\n }\n\n // Call transforms.\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n return tree\n }\n\n /**\n * @param {Array} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1\n let containerBalance = -1\n let listSpread = false\n /** @type {Token | undefined} */\n let listItem\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number | undefined} */\n let firstBlankLineIndex\n /** @type {boolean | undefined} */\n let atMarker\n while (++index <= length) {\n const event = events[index]\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n let tailIndex = index\n lineIndex = undefined\n while (tailIndex--) {\n const tailEvent = events[tailIndex]\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = Object.assign(\n {},\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])\n index++\n length++\n }\n\n // Create a new list item.\n if (event[1].type === 'listItemPrefix') {\n listItem = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n }\n // @ts-expect-error: `listItem` is most definitely defined, TS...\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n events[start][1]._spread = listSpread\n return length\n }\n\n /**\n * Set data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @param {CompileData[Key]} [value]\n * New value.\n * @returns {void}\n * Nothing.\n */\n function setData(key, value) {\n data[key] = value\n }\n\n /**\n * Get data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @returns {CompileData[Key]}\n * Value.\n */\n function getData(key) {\n return data[key]\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Node} create\n * Create a node.\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @returns {void}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n })\n }\n\n /**\n * @template {Node} Kind\n * Node type.\n * @this {CompileContext}\n * Context.\n * @param {Kind} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {Kind}\n * The given node.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1]\n // @ts-expect-error: Assume `Node` can exist as a child of `parent`.\n parent.children.push(node)\n this.stack.push(node)\n this.tokenStack.push([token, errorHandler])\n // @ts-expect-error: `end` will be patched later.\n node.position = {\n start: point(token.start)\n }\n return node\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {Node}\n * The closed node.\n */\n function exit(token, onExitError) {\n const node = this.stack.pop()\n const open = this.tokenStack.pop()\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({\n start: token.start,\n end: token.end\n }) +\n '): it’s not open'\n )\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0])\n } else {\n const handler = open[1] || defaultOnError\n handler.call(this, token, open[0])\n }\n }\n node.position.end = point(token.end)\n return node\n }\n\n /**\n * @this {CompileContext}\n * @returns {string}\n */\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n const ancestor = this.stack[this.stack.length - 2]\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)\n setData('expectingFirstListItemValue')\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.lang = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.meta = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n setData('flowCodeInside')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1]\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length\n node.depth = depth\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1]\n node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1]\n let tail = node.children[node.children.length - 1]\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n // @ts-expect-error: we’ll add `end` later.\n tail.position = {\n start: point(token.start)\n }\n // @ts-expect-error: Assume `parent` accepts `text`.\n node.children.push(tail)\n }\n this.stack.push(tail)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1]\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n const tail = context.children[context.children.length - 1]\n tail.position.end = point(token.end)\n setData('atHardBreak')\n return\n }\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.includes(context.type)\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token)\n const ancestor = this.stack[this.stack.length - 2]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string)\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1]\n const value = this.resume()\n const node = this.stack[this.stack.length - 1]\n // Assume a reference.\n setData('inReference', true)\n if (node.type === 'link') {\n /** @type {Array} */\n // @ts-expect-error: Assume static phrasing content.\n const children = fragment.children\n node.children = children\n } else {\n node.alt = value\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n setData('inReference')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token)\n const type = getData('characterReferenceType')\n /** @type {string} */\n let value\n if (type) {\n value = decodeNumericCharacterReference(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n setData('characterReferenceType')\n } else {\n const result = decodeNamedCharacterReference(data)\n value = result\n }\n const tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = this.sliceSerialize(token)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n }\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n }\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n }\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n }\n }\n\n /** @returns {Heading} */\n function heading() {\n // @ts-expect-error `depth` will be set later.\n return {\n type: 'heading',\n depth: undefined,\n children: []\n }\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n }\n }\n\n /** @returns {HTML} */\n function html() {\n return {\n type: 'html',\n value: ''\n }\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n }\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n }\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n }\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n }\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n }\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Array>} extensions\n * @returns {void}\n */\nfunction configure(combined, extensions) {\n let index = -1\n while (++index < extensions.length) {\n const value = extensions[index]\n if (Array.isArray(value)) {\n configure(combined, value)\n } else {\n extension(combined, value)\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {void}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key\n for (key in extension) {\n if (own.call(extension, key)) {\n if (key === 'canContainEols') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'transforms') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'enter' || key === 'exit') {\n const right = extension[key]\n if (right) {\n Object.assign(combined[key], right)\n }\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error(\n 'Cannot close `' +\n left.type +\n '` (' +\n stringifyPosition({\n start: left.start,\n end: left.end\n }) +\n '): a different token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is open'\n )\n } else {\n throw new Error(\n 'Cannot close document, a token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is still open'\n )\n }\n}\n","/**\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Transform} FromMarkdownTransform\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown/lib/types.js').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction\n * @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject\n * @typedef {import('mdast-util-find-and-replace').PhrasingContent} PhrasingContent\n */\n\nimport {ccount} from 'ccount'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\n\nconst inConstruct = 'phrasing'\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n/** @type {FromMarkdownExtension} */\nexport const gfmAutolinkLiteralFromMarkdown = {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n}\n\n/** @type {ToMarkdownExtension} */\nexport const gfmAutolinkLiteralToMarkdown = {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {character: ':', before: '[ps]', after: '\\\\/', inConstruct, notInConstruct}\n ]\n}\n\n/** @type {FromMarkdownHandle} */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = /** @type {Link} */ (this.stack[this.stack.length - 1])\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/g, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {PhrasingContent} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[_-\\d]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string|undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n /** @type {number} */\n let closingParenIndex\n /** @type {number} */\n let openingParens\n /** @type {number} */\n let closingParens\n /** @type {string|undefined} */\n let trail\n\n if (trailExec) {\n url = url.slice(0, trailExec.index)\n trail = trailExec[0]\n closingParenIndex = trail.indexOf(')')\n openingParens = ccount(url, '(')\n closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n (!email || code !== 47)\n )\n}\n","/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Map} Map\n */\n\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {association} from 'mdast-util-to-markdown/lib/util/association.js'\nimport {containerFlow} from 'mdast-util-to-markdown/lib/util/container-flow.js'\nimport {indentLines} from 'mdast-util-to-markdown/lib/util/indent-lines.js'\nimport {safe} from 'mdast-util-to-markdown/lib/util/safe.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n/**\n * @returns {FromMarkdownExtension}\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteDefinition: enterFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteCallString: enterFootnoteCallString\n },\n exit: {\n gfmFootnoteDefinition: exitFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteCallString: exitFootnoteCallString\n }\n }\n\n /** @type {FromMarkdownHandle} */\n function enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n }\n\n /** @type {FromMarkdownHandle} */\n function enterFootnoteDefinitionLabelString() {\n this.buffer()\n }\n\n /** @type {FromMarkdownHandle} */\n function exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = /** @type {FootnoteDefinition} */ (\n this.stack[this.stack.length - 1]\n )\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /** @type {FromMarkdownHandle} */\n function exitFootnoteDefinition(token) {\n this.exit(token)\n }\n\n /** @type {FromMarkdownHandle} */\n function enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n }\n\n /** @type {FromMarkdownHandle} */\n function enterFootnoteCallString() {\n this.buffer()\n }\n\n /** @type {FromMarkdownHandle} */\n function exitFootnoteCallString(token) {\n const label = this.resume()\n const node = /** @type {FootnoteDefinition} */ (\n this.stack[this.stack.length - 1]\n )\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /** @type {FromMarkdownHandle} */\n function exitFootnoteCall(token) {\n this.exit(token)\n }\n}\n\n/**\n * @returns {ToMarkdownExtension}\n */\nexport function gfmFootnoteToMarkdown() {\n footnoteReference.peek = footnoteReferencePeek\n\n return {\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],\n handlers: {footnoteDefinition, footnoteReference}\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\n function footnoteReference(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n let value = tracker.move('[^')\n const exit = context.enter('footnoteReference')\n const subexit = context.enter('reference')\n value += tracker.move(\n safe(context, association(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n }\n\n /** @type {ToMarkdownHandle} */\n function footnoteReferencePeek() {\n return '['\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\n function footnoteDefinition(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n let value = tracker.move('[^')\n const exit = context.enter('footnoteDefinition')\n const subexit = context.enter('label')\n value += tracker.move(\n safe(context, association(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n value += tracker.move(\n ']:' + (node.children && node.children.length > 0 ? ' ' : '')\n )\n tracker.shift(4)\n value += tracker.move(\n indentLines(containerFlow(node, context, tracker.current()), map)\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' ') + line\n }\n\n return line\n }\n }\n}\n","/**\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {containerPhrasing} from 'mdast-util-to-markdown/lib/util/container-phrasing.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n/** @type {FromMarkdownExtension} */\nexport const gfmStrikethroughFromMarkdown = {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n}\n\n/** @type {ToMarkdownExtension} */\nexport const gfmStrikethroughToMarkdown = {\n unsafe: [{character: '~', inConstruct: 'phrasing'}],\n handlers: {delete: handleDelete}\n}\n\nhandleDelete.peek = peekDelete\n\n/** @type {FromMarkdownHandle} */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n const exit = context.enter('emphasis')\n let value = tracker.move('~~')\n value += containerPhrasing(node, context, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n","/**\n * @typedef {import('mdast').AlignType} AlignType\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('markdown-table').MarkdownTableOptions} MarkdownTableOptions\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Context} ToMarkdownContext\n * @typedef {import('mdast-util-to-markdown').SafeOptions} SafeOptions\n *\n * @typedef Options\n * @property {boolean} [tableCellPadding=true]\n * @property {boolean} [tablePipeAlign=true]\n * @property {MarkdownTableOptions['stringLength']} [stringLength]\n */\n\nimport {containerPhrasing} from 'mdast-util-to-markdown/lib/util/container-phrasing.js'\nimport {inlineCode} from 'mdast-util-to-markdown/lib/handle/inline-code.js'\nimport {markdownTable} from 'markdown-table'\n\n/** @type {FromMarkdownExtension} */\nexport const gfmTableFromMarkdown = {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n}\n\n/** @type {FromMarkdownHandle} */\nfunction enterTable(token) {\n /** @type {Array<'left'|'right'|'center'|'none'>} */\n // @ts-expect-error: `align` is custom.\n const align = token._align\n this.enter(\n {\n type: 'table',\n align: align.map((d) => (d === 'none' ? null : d)),\n children: []\n },\n token\n )\n this.setData('inTable', true)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitTable(token) {\n this.exit(token)\n this.setData('inTable')\n}\n\n/** @type {FromMarkdownHandle} */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exit(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownHandle} */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/** @type {FromMarkdownHandle} */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.getData('inTable')) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = /** @type {InlineCode} */ (this.stack[this.stack.length - 1])\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * @param {Options} [options]\n * @returns {ToMarkdownExtension}\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // \n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n table: handleTable,\n tableRow: handleTableRow,\n tableCell: handleTableCell,\n inlineCode: inlineCodeWithTable\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, context, safeOptions) {\n return serializeData(\n handleTableAsData(node, context, safeOptions),\n // @ts-expect-error: fixed in `markdown-table@3.0.1`.\n node.align\n )\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, context, safeOptions) {\n const row = handleTableRowAsData(node, context, safeOptions)\n // `markdown-table` will always add an align row\n const value = serializeData([row])\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, context, safeOptions) {\n const exit = context.enter('tableCell')\n const subexit = context.enter('phrasing')\n const value = containerPhrasing(node, context, {\n ...safeOptions,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array>} matrix\n * @param {Array} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n alignDelimiters,\n padding,\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {ToMarkdownContext} context\n * @param {SafeOptions} safeOptions\n */\n function handleTableAsData(node, context, safeOptions) {\n const children = node.children\n let index = -1\n /** @type {Array>} */\n const result = []\n const subexit = context.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(\n children[index],\n context,\n safeOptions\n )\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {ToMarkdownContext} context\n * @param {SafeOptions} safeOptions\n */\n function handleTableRowAsData(node, context, safeOptions) {\n const children = node.children\n let index = -1\n /** @type {Array} */\n const result = []\n const subexit = context.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(\n children[index],\n node,\n context,\n safeOptions\n )\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, context) {\n let value = inlineCode(node, parent, context)\n\n if (context.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n","/**\n * @typedef {Extract} Parent\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').BlockContent} BlockContent\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {listItem} from 'mdast-util-to-markdown/lib/handle/list-item.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n/** @type {FromMarkdownExtension} */\nexport const gfmTaskListItemFromMarkdown = {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n}\n\n/** @type {ToMarkdownExtension} */\nexport const gfmTaskListItemToMarkdown = {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitCheck(token) {\n const node = /** @type {ListItem} */ (this.stack[this.stack.length - 2])\n // We’re always in a paragraph, in a list item.\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/** @type {FromMarkdownHandle} */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = /** @type {Parent} */ (this.stack[this.stack.length - 2])\n const node = /** @type {Paragraph} */ (this.stack[this.stack.length - 1])\n const siblings = parent.children\n const head = node.children[0]\n let index = -1\n /** @type {Paragraph|undefined} */\n let firstParaghraph\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean' &&\n head &&\n head.type === 'text'\n ) {\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, context, safeOptions) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = track(safeOptions)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = listItem(node, parent, context, {\n ...safeOptions,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n","/**\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n *\n * @typedef {import('mdast-util-gfm-table').Options} Options\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * @returns {Array.}\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown,\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown,\n gfmTableFromMarkdown,\n gfmTaskListItemFromMarkdown\n ]\n}\n\n/**\n * @param {Options} [options]\n * @returns {ToMarkdownExtension}\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown,\n gfmFootnoteToMarkdown(),\n gfmStrikethroughToMarkdown,\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown\n ]\n }\n}\n","// Note: types exposed from `index.d.ts`.\nexport {handlers as defaultHandlers} from './lib/handlers/index.js'\n// To do: next major: remove.\nexport {one, all} from './lib/state.js'\nexport {toHast} from './lib/index.js'\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\nexport function footer(state) {\n /** @type {Array} */\n const listItems = []\n let index = -1\n\n while (++index < state.footnoteOrder.length) {\n const def = state.footnoteById[state.footnoteOrder[index]]\n\n if (!def) {\n continue\n }\n\n const content = state.all(def)\n const id = String(def.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let referenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n\n while (++referenceIndex <= state.footnoteCounts[id]) {\n /** @type {Element} */\n const backReference = {\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (referenceIndex > 1 ? '-' + referenceIndex : ''),\n dataFootnoteBackref: true,\n className: ['data-footnote-backref'],\n ariaLabel: state.footnoteBackLabel\n },\n children: [{type: 'text', value: '↩'}]\n }\n\n if (referenceIndex > 1) {\n backReference.children.push({\n type: 'element',\n tagName: 'sup',\n children: [{type: 'text', value: String(referenceIndex)}]\n })\n }\n\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n backReferences.push(backReference)\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: state.clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(def, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: state.footnoteLabelTagName,\n properties: {\n // To do: use structured clone.\n ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: state.footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n // To do: next major, use `node.lang` w/o regex, the splitting’s been going\n // on for years in remark now.\n const lang = node.lang ? node.lang.match(/^[^ \\t]+(?=[ \\t]|$)/) : null\n /** @type {Properties} */\n const properties = {}\n\n if (lang) {\n properties.className = ['language-' + lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
    `.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('hast').Element} Element\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {FootnoteReference} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnoteReference(state, node) {\n  const id = String(node.identifier).toUpperCase()\n  const safeId = normalizeUri(id.toLowerCase())\n  const index = state.footnoteOrder.indexOf(id)\n  /** @type {number} */\n  let counter\n\n  if (index === -1) {\n    state.footnoteOrder.push(id)\n    state.footnoteCounts[id] = 1\n    counter = state.footnoteOrder.length\n  } else {\n    state.footnoteCounts[id]++\n    counter = index + 1\n  }\n\n  const reuseCounter = state.footnoteCounts[id]\n\n  /** @type {Element} */\n  const link = {\n    type: 'element',\n    tagName: 'a',\n    properties: {\n      href: '#' + state.clobberPrefix + 'fn-' + safeId,\n      id:\n        state.clobberPrefix +\n        'fnref-' +\n        safeId +\n        (reuseCounter > 1 ? '-' + reuseCounter : ''),\n      dataFootnoteRef: true,\n      ariaDescribedBy: ['footnote-label']\n    },\n    children: [{type: 'text', value: String(counter)}]\n  }\n  state.patch(node, link)\n\n  /** @type {Element} */\n  const sup = {\n    type: 'element',\n    tagName: 'sup',\n    properties: {},\n    children: [link]\n  }\n  state.patch(node, sup)\n  return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Footnote} Footnote\n * @typedef {import('../state.js').State} State\n */\n\nimport {footnoteReference} from './footnote-reference.js'\n\n// To do: when both:\n// * \n// * \n// …are archived, remove this (also from mdast).\n// These inline notes are not used in GFM.\n\n/**\n * Turn an mdast `footnote` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Footnote} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnote(state, node) {\n  const footnoteById = state.footnoteById\n  let no = 1\n\n  while (no in footnoteById) no++\n\n  const identifier = String(no)\n\n  footnoteById[identifier] = {\n    type: 'footnoteDefinition',\n    identifier,\n    children: [{type: 'paragraph', children: node.children}],\n    position: node.position\n  }\n\n  return footnoteReference(state, {\n    type: 'footnoteReference',\n    identifier,\n    position: node.position\n  })\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').HTML} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Raw | Element | null}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.dangerous) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  // To do: next major: return `undefined`.\n  return null\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(def.url || ''), alt: node.alt}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {footnote} from './footnote.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n */\nexport const handlers = {\n  blockquote,\n  break: hardBreak,\n  code,\n  delete: strikethrough,\n  emphasis,\n  footnoteReference,\n  footnote,\n  heading,\n  html,\n  imageReference,\n  image,\n  inlineCode,\n  linkReference,\n  link,\n  listItem,\n  list,\n  paragraph,\n  root,\n  strong,\n  table,\n  tableCell,\n  tableRow,\n  text,\n  thematicBreak,\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  // To do: next major: return `undefined`.\n  return null\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(def.url || '')}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ListItem} node\n *   mdast node.\n * @param {Parents | null | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function listItem(state, node, parent) {\n  const results = state.all(node)\n  const loose = parent ? listLoose(parent) : listItemLoose(node)\n  /** @type {Properties} */\n  const properties = {}\n  /** @type {Array} */\n  const children = []\n\n  if (typeof node.checked === 'boolean') {\n    const head = results[0]\n    /** @type {Element} */\n    let paragraph\n\n    if (head && head.type === 'element' && head.tagName === 'p') {\n      paragraph = head\n    } else {\n      paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n      results.unshift(paragraph)\n    }\n\n    if (paragraph.children.length > 0) {\n      paragraph.children.unshift({type: 'text', value: ' '})\n    }\n\n    paragraph.children.unshift({\n      type: 'element',\n      tagName: 'input',\n      properties: {type: 'checkbox', checked: node.checked, disabled: true},\n      children: []\n    })\n\n    // According to github-markdown-css, this class hides bullet.\n    // See: .\n    properties.className = ['task-list-item']\n  }\n\n  let index = -1\n\n  while (++index < results.length) {\n    const child = results[index]\n\n    // Add eols before nodes, except if this is a loose, first paragraph.\n    if (\n      loose ||\n      index !== 0 ||\n      child.type !== 'element' ||\n      child.tagName !== 'p'\n    ) {\n      children.push({type: 'text', value: '\\n'})\n    }\n\n    if (child.type === 'element' && child.tagName === 'p' && !loose) {\n      children.push(...child.children)\n    } else {\n      children.push(child)\n    }\n  }\n\n  const tail = results[results.length - 1]\n\n  // Add a final eol.\n  if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n    children.push({type: 'text', value: '\\n'})\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'li', properties, children}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n  let loose = false\n  if (node.type === 'list') {\n    loose = node.spread || false\n    const children = node.children\n    let index = -1\n\n    while (!loose && ++index < children.length) {\n      loose = listItemLoose(children[index])\n    }\n  }\n\n  return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n  const spread = node.spread\n\n  return spread === undefined || spread === null\n    ? node.children.length > 1\n    : spread\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastRoot | HastElement}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | null | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(node, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointStart, pointEnd} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start.line && end.line) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastText | HastElement}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Root} HastRoot\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Root} MdastRoot\n *\n * @typedef {import('./state.js').Options} Options\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n */\n\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * *   `hast-util-to-html` also has an option `allowDangerousHtml` which will\n *     output the raw HTML.\n *     This is typically discouraged as noted by the option name but is useful\n *     if you completely trust authors\n * *   `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n *     into standard hast nodes (`element`, `text`, etc).\n *     This is a heavy task as it needs a full HTML parser, but it is the only\n *     way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n * 

    \n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
    ` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {HastNodes | null | undefined}\n * hast tree.\n */\n// To do: next major: always return a single `root`.\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, null)\n const foot = footer(state)\n\n if (foot) {\n // @ts-expect-error If there’s a footer, there were definitions, meaning block\n // content.\n // So assume `node` is a parent node.\n node.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n // To do: next major: always return root?\n return Array.isArray(node) ? {type: 'root', children: node} : node\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Reference} Reference\n * @typedef {import('mdast').Root} Root\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} References\n */\n\n// To do: next major: always return array.\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {References} node\n * Reference node (image, link).\n * @returns {ElementContent | Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\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 {type: 'text', value: '![' + node.alt + suffix}\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Parent} MdastParent\n * @typedef {import('mdast').Root} MdastRoot\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n * @typedef {Extract} MdastParents\n *\n * @typedef EmbeddedHastFields\n * hast fields.\n * @property {string | null | undefined} [hName]\n * Generate a specific element with this tag name instead.\n * @property {HastProperties | null | undefined} [hProperties]\n * Generate an element with these properties instead.\n * @property {Array | null | undefined} [hChildren]\n * Generate an element with this content instead.\n *\n * @typedef {Record & EmbeddedHastFields} MdastData\n * mdast data with embedded hast fields.\n *\n * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData\n * mdast node with embedded hast data.\n *\n * @typedef PointLike\n * Point-like value.\n * @property {number | null | undefined} [line]\n * Line.\n * @property {number | null | undefined} [column]\n * Column.\n * @property {number | null | undefined} [offset]\n * Offset.\n *\n * @typedef PositionLike\n * Position-like value.\n * @property {PointLike | null | undefined} [start]\n * Point-like value.\n * @property {PointLike | null | undefined} [end]\n * Point-like value.\n *\n * @callback Handler\n * Handle a node.\n * @param {State} state\n * Info passed around.\n * @param {any} node\n * mdast node to handle.\n * @param {MdastParents | null | undefined} parent\n * Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n * hast node.\n *\n * @callback HFunctionProps\n * Signature of `state` for when props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n * mdast node or unist position.\n * @param {string} tagName\n * HTML tag name.\n * @param {HastProperties} props\n * Properties.\n * @param {Array | null | undefined} [children]\n * hast content.\n * @returns {HastElement}\n * Compiled element.\n *\n * @callback HFunctionNoProps\n * Signature of `state` for when no props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n * mdast node or unist position.\n * @param {string} tagName\n * HTML tag name.\n * @param {Array | null | undefined} [children]\n * hast content.\n * @returns {HastElement}\n * Compiled element.\n *\n * @typedef HFields\n * Info on `state`.\n * @property {boolean} dangerous\n * Whether HTML is allowed.\n * @property {string} clobberPrefix\n * Prefix to use to prevent DOM clobbering.\n * @property {string} footnoteLabel\n * Label to use to introduce the footnote section.\n * @property {string} footnoteLabelTagName\n * HTML used for the footnote label.\n * @property {HastProperties} footnoteLabelProperties\n * Properties on the HTML tag used for the footnote label.\n * @property {string} footnoteBackLabel\n * Label to use from backreferences back to their footnote call.\n * @property {(identifier: string) => MdastDefinition | null} definition\n * Definition cache.\n * @property {Record} footnoteById\n * Footnote definitions by their identifier.\n * @property {Array} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Record} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {Handler} unknownHandler\n * Handler for any none not in `passThrough` or otherwise handled.\n * @property {(from: MdastNodes, node: HastNodes) => void} patch\n * Copy a node’s positional info.\n * @property {(from: MdastNodes, to: Type) => Type | HastElement} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array | null | undefined} one\n * Transform an mdast node to hast.\n * @property {(node: MdastNodes) => Array} all\n * Transform the children of an mdast parent to hast.\n * @property {(nodes: Array, loose?: boolean | null | undefined) => Array} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment\n * Like `state` but lower-level and usable on non-elements.\n * Deprecated: use `patch` and `applyData`.\n * @property {Array} passThrough\n * List of node types to pass through untouched (except for their children).\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n * Whether to persist raw HTML in markdown in the hast tree.\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n * Prefix to use before the `id` attribute on footnotes to prevent it from\n * *clobbering*.\n * @property {string | null | undefined} [footnoteBackLabel='Back to content']\n * Label to use from backreferences back to their footnote call (affects\n * screen readers).\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Label to use for the footnotes section (affects screen readers).\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (note that `id: 'footnote-label'`\n * is always added as footnote calls use it with `aria-describedby` to\n * provide an accessible label).\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * Tag name to use for the footnote label.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes.\n * @property {Array | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes.\n *\n * @typedef {Record} Handlers\n * Handle nodes.\n *\n * @typedef {HFunctionProps & HFunctionNoProps & HFields} State\n * Info passed around.\n */\n\nimport {visit} from 'unist-util-visit'\nimport {position, pointStart, pointEnd} from 'unist-util-position'\nimport {generated} from 'unist-util-generated'\nimport {definitions} from 'mdast-util-definitions'\nimport {handlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || {}\n const dangerous = settings.allowDangerousHtml || false\n /** @type {Record} */\n const footnoteById = {}\n\n // To do: next major: add `options` to state, remove:\n // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,\n // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,\n // `unknownHandler`.\n\n // To do: next major: move to `state.options.allowDangerousHtml`.\n state.dangerous = dangerous\n // To do: next major: move to `state.options`.\n state.clobberPrefix =\n settings.clobberPrefix === undefined || settings.clobberPrefix === null\n ? 'user-content-'\n : settings.clobberPrefix\n // To do: next major: move to `state.options`.\n state.footnoteLabel = settings.footnoteLabel || 'Footnotes'\n // To do: next major: move to `state.options`.\n state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'\n // To do: next major: move to `state.options`.\n state.footnoteLabelProperties = settings.footnoteLabelProperties || {\n className: ['sr-only']\n }\n // To do: next major: move to `state.options`.\n state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'\n // To do: next major: move to `state.options`.\n state.unknownHandler = settings.unknownHandler\n // To do: next major: move to `state.options`.\n state.passThrough = settings.passThrough\n\n state.handlers = {...handlers, ...settings.handlers}\n\n // To do: next major: replace utility with `definitionById` object, so we\n // only walk once (as we need footnotes too).\n state.definition = definitions(tree)\n state.footnoteById = footnoteById\n /** @type {Array} */\n state.footnoteOrder = []\n /** @type {Record} */\n state.footnoteCounts = {}\n\n state.patch = patch\n state.applyData = applyData\n state.one = oneBound\n state.all = allBound\n state.wrap = wrap\n // To do: next major: remove `augment`.\n state.augment = augment\n\n visit(tree, 'footnoteDefinition', (definition) => {\n const id = String(definition.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: .\n if (!own.call(footnoteById, id)) {\n footnoteById[id] = definition\n }\n })\n\n // @ts-expect-error Hush, it’s fine!\n return state\n\n /**\n * Finalise the created `right`, a hast node, from `left`, an mdast node.\n *\n * @param {MdastNodeWithData | PositionLike | null | undefined} left\n * @param {HastElementContent} right\n * @returns {HastElementContent}\n */\n /* c8 ignore start */\n // To do: next major: remove.\n function augment(left, right) {\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (left && 'data' in left && left.data) {\n /** @type {MdastData} */\n const data = left.data\n\n if (data.hName) {\n if (right.type !== 'element') {\n right = {\n type: 'element',\n tagName: '',\n properties: {},\n children: []\n }\n }\n\n right.tagName = data.hName\n }\n\n if (right.type === 'element' && data.hProperties) {\n right.properties = {...right.properties, ...data.hProperties}\n }\n\n if ('children' in right && right.children && data.hChildren) {\n right.children = data.hChildren\n }\n }\n\n if (left) {\n const ctx = 'type' in left ? left : {position: left}\n\n if (!generated(ctx)) {\n // @ts-expect-error: fine.\n right.position = {start: pointStart(ctx), end: pointEnd(ctx)}\n }\n }\n\n return right\n }\n /* c8 ignore stop */\n\n /**\n * Create an element for `node`.\n *\n * @type {HFunctionProps}\n */\n /* c8 ignore start */\n // To do: next major: remove.\n function state(node, tagName, props, children) {\n if (Array.isArray(props)) {\n children = props\n props = {}\n }\n\n // @ts-expect-error augmenting an element yields an element.\n return augment(node, {\n type: 'element',\n tagName,\n properties: props || {},\n children: children || []\n })\n }\n /* c8 ignore stop */\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | null | undefined} [parent]\n * Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n * Resulting hast node.\n */\n function oneBound(node, parent) {\n // @ts-expect-error: that’s a state :)\n return one(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array}\n * Resulting hast nodes.\n */\n function allBound(parent) {\n // @ts-expect-error: that’s a state :)\n return all(state, parent)\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {void}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {Type | HastElement}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {Type | HastElement} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent is likely to keep the content around (otherwise: pass\n // `hChildren`).\n else {\n result = {\n type: 'element',\n tagName: hName,\n properties: {},\n children: []\n }\n\n // To do: next major: take the children from the `root`, or inject the\n // raw/text/comment or so into the element?\n // if ('children' in node) {\n // // @ts-expect-error: assume `children` are allowed in elements.\n // result.children = node.children\n // } else {\n // // @ts-expect-error: assume `node` is allowed in elements.\n // result.children.push(node)\n // }\n }\n }\n\n if (result.type === 'element' && hProperties) {\n result.properties = {...result.properties, ...hProperties}\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n // @ts-expect-error: assume valid children are defined.\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an mdast node into a hast node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | null | undefined} [parent]\n * Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n * Resulting hast node.\n */\n// To do: next major: do not expose, keep bound.\nexport function one(state, node, parent) {\n const type = node && node.type\n\n // Fail on non-nodes.\n if (!type) {\n throw new Error('Expected node, got `' + node + '`')\n }\n\n if (own.call(state.handlers, type)) {\n return state.handlers[type](state, node, parent)\n }\n\n if (state.passThrough && state.passThrough.includes(type)) {\n // To do: next major: deep clone.\n // @ts-expect-error: types of passed through nodes are expected to be added manually.\n return 'children' in node ? {...node, children: all(state, node)} : node\n }\n\n if (state.unknownHandler) {\n return state.unknownHandler(state, node, parent)\n }\n\n return defaultUnknownHandler(state, node)\n}\n\n/**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array}\n * Resulting hast nodes.\n */\n// To do: next major: do not expose, keep bound.\nexport function all(state, parent) {\n /** @type {Array} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = one(state, nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = result.value.replace(/^\\s+/, '')\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = head.value.replace(/^\\s+/, '')\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastText | HastElement}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastText | HastElement} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: all(state, node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastContent} Type\n * Node type.\n * @param {Array} nodes\n * List of nodes to wrap.\n * @param {boolean | null | undefined} [loose=false]\n * Whether to add line endings at start and end.\n * @returns {Array}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n","/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../types.js').Handle} Handle\n */\n\nimport {patternCompile} from '../util/pattern-compile.js'\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @type {Handle}\n * @param {InlineCode} node\n */\nexport function inlineCode(node, _, context) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < context.unsafe.length) {\n const pattern = context.unsafe[index]\n const expression = patternCompile(pattern)\n /** @type {RegExpExecArray|null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @type {Handle}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n","/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').List} List\n * @typedef {import('../util/indent-lines.js').Map} Map\n * @typedef {import('../types.js').Options} Options\n * @typedef {import('../types.js').Handle} Handle\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\nimport {containerFlow} from '../util/container-flow.js'\nimport {indentLines} from '../util/indent-lines.js'\nimport {track} from '../util/track.js'\n\n/**\n * @type {Handle}\n * @param {ListItem} node\n */\nexport function listItem(node, parent, context, safeOptions) {\n const listItemIndent = checkListItemIndent(context)\n let bullet = context.bulletCurrent || checkBullet(context)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (context.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = track(safeOptions)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = context.enter('listItem')\n const value = indentLines(\n containerFlow(node, context, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n","/**\n * @typedef {import('mdast').Association} Association\n */\n\nimport {decodeString} from 'micromark-util-decode-string'\n\n/**\n * The `label` of an association is the string value: character escapes and\n * references work, and casing is intact.\n * The `identifier` is used to match one association to another: controversially,\n * character escapes and references don’t work in this matching: `©` does\n * not match `©`, and `\\+` does not match `+`.\n * But casing is ignored (and whitespace) is trimmed and collapsed: ` A\\nb`\n * matches `a b`.\n * So, we do prefer the label when figuring out how we’re going to serialize:\n * it has whitespace, casing, and we can ignore most useless character escapes\n * and all character references.\n *\n * @param {Association} node\n * @returns {string}\n */\nexport function association(node) {\n if (node.label || !node.identifier) {\n return node.label || ''\n }\n\n return decodeString(node.identifier)\n}\n","/**\n * @typedef {import('../types.js').Context} Context\n * @typedef {import('../types.js').Options} Options\n */\n\n/**\n * @param {Context} context\n * @returns {Exclude}\n */\nexport function checkBullet(context) {\n const marker = context.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('../types.js').Context} Context\n * @typedef {import('../types.js').Options} Options\n */\n\n/**\n * @param {Context} context\n * @returns {Exclude}\n */\nexport function checkListItemIndent(context) {\n const style = context.options.listItemIndent || 'tab'\n\n // To do: remove in a major.\n // @ts-expect-error: deprecated.\n if (style === 1 || style === '1') {\n return 'one'\n }\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n","/**\n * @typedef {import('../types.js').Node} Node\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').Join} Join\n * @typedef {import('../types.js').Context} Context\n * @typedef {import('../types.js').TrackFields} TrackFields\n */\n\nimport {track} from './track.js'\n\n/**\n * @param {Parent} parent\n * @param {Context} context\n * @param {TrackFields} safeOptions\n * @returns {string}\n */\nexport function containerFlow(parent, context, safeOptions) {\n const indexStack = context.indexStack\n const children = parent.children || []\n const tracker = track(safeOptions)\n /** @type {Array} */\n const results = []\n let index = -1\n\n indexStack.push(-1)\n\n while (++index < children.length) {\n const child = children[index]\n\n indexStack[indexStack.length - 1] = index\n\n results.push(\n tracker.move(\n context.handle(child, parent, context, {\n before: '\\n',\n after: '\\n',\n ...tracker.current()\n })\n )\n )\n\n if (child.type !== 'list') {\n context.bulletLastUsed = undefined\n }\n\n if (index < children.length - 1) {\n results.push(tracker.move(between(child, children[index + 1])))\n }\n }\n\n indexStack.pop()\n\n return results.join('')\n\n /**\n * @param {Node} left\n * @param {Node} right\n * @returns {string}\n */\n function between(left, right) {\n let index = context.join.length\n\n while (index--) {\n const result = context.join[index](left, right, parent, context)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return '\\n'.repeat(1 + result)\n }\n\n if (result === false) {\n return '\\n\\n\\n\\n'\n }\n }\n\n return '\\n\\n'\n }\n}\n","/**\n * @typedef {import('../types.js').Node} Node\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').SafeOptions} SafeOptions\n * @typedef {import('../types.js').Context} Context\n */\n\nimport {track} from './track.js'\n\n/**\n * @param {Parent} parent\n * @param {Context} context\n * @param {SafeOptions} safeOptions\n * @returns {string}\n */\nexport function containerPhrasing(parent, context, safeOptions) {\n const indexStack = context.indexStack\n const children = parent.children || []\n /** @type {Array} */\n const results = []\n let index = -1\n let before = safeOptions.before\n\n indexStack.push(-1)\n let tracker = track(safeOptions)\n\n while (++index < children.length) {\n const child = children[index]\n /** @type {string} */\n let after\n\n indexStack[indexStack.length - 1] = index\n\n if (index + 1 < children.length) {\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n let handle = context.handle.handlers[children[index + 1].type]\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, context, {\n before: '',\n after: '',\n ...tracker.current()\n }).charAt(0)\n : ''\n } else {\n after = safeOptions.after\n }\n\n // In some cases, html (text) can be found in phrasing right after an eol.\n // When we’d serialize that, in most cases that would be seen as html\n // (flow).\n // As we can’t escape or so to prevent it from happening, we take a somewhat\n // reasonable approach: replace that eol with a space.\n // See: \n if (\n results.length > 0 &&\n (before === '\\r' || before === '\\n') &&\n child.type === 'html'\n ) {\n results[results.length - 1] = results[results.length - 1].replace(\n /(\\r?\\n|\\r)$/,\n ' '\n )\n before = ' '\n\n // To do: does this work to reset tracker?\n tracker = track(safeOptions)\n tracker.move(results.join(''))\n }\n\n results.push(\n tracker.move(\n context.handle(child, parent, context, {\n ...tracker.current(),\n before,\n after\n })\n )\n )\n\n before = results[results.length - 1].slice(-1)\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n","/**\n * @callback Map\n * @param {string} value\n * @param {number} line\n * @param {boolean} blank\n * @returns {string}\n */\n\nconst eol = /\\r?\\n|\\r/g\n\n/**\n * @param {string} value\n * @param {Map} map\n * @returns {string}\n */\nexport function indentLines(value, map) {\n /** @type {Array} */\n const result = []\n let start = 0\n let line = 0\n /** @type {RegExpExecArray|null} */\n let match\n\n while ((match = eol.exec(value))) {\n one(value.slice(start, match.index))\n result.push(match[0])\n start = match.index + match[0].length\n line++\n }\n\n one(value.slice(start))\n\n return result.join('')\n\n /**\n * @param {string} value\n */\n function one(value) {\n result.push(map(value, line, !value))\n }\n}\n","/**\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Unsafe} pattern\n * @returns {RegExp}\n */\nexport function patternCompile(pattern) {\n if (!pattern._compiled) {\n const before =\n (pattern.atBreak ? '[\\\\r\\\\n][\\\\t ]*' : '') +\n (pattern.before ? '(?:' + pattern.before + ')' : '')\n\n pattern._compiled = new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (pattern.after ? '(?:' + pattern.after + ')' : ''),\n 'g'\n )\n }\n\n return pattern._compiled\n}\n","/**\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Array} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (!list) {\n return none\n }\n\n if (typeof list === 'string') {\n list = [list]\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n","/**\n * @typedef {import('../types.js').Context} Context\n * @typedef {import('../types.js').SafeOptions} SafeOptions\n */\n\nimport {patternCompile} from './pattern-compile.js'\nimport {patternInScope} from './pattern-in-scope.js'\n\n/**\n * @param {Context} context\n * @param {string|null|undefined} input\n * @param {SafeOptions & {encode?: Array}} config\n * @returns {string}\n */\nexport function safe(context, input, config) {\n const value = (config.before || '') + (input || '') + (config.after || '')\n /** @type {Array} */\n const positions = []\n /** @type {Array} */\n const result = []\n /** @type {Record} */\n const infos = {}\n let index = -1\n\n while (++index < context.unsafe.length) {\n const pattern = context.unsafe[index]\n\n if (!patternInScope(context.stack, pattern)) {\n continue\n }\n\n const expression = patternCompile(pattern)\n /** @type {RegExpExecArray|null} */\n let match\n\n while ((match = expression.exec(value))) {\n const before = 'before' in pattern || Boolean(pattern.atBreak)\n const after = 'after' in pattern\n const position = match.index + (before ? match[1].length : 0)\n\n if (positions.includes(position)) {\n if (infos[position].before && !before) {\n infos[position].before = false\n }\n\n if (infos[position].after && !after) {\n infos[position].after = false\n }\n } else {\n positions.push(position)\n infos[position] = {before, after}\n }\n }\n }\n\n positions.sort(numerical)\n\n let start = config.before ? config.before.length : 0\n const end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n const position = positions[index]\n\n // Character before or after matched:\n if (position < start || position >= end) {\n continue\n }\n\n // If this character is supposed to be escaped because it has a condition on\n // the next character, and the next character is definitly being escaped,\n // then skip this escape.\n if (\n (position + 1 < end &&\n positions[index + 1] === position + 1 &&\n infos[position].after &&\n !infos[position + 1].before &&\n !infos[position + 1].after) ||\n (positions[index - 1] === position - 1 &&\n infos[position].before &&\n !infos[position - 1].before &&\n !infos[position - 1].after)\n ) {\n continue\n }\n\n if (start !== position) {\n // If we have to use a character reference, an ampersand would be more\n // correct, but as backslashes only care about punctuation, either will\n // do the trick\n result.push(escapeBackslashes(value.slice(start, position), '\\\\'))\n }\n\n start = position\n\n if (\n /[!-/:-@[-`{-~]/.test(value.charAt(position)) &&\n (!config.encode || !config.encode.includes(value.charAt(position)))\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(\n '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'\n )\n start++\n }\n }\n\n result.push(escapeBackslashes(value.slice(start, end), config.after))\n\n return result.join('')\n}\n\n/**\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction numerical(a, b) {\n return a - b\n}\n\n/**\n * @param {string} value\n * @param {string} after\n * @returns {string}\n */\nfunction escapeBackslashes(value, after) {\n const expression = /\\\\(?=[!-/:-@[-`{-~])/g\n /** @type {Array} */\n const positions = []\n /** @type {Array} */\n const results = []\n const whole = value + after\n let index = -1\n let start = 0\n /** @type {RegExpExecArray|null} */\n let match\n\n while ((match = expression.exec(whole))) {\n positions.push(match.index)\n }\n\n while (++index < positions.length) {\n if (start !== positions[index]) {\n results.push(value.slice(start, positions[index]))\n }\n\n results.push('\\\\')\n start = positions[index]\n }\n\n results.push(value.slice(start))\n\n return results.join('')\n}\n","/**\n * @typedef {import('unist').Point} Point\n * @typedef {import('../types.js').TrackFields} TrackFields\n */\n\n/**\n * Functions to track output positions.\n * This info isn’t used yet but suchs functionality allows line wrapping,\n * and theoretically source maps (though, is there practical use in that?).\n *\n * @param {TrackFields} options_\n */\nexport function track(options_) {\n // Defaults are used to prevent crashes when older utilities somehow activate\n // this code.\n /* c8 ignore next 5 */\n const options = options_ || {}\n const now = options.now || {}\n let lineShift = options.lineShift || 0\n let line = now.line || 1\n let column = now.column || 1\n\n return {move, current, shift}\n\n /**\n * Get the current tracked info.\n *\n * @returns {{now: Point, lineShift: number}}\n */\n function current() {\n return {now: {line, column}, lineShift}\n }\n\n /**\n * Define an increased line shift (the typical indent for lines).\n *\n * @param {number} value\n */\n function shift(value) {\n lineShift += value\n }\n\n /**\n * Move past a string.\n *\n * @param {string} value\n * @returns {string}\n */\n function move(value = '') {\n const chunks = value.split(/\\r?\\n|\\r/g)\n const tail = chunks[chunks.length - 1]\n line += chunks.length - 1\n column =\n chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift\n return value\n }\n}\n","/**\n * @typedef {import('./lib/index.js').Options} Options\n */\n\nexport {toString} from './lib/index.js'\n","/**\n * @typedef {import('mdast').Root|import('mdast').Content} Node\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [includeImageAlt=true]\n * Whether to use `alt` for `image`s.\n * @property {boolean | null | undefined} [includeHtml=true]\n * Whether to use `value` of HTML.\n */\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Get the text content of a node or list of nodes.\n *\n * Prefers the node’s plain-text fields, otherwise serializes its children,\n * and if the given value is an array, serialize the nodes in it.\n *\n * @param {unknown} value\n * Thing to serialize, typically `Node`.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized `value`.\n */\nexport function toString(value, options) {\n const settings = options || emptyOptions\n const includeImageAlt =\n typeof settings.includeImageAlt === 'boolean'\n ? settings.includeImageAlt\n : true\n const includeHtml =\n typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true\n\n return one(value, includeImageAlt, includeHtml)\n}\n\n/**\n * One node or several nodes.\n *\n * @param {unknown} value\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized node.\n */\nfunction one(value, includeImageAlt, includeHtml) {\n if (node(value)) {\n if ('value' in value) {\n return value.type === 'html' && !includeHtml ? '' : value.value\n }\n\n if (includeImageAlt && 'alt' in value && value.alt) {\n return value.alt\n }\n\n if ('children' in value) {\n return all(value.children, includeImageAlt, includeHtml)\n }\n }\n\n if (Array.isArray(value)) {\n return all(value, includeImageAlt, includeHtml)\n }\n\n return ''\n}\n\n/**\n * Serialize a list of nodes.\n *\n * @param {Array} values\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized nodes.\n */\nfunction all(values, includeImageAlt, includeHtml) {\n /** @type {Array} */\n const result = []\n let index = -1\n\n while (++index < values.length) {\n result[index] = one(values[index], includeImageAlt, includeHtml)\n }\n\n return result.join('')\n}\n\n/**\n * Check if `value` looks like a node.\n *\n * @param {unknown} value\n * Thing.\n * @returns {value is Node}\n * Whether `value` is a node.\n */\nfunction node(value) {\n return Boolean(value && typeof value === 'object')\n}\n","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","export {attention} from './lib/attention.js'\nexport {autolink} from './lib/autolink.js'\nexport {blankLine} from './lib/blank-line.js'\nexport {blockQuote} from './lib/block-quote.js'\nexport {characterEscape} from './lib/character-escape.js'\nexport {characterReference} from './lib/character-reference.js'\nexport {codeFenced} from './lib/code-fenced.js'\nexport {codeIndented} from './lib/code-indented.js'\nexport {codeText} from './lib/code-text.js'\nexport {content} from './lib/content.js'\nexport {definition} from './lib/definition.js'\nexport {hardBreakEscape} from './lib/hard-break-escape.js'\nexport {headingAtx} from './lib/heading-atx.js'\nexport {htmlFlow} from './lib/html-flow.js'\nexport {htmlText} from './lib/html-text.js'\nexport {labelEnd} from './lib/label-end.js'\nexport {labelStartImage} from './lib/label-start-image.js'\nexport {labelStartLink} from './lib/label-start-link.js'\nexport {lineEnding} from './lib/line-ending.js'\nexport {list} from './lib/list.js'\nexport {setextUnderline} from './lib/setext-underline.js'\nexport {thematicBreak} from './lib/thematic-break.js'\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Point} Point\n */\nimport {push, splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\n\nfunction resolveAllAttention(events, context) {\n let index = -1\n /** @type {number} */\n\n let open\n /** @type {Token} */\n\n let group\n /** @type {Token} */\n\n let text\n /** @type {Token} */\n\n let openingSequence\n /** @type {Token} */\n\n let closingSequence\n /** @type {number} */\n\n let use\n /** @type {Event[]} */\n\n let nextEvents\n /** @type {number} */\n\n let offset // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index // Now walk back to find an opener.\n\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open && // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n } // Number of markers to use from the sequence.\n\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\n nextEvents = [] // If there are more markers in the opening, add them before.\n\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n } // Opening.\n\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ]) // Between.\n\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n ) // Closing.\n\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ]) // If there are more markers in the closing, add them after.\n\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = push(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n } // Remove remaining sequences.\n\n index = -1\n\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null\n const previous = this.previous\n const before = classifyCharacter(previous)\n /** @type {NonNullable} */\n\n let marker\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('attentionSequence')\n marker = code\n return sequence(code)\n }\n /** @type {State} */\n\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n return sequence\n }\n\n const token = effects.exit('attentionSequence')\n const after = classifyCharacter(code)\n const open =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !before || (before === 2 && after) || attentionMarkers.includes(previous)\n token._open = Boolean(marker === 42 ? open : open && (before || !close))\n token._close = Boolean(marker === 42 ? close : close && (after || !open))\n return ok(code)\n }\n}\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * @param {number} offset\n * @returns {void}\n */\n\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 1\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('autolink')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.enter('autolinkProtocol')\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n\n return asciiAtext(code) ? emailAtext(code) : nok(code)\n }\n /** @type {State} */\n\n function schemeOrEmailAtext(code) {\n return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)\n ? schemeInsideOrEmailAtext(code)\n : emailAtext(code)\n }\n /** @type {State} */\n\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n return urlInside\n }\n\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n\n return emailAtext(code)\n }\n /** @type {State} */\n\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n return end(code)\n }\n\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return urlInside\n }\n /** @type {State} */\n\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n /** @type {State} */\n\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n\n if (code === 62) {\n // Exit, then change the type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n return end(code)\n }\n\n return emailValue(code)\n }\n /** @type {State} */\n\n function emailValue(code) {\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n effects.consume(code)\n return code === 45 ? emailValue : emailLabel\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function end(code) {\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const blankLine = {\n tokenize: tokenizeBlankLine,\n partial: true\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeBlankLine(effects, ok, nok) {\n return factorySpace(effects, afterWhitespace, 'linePrefix')\n /** @type {State} */\n\n function afterWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownSpace} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const blockQuote = {\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart,\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n if (code === 62) {\n const state = self.containerState\n\n if (!state.open) {\n effects.enter('blockQuote', {\n _container: true\n })\n state.open = true\n }\n\n effects.enter('blockQuotePrefix')\n effects.enter('blockQuoteMarker')\n effects.consume(code)\n effects.exit('blockQuoteMarker')\n return after\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n if (markdownSpace(code)) {\n effects.enter('blockQuotePrefixWhitespace')\n effects.consume(code)\n effects.exit('blockQuotePrefixWhitespace')\n effects.exit('blockQuotePrefix')\n return ok\n }\n\n effects.exit('blockQuotePrefix')\n return ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n return factorySpace(\n effects,\n effects.attempt(blockQuote, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4\n )\n}\n/** @type {Exiter} */\n\nfunction exit(effects) {\n effects.exit('blockQuote')\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {asciiPunctuation} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (asciiPunctuation(code)) {\n effects.enter('characterEscapeValue')\n effects.consume(code)\n effects.exit('characterEscapeValue')\n effects.exit('characterEscape')\n return ok\n }\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this\n let size = 0\n /** @type {number} */\n\n let max\n /** @type {(code: Code) => code is number} */\n\n let test\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('characterReference')\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\n /** @type {State} */\n\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter('characterReferenceMarkerHexadecimal')\n effects.consume(code)\n effects.exit('characterReferenceMarkerHexadecimal')\n effects.enter('characterReferenceValue')\n max = 6\n test = asciiHexDigit\n return value\n }\n\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n /** @type {State} */\n\n function value(code) {\n /** @type {Token} */\n let token\n\n if (code === 59 && size) {\n token = effects.exit('characterReferenceValue')\n\n if (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace\n} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n\n const closingFenceConstruct = {\n tokenize: tokenizeClosingFence,\n partial: true\n }\n /** @type {Construct} */\n\n const nonLazyLine = {\n tokenize: tokenizeNonLazyLine,\n partial: true\n }\n const tail = this.events[this.events.length - 1]\n const initialPrefix =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n let sizeOpen = 0\n /** @type {NonNullable} */\n\n let marker\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n marker = code\n return sequenceOpen(code)\n }\n /** @type {State} */\n\n function sequenceOpen(code) {\n if (code === marker) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n\n effects.exit('codeFencedFenceSequence')\n return sizeOpen < 3\n ? nok(code)\n : factorySpace(effects, infoOpen, 'whitespace')(code)\n }\n /** @type {State} */\n\n function infoOpen(code) {\n if (code === null || markdownLineEnding(code)) {\n return openAfter(code)\n }\n\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n /** @type {State} */\n\n function info(code) {\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, infoAfter, 'whitespace')(code)\n }\n\n if (code === 96 && code === marker) return nok(code)\n effects.consume(code)\n return info\n }\n /** @type {State} */\n\n function infoAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n return openAfter(code)\n }\n\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n /** @type {State} */\n\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return openAfter(code)\n }\n\n if (code === 96 && code === marker) return nok(code)\n effects.consume(code)\n return meta\n }\n /** @type {State} */\n\n function openAfter(code) {\n effects.exit('codeFencedFence')\n return self.interrupt ? ok(code) : contentStart(code)\n }\n /** @type {State} */\n\n function contentStart(code) {\n if (code === null) {\n return after(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.attempt(\n nonLazyLine,\n effects.attempt(\n closingFenceConstruct,\n after,\n initialPrefix\n ? factorySpace(\n effects,\n contentStart,\n 'linePrefix',\n initialPrefix + 1\n )\n : contentStart\n ),\n after\n )(code)\n }\n\n effects.enter('codeFlowValue')\n return contentContinue(code)\n }\n /** @type {State} */\n\n function contentContinue(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return contentStart(code)\n }\n\n effects.consume(code)\n return contentContinue\n }\n /** @type {State} */\n\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n /** @type {Tokenizer} */\n\n function tokenizeNonLazyLine(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n /** @type {State} */\n\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n }\n /** @type {Tokenizer} */\n\n function tokenizeClosingFence(effects, ok, nok) {\n let size = 0\n return factorySpace(\n effects,\n closingSequenceStart,\n 'linePrefix',\n this.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )\n /** @type {State} */\n\n function closingSequenceStart(code) {\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return closingSequence(code)\n }\n /** @type {State} */\n\n function closingSequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return closingSequence\n }\n\n if (size < sizeOpen) return nok(code)\n effects.exit('codeFencedFenceSequence')\n return factorySpace(effects, closingSequenceEnd, 'whitespace')(code)\n }\n /** @type {State} */\n\n function closingSequenceEnd(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n\n return nok(code)\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented\n}\n/** @type {Construct} */\n\nconst indentedContent = {\n tokenize: tokenizeIndentedContent,\n partial: true\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeCodeIndented(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('codeIndented')\n return factorySpace(effects, afterStartPrefix, 'linePrefix', 4 + 1)(code)\n }\n /** @type {State} */\n\n function afterStartPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ? afterPrefix(code)\n : nok(code)\n }\n /** @type {State} */\n\n function afterPrefix(code) {\n if (code === null) {\n return after(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.attempt(indentedContent, afterPrefix, after)(code)\n }\n\n effects.enter('codeFlowValue')\n return content(code)\n }\n /** @type {State} */\n\n function content(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return afterPrefix(code)\n }\n\n effects.consume(code)\n return content\n }\n /** @type {State} */\n\n function after(code) {\n effects.exit('codeIndented')\n return ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeIndentedContent(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n // If this is a lazy line, it can’t be code.\n if (self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return start\n }\n\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)\n }\n /** @type {State} */\n\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ? ok(code)\n : markdownLineEnding(code)\n ? start(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').State} State\n */\nimport {markdownLineEnding} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\n}\n/** @type {Resolver} */\n\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4\n let headEnterIndex = 3\n /** @type {number} */\n\n let index\n /** @type {number|undefined} */\n\n let enter // If we start and end with an EOL or a space.\n\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex // And we have data.\n\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[headEnterIndex][1].type = 'codeTextPadding'\n events[tailExitIndex][1].type = 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n } // Merge adjacent spaces and data.\n\n index = headEnterIndex - 1\n tailExitIndex++\n\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n tailExitIndex -= index - enter - 2\n index = enter + 2\n }\n\n enter = undefined\n }\n }\n\n return events\n}\n/** @type {Previous} */\n\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this\n let sizeOpen = 0\n /** @type {number} */\n\n let size\n /** @type {Token} */\n\n let token\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return openingSequence(code)\n }\n /** @type {State} */\n\n function openingSequence(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return openingSequence\n }\n\n effects.exit('codeTextSequence')\n return gap(code)\n }\n /** @type {State} */\n\n function gap(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n } // Closing fence?\n // Could also be data.\n\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return closingSequence(code)\n } // Tabs don’t work, and virtual spaces don’t make sense.\n\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return gap\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return gap\n } // Data.\n\n effects.enter('codeTextData')\n return data(code)\n } // In code.\n\n /** @type {State} */\n\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return gap(code)\n }\n\n effects.consume(code)\n return data\n } // Closing fence.\n\n /** @type {State} */\n\n function closingSequence(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return closingSequence\n } // Done!\n\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n } // More or less accents: mark as data.\n\n token.type = 'codeTextData'\n return data(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * No name because it must not be turned off.\n * @type {Construct}\n */\nexport const content = {\n tokenize: tokenizeContent,\n resolve: resolveContent\n}\n/** @type {Construct} */\n\nconst continuationConstruct = {\n tokenize: tokenizeContinuation,\n partial: true\n}\n/**\n * Content is transparent: it’s parsed right now. That way, definitions are also\n * parsed right now: before text in paragraphs (specifically, media) are parsed.\n *\n * @type {Resolver}\n */\n\nfunction resolveContent(events) {\n subtokenize(events)\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeContent(effects, ok) {\n /** @type {Token} */\n let previous\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('content')\n previous = effects.enter('chunkContent', {\n contentType: 'content'\n })\n return data(code)\n }\n /** @type {State} */\n\n function data(code) {\n if (code === null) {\n return contentEnd(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.check(\n continuationConstruct,\n contentContinue,\n contentEnd\n )(code)\n } // Data.\n\n effects.consume(code)\n return data\n }\n /** @type {State} */\n\n function contentEnd(code) {\n effects.exit('chunkContent')\n effects.exit('content')\n return ok(code)\n }\n /** @type {State} */\n\n function contentContinue(code) {\n effects.consume(code)\n effects.exit('chunkContent')\n previous.next = effects.enter('chunkContent', {\n contentType: 'content',\n previous\n })\n previous = previous.next\n return data\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeContinuation(effects, ok, nok) {\n const self = this\n return startLookahead\n /** @type {State} */\n\n function startLookahead(code) {\n effects.exit('chunkContent')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, prefixed, 'linePrefix')\n }\n /** @type {State} */\n\n function prefixed(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n const tail = self.events[self.events.length - 1]\n\n if (\n !self.parser.constructs.disable.null.includes('codeIndented') &&\n tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ) {\n return ok(code)\n }\n\n return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factorySpace} from 'micromark-factory-space'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace\n} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const definition = {\n name: 'definition',\n tokenize: tokenizeDefinition\n}\n/** @type {Construct} */\n\nconst titleConstruct = {\n tokenize: tokenizeTitle,\n partial: true\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeDefinition(effects, ok, nok) {\n const self = this\n /** @type {string} */\n\n let identifier\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('definition')\n return factoryLabel.call(\n self,\n effects,\n labelAfter,\n nok,\n 'definitionLabel',\n 'definitionLabelMarker',\n 'definitionLabelString'\n )(code)\n }\n /** @type {State} */\n\n function labelAfter(code) {\n identifier = normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker') // Note: blank lines can’t exist in content.\n\n return factoryWhitespace(\n effects,\n factoryDestination(\n effects,\n effects.attempt(\n titleConstruct,\n factorySpace(effects, after, 'whitespace'),\n factorySpace(effects, after, 'whitespace')\n ),\n nok,\n 'definitionDestination',\n 'definitionDestinationLiteral',\n 'definitionDestinationLiteralMarker',\n 'definitionDestinationRaw',\n 'definitionDestinationString'\n )\n )\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('definition')\n\n if (!self.parser.defined.includes(identifier)) {\n self.parser.defined.push(identifier)\n }\n\n return ok(code)\n }\n\n return nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeTitle(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, before)(code)\n : nok(code)\n }\n /** @type {State} */\n\n function before(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factorySpace(effects, after, 'whitespace'),\n nok,\n 'definitionTitle',\n 'definitionTitleMarker',\n 'definitionTitleString'\n )(code)\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {markdownLineEnding} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (markdownLineEnding(code)) {\n effects.exit('escapeMarker')\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {splice} from 'micromark-util-chunked'\n\n/** @type {Construct} */\nexport const headingAtx = {\n name: 'headingAtx',\n tokenize: tokenizeHeadingAtx,\n resolve: resolveHeadingAtx\n}\n/** @type {Resolver} */\n\nfunction resolveHeadingAtx(events, context) {\n let contentEnd = events.length - 2\n let contentStart = 3\n /** @type {Token} */\n\n let content\n /** @type {Token} */\n\n let text // Prefix whitespace, part of the opening.\n\n if (events[contentStart][1].type === 'whitespace') {\n contentStart += 2\n } // Suffix whitespace, part of the closing.\n\n if (\n contentEnd - 2 > contentStart &&\n events[contentEnd][1].type === 'whitespace'\n ) {\n contentEnd -= 2\n }\n\n if (\n events[contentEnd][1].type === 'atxHeadingSequence' &&\n (contentStart === contentEnd - 1 ||\n (contentEnd - 4 > contentStart &&\n events[contentEnd - 2][1].type === 'whitespace'))\n ) {\n contentEnd -= contentStart + 1 === contentEnd ? 2 : 4\n }\n\n if (contentEnd > contentStart) {\n content = {\n type: 'atxHeadingText',\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end\n }\n text = {\n type: 'chunkText',\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end,\n // @ts-expect-error Constants are fine to assign.\n contentType: 'text'\n }\n splice(events, contentStart, contentEnd - contentStart + 1, [\n ['enter', content, context],\n ['enter', text, context],\n ['exit', text, context],\n ['exit', content, context]\n ])\n }\n\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeHeadingAtx(effects, ok, nok) {\n const self = this\n let size = 0\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('atxHeading')\n effects.enter('atxHeadingSequence')\n return fenceOpenInside(code)\n }\n /** @type {State} */\n\n function fenceOpenInside(code) {\n if (code === 35 && size++ < 6) {\n effects.consume(code)\n return fenceOpenInside\n }\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingSequence')\n return self.interrupt ? ok(code) : headingBreak(code)\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function headingBreak(code) {\n if (code === 35) {\n effects.enter('atxHeadingSequence')\n return sequence(code)\n }\n\n if (code === null || markdownLineEnding(code)) {\n effects.exit('atxHeading')\n return ok(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, headingBreak, 'whitespace')(code)\n }\n\n effects.enter('atxHeadingText')\n return data(code)\n }\n /** @type {State} */\n\n function sequence(code) {\n if (code === 35) {\n effects.consume(code)\n return sequence\n }\n\n effects.exit('atxHeadingSequence')\n return headingBreak(code)\n }\n /** @type {State} */\n\n function data(code) {\n if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingText')\n return headingBreak(code)\n }\n\n effects.consume(code)\n return data\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {htmlBlockNames, htmlRawNames} from 'micromark-util-html-tag-name'\nimport {blankLine} from './blank-line.js'\n/** @type {Construct} */\n\nexport const htmlFlow = {\n name: 'htmlFlow',\n tokenize: tokenizeHtmlFlow,\n resolveTo: resolveToHtmlFlow,\n concrete: true\n}\n/** @type {Construct} */\n\nconst nextBlankConstruct = {\n tokenize: tokenizeNextBlank,\n partial: true\n}\n/** @type {Resolver} */\n\nfunction resolveToHtmlFlow(events) {\n let index = events.length\n\n while (index--) {\n if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {\n break\n }\n }\n\n if (index > 1 && events[index - 2][1].type === 'linePrefix') {\n // Add the prefix start to the HTML token.\n events[index][1].start = events[index - 2][1].start // Add the prefix start to the HTML line token.\n\n events[index + 1][1].start = events[index - 2][1].start // Remove the line prefix.\n\n events.splice(index - 2, 2)\n }\n\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeHtmlFlow(effects, ok, nok) {\n const self = this\n /** @type {number} */\n\n let kind\n /** @type {boolean} */\n\n let startTag\n /** @type {string} */\n\n let buffer\n /** @type {number} */\n\n let index\n /** @type {Code} */\n\n let marker\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('htmlFlow')\n effects.enter('htmlFlowData')\n effects.consume(code)\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationStart\n }\n\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === 63) {\n effects.consume(code)\n kind = 3 // While we’re in an instruction instead of a declaration, we’re on a `?`\n // right now, so we do need to search for `>`, similar to declarations.\n\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n buffer = String.fromCharCode(code)\n startTag = true\n return tagName\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function declarationStart(code) {\n if (code === 45) {\n effects.consume(code)\n kind = 2\n return commentOpenInside\n }\n\n if (code === 91) {\n effects.consume(code)\n kind = 5\n buffer = 'CDATA['\n index = 0\n return cdataOpenInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n kind = 4\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function cdataOpenInside(code) {\n if (code === buffer.charCodeAt(index++)) {\n effects.consume(code)\n return index === buffer.length\n ? self.interrupt\n ? ok\n : continuation\n : cdataOpenInside\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n buffer = String.fromCharCode(code)\n return tagName\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function tagName(code) {\n if (\n code === null ||\n code === 47 ||\n code === 62 ||\n markdownLineEndingOrSpace(code)\n ) {\n if (\n code !== 47 &&\n startTag &&\n htmlRawNames.includes(buffer.toLowerCase())\n ) {\n kind = 1\n return self.interrupt ? ok(code) : continuation(code)\n }\n\n if (htmlBlockNames.includes(buffer.toLowerCase())) {\n kind = 6\n\n if (code === 47) {\n effects.consume(code)\n return basicSelfClosing\n }\n\n return self.interrupt ? ok(code) : continuation(code)\n }\n\n kind = 7 // Do not support complete HTML when interrupting\n\n return self.interrupt && !self.parser.lazy[self.now().line]\n ? nok(code)\n : startTag\n ? completeAttributeNameBefore(code)\n : completeClosingTagAfter(code)\n }\n\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n buffer += String.fromCharCode(code)\n return tagName\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code)\n return self.interrupt ? ok : continuation\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeClosingTagAfter\n }\n\n return completeEnd(code)\n }\n /** @type {State} */\n\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code)\n return completeEnd\n }\n\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return completeAttributeName\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameBefore\n }\n\n return completeEnd(code)\n }\n /** @type {State} */\n\n function completeAttributeName(code) {\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return completeAttributeName\n }\n\n return completeAttributeNameAfter(code)\n }\n /** @type {State} */\n\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameAfter\n }\n\n return completeAttributeNameBefore(code)\n }\n /** @type {State} */\n\n function completeAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return completeAttributeValueQuoted\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n\n marker = null\n return completeAttributeValueUnquoted(code)\n }\n /** @type {State} */\n\n function completeAttributeValueQuoted(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n if (code === marker) {\n effects.consume(code)\n return completeAttributeValueQuotedAfter\n }\n\n effects.consume(code)\n return completeAttributeValueQuoted\n }\n /** @type {State} */\n\n function completeAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96 ||\n markdownLineEndingOrSpace(code)\n ) {\n return completeAttributeNameAfter(code)\n }\n\n effects.consume(code)\n return completeAttributeValueUnquoted\n }\n /** @type {State} */\n\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code)\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code)\n return completeAfter\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function completeAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAfter\n }\n\n return code === null || markdownLineEnding(code)\n ? continuation(code)\n : nok(code)\n }\n /** @type {State} */\n\n function continuation(code) {\n if (code === 45 && kind === 2) {\n effects.consume(code)\n return continuationCommentInside\n }\n\n if (code === 60 && kind === 1) {\n effects.consume(code)\n return continuationRawTagOpen\n }\n\n if (code === 62 && kind === 4) {\n effects.consume(code)\n return continuationClose\n }\n\n if (code === 63 && kind === 3) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n if (code === 93 && kind === 5) {\n effects.consume(code)\n return continuationCharacterDataInside\n }\n\n if (markdownLineEnding(code) && (kind === 6 || kind === 7)) {\n return effects.check(\n nextBlankConstruct,\n continuationClose,\n continuationAtLineEnding\n )(code)\n }\n\n if (code === null || markdownLineEnding(code)) {\n return continuationAtLineEnding(code)\n }\n\n effects.consume(code)\n return continuation\n }\n /** @type {State} */\n\n function continuationAtLineEnding(code) {\n effects.exit('htmlFlowData')\n return htmlContinueStart(code)\n }\n /** @type {State} */\n\n function htmlContinueStart(code) {\n if (code === null) {\n return done(code)\n }\n\n if (markdownLineEnding(code)) {\n return effects.attempt(\n {\n tokenize: htmlLineEnd,\n partial: true\n },\n htmlContinueStart,\n done\n )(code)\n }\n\n effects.enter('htmlFlowData')\n return continuation(code)\n }\n /** @type {Tokenizer} */\n\n function htmlLineEnd(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n /** @type {State} */\n\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n }\n /** @type {State} */\n\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n /** @type {State} */\n\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n /** @type {State} */\n\n function continuationRawEndTag(code) {\n if (code === 62 && htmlRawNames.includes(buffer.toLowerCase())) {\n effects.consume(code)\n return continuationClose\n }\n\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n /** @type {State} */\n\n function continuationCharacterDataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n /** @type {State} */\n\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n } // More dashes.\n\n if (code === 45 && kind === 2) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n /** @type {State} */\n\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return done(code)\n }\n\n effects.consume(code)\n return continuationClose\n }\n /** @type {State} */\n\n function done(code) {\n effects.exit('htmlFlow')\n return ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeNextBlank(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.exit('htmlFlowData')\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable|undefined} */\n\n let marker\n /** @type {string} */\n\n let buffer\n /** @type {number} */\n\n let index\n /** @type {State} */\n\n let returnState\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpen\n }\n\n if (code === 91) {\n effects.consume(code)\n buffer = 'CDATA['\n index = 0\n return cdataOpen\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function commentOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentStart\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function commentStart(code) {\n if (code === null || code === 62) {\n return nok(code)\n }\n\n if (code === 45) {\n effects.consume(code)\n return commentStartDash\n }\n\n return comment(code)\n }\n /** @type {State} */\n\n function commentStartDash(code) {\n if (code === null || code === 62) {\n return nok(code)\n }\n\n return comment(code)\n }\n /** @type {State} */\n\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = comment\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return comment\n }\n /** @type {State} */\n\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return end\n }\n\n return comment(code)\n }\n /** @type {State} */\n\n function cdataOpen(code) {\n if (code === buffer.charCodeAt(index++)) {\n effects.consume(code)\n return index === buffer.length ? cdata : cdataOpen\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = cdata\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return cdata\n }\n /** @type {State} */\n\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n /** @type {State} */\n\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n /** @type {State} */\n\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = declaration\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return declaration\n }\n /** @type {State} */\n\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = instruction\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return instruction\n }\n /** @type {State} */\n\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n /** @type {State} */\n\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function tagClose(code) {\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return tagCloseBetween(code)\n }\n /** @type {State} */\n\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n\n return end(code)\n }\n /** @type {State} */\n\n function tagOpen(code) {\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n\n return end(code)\n }\n /** @type {State} */\n\n function tagOpenAttributeName(code) {\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n return tagOpenAttributeNameAfter(code)\n }\n /** @type {State} */\n\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n\n return tagOpenBetween(code)\n }\n /** @type {State} */\n\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return atLineEnding(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueUnquoted\n }\n /** @type {State} */\n\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n return tagOpenAttributeValueQuotedAfter\n }\n\n if (code === null) {\n return nok(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return atLineEnding(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n /** @type {State} */\n\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 62 || code === 47 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n\n if (code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n } // We can’t have blank lines in content, so no need to worry about empty\n // tokens.\n\n /** @type {State} */\n\n function atLineEnding(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(\n effects,\n afterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )\n }\n /** @type {State} */\n\n function afterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\n /** @type {State} */\n\n function end(code) {\n if (code === 62) {\n effects.consume(code)\n effects.exit('htmlTextData')\n effects.exit('htmlText')\n return ok\n }\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\n\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\n/** @type {Construct} */\n\nconst resourceConstruct = {\n tokenize: tokenizeResource\n}\n/** @type {Construct} */\n\nconst fullReferenceConstruct = {\n tokenize: tokenizeFullReference\n}\n/** @type {Construct} */\n\nconst collapsedReferenceConstruct = {\n tokenize: tokenizeCollapsedReference\n}\n/** @type {Resolver} */\n\nfunction resolveAllLabelEnd(events) {\n let index = -1\n /** @type {Token} */\n\n let token\n\n while (++index < events.length) {\n token = events[index][1]\n\n if (\n token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd'\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n\n return events\n}\n/** @type {Resolver} */\n\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n\n let token\n /** @type {number|undefined} */\n\n let open\n /** @type {number|undefined} */\n\n let close\n /** @type {Event[]} */\n\n let media // Find an opening.\n\n while (index--) {\n token = events[index][1]\n\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n } // Mark other link openings as inactive, as we can’t have links in\n // links.\n\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n\n const group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n const label = {\n type: 'label',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n }\n const text = {\n type: 'labelText',\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ] // Opening marker.\n\n media = push(media, events.slice(open + 1, open + offset + 3)) // Text open.\n\n media = push(media, [['enter', text, context]]) // Between.\n\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n ) // Text close, marker close, label close.\n\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ]) // Reference, resource, or so.\n\n media = push(media, events.slice(close + 1)) // Media close.\n\n media = push(media, [['exit', group, context]])\n splice(events, open, events.length, media)\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n\n let labelStart\n /** @type {boolean} */\n\n let defined // Find an opening.\n\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n\n return start\n /** @type {State} */\n\n function start(code) {\n if (!labelStart) {\n return nok(code)\n } // It’s a balanced bracket, but contains a link.\n\n if (labelStart._inactive) return balanced(code)\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n )\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return afterLabelEnd\n }\n /** @type {State} */\n\n function afterLabelEnd(code) {\n // Resource: `[asd](fgh)`.\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n ok,\n defined ? ok : balanced\n )(code)\n } // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference?\n\n if (code === 91) {\n return effects.attempt(\n fullReferenceConstruct,\n ok,\n defined\n ? effects.attempt(collapsedReferenceConstruct, ok, balanced)\n : balanced\n )(code)\n } // Shortcut reference: `[asd]`?\n\n return defined ? ok(code) : balanced(code)\n }\n /** @type {State} */\n\n function balanced(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeResource(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return factoryWhitespace(effects, open)\n }\n /** @type {State} */\n\n function open(code) {\n if (code === 41) {\n return end(code)\n }\n\n return factoryDestination(\n effects,\n destinationAfter,\n nok,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 32\n )(code)\n }\n /** @type {State} */\n\n function destinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, between)(code)\n : end(code)\n }\n /** @type {State} */\n\n function between(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factoryWhitespace(effects, end),\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n\n return end(code)\n }\n /** @type {State} */\n\n function end(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n\n return nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeFullReference(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n return factoryLabel.call(\n self,\n effects,\n afterLabel,\n nok,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n /** @type {State} */\n\n function afterLabel(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeCollapsedReference(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {labelEnd} from './label-end.js'\n/** @type {Construct} */\n\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('labelImage')\n effects.enter('labelImageMarker')\n effects.consume(code)\n effects.exit('labelImageMarker')\n return open\n }\n /** @type {State} */\n\n function open(code) {\n if (code === 91) {\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelImage')\n return after\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n /* To do: remove in the future once we’ve switched from\n * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,\n * which doesn’t need this */\n\n /* Hidden footnotes hook */\n\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {labelEnd} from './label-end.js'\n/** @type {Construct} */\n\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('labelLink')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelLink')\n return after\n }\n /** @type {State} */\n\n function after(code) {\n /* To do: remove in the future once we’ve switched from\n * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,\n * which doesn’t need this */\n\n /* Hidden footnotes hook. */\n\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeLineEnding(effects, ok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, ok, 'linePrefix')\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\n\n/**\n * @typedef {Record & {marker: Code, type: string, size: number}} ListContainerState\n * @typedef {TokenizeContext & {containerState: ListContainerState}} TokenizeContextWithState\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {asciiDigit, markdownSpace} from 'micromark-util-character'\nimport {blankLine} from './blank-line.js'\nimport {thematicBreak} from './thematic-break.js'\n/** @type {Construct} */\n\nexport const list = {\n name: 'list',\n tokenize: tokenizeListStart,\n continuation: {\n tokenize: tokenizeListContinuation\n },\n exit: tokenizeListEnd\n}\n/** @type {Construct} */\n\nconst listItemPrefixWhitespaceConstruct = {\n tokenize: tokenizeListItemPrefixWhitespace,\n partial: true\n}\n/** @type {Construct} */\n\nconst indentConstruct = {\n tokenize: tokenizeIndent,\n partial: true\n}\n/**\n * @type {Tokenizer}\n * @this {TokenizeContextWithState}\n */\n\nfunction tokenizeListStart(effects, ok, nok) {\n const self = this\n const tail = self.events[self.events.length - 1]\n let initialSize =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n let size = 0\n return start\n /** @type {State} */\n\n function start(code) {\n const kind =\n self.containerState.type ||\n (code === 42 || code === 43 || code === 45\n ? 'listUnordered'\n : 'listOrdered')\n\n if (\n kind === 'listUnordered'\n ? !self.containerState.marker || code === self.containerState.marker\n : asciiDigit(code)\n ) {\n if (!self.containerState.type) {\n self.containerState.type = kind\n effects.enter(kind, {\n _container: true\n })\n }\n\n if (kind === 'listUnordered') {\n effects.enter('listItemPrefix')\n return code === 42 || code === 45\n ? effects.check(thematicBreak, nok, atMarker)(code)\n : atMarker(code)\n }\n\n if (!self.interrupt || code === 49) {\n effects.enter('listItemPrefix')\n effects.enter('listItemValue')\n return inside(code)\n }\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function inside(code) {\n if (asciiDigit(code) && ++size < 10) {\n effects.consume(code)\n return inside\n }\n\n if (\n (!self.interrupt || size < 2) &&\n (self.containerState.marker\n ? code === self.containerState.marker\n : code === 41 || code === 46)\n ) {\n effects.exit('listItemValue')\n return atMarker(code)\n }\n\n return nok(code)\n }\n /**\n * @type {State}\n **/\n\n function atMarker(code) {\n effects.enter('listItemMarker')\n effects.consume(code)\n effects.exit('listItemMarker')\n self.containerState.marker = self.containerState.marker || code\n return effects.check(\n blankLine, // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank,\n effects.attempt(\n listItemPrefixWhitespaceConstruct,\n endOfPrefix,\n otherPrefix\n )\n )\n }\n /** @type {State} */\n\n function onBlank(code) {\n self.containerState.initialBlankLine = true\n initialSize++\n return endOfPrefix(code)\n }\n /** @type {State} */\n\n function otherPrefix(code) {\n if (markdownSpace(code)) {\n effects.enter('listItemPrefixWhitespace')\n effects.consume(code)\n effects.exit('listItemPrefixWhitespace')\n return endOfPrefix\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function endOfPrefix(code) {\n self.containerState.size =\n initialSize +\n self.sliceSerialize(effects.exit('listItemPrefix'), true).length\n return ok(code)\n }\n}\n/**\n * @type {Tokenizer}\n * @this {TokenizeContextWithState}\n */\n\nfunction tokenizeListContinuation(effects, ok, nok) {\n const self = this\n self.containerState._closeFlow = undefined\n return effects.check(blankLine, onBlank, notBlank)\n /** @type {State} */\n\n function onBlank(code) {\n self.containerState.furtherBlankLines =\n self.containerState.furtherBlankLines ||\n self.containerState.initialBlankLine // We have a blank line.\n // Still, try to consume at most the items size.\n\n return factorySpace(\n effects,\n ok,\n 'listItemIndent',\n self.containerState.size + 1\n )(code)\n }\n /** @type {State} */\n\n function notBlank(code) {\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = undefined\n self.containerState.initialBlankLine = undefined\n return notInCurrentItem(code)\n }\n\n self.containerState.furtherBlankLines = undefined\n self.containerState.initialBlankLine = undefined\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)\n }\n /** @type {State} */\n\n function notInCurrentItem(code) {\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true // As we’re closing flow, we’re no longer interrupting.\n\n self.interrupt = undefined\n return factorySpace(\n effects,\n effects.attempt(list, ok, nok),\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n}\n/**\n * @type {Tokenizer}\n * @this {TokenizeContextWithState}\n */\n\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemIndent',\n self.containerState.size + 1\n )\n /** @type {State} */\n\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'listItemIndent' &&\n tail[2].sliceSerialize(tail[1], true).length === self.containerState.size\n ? ok(code)\n : nok(code)\n }\n}\n/**\n * @type {Exiter}\n * @this {TokenizeContextWithState}\n */\n\nfunction tokenizeListEnd(effects) {\n effects.exit(this.containerState.type)\n}\n/**\n * @type {Tokenizer}\n * @this {TokenizeContextWithState}\n */\n\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n const self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemPrefixWhitespace',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4 + 1\n )\n /** @type {State} */\n\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return !markdownSpace(code) &&\n tail &&\n tail[1].type === 'listItemPrefixWhitespace'\n ? ok(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n tokenize: tokenizeSetextUnderline,\n resolveTo: resolveToSetextUnderline\n}\n/** @type {Resolver} */\n\nfunction resolveToSetextUnderline(events, context) {\n let index = events.length\n /** @type {number|undefined} */\n\n let content\n /** @type {number|undefined} */\n\n let text\n /** @type {number|undefined} */\n\n let definition // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === 'content') {\n content = index\n break\n }\n\n if (events[index][1].type === 'paragraph') {\n text = index\n }\n } // Exit\n else {\n if (events[index][1].type === 'content') {\n // Remove the content end (if needed we’ll add it later)\n events.splice(index, 1)\n }\n\n if (!definition && events[index][1].type === 'definition') {\n definition = index\n }\n }\n }\n\n const heading = {\n type: 'setextHeading',\n start: Object.assign({}, events[text][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n } // Change the paragraph to setext heading text.\n\n events[text][1].type = 'setextHeadingText' // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n\n if (definition) {\n events.splice(text, 0, ['enter', heading, context])\n events.splice(definition + 1, 0, ['exit', events[content][1], context])\n events[content][1].end = Object.assign({}, events[definition][1].end)\n } else {\n events[content][1] = heading\n } // Add the heading exit at the end.\n\n events.push(['exit', heading, context])\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {NonNullable} */\n\n let marker\n /** @type {boolean} */\n\n let paragraph // Find an opening.\n\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (\n self.events[index][1].type !== 'lineEnding' &&\n self.events[index][1].type !== 'linePrefix' &&\n self.events[index][1].type !== 'content'\n ) {\n paragraph = self.events[index][1].type === 'paragraph'\n break\n }\n }\n\n return start\n /** @type {State} */\n\n function start(code) {\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter('setextHeadingLine')\n effects.enter('setextHeadingLineSequence')\n marker = code\n return closingSequence(code)\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function closingSequence(code) {\n if (code === marker) {\n effects.consume(code)\n return closingSequence\n }\n\n effects.exit('setextHeadingLineSequence')\n return factorySpace(effects, closingSequenceEnd, 'lineSuffix')(code)\n }\n /** @type {State} */\n\n function closingSequenceEnd(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('setextHeadingLine')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n\n/** @type {Construct} */\nexport const thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeThematicBreak(effects, ok, nok) {\n let size = 0\n /** @type {NonNullable} */\n\n let marker\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('thematicBreak')\n marker = code\n return atBreak(code)\n }\n /** @type {State} */\n\n function atBreak(code) {\n if (code === marker) {\n effects.enter('thematicBreakSequence')\n return sequence(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, 'whitespace')(code)\n }\n\n if (size < 3 || (code !== null && !markdownLineEnding(code))) {\n return nok(code)\n }\n\n effects.exit('thematicBreak')\n return ok(code)\n }\n /** @type {State} */\n\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return sequence\n }\n\n effects.exit('thematicBreakSequence')\n return atBreak(code)\n }\n}\n","export {gfmAutolinkLiteral} from './lib/syntax.js'\nexport {gfmAutolinkLiteralHtml} from './lib/html.js'\n","/**\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('micromark-util-types').Handle} Handle\n * @typedef {import('micromark-util-types').CompileContext} CompileContext\n * @typedef {import('micromark-util-types').Token} Token\n */\nimport {sanitizeUri} from 'micromark-util-sanitize-uri'\n/** @type {HtmlExtension} */\n\nexport const gfmAutolinkLiteralHtml = {\n exit: {\n literalAutolinkEmail,\n literalAutolinkHttp,\n literalAutolinkWww\n }\n}\n/** @type {Handle} */\n\nfunction literalAutolinkWww(token) {\n anchorFromToken.call(this, token, 'http://')\n}\n/** @type {Handle} */\n\nfunction literalAutolinkEmail(token) {\n anchorFromToken.call(this, token, 'mailto:')\n}\n/** @type {Handle} */\n\nfunction literalAutolinkHttp(token) {\n anchorFromToken.call(this, token)\n}\n/**\n * @this CompileContext\n * @param {Token} token\n * @param {string} [protocol]\n * @returns {void}\n */\n\nfunction anchorFromToken(token, protocol) {\n const url = this.sliceSerialize(token)\n this.tag('')\n this.raw(this.encode(url))\n this.tag('')\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiControl,\n asciiDigit,\n markdownLineEndingOrSpace,\n markdownLineEnding,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\nconst www = {\n tokenize: tokenizeWww,\n partial: true\n}\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n}\nconst path = {\n tokenize: tokenizePath,\n partial: true\n}\nconst punctuation = {\n tokenize: tokenizePunctuation,\n partial: true\n}\nconst namedCharacterReference = {\n tokenize: tokenizeNamedCharacterReference,\n partial: true\n}\nconst wwwAutolink = {\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n}\nconst httpAutolink = {\n tokenize: tokenizeHttpAutolink,\n previous: previousHttp\n}\nconst emailAutolink = {\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n}\n/** @type {ConstructRecord} */\n\nconst text = {}\n/** @type {Extension} */\n\nexport const gfmAutolinkLiteral = {\n text\n}\nlet code = 48 // Add alphanumerics.\n\nwhile (code < 123) {\n text[code] = emailAutolink\n code++\n if (code === 58) code = 65\n else if (code === 91) code = 97\n}\n\ntext[43] = emailAutolink\ntext[45] = emailAutolink\ntext[46] = emailAutolink\ntext[95] = emailAutolink\ntext[72] = [emailAutolink, httpAutolink]\ntext[104] = [emailAutolink, httpAutolink]\ntext[87] = [emailAutolink, wwwAutolink]\ntext[119] = [emailAutolink, wwwAutolink]\n/** @type {Tokenizer} */\n\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this\n /** @type {boolean} */\n\n let hasDot\n /** @type {boolean|undefined} */\n\n let hasDigitInLastSegment\n return start\n /** @type {State} */\n\n function start(code) {\n if (\n !gfmAtext(code) ||\n !previousEmail(self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkEmail')\n return atext(code)\n }\n /** @type {State} */\n\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code)\n return atext\n }\n\n if (code === 64) {\n effects.consume(code)\n return label\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function label(code) {\n if (code === 46) {\n return effects.check(punctuation, done, dotContinuation)(code)\n }\n\n if (code === 45 || code === 95) {\n return effects.check(punctuation, nok, dashOrUnderscoreContinuation)(code)\n }\n\n if (asciiAlphanumeric(code)) {\n if (!hasDigitInLastSegment && asciiDigit(code)) {\n hasDigitInLastSegment = true\n }\n\n effects.consume(code)\n return label\n }\n\n return done(code)\n }\n /** @type {State} */\n\n function dotContinuation(code) {\n effects.consume(code)\n hasDot = true\n hasDigitInLastSegment = undefined\n return label\n }\n /** @type {State} */\n\n function dashOrUnderscoreContinuation(code) {\n effects.consume(code)\n return afterDashOrUnderscore\n }\n /** @type {State} */\n\n function afterDashOrUnderscore(code) {\n if (code === 46) {\n return effects.check(punctuation, nok, dotContinuation)(code)\n }\n\n return label(code)\n }\n /** @type {State} */\n\n function done(code) {\n if (hasDot && !hasDigitInLastSegment) {\n effects.exit('literalAutolinkEmail')\n effects.exit('literalAutolink')\n return ok(code)\n }\n\n return nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n if (\n (code !== 87 && code !== 119) ||\n !previousWww(self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkWww') // For `www.` we check instead of attempt, because when it matches, GH\n // treats it as part of a domain (yes, it says a valid domain must come\n // after `www.`, but that’s not how it’s implemented by them).\n\n return effects.check(\n www,\n effects.attempt(domain, effects.attempt(path, done), nok),\n nok\n )(code)\n }\n /** @type {State} */\n\n function done(code) {\n effects.exit('literalAutolinkWww')\n effects.exit('literalAutolink')\n return ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeHttpAutolink(effects, ok, nok) {\n const self = this\n return start\n /** @type {State} */\n\n function start(code) {\n if (\n (code !== 72 && code !== 104) ||\n !previousHttp(self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkHttp')\n effects.consume(code)\n return t1\n }\n /** @type {State} */\n\n function t1(code) {\n if (code === 84 || code === 116) {\n effects.consume(code)\n return t2\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function t2(code) {\n if (code === 84 || code === 116) {\n effects.consume(code)\n return p\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function p(code) {\n if (code === 80 || code === 112) {\n effects.consume(code)\n return s\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function s(code) {\n if (code === 83 || code === 115) {\n effects.consume(code)\n return colon\n }\n\n return colon(code)\n }\n /** @type {State} */\n\n function colon(code) {\n if (code === 58) {\n effects.consume(code)\n return slash1\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function slash1(code) {\n if (code === 47) {\n effects.consume(code)\n return slash2\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function slash2(code) {\n if (code === 47) {\n effects.consume(code)\n return after\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n return code === null ||\n asciiControl(code) ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)\n ? nok(code)\n : effects.attempt(domain, effects.attempt(path, done), nok)(code)\n }\n /** @type {State} */\n\n function done(code) {\n effects.exit('literalAutolinkHttp')\n effects.exit('literalAutolink')\n return ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeWww(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.consume(code)\n return w2\n }\n /** @type {State} */\n\n function w2(code) {\n if (code === 87 || code === 119) {\n effects.consume(code)\n return w3\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function w3(code) {\n if (code === 87 || code === 119) {\n effects.consume(code)\n return dot\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function dot(code) {\n if (code === 46) {\n effects.consume(code)\n return after\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n return code === null || markdownLineEnding(code) ? nok(code) : ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean|undefined} */\n let hasUnderscoreInLastSegment\n /** @type {boolean|undefined} */\n\n let hasUnderscoreInLastLastSegment\n return domain\n /** @type {State} */\n\n function domain(code) {\n if (code === 38) {\n return effects.check(\n namedCharacterReference,\n done,\n punctuationContinuation\n )(code)\n }\n\n if (code === 46 || code === 95) {\n return effects.check(punctuation, done, punctuationContinuation)(code)\n } // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n\n if (\n code === null ||\n asciiControl(code) ||\n unicodeWhitespace(code) ||\n (code !== 45 && unicodePunctuation(code))\n ) {\n return done(code)\n }\n\n effects.consume(code)\n return domain\n }\n /** @type {State} */\n\n function punctuationContinuation(code) {\n if (code === 46) {\n hasUnderscoreInLastLastSegment = hasUnderscoreInLastSegment\n hasUnderscoreInLastSegment = undefined\n effects.consume(code)\n return domain\n }\n\n if (code === 95) hasUnderscoreInLastSegment = true\n effects.consume(code)\n return domain\n }\n /** @type {State} */\n\n function done(code) {\n if (!hasUnderscoreInLastLastSegment && !hasUnderscoreInLastSegment) {\n return ok(code)\n }\n\n return nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizePath(effects, ok) {\n let balance = 0\n return inPath\n /** @type {State} */\n\n function inPath(code) {\n if (code === 38) {\n return effects.check(\n namedCharacterReference,\n ok,\n continuedPunctuation\n )(code)\n }\n\n if (code === 40) {\n balance++\n }\n\n if (code === 41) {\n return effects.check(\n punctuation,\n parenAtPathEnd,\n continuedPunctuation\n )(code)\n }\n\n if (pathEnd(code)) {\n return ok(code)\n }\n\n if (trailingPunctuation(code)) {\n return effects.check(punctuation, ok, continuedPunctuation)(code)\n }\n\n effects.consume(code)\n return inPath\n }\n /** @type {State} */\n\n function continuedPunctuation(code) {\n effects.consume(code)\n return inPath\n }\n /** @type {State} */\n\n function parenAtPathEnd(code) {\n balance--\n return balance < 0 ? ok(code) : continuedPunctuation(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeNamedCharacterReference(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.consume(code)\n return inside\n }\n /** @type {State} */\n\n function inside(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return inside\n }\n\n if (code === 59) {\n effects.consume(code)\n return after\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function after(code) {\n // If the named character reference is followed by the end of the path, it’s\n // not continued punctuation.\n return pathEnd(code) ? ok(code) : nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizePunctuation(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.consume(code)\n return after\n }\n /** @type {State} */\n\n function after(code) {\n // Check the next.\n if (trailingPunctuation(code)) {\n effects.consume(code)\n return after\n } // If the punctuation marker is followed by the end of the path, it’s not\n // continued punctuation.\n\n return pathEnd(code) ? ok(code) : nok(code)\n }\n}\n/**\n * @param {Code} code\n * @returns {boolean}\n */\n\nfunction trailingPunctuation(code) {\n return (\n code === 33 ||\n code === 34 ||\n code === 39 ||\n code === 41 ||\n code === 42 ||\n code === 44 ||\n code === 46 ||\n code === 58 ||\n code === 59 ||\n code === 60 ||\n code === 63 ||\n code === 95 ||\n code === 126\n )\n}\n/**\n * @param {Code} code\n * @returns {boolean}\n */\n\nfunction pathEnd(code) {\n return code === null || code === 60 || markdownLineEndingOrSpace(code)\n}\n/**\n * @param {Code} code\n * @returns {boolean}\n */\n\nfunction gfmAtext(code) {\n return (\n code === 43 ||\n code === 45 ||\n code === 46 ||\n code === 95 ||\n asciiAlphanumeric(code)\n )\n}\n/** @type {Previous} */\n\nfunction previousWww(code) {\n return (\n code === null ||\n code === 40 ||\n code === 42 ||\n code === 95 ||\n code === 126 ||\n markdownLineEndingOrSpace(code)\n )\n}\n/** @type {Previous} */\n\nfunction previousHttp(code) {\n return code === null || !asciiAlpha(code)\n}\n/** @type {Previous} */\n\nfunction previousEmail(code) {\n return code !== 47 && previousHttp(code)\n}\n/**\n * @param {Array} events\n * @returns {boolean}\n */\n\nfunction previousUnbalanced(events) {\n let index = events.length\n let result = false\n\n while (index--) {\n const token = events[index][1]\n\n if (\n (token.type === 'labelLink' || token.type === 'labelImage') &&\n !token._balanced\n ) {\n result = true\n break\n } // @ts-expect-error If we’ve seen this token, and it was marked as not\n // having any unbalanced bracket before it, we can exit.\n\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false\n break\n }\n }\n\n if (events.length > 0 && !result) {\n // @ts-expect-error Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true\n }\n\n return result\n}\n","/**\n * @typedef {import('./lib/html.js').Options} HtmlOptions\n */\nexport {gfmFootnote} from './lib/syntax.js'\nexport {gfmFootnoteHtml} from './lib/html.js'\n","/**\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('micromark-util-types').CompileContext} CompileContext\n *\n * @typedef Options\n * @property {string} [clobberPrefix='user-content-']\n * Prefix to use before the `id` attribute to prevent it from *clobbering*.\n * attributes.\n * DOM clobbering is this:\n *\n * ```html\n *

    \n * \n * ```\n *\n * Elements by their ID are made available in browsers on the `window` object.\n * Using a prefix prevents this from being a problem.\n * @property {string} [label='Footnotes']\n * Label to use for the footnotes section.\n * Affects screen reader users.\n * Change it if you’re authoring in a different language.\n * @property {string} [backLabel='Back to content']\n * Label to use from backreferences back to their footnote call.\n * Affects screen reader users.\n * Change it if you’re authoring in a different language.\n */\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {sanitizeUri} from 'micromark-util-sanitize-uri'\nconst own = {}.hasOwnProperty\n/**\n * @param {Options} [options={}]\n * @returns {HtmlExtension}\n */\n\nexport function gfmFootnoteHtml(options = {}) {\n const label = options.label || 'Footnotes'\n const backLabel = options.backLabel || 'Back to content'\n const clobberPrefix =\n options.clobberPrefix === undefined || options.clobberPrefix === null\n ? 'user-content-'\n : options.clobberPrefix\n return {\n enter: {\n gfmFootnoteDefinition() {\n const stack =\n /** @type {Array} */\n this.getData('tightStack')\n stack.push(false)\n },\n\n gfmFootnoteDefinitionLabelString() {\n this.buffer()\n },\n\n gfmFootnoteCallString() {\n this.buffer()\n }\n },\n exit: {\n gfmFootnoteDefinition() {\n let definitions =\n /** @type {Record} */\n this.getData('gfmFootnoteDefinitions')\n const footnoteStack =\n /** @type {Array} */\n this.getData('gfmFootnoteDefinitionStack')\n const tightStack =\n /** @type {Array} */\n this.getData('tightStack')\n const current = footnoteStack.pop()\n const value = this.resume()\n\n if (!definitions) {\n this.setData('gfmFootnoteDefinitions', (definitions = {}))\n }\n\n if (!own.call(definitions, current)) definitions[current] = value\n tightStack.pop()\n this.setData('slurpOneLineEnding', true) // “Hack” to prevent a line ending from showing up if we’re in a definition in\n // an empty list item.\n\n this.setData('lastWasTag')\n },\n\n gfmFootnoteDefinitionLabelString(token) {\n let footnoteStack =\n /** @type {Array} */\n this.getData('gfmFootnoteDefinitionStack')\n\n if (!footnoteStack) {\n this.setData('gfmFootnoteDefinitionStack', (footnoteStack = []))\n }\n\n footnoteStack.push(normalizeIdentifier(this.sliceSerialize(token)))\n this.resume() // Drop the label.\n\n this.buffer() // Get ready for a value.\n },\n\n gfmFootnoteCallString(token) {\n let calls =\n /** @type {Array|undefined} */\n this.getData('gfmFootnoteCallOrder')\n let counts =\n /** @type {Record|undefined} */\n this.getData('gfmFootnoteCallCounts')\n const id = normalizeIdentifier(this.sliceSerialize(token))\n /** @type {number} */\n\n let counter\n this.resume()\n if (!calls) this.setData('gfmFootnoteCallOrder', (calls = []))\n if (!counts) this.setData('gfmFootnoteCallCounts', (counts = {}))\n const index = calls.indexOf(id)\n const safeId = sanitizeUri(id.toLowerCase())\n\n if (index === -1) {\n calls.push(id)\n counts[id] = 1\n counter = calls.length\n } else {\n counts[id]++\n counter = index + 1\n }\n\n const reuseCounter = counts[id]\n this.tag(\n ' 1 ? '-' + reuseCounter : '') +\n '\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\">' +\n String(counter) +\n ''\n )\n },\n\n null() {\n const calls =\n /** @type {Array} */\n this.getData('gfmFootnoteCallOrder') || []\n const counts =\n /** @type {Record} */\n this.getData('gfmFootnoteCallCounts') || {}\n const definitions =\n /** @type {Record} */\n this.getData('gfmFootnoteDefinitions') || {}\n let index = -1\n\n if (calls.length > 0) {\n this.lineEndingIfNeeded()\n this.tag(\n '

    '\n )\n this.raw(this.encode(label))\n this.tag('

    ')\n this.lineEndingIfNeeded()\n this.tag('
      ')\n }\n\n while (++index < calls.length) {\n // Called definitions are always defined.\n const id = calls[index]\n const safeId = sanitizeUri(id.toLowerCase())\n let referenceIndex = 0\n /** @type {Array} */\n\n const references = []\n\n while (++referenceIndex <= counts[id]) {\n references.push(\n ' 1 ? '-' + referenceIndex : '') +\n '\" data-footnote-backref=\"\" class=\"data-footnote-backref\" aria-label=\"' +\n this.encode(backLabel) +\n '\">↩' +\n (referenceIndex > 1\n ? '' + referenceIndex + ''\n : '') +\n ''\n )\n }\n\n const reference = references.join(' ')\n let injected = false\n this.lineEndingIfNeeded()\n this.tag('
    1. ')\n this.lineEndingIfNeeded()\n this.tag(\n definitions[id].replace(\n /<\\/p>(?:\\r?\\n|\\r)?$/,\n (\n /** @type {string} */\n $0\n ) => {\n injected = true\n return ' ' + reference + $0\n }\n )\n )\n\n if (!injected) {\n this.lineEndingIfNeeded()\n this.tag(reference)\n }\n\n this.lineEndingIfNeeded()\n this.tag('
    2. ')\n }\n\n if (calls.length > 0) {\n this.lineEndingIfNeeded()\n this.tag('
    ')\n this.lineEndingIfNeeded()\n this.tag('
    ')\n }\n }\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Event} Event\n */\nimport {blankLine} from 'micromark-core-commonmark'\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace\n} from 'micromark-util-character'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nconst indent = {\n tokenize: tokenizeIndent,\n partial: true\n}\n/**\n * @returns {Extension}\n */\n\nexport function gfmFootnote() {\n /** @type {Extension} */\n return {\n document: {\n [91]: {\n tokenize: tokenizeDefinitionStart,\n continuation: {\n tokenize: tokenizeDefinitionContinuation\n },\n exit: gfmFootnoteDefinitionEnd\n }\n },\n text: {\n [91]: {\n tokenize: tokenizeGfmFootnoteCall\n },\n [93]: {\n add: 'after',\n tokenize: tokenizePotentialGfmFootnoteCall,\n resolveTo: resolveToPotentialGfmFootnoteCall\n }\n }\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizePotentialGfmFootnoteCall(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Array} */\n // @ts-expect-error It’s fine!\n\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n /** @type {Token} */\n\n let labelStart // Find an opening.\n\n while (index--) {\n const token = self.events[index][1]\n\n if (token.type === 'labelImage') {\n labelStart = token\n break\n } // Exit if we’ve walked far enough.\n\n if (\n token.type === 'gfmFootnoteCall' ||\n token.type === 'labelLink' ||\n token.type === 'label' ||\n token.type === 'image' ||\n token.type === 'link'\n ) {\n break\n }\n }\n\n return start\n /** @type {State} */\n\n function start(code) {\n if (!labelStart || !labelStart._balanced) {\n return nok(code)\n }\n\n const id = normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n\n if (id.charCodeAt(0) !== 94 || !defined.includes(id.slice(1))) {\n return nok(code)\n }\n\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n return ok(code)\n }\n}\n/** @type {Resolver} */\n\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n let index = events.length\n /** @type {Token|undefined} */\n\n let labelStart // Find an opening.\n\n while (index--) {\n if (\n events[index][1].type === 'labelImage' &&\n events[index][0] === 'enter'\n ) {\n labelStart = events[index][1]\n break\n }\n }\n\n // Change the `labelImageMarker` to a `data`.\n events[index + 1][1].type = 'data'\n events[index + 3][1].type = 'gfmFootnoteCallLabelMarker' // The whole (without `!`):\n\n const call = {\n type: 'gfmFootnoteCall',\n start: Object.assign({}, events[index + 3][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n } // The `^` marker\n\n const marker = {\n type: 'gfmFootnoteCallMarker',\n start: Object.assign({}, events[index + 3][1].end),\n end: Object.assign({}, events[index + 3][1].end)\n } // Increment the end 1 character.\n\n marker.end.column++\n marker.end.offset++\n marker.end._bufferIndex++\n const string = {\n type: 'gfmFootnoteCallString',\n start: Object.assign({}, marker.end),\n end: Object.assign({}, events[events.length - 1][1].start)\n }\n const chunk = {\n type: 'chunkString',\n contentType: 'string',\n start: Object.assign({}, string.start),\n end: Object.assign({}, string.end)\n }\n /** @type {Array} */\n\n const replacement = [\n // Take the `labelImageMarker` (now `data`, the `!`)\n events[index + 1],\n events[index + 2],\n ['enter', call, context], // The `[`\n events[index + 3],\n events[index + 4], // The `^`.\n ['enter', marker, context],\n ['exit', marker, context], // Everything in between.\n ['enter', string, context],\n ['enter', chunk, context],\n ['exit', chunk, context],\n ['exit', string, context], // The ending (`]`, properly parsed and labelled).\n events[events.length - 2],\n events[events.length - 1],\n ['exit', call, context]\n ]\n events.splice(index, events.length - index + 1, ...replacement)\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeGfmFootnoteCall(effects, ok, nok) {\n const self = this\n /** @type {Array} */\n // @ts-expect-error It’s fine!\n\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n let size = 0\n /** @type {boolean} */\n\n let data\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('gfmFootnoteCall')\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n return callStart\n }\n /** @type {State} */\n\n function callStart(code) {\n if (code !== 94) return nok(code)\n effects.enter('gfmFootnoteCallMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallMarker')\n effects.enter('gfmFootnoteCallString')\n effects.enter('chunkString').contentType = 'string'\n return callData\n }\n /** @type {State} */\n\n function callData(code) {\n /** @type {Token} */\n let token\n\n if (code === null || code === 91 || size++ > 999) {\n return nok(code)\n }\n\n if (code === 93) {\n if (!data) {\n return nok(code)\n }\n\n effects.exit('chunkString')\n token = effects.exit('gfmFootnoteCallString')\n return defined.includes(normalizeIdentifier(self.sliceSerialize(token)))\n ? end(code)\n : nok(code)\n }\n\n effects.consume(code)\n\n if (!markdownLineEndingOrSpace(code)) {\n data = true\n }\n\n return code === 92 ? callEscape : callData\n }\n /** @type {State} */\n\n function callEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return callData\n }\n\n return callData(code)\n }\n /** @type {State} */\n\n function end(code) {\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n effects.exit('gfmFootnoteCall')\n return ok\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeDefinitionStart(effects, ok, nok) {\n const self = this\n /** @type {Array} */\n // @ts-expect-error It’s fine!\n\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n /** @type {string} */\n\n let identifier\n let size = 0\n /** @type {boolean|undefined} */\n\n let data\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('gfmFootnoteDefinition')._container = true\n effects.enter('gfmFootnoteDefinitionLabel')\n effects.enter('gfmFootnoteDefinitionLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionLabelMarker')\n return labelStart\n }\n /** @type {State} */\n\n function labelStart(code) {\n if (code === 94) {\n effects.enter('gfmFootnoteDefinitionMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionMarker')\n effects.enter('gfmFootnoteDefinitionLabelString')\n return atBreak\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function atBreak(code) {\n /** @type {Token} */\n let token\n\n if (code === null || code === 91 || size > 999) {\n return nok(code)\n }\n\n if (code === 93) {\n if (!data) {\n return nok(code)\n }\n\n token = effects.exit('gfmFootnoteDefinitionLabelString')\n identifier = normalizeIdentifier(self.sliceSerialize(token))\n effects.enter('gfmFootnoteDefinitionLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionLabelMarker')\n effects.exit('gfmFootnoteDefinitionLabel')\n return labelAfter\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n size++\n return atBreak\n }\n\n effects.enter('chunkString').contentType = 'string'\n return label(code)\n }\n /** @type {State} */\n\n function label(code) {\n if (\n code === null ||\n markdownLineEnding(code) ||\n code === 91 ||\n code === 93 ||\n size > 999\n ) {\n effects.exit('chunkString')\n return atBreak(code)\n }\n\n if (!markdownLineEndingOrSpace(code)) {\n data = true\n }\n\n size++\n effects.consume(code)\n return code === 92 ? labelEscape : label\n }\n /** @type {State} */\n\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return label\n }\n\n return label(code)\n }\n /** @type {State} */\n\n function labelAfter(code) {\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker') // Any whitespace after the marker is eaten, forming indented code\n // is not possible.\n // No space is also fine, just like a block quote marker.\n\n return factorySpace(effects, done, 'gfmFootnoteDefinitionWhitespace')\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function done(code) {\n if (!defined.includes(identifier)) {\n defined.push(identifier)\n }\n\n return ok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeDefinitionContinuation(effects, ok, nok) {\n // Either a blank line, which is okay, or an indented thing.\n return effects.check(blankLine, ok, effects.attempt(indent, ok, nok))\n}\n/** @type {Exiter} */\n\nfunction gfmFootnoteDefinitionEnd(effects) {\n effects.exit('gfmFootnoteDefinition')\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'gfmFootnoteDefinitionIndent',\n 4 + 1\n )\n /** @type {State} */\n\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'gfmFootnoteDefinitionIndent' &&\n tail[2].sliceSerialize(tail[1], true).length === 4\n ? ok(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('./lib/syntax.js').Options} Options\n */\nexport {gfmStrikethroughHtml} from './lib/html.js'\nexport {gfmStrikethrough} from './lib/syntax.js'\n","/**\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\n/** @type {HtmlExtension} */\nexport const gfmStrikethroughHtml = {\n enter: {\n strikethrough() {\n this.tag('')\n }\n },\n exit: {\n strikethrough() {\n this.tag('')\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').Event} Event\n */\n\n/**\n * @typedef Options\n * Configuration (optional).\n * @property {boolean} [singleTilde=true]\n * Whether to support strikethrough with a single tilde (`boolean`, default:\n * `true`).\n * Single tildes work on github.com, but are technically prohibited by the\n * GFM spec.\n */\nimport {splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n\n/**\n * @param {Options} [options]\n * @returns {Extension}\n */\nexport function gfmStrikethrough(options = {}) {\n let single = options.singleTilde\n const tokenizer = {\n tokenize: tokenizeStrikethrough,\n resolveAll: resolveAllStrikethrough\n }\n\n if (single === null || single === undefined) {\n single = true\n }\n\n return {\n text: {\n [126]: tokenizer\n },\n insideSpan: {\n null: [tokenizer]\n },\n attentionMarkers: {\n null: [126]\n }\n }\n /**\n * Take events and resolve strikethrough.\n *\n * @type {Resolver}\n */\n\n function resolveAllStrikethrough(events, context) {\n let index = -1 // Walk through all events.\n\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'strikethroughSequenceTemporary' &&\n events[index][1]._close\n ) {\n let open = index // Now walk back to find an opener.\n\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'strikethroughSequenceTemporary' &&\n events[open][1]._open && // If the sizes are the same:\n events[index][1].end.offset - events[index][1].start.offset ===\n events[open][1].end.offset - events[open][1].start.offset\n ) {\n events[index][1].type = 'strikethroughSequence'\n events[open][1].type = 'strikethroughSequence'\n const strikethrough = {\n type: 'strikethrough',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[index][1].end)\n }\n const text = {\n type: 'strikethroughText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n } // Opening.\n\n const nextEvents = [\n ['enter', strikethrough, context],\n ['enter', events[open][1], context],\n ['exit', events[open][1], context],\n ['enter', text, context]\n ] // Between.\n\n splice(\n nextEvents,\n nextEvents.length,\n 0,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n ) // Closing.\n\n splice(nextEvents, nextEvents.length, 0, [\n ['exit', text, context],\n ['enter', events[index][1], context],\n ['exit', events[index][1], context],\n ['exit', strikethrough, context]\n ])\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - 2\n break\n }\n }\n }\n }\n\n index = -1\n\n while (++index < events.length) {\n if (events[index][1].type === 'strikethroughSequenceTemporary') {\n events[index][1].type = 'data'\n }\n }\n\n return events\n }\n /** @type {Tokenizer} */\n\n function tokenizeStrikethrough(effects, ok, nok) {\n const previous = this.previous\n const events = this.events\n let size = 0\n return start\n /** @type {State} */\n\n function start(code) {\n if (\n previous === 126 &&\n events[events.length - 1][1].type !== 'characterEscape'\n ) {\n return nok(code)\n }\n\n effects.enter('strikethroughSequenceTemporary')\n return more(code)\n }\n /** @type {State} */\n\n function more(code) {\n const before = classifyCharacter(previous)\n\n if (code === 126) {\n // If this is the third marker, exit.\n if (size > 1) return nok(code)\n effects.consume(code)\n size++\n return more\n }\n\n if (size < 2 && !single) return nok(code)\n const token = effects.exit('strikethroughSequenceTemporary')\n const after = classifyCharacter(code)\n token._open = !after || (after === 2 && Boolean(before))\n token._close = !before || (before === 2 && Boolean(after))\n return ok(code)\n }\n }\n}\n","export {gfmTableHtml} from './lib/html.js'\nexport {gfmTable} from './lib/syntax.js'\n","/**\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('./syntax.js').Align} Align\n */\nconst alignment = {\n none: '',\n left: ' align=\"left\"',\n right: ' align=\"right\"',\n center: ' align=\"center\"'\n}\n/** @type {HtmlExtension} */\n\nexport const gfmTableHtml = {\n enter: {\n table(token) {\n /** @type {Array} */\n // @ts-expect-error Custom.\n const tableAlign = token._align\n this.lineEndingIfNeeded()\n this.tag('')\n this.setData('tableAlign', tableAlign)\n },\n\n tableBody() {\n // Clear slurping line ending from the delimiter row.\n this.setData('slurpOneLineEnding')\n this.tag('')\n },\n\n tableData() {\n const tableAlign =\n /** @type {Array} */\n this.getData('tableAlign')\n const tableColumn =\n /** @type {number} */\n this.getData('tableColumn')\n const align = alignment[tableAlign[tableColumn]]\n\n if (align === undefined) {\n // Capture results to ignore them.\n this.buffer()\n } else {\n this.lineEndingIfNeeded()\n this.tag('')\n }\n },\n\n tableHead() {\n this.lineEndingIfNeeded()\n this.tag('')\n },\n\n tableHeader() {\n const tableAlign =\n /** @type {Array} */\n this.getData('tableAlign')\n const tableColumn =\n /** @type {number} */\n this.getData('tableColumn')\n const align = alignment[tableAlign[tableColumn]]\n this.lineEndingIfNeeded()\n this.tag('')\n },\n\n tableRow() {\n this.setData('tableColumn', 0)\n this.lineEndingIfNeeded()\n this.tag('')\n }\n },\n exit: {\n // Overwrite the default code text data handler to unescape escaped pipes when\n // they are in tables.\n codeTextData(token) {\n let value = this.sliceSerialize(token)\n\n if (this.getData('tableAlign')) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n this.raw(this.encode(value))\n },\n\n table() {\n this.setData('tableAlign') // If there was no table body, make sure the slurping from the delimiter row\n // is cleared.\n\n this.setData('slurpAllLineEndings')\n this.lineEndingIfNeeded()\n this.tag('
    ')\n },\n\n tableBody() {\n this.lineEndingIfNeeded()\n this.tag('')\n },\n\n tableData() {\n const tableAlign =\n /** @type {Array} */\n this.getData('tableAlign')\n const tableColumn =\n /** @type {number} */\n this.getData('tableColumn')\n\n if (tableColumn in tableAlign) {\n this.tag('')\n this.setData('tableColumn', tableColumn + 1)\n } else {\n // Stop capturing.\n this.resume()\n }\n },\n\n tableHead() {\n this.lineEndingIfNeeded()\n this.tag('')\n this.setData('slurpOneLineEnding', true) // Slurp the line ending from the delimiter row.\n },\n\n tableHeader() {\n const tableColumn =\n /** @type {number} */\n this.getData('tableColumn')\n this.tag('')\n this.setData('tableColumn', tableColumn + 1)\n },\n\n tableRow() {\n const tableAlign =\n /** @type {Array} */\n this.getData('tableAlign')\n let tableColumn =\n /** @type {number} */\n this.getData('tableColumn')\n\n while (tableColumn < tableAlign.length) {\n this.lineEndingIfNeeded()\n this.tag('')\n tableColumn++\n }\n\n this.setData('tableColumn', tableColumn)\n this.lineEndingIfNeeded()\n this.tag('')\n }\n }\n}\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\n\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n */\n\n/**\n * @typedef {'left'|'center'|'right'|'none'} Align\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n\n/** @type {Extension} */\nexport const gfmTable = {\n flow: {\n null: {\n tokenize: tokenizeTable,\n resolve: resolveTable\n }\n }\n}\nconst nextPrefixedOrBlank = {\n tokenize: tokenizeNextPrefixedOrBlank,\n partial: true\n}\n/** @type {Resolver} */\n\nfunction resolveTable(events, context) {\n let index = -1\n /** @type {boolean|undefined} */\n\n let inHead\n /** @type {boolean|undefined} */\n\n let inDelimiterRow\n /** @type {boolean|undefined} */\n\n let inRow\n /** @type {number|undefined} */\n\n let contentStart\n /** @type {number|undefined} */\n\n let contentEnd\n /** @type {number|undefined} */\n\n let cellStart\n /** @type {boolean|undefined} */\n\n let seenCellInRow\n\n while (++index < events.length) {\n const token = events[index][1]\n\n if (inRow) {\n if (token.type === 'temporaryTableCellContent') {\n contentStart = contentStart || index\n contentEnd = index\n }\n\n if (\n // Combine separate content parts into one.\n (token.type === 'tableCellDivider' || token.type === 'tableRow') &&\n contentEnd\n ) {\n const content = {\n type: 'tableContent',\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end\n }\n /** @type {Token} */\n\n const text = {\n type: 'chunkText',\n start: content.start,\n end: content.end,\n // @ts-expect-error It’s fine.\n contentType: 'text'\n }\n events.splice(\n contentStart,\n contentEnd - contentStart + 1,\n ['enter', content, context],\n ['enter', text, context],\n ['exit', text, context],\n ['exit', content, context]\n )\n index -= contentEnd - contentStart - 3\n contentStart = undefined\n contentEnd = undefined\n }\n }\n\n if (\n events[index][0] === 'exit' &&\n cellStart !== undefined &&\n cellStart + (seenCellInRow ? 0 : 1) < index &&\n (token.type === 'tableCellDivider' ||\n (token.type === 'tableRow' &&\n (cellStart + 3 < index ||\n events[cellStart][1].type !== 'whitespace')))\n ) {\n const cell = {\n type: inDelimiterRow\n ? 'tableDelimiter'\n : inHead\n ? 'tableHeader'\n : 'tableData',\n start: events[cellStart][1].start,\n end: events[index][1].end\n }\n events.splice(index + (token.type === 'tableCellDivider' ? 1 : 0), 0, [\n 'exit',\n cell,\n context\n ])\n events.splice(cellStart, 0, ['enter', cell, context])\n index += 2\n cellStart = index + 1\n seenCellInRow = true\n }\n\n if (token.type === 'tableRow') {\n inRow = events[index][0] === 'enter'\n\n if (inRow) {\n cellStart = index + 1\n seenCellInRow = false\n }\n }\n\n if (token.type === 'tableDelimiterRow') {\n inDelimiterRow = events[index][0] === 'enter'\n\n if (inDelimiterRow) {\n cellStart = index + 1\n seenCellInRow = false\n }\n }\n\n if (token.type === 'tableHead') {\n inHead = events[index][0] === 'enter'\n }\n }\n\n return events\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeTable(effects, ok, nok) {\n const self = this\n /** @type {Array} */\n\n const align = []\n let tableHeaderCount = 0\n /** @type {boolean|undefined} */\n\n let seenDelimiter\n /** @type {boolean|undefined} */\n\n let hasDash\n return start\n /** @type {State} */\n\n function start(code) {\n // @ts-expect-error Custom.\n effects.enter('table')._align = align\n effects.enter('tableHead')\n effects.enter('tableRow') // If we start with a pipe, we open a cell marker.\n\n if (code === 124) {\n return cellDividerHead(code)\n }\n\n tableHeaderCount++\n effects.enter('temporaryTableCellContent') // Can’t be space or eols at the start of a construct, so we’re in a cell.\n\n return inCellContentHead(code)\n }\n /** @type {State} */\n\n function cellDividerHead(code) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n seenDelimiter = true\n return cellBreakHead\n }\n /** @type {State} */\n\n function cellBreakHead(code) {\n if (code === null || markdownLineEnding(code)) {\n return atRowEndHead(code)\n }\n\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n effects.consume(code)\n return inWhitespaceHead\n }\n\n if (seenDelimiter) {\n seenDelimiter = undefined\n tableHeaderCount++\n }\n\n if (code === 124) {\n return cellDividerHead(code)\n } // Anything else is cell content.\n\n effects.enter('temporaryTableCellContent')\n return inCellContentHead(code)\n }\n /** @type {State} */\n\n function inWhitespaceHead(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return inWhitespaceHead\n }\n\n effects.exit('whitespace')\n return cellBreakHead(code)\n }\n /** @type {State} */\n\n function inCellContentHead(code) {\n // EOF, whitespace, pipe\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('temporaryTableCellContent')\n return cellBreakHead(code)\n }\n\n effects.consume(code)\n return code === 92 ? inCellContentEscapeHead : inCellContentHead\n }\n /** @type {State} */\n\n function inCellContentEscapeHead(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return inCellContentHead\n } // Anything else.\n\n return inCellContentHead(code)\n }\n /** @type {State} */\n\n function atRowEndHead(code) {\n if (code === null) {\n return nok(code)\n }\n\n effects.exit('tableRow')\n effects.exit('tableHead')\n const originalInterrupt = self.interrupt\n self.interrupt = true\n return effects.attempt(\n {\n tokenize: tokenizeRowEnd,\n partial: true\n },\n function (code) {\n self.interrupt = originalInterrupt\n effects.enter('tableDelimiterRow')\n return atDelimiterRowBreak(code)\n },\n function (code) {\n self.interrupt = originalInterrupt\n return nok(code)\n }\n )(code)\n }\n /** @type {State} */\n\n function atDelimiterRowBreak(code) {\n if (code === null || markdownLineEnding(code)) {\n return rowEndDelimiter(code)\n }\n\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n effects.consume(code)\n return inWhitespaceDelimiter\n }\n\n if (code === 45) {\n effects.enter('tableDelimiterFiller')\n effects.consume(code)\n hasDash = true\n align.push('none')\n return inFillerDelimiter\n }\n\n if (code === 58) {\n effects.enter('tableDelimiterAlignment')\n effects.consume(code)\n effects.exit('tableDelimiterAlignment')\n align.push('left')\n return afterLeftAlignment\n } // If we start with a pipe, we open a cell marker.\n\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return atDelimiterRowBreak\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function inWhitespaceDelimiter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return inWhitespaceDelimiter\n }\n\n effects.exit('whitespace')\n return atDelimiterRowBreak(code)\n }\n /** @type {State} */\n\n function inFillerDelimiter(code) {\n if (code === 45) {\n effects.consume(code)\n return inFillerDelimiter\n }\n\n effects.exit('tableDelimiterFiller')\n\n if (code === 58) {\n effects.enter('tableDelimiterAlignment')\n effects.consume(code)\n effects.exit('tableDelimiterAlignment')\n align[align.length - 1] =\n align[align.length - 1] === 'left' ? 'center' : 'right'\n return afterRightAlignment\n }\n\n return atDelimiterRowBreak(code)\n }\n /** @type {State} */\n\n function afterLeftAlignment(code) {\n if (code === 45) {\n effects.enter('tableDelimiterFiller')\n effects.consume(code)\n hasDash = true\n return inFillerDelimiter\n } // Anything else is not ok.\n\n return nok(code)\n }\n /** @type {State} */\n\n function afterRightAlignment(code) {\n if (code === null || markdownLineEnding(code)) {\n return rowEndDelimiter(code)\n }\n\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n effects.consume(code)\n return inWhitespaceDelimiter\n } // `|`\n\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return atDelimiterRowBreak\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function rowEndDelimiter(code) {\n effects.exit('tableDelimiterRow') // Exit if there was no dash at all, or if the header cell count is not the\n // delimiter cell count.\n\n if (!hasDash || tableHeaderCount !== align.length) {\n return nok(code)\n }\n\n if (code === null) {\n return tableClose(code)\n }\n\n return effects.check(\n nextPrefixedOrBlank,\n tableClose,\n effects.attempt(\n {\n tokenize: tokenizeRowEnd,\n partial: true\n },\n factorySpace(effects, bodyStart, 'linePrefix', 4),\n tableClose\n )\n )(code)\n }\n /** @type {State} */\n\n function tableClose(code) {\n effects.exit('table')\n return ok(code)\n }\n /** @type {State} */\n\n function bodyStart(code) {\n effects.enter('tableBody')\n return rowStartBody(code)\n }\n /** @type {State} */\n\n function rowStartBody(code) {\n effects.enter('tableRow') // If we start with a pipe, we open a cell marker.\n\n if (code === 124) {\n return cellDividerBody(code)\n }\n\n effects.enter('temporaryTableCellContent') // Can’t be space or eols at the start of a construct, so we’re in a cell.\n\n return inCellContentBody(code)\n }\n /** @type {State} */\n\n function cellDividerBody(code) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return cellBreakBody\n }\n /** @type {State} */\n\n function cellBreakBody(code) {\n if (code === null || markdownLineEnding(code)) {\n return atRowEndBody(code)\n }\n\n if (markdownSpace(code)) {\n effects.enter('whitespace')\n effects.consume(code)\n return inWhitespaceBody\n } // `|`\n\n if (code === 124) {\n return cellDividerBody(code)\n } // Anything else is cell content.\n\n effects.enter('temporaryTableCellContent')\n return inCellContentBody(code)\n }\n /** @type {State} */\n\n function inWhitespaceBody(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return inWhitespaceBody\n }\n\n effects.exit('whitespace')\n return cellBreakBody(code)\n }\n /** @type {State} */\n\n function inCellContentBody(code) {\n // EOF, whitespace, pipe\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('temporaryTableCellContent')\n return cellBreakBody(code)\n }\n\n effects.consume(code)\n return code === 92 ? inCellContentEscapeBody : inCellContentBody\n }\n /** @type {State} */\n\n function inCellContentEscapeBody(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return inCellContentBody\n } // Anything else.\n\n return inCellContentBody(code)\n }\n /** @type {State} */\n\n function atRowEndBody(code) {\n effects.exit('tableRow')\n\n if (code === null) {\n return tableBodyClose(code)\n }\n\n return effects.check(\n nextPrefixedOrBlank,\n tableBodyClose,\n effects.attempt(\n {\n tokenize: tokenizeRowEnd,\n partial: true\n },\n factorySpace(effects, rowStartBody, 'linePrefix', 4),\n tableBodyClose\n )\n )(code)\n }\n /** @type {State} */\n\n function tableBodyClose(code) {\n effects.exit('tableBody')\n return tableClose(code)\n }\n /** @type {Tokenizer} */\n\n function tokenizeRowEnd(effects, ok, nok) {\n return start\n /** @type {State} */\n\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, prefixed, 'linePrefix')\n }\n /** @type {State} */\n\n function prefixed(code) {\n // Blank or interrupting line.\n if (\n self.parser.lazy[self.now().line] ||\n code === null ||\n markdownLineEnding(code)\n ) {\n return nok(code)\n }\n\n const tail = self.events[self.events.length - 1] // Indented code can interrupt delimiter and body rows.\n\n if (\n !self.parser.constructs.disable.null.includes('codeIndented') &&\n tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ) {\n return nok(code)\n }\n\n self._gfmTableDynamicInterruptHack = true\n return effects.check(\n self.parser.constructs.flow,\n function (code) {\n self._gfmTableDynamicInterruptHack = false\n return nok(code)\n },\n function (code) {\n self._gfmTableDynamicInterruptHack = false\n return ok(code)\n }\n )(code)\n }\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeNextPrefixedOrBlank(effects, ok, nok) {\n let size = 0\n return start\n /** @type {State} */\n\n function start(code) {\n // This is a check, so we don’t care about tokens, but we open a bogus one\n // so we’re valid.\n effects.enter('check') // EOL.\n\n effects.consume(code)\n return whitespace\n }\n /** @type {State} */\n\n function whitespace(code) {\n if (code === -1 || code === 32) {\n effects.consume(code)\n size++\n return size === 4 ? ok : whitespace\n } // EOF or whitespace\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n return ok(code)\n } // Anything else.\n\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').CompileContext} CompileContext\n */\n\n/**\n * An opening or closing tag, followed by a case-insensitive specific tag name,\n * followed by HTML whitespace, a greater than, or a slash.\n */\nconst reFlow =\n /<(\\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\\t\\n\\f\\r />])/gi\n\n/**\n * As HTML (text) parses tags separately (and v. strictly), we don’t need to be\n * global.\n */\nconst reText = new RegExp('^' + reFlow.source, 'i')\n\n/** @type {HtmlExtension} */\nexport const gfmTagfilterHtml = {\n exit: {\n htmlFlowData(token) {\n exitHtmlData.call(this, token, reFlow)\n },\n htmlTextData(token) {\n exitHtmlData.call(this, token, reText)\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @param {Token} token\n * @param {RegExp} filter\n */\nfunction exitHtmlData(token, filter) {\n let value = this.sliceSerialize(token)\n\n if (this.options.allowDangerousHtml) {\n value = value.replace(filter, '<$1$2')\n }\n\n this.raw(this.encode(value))\n}\n","export {gfmTaskListItemHtml} from './lib/html.js'\nexport {gfmTaskListItem} from './lib/syntax.js'\n","/**\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\n/** @type {HtmlExtension} */\nexport const gfmTaskListItemHtml = {\n enter: {\n taskListCheck() {\n this.tag('')\n },\n\n taskListCheckValueChecked() {\n this.tag('checked=\"\" ')\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Code} Code\n */\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEndingOrSpace,\n markdownLineEnding\n} from 'micromark-util-character'\nconst tasklistCheck = {\n tokenize: tokenizeTasklistCheck\n}\nexport const gfmTaskListItem = {\n text: {\n [91]: tasklistCheck\n }\n}\n/** @type {Tokenizer} */\n\nfunction tokenizeTasklistCheck(effects, ok, nok) {\n const self = this\n return open\n /** @type {State} */\n\n function open(code) {\n if (\n // Exit if there’s stuff before.\n self.previous !== null || // Exit if not in the first content that is the first child of a list\n // item.\n !self._gfmTasklistFirstContentOfListItem\n ) {\n return nok(code)\n }\n\n effects.enter('taskListCheck')\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n return inside\n }\n /** @type {State} */\n\n function inside(code) {\n // To match how GH works in comments, use `markdownSpace` (`[ \\t]`) instead\n // of `markdownLineEndingOrSpace` (`[ \\t\\r\\n]`).\n if (markdownLineEndingOrSpace(code)) {\n effects.enter('taskListCheckValueUnchecked')\n effects.consume(code)\n effects.exit('taskListCheckValueUnchecked')\n return close\n }\n\n if (code === 88 || code === 120) {\n effects.enter('taskListCheckValueChecked')\n effects.consume(code)\n effects.exit('taskListCheckValueChecked')\n return close\n }\n\n return nok(code)\n }\n /** @type {State} */\n\n function close(code) {\n if (code === 93) {\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n effects.exit('taskListCheck')\n return effects.check(\n {\n tokenize: spaceThenNonSpace\n },\n ok,\n nok\n )\n }\n\n return nok(code)\n }\n}\n/** @type {Tokenizer} */\n\nfunction spaceThenNonSpace(effects, ok, nok) {\n const self = this\n return factorySpace(effects, after, 'whitespace')\n /** @type {State} */\n\n function after(code) {\n const tail = self.events[self.events.length - 1]\n return (\n // We either found spaces…\n ((tail && tail[1].type === 'whitespace') || // …or it was followed by a line ending, in which case, there has to be\n // non-whitespace after that line ending, because otherwise we’d get an\n // EOF as the content is closed with blank lines.\n markdownLineEnding(code)) &&\n code !== null\n ? ok(code)\n : nok(code)\n )\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options\n * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions\n */\n\nimport {\n combineExtensions,\n combineHtmlExtensions\n} from 'micromark-util-combine-extensions'\nimport {\n gfmAutolinkLiteral,\n gfmAutolinkLiteralHtml\n} from 'micromark-extension-gfm-autolink-literal'\nimport {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'\nimport {\n gfmStrikethrough,\n gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\nimport {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'\nimport {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'\nimport {\n gfmTaskListItem,\n gfmTaskListItemHtml\n} from 'micromark-extension-gfm-task-list-item'\n\n/**\n * Support GFM or markdown on github.com.\n *\n * @param {Options} [options]\n * @returns {Extension}\n */\nexport function gfm(options) {\n return combineExtensions([\n gfmAutolinkLiteral,\n gfmFootnote(),\n gfmStrikethrough(options),\n gfmTable,\n gfmTaskListItem\n ])\n}\n\n/**\n * Support to compile GFM to HTML.\n *\n * @param {HtmlOptions} [options]\n * @returns {HtmlExtension}\n */\nexport function gfmHtml(options) {\n return combineHtmlExtensions([\n gfmAutolinkLiteralHtml,\n gfmFootnoteHtml(options),\n gfmStrikethroughHtml,\n gfmTableHtml,\n gfmTagfilterHtml,\n gfmTaskListItemHtml\n ])\n}\n","/**\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenType} TokenType\n */\n\nimport {\n asciiControl,\n markdownLineEndingOrSpace,\n markdownLineEnding\n} from 'micromark-util-character'\n/**\n * Parse destinations.\n *\n * ###### Examples\n *\n * ```markdown\n * \n * b>\n * \n * \n * a\n * a\\)b\n * a(b)c\n * a(b)\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type for whole (`` or `b`).\n * @param {TokenType} literalType\n * Type when enclosed (``).\n * @param {TokenType} literalMarkerType\n * Type for enclosing (`<` and `>`).\n * @param {TokenType} rawType\n * Type when not enclosed (`b`).\n * @param {TokenType} stringType\n * Type for the value (`a` or `b`).\n * @param {number | undefined} [max=Infinity]\n * Depth of nested parens (inclusive).\n * @returns {State}\n * Start state.\n */ // eslint-disable-next-line max-params\nexport function factoryDestination(\n effects,\n ok,\n nok,\n type,\n literalType,\n literalMarkerType,\n rawType,\n stringType,\n max\n) {\n const limit = max || Number.POSITIVE_INFINITY\n let balance = 0\n return start\n\n /**\n * Start of destination.\n *\n * ```markdown\n * > | \n * ^\n * > | aa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 60) {\n effects.enter(type)\n effects.enter(literalType)\n effects.enter(literalMarkerType)\n effects.consume(code)\n effects.exit(literalMarkerType)\n return enclosedBefore\n }\n\n // ASCII control, space, closing paren.\n if (code === null || code === 32 || code === 41 || asciiControl(code)) {\n return nok(code)\n }\n effects.enter(type)\n effects.enter(rawType)\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return raw(code)\n }\n\n /**\n * After `<`, at an enclosed destination.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function enclosedBefore(code) {\n if (code === 62) {\n effects.enter(literalMarkerType)\n effects.consume(code)\n effects.exit(literalMarkerType)\n effects.exit(literalType)\n effects.exit(type)\n return ok\n }\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return enclosed(code)\n }\n\n /**\n * In enclosed destination.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function enclosed(code) {\n if (code === 62) {\n effects.exit('chunkString')\n effects.exit(stringType)\n return enclosedBefore(code)\n }\n if (code === null || code === 60 || markdownLineEnding(code)) {\n return nok(code)\n }\n effects.consume(code)\n return code === 92 ? enclosedEscape : enclosed\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function enclosedEscape(code) {\n if (code === 60 || code === 62 || code === 92) {\n effects.consume(code)\n return enclosed\n }\n return enclosed(code)\n }\n\n /**\n * In raw destination.\n *\n * ```markdown\n * > | aa\n * ^\n * ```\n *\n * @type {State}\n */\n function raw(code) {\n if (\n !balance &&\n (code === null || code === 41 || markdownLineEndingOrSpace(code))\n ) {\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n if (balance < limit && code === 40) {\n effects.consume(code)\n balance++\n return raw\n }\n if (code === 41) {\n effects.consume(code)\n balance--\n return raw\n }\n\n // ASCII control (but *not* `\\0`) and space and `(`.\n // Note: in `markdown-rs`, `\\0` exists in codes, in `micromark-js` it\n // doesn’t.\n if (code === null || code === 32 || code === 40 || asciiControl(code)) {\n return nok(code)\n }\n effects.consume(code)\n return code === 92 ? rawEscape : raw\n }\n\n /**\n * After `\\`, at special character.\n *\n * ```markdown\n * > | a\\*a\n * ^\n * ```\n *\n * @type {State}\n */\n function rawEscape(code) {\n if (code === 40 || code === 41 || code === 92) {\n effects.consume(code)\n return raw\n }\n return raw(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').TokenType} TokenType\n */\n\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/**\n * Parse labels.\n *\n * > 👉 **Note**: labels in markdown are capped at 999 characters in the string.\n *\n * ###### Examples\n *\n * ```markdown\n * [a]\n * [a\n * b]\n * [a\\]b]\n * ```\n *\n * @this {TokenizeContext}\n * Tokenize context.\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type of the whole label (`[a]`).\n * @param {TokenType} markerType\n * Type for the markers (`[` and `]`).\n * @param {TokenType} stringType\n * Type for the identifier (`a`).\n * @returns {State}\n * Start state.\n */ // eslint-disable-next-line max-params\nexport function factoryLabel(effects, ok, nok, type, markerType, stringType) {\n const self = this\n let size = 0\n /** @type {boolean} */\n let seen\n return start\n\n /**\n * Start of label.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(type)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n effects.enter(stringType)\n return atBreak\n }\n\n /**\n * In label, at something, before something else.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (\n size > 999 ||\n code === null ||\n code === 91 ||\n (code === 93 && !seen) ||\n // To do: remove in the future once we’ve switched from\n // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,\n // which doesn’t need this.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n (code === 94 &&\n !size &&\n '_hiddenFootnoteSupport' in self.parser.constructs)\n ) {\n return nok(code)\n }\n if (code === 93) {\n effects.exit(stringType)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n effects.exit(type)\n return ok\n }\n\n // To do: indent? Link chunks and EOLs together?\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return atBreak\n }\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return labelInside(code)\n }\n\n /**\n * In label, in text.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (\n code === null ||\n code === 91 ||\n code === 93 ||\n markdownLineEnding(code) ||\n size++ > 999\n ) {\n effects.exit('chunkString')\n return atBreak(code)\n }\n effects.consume(code)\n if (!seen) seen = !markdownSpace(code)\n return code === 92 ? labelEscape : labelInside\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | [a\\*a]\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return labelInside\n }\n return labelInside(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenType} TokenType\n */\n\nimport {markdownSpace} from 'micromark-util-character'\n\n// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`.\n\n/**\n * Parse spaces and tabs.\n *\n * There is no `nok` parameter:\n *\n * * spaces in markdown are often optional, in which case this factory can be\n * used and `ok` will be switched to whether spaces were found or not\n * * one line ending or space can be detected with `markdownSpace(code)` right\n * before using `factorySpace`\n *\n * ###### Examples\n *\n * Where `␉` represents a tab (plus how much it expands) and `␠` represents a\n * single space.\n *\n * ```markdown\n * ␉\n * ␠␠␠␠\n * ␉␠\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {TokenType} type\n * Type (`' \\t'`).\n * @param {number | undefined} [max=Infinity]\n * Max (exclusive).\n * @returns\n * Start state.\n */\nexport function factorySpace(effects, ok, type, max) {\n const limit = max ? max - 1 : Number.POSITIVE_INFINITY\n let size = 0\n return start\n\n /** @type {State} */\n function start(code) {\n if (markdownSpace(code)) {\n effects.enter(type)\n return prefix(code)\n }\n return ok(code)\n }\n\n /** @type {State} */\n function prefix(code) {\n if (markdownSpace(code) && size++ < limit) {\n effects.consume(code)\n return prefix\n }\n effects.exit(type)\n return ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenType} TokenType\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/**\n * Parse titles.\n *\n * ###### Examples\n *\n * ```markdown\n * \"a\"\n * 'b'\n * (c)\n * \"a\n * b\"\n * 'a\n * b'\n * (a\\)b)\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type of the whole title (`\"a\"`, `'b'`, `(c)`).\n * @param {TokenType} markerType\n * Type for the markers (`\"`, `'`, `(`, and `)`).\n * @param {TokenType} stringType\n * Type for the value (`a`).\n * @returns {State}\n * Start state.\n */ // eslint-disable-next-line max-params\nexport function factoryTitle(effects, ok, nok, type, markerType, stringType) {\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of title.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 34 || code === 39 || code === 40) {\n effects.enter(type)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n marker = code === 40 ? 41 : code\n return begin\n }\n return nok(code)\n }\n\n /**\n * After opening marker.\n *\n * This is also used at the closing marker.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function begin(code) {\n if (code === marker) {\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n effects.exit(type)\n return ok\n }\n effects.enter(stringType)\n return atBreak(code)\n }\n\n /**\n * At something, before something else.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.exit(stringType)\n return begin(marker)\n }\n if (code === null) {\n return nok(code)\n }\n\n // Note: blank lines can’t exist in content.\n if (markdownLineEnding(code)) {\n // To do: use `space_or_tab_eol_with_options`, connect.\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, atBreak, 'linePrefix')\n }\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return inside(code)\n }\n\n /**\n *\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker || code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n return atBreak(code)\n }\n effects.consume(code)\n return code === 92 ? escape : inside\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | \"a\\*b\"\n * ^\n * ```\n *\n * @type {State}\n */\n function escape(code) {\n if (code === marker || code === 92) {\n effects.consume(code)\n return inside\n }\n return inside(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').State} State\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/**\n * Parse spaces and tabs.\n *\n * There is no `nok` parameter:\n *\n * * line endings or spaces in markdown are often optional, in which case this\n * factory can be used and `ok` will be switched to whether spaces were found\n * or not\n * * one line ending or space can be detected with\n * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @returns\n * Start state.\n */\nexport function factoryWhitespace(effects, ok) {\n /** @type {boolean} */\n let seen\n return start\n\n /** @type {State} */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n seen = true\n return start\n }\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n start,\n seen ? 'linePrefix' : 'lineSuffix'\n )(code)\n }\n return ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {unicodePunctuationRegex} from './lib/unicode-punctuation-regex.js'\n\n/**\n * Check whether the character code represents an ASCII alpha (`a` through `z`,\n * case insensitive).\n *\n * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.\n *\n * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)\n * to U+005A (`Z`).\n *\n * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)\n * to U+007A (`z`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAlpha = regexCheck(/[A-Za-z]/)\n\n/**\n * Check whether the character code represents an ASCII alphanumeric (`a`\n * through `z`, case insensitive, or `0` through `9`).\n *\n * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha\n * (see `asciiAlpha`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/)\n\n/**\n * Check whether the character code represents an ASCII atext.\n *\n * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in\n * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),\n * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F\n * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E\n * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE\n * (`{`) to U+007E TILDE (`~`).\n *\n * See:\n * **\\[RFC5322]**:\n * [Internet Message Format](https://tools.ietf.org/html/rfc5322).\n * P. Resnick.\n * IETF.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/)\n\n/**\n * Check whether a character code is an ASCII control character.\n *\n * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)\n * to U+001F (US), or U+007F (DEL).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code !== null && (code < 32 || code === 127)\n )\n}\n\n/**\n * Check whether the character code represents an ASCII digit (`0` through `9`).\n *\n * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to\n * U+0039 (`9`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiDigit = regexCheck(/\\d/)\n\n/**\n * Check whether the character code represents an ASCII hex digit (`a` through\n * `f`, case insensitive, or `0` through `9`).\n *\n * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex\n * digit, or an ASCII lower hex digit.\n *\n * An **ASCII upper hex digit** is a character in the inclusive range U+0041\n * (`A`) to U+0046 (`F`).\n *\n * An **ASCII lower hex digit** is a character in the inclusive range U+0061\n * (`a`) to U+0066 (`f`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiHexDigit = regexCheck(/[\\dA-Fa-f]/)\n\n/**\n * Check whether the character code represents ASCII punctuation.\n *\n * An **ASCII punctuation** is a character in the inclusive ranges U+0021\n * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT\n * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT\n * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)\n\n/**\n * Check whether a character code is a markdown line ending.\n *\n * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN\n * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).\n *\n * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE\n * RETURN (CR) are replaced by these virtual characters depending on whether\n * they occurred together.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEnding(code) {\n return code !== null && code < -2\n}\n\n/**\n * Check whether a character code is a markdown line ending (see\n * `markdownLineEnding`) or markdown space (see `markdownSpace`).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEndingOrSpace(code) {\n return code !== null && (code < 0 || code === 32)\n}\n\n/**\n * Check whether a character code is a markdown space.\n *\n * A **markdown space** is the concrete character U+0020 SPACE (SP) and the\n * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).\n *\n * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is\n * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL\n * SPACE (VS) characters, depending on the column at which the tab occurred.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownSpace(code) {\n return code === -2 || code === -1 || code === 32\n}\n\n// Size note: removing ASCII from the regex and using `asciiPunctuation` here\n// In fact adds to the bundle size.\n/**\n * Check whether the character code represents Unicode punctuation.\n *\n * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,\n * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`\n * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`\n * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII\n * punctuation (see `asciiPunctuation`).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodePunctuation = regexCheck(unicodePunctuationRegex)\n\n/**\n * Check whether the character code represents Unicode whitespace.\n *\n * Note that this does handle micromark specific markdown whitespace characters.\n * See `markdownLineEndingOrSpace` to check that.\n *\n * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,\n * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),\n * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\\[UNICODE]**).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodeWhitespace = regexCheck(/\\s/)\n\n/**\n * Create a code check from a regex.\n *\n * @param {RegExp} regex\n * @returns {(code: Code) => boolean}\n */\nfunction regexCheck(regex) {\n return check\n\n /**\n * Check whether a code matches the bound regex.\n *\n * @param {Code} code\n * Character code.\n * @returns {boolean}\n * Whether the character code matches the bound regex.\n */\n function check(code) {\n return code !== null && regex.test(String.fromCharCode(code))\n }\n}\n","// This module is generated by `script/`.\n//\n// CommonMark handles attention (emphasis, strong) markers based on what comes\n// before or after them.\n// One such difference is if those characters are Unicode punctuation.\n// This script is generated from the Unicode data.\n\n/**\n * Regular expression that matches a unicode punctuation character.\n */\nexport const unicodePunctuationRegex =\n /[!-\\/:-@\\[-`\\{-~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1B7D\\u1B7E\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52-\\u2E5D\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/\n","/**\n * Like `Array#splice`, but smarter for giant arrays.\n *\n * `Array#splice` takes all items to be inserted as individual argument which\n * causes a stack overflow in V8 when trying to insert 100k items for instance.\n *\n * Otherwise, this does not return the removed items, and takes `items` as an\n * array instead of rest parameters.\n *\n * @template {unknown} T\n * Item type.\n * @param {Array} list\n * List to operate on.\n * @param {number} start\n * Index to remove/insert at (can be negative).\n * @param {number} remove\n * Number of items to remove.\n * @param {Array} items\n * Items to inject into `list`.\n * @returns {void}\n * Nothing.\n */\nexport function splice(list, start, remove, items) {\n const end = list.length\n let chunkStart = 0\n /** @type {Array} */\n let parameters\n\n // Make start between zero and `end` (included).\n if (start < 0) {\n start = -start > end ? 0 : end + start\n } else {\n start = start > end ? end : start\n }\n remove = remove > 0 ? remove : 0\n\n // No need to chunk the items if there’s only a couple (10k) items.\n if (items.length < 10000) {\n parameters = Array.from(items)\n parameters.unshift(start, remove)\n // @ts-expect-error Hush, it’s fine.\n list.splice(...parameters)\n } else {\n // Delete `remove` items starting from `start`\n if (remove) list.splice(start, remove)\n\n // Insert the items in chunks to not cause stack overflows.\n while (chunkStart < items.length) {\n parameters = items.slice(chunkStart, chunkStart + 10000)\n parameters.unshift(start, 0)\n // @ts-expect-error Hush, it’s fine.\n list.splice(...parameters)\n chunkStart += 10000\n start += 10000\n }\n }\n}\n\n/**\n * Append `items` (an array) at the end of `list` (another array).\n * When `list` was empty, returns `items` instead.\n *\n * This prevents a potentially expensive operation when `list` is empty,\n * and adds items in batches to prevent V8 from hanging.\n *\n * @template {unknown} T\n * Item type.\n * @param {Array} list\n * List to operate on.\n * @param {Array} items\n * Items to add to `list`.\n * @returns {Array}\n * Either `list` or `items`.\n */\nexport function push(list, items) {\n if (list.length > 0) {\n splice(list, list.length, 0, items)\n return list\n }\n return items\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Handles} Handles\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension\n */\n\nimport {splice} from 'micromark-util-chunked'\n\nconst hasOwnProperty = {}.hasOwnProperty\n\n/**\n * Combine multiple syntax extensions into one.\n *\n * @param {Array} extensions\n * List of syntax extensions.\n * @returns {NormalizedExtension}\n * A single combined extension.\n */\nexport function combineExtensions(extensions) {\n /** @type {NormalizedExtension} */\n const all = {}\n let index = -1\n\n while (++index < extensions.length) {\n syntaxExtension(all, extensions[index])\n }\n\n return all\n}\n\n/**\n * Merge `extension` into `all`.\n *\n * @param {NormalizedExtension} all\n * Extension to merge into.\n * @param {Extension} extension\n * Extension to merge.\n * @returns {void}\n */\nfunction syntaxExtension(all, extension) {\n /** @type {keyof Extension} */\n let hook\n\n for (hook in extension) {\n const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined\n /** @type {Record} */\n const left = maybe || (all[hook] = {})\n /** @type {Record | undefined} */\n const right = extension[hook]\n /** @type {string} */\n let code\n\n if (right) {\n for (code in right) {\n if (!hasOwnProperty.call(left, code)) left[code] = []\n const value = right[code]\n constructs(\n // @ts-expect-error Looks like a list.\n left[code],\n Array.isArray(value) ? value : value ? [value] : []\n )\n }\n }\n }\n}\n\n/**\n * Merge `list` into `existing` (both lists of constructs).\n * Mutates `existing`.\n *\n * @param {Array} existing\n * @param {Array} list\n * @returns {void}\n */\nfunction constructs(existing, list) {\n let index = -1\n /** @type {Array} */\n const before = []\n\n while (++index < list.length) {\n // @ts-expect-error Looks like an object.\n ;(list[index].add === 'after' ? existing : before).push(list[index])\n }\n\n splice(existing, 0, 0, before)\n}\n\n/**\n * Combine multiple HTML extensions into one.\n *\n * @param {Array} htmlExtensions\n * List of HTML extensions.\n * @returns {HtmlExtension}\n * A single combined HTML extension.\n */\nexport function combineHtmlExtensions(htmlExtensions) {\n /** @type {HtmlExtension} */\n const handlers = {}\n let index = -1\n\n while (++index < htmlExtensions.length) {\n htmlExtension(handlers, htmlExtensions[index])\n }\n\n return handlers\n}\n\n/**\n * Merge `extension` into `all`.\n *\n * @param {HtmlExtension} all\n * Extension to merge into.\n * @param {HtmlExtension} extension\n * Extension to merge.\n * @returns {void}\n */\nfunction htmlExtension(all, extension) {\n /** @type {keyof HtmlExtension} */\n let hook\n\n for (hook in extension) {\n const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined\n const left = maybe || (all[hook] = {})\n const right = extension[hook]\n /** @type {keyof Handles} */\n let type\n\n if (right) {\n for (type in right) {\n // @ts-expect-error assume document vs regular handler are managed correctly.\n left[type] = right[type]\n }\n }\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base)\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 ||\n code === 11 ||\n (code > 13 && code < 32) ||\n // Control character (DEL) of C0, and C1 controls.\n (code > 126 && code < 160) ||\n // Lone high surrogates and low surrogates.\n (code > 55295 && code < 57344) ||\n // Noncharacters.\n (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||\n (code & 65535) === 65535 ||\n (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||\n // Out of range\n code > 1114111\n ) {\n return '\\uFFFD'\n }\n return String.fromCharCode(code)\n}\n","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @param {string} $2\n * @returns {string}\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1\n }\n\n // Reference.\n const head = $2.charCodeAt(0)\n if (head === 35) {\n const head = $2.charCodeAt(1)\n const hex = head === 120 || head === 88\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)\n }\n return decodeNamedCharacterReference($2) || $0\n}\n","const characterReferences = {'\"': 'quot', '&': 'amp', '<': 'lt', '>': 'gt'}\n\n/**\n * Encode only the dangerous HTML characters.\n *\n * This ensures that certain characters which have special meaning in HTML are\n * dealt with.\n * Technically, we can skip `>` and `\"` in many cases, but CM includes them.\n *\n * @param {string} value\n * Value to encode.\n * @returns {string}\n * Encoded value.\n */\nexport function encode(value) {\n return value.replace(/[\"&<>]/g, replace)\n\n /**\n * @param {string} value\n * @returns {string}\n */\n function replace(value) {\n // @ts-expect-error Hush, it’s fine.\n return '&' + characterReferences[value] + ';'\n }\n}\n","/**\n * List of lowercase HTML “block” tag names.\n *\n * The list, when parsing HTML (flow), results in more relaxed rules (condition\n * 6).\n * Because they are known blocks, the HTML-like syntax doesn’t have to be\n * strictly parsed.\n * For tag names not in this list, a more strict algorithm (condition 7) is used\n * to detect whether the HTML-like syntax is seen as HTML (flow) or not.\n *\n * This is copied from:\n * .\n *\n * > 👉 **Note**: `search` was added in `CommonMark@0.31`.\n */\nexport const htmlBlockNames = [\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 'hr',\n 'html',\n 'iframe',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'menu',\n 'menuitem',\n 'nav',\n 'noframes',\n 'ol',\n 'optgroup',\n 'option',\n 'p',\n 'param',\n 'search',\n 'section',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n]\n\n/**\n * List of lowercase HTML “raw” tag names.\n *\n * The list, when parsing HTML (flow), results in HTML that can include lines\n * without exiting, until a closing tag also in this list is found (condition\n * 1).\n *\n * This module is copied from:\n * .\n *\n * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.\n */\nexport const htmlRawNames = ['pre', 'script', 'style', 'textarea']\n","/**\n * Normalize an identifier (as found in references, definitions).\n *\n * Collapses markdown whitespace, trim, and then lower- and uppercase.\n *\n * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their\n * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different\n * uppercase character (U+0398 (`Θ`)).\n * So, to get a canonical form, we perform both lower- and uppercase.\n *\n * Using uppercase last makes sure keys will never interact with default\n * prototypal values (such as `constructor`): nothing in the prototype of\n * `Object` is uppercase.\n *\n * @param {string} value\n * Identifier to normalize.\n * @returns {string}\n * Normalized identifier.\n */\nexport function normalizeIdentifier(value) {\n return (\n value\n // Collapse markdown whitespace.\n .replace(/[\\t\\n\\r ]+/g, ' ')\n // Trim.\n .replace(/^ | $/g, '')\n // Some characters are considered “uppercase”, but if their lowercase\n // counterpart is uppercased will result in a different uppercase\n // character.\n // Hence, to get that form, we perform both lower- and uppercase.\n // Upper case makes sure keys will not interact with default prototypal\n // methods: no method is uppercase.\n .toLowerCase()\n .toUpperCase()\n )\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\n/**\n * Call all `resolveAll`s.\n *\n * @param {Array<{resolveAll?: Resolver | undefined}>} constructs\n * List of constructs, optionally with `resolveAll`s.\n * @param {Array} events\n * List of events.\n * @param {TokenizeContext} context\n * Context used by `tokenize`.\n * @returns {Array}\n * Changed events.\n */\nexport function resolveAll(constructs, events, context) {\n /** @type {Array} */\n const called = []\n let index = -1\n\n while (++index < constructs.length) {\n const resolve = constructs[index].resolveAll\n\n if (resolve && !called.includes(resolve)) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n","import {asciiAlphanumeric} from 'micromark-util-character'\nimport {encode} from 'micromark-util-encode'\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''))\n if (!protocol) {\n return value\n }\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\n return value\n }\n return ''\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array} */\n const result = []\n let index = -1\n let start = 0\n let skip = 0\n while (++index < value.length) {\n const code = value.charCodeAt(index)\n /** @type {string} */\n let replace = ''\n\n // A correct percent encoded value.\n if (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\n skip = 2\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code)\n }\n }\n // Astral.\n else if (code > 55295 && code < 57344) {\n const next = value.charCodeAt(index + 1)\n\n // A correct surrogate pair.\n if (code < 56320 && next > 56319 && next < 57344) {\n replace = String.fromCharCode(code, next)\n skip = 1\n }\n // Lone surrogate.\n else {\n replace = '\\uFFFD'\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code)\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace))\n start = index + skip + 1\n replace = ''\n }\n if (skip) {\n index += skip\n skip = 0\n }\n }\n return result.join('') + value.slice(start)\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Token} Token\n */\n\nimport {splice} from 'micromark-util-chunked'\n/**\n * Tokenize subcontent.\n *\n * @param {Array} events\n * List of events.\n * @returns {boolean}\n * Whether subtokens were found.\n */\nexport function subtokenize(events) {\n /** @type {Record} */\n const jumps = {}\n let index = -1\n /** @type {Event} */\n let event\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number} */\n let otherIndex\n /** @type {Event} */\n let otherEvent\n /** @type {Array} */\n let parameters\n /** @type {Array} */\n let subevents\n /** @type {boolean | undefined} */\n let more\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index]\n }\n event = events[index]\n\n // Add a hook for the GFM tasklist extension, which needs to know if text\n // is in the first content of a list item.\n if (\n index &&\n event[1].type === 'chunkFlow' &&\n events[index - 1][1].type === 'listItemPrefix'\n ) {\n subevents = event[1]._tokenizer.events\n otherIndex = 0\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'lineEndingBlank'\n ) {\n otherIndex += 2\n }\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'content'\n ) {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === 'content') {\n break\n }\n if (subevents[otherIndex][1].type === 'chunkText') {\n subevents[otherIndex][1]._isInFirstContentOfListItem = true\n otherIndex++\n }\n }\n }\n }\n\n // Enter.\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n Object.assign(jumps, subcontent(events, index))\n index = jumps[index]\n more = true\n }\n }\n // Exit.\n else if (event[1]._container) {\n otherIndex = index\n lineIndex = undefined\n while (otherIndex--) {\n otherEvent = events[otherIndex]\n if (\n otherEvent[1].type === 'lineEnding' ||\n otherEvent[1].type === 'lineEndingBlank'\n ) {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n }\n otherEvent[1].type = 'lineEnding'\n lineIndex = otherIndex\n }\n } else {\n break\n }\n }\n if (lineIndex) {\n // Fix position.\n event[1].end = Object.assign({}, events[lineIndex][1].start)\n\n // Switch container exit w/ line endings.\n parameters = events.slice(lineIndex, index)\n parameters.unshift(event)\n splice(events, lineIndex, index - lineIndex + 1, parameters)\n }\n }\n }\n return !more\n}\n\n/**\n * Tokenize embedded tokens.\n *\n * @param {Array} events\n * @param {number} eventIndex\n * @returns {Record}\n */\nfunction subcontent(events, eventIndex) {\n const token = events[eventIndex][1]\n const context = events[eventIndex][2]\n let startPosition = eventIndex - 1\n /** @type {Array} */\n const startPositions = []\n const tokenizer =\n token._tokenizer || context.parser[token.contentType](token.start)\n const childEvents = tokenizer.events\n /** @type {Array<[number, number]>} */\n const jumps = []\n /** @type {Record} */\n const gaps = {}\n /** @type {Array} */\n let stream\n /** @type {Token | undefined} */\n let previous\n let index = -1\n /** @type {Token | undefined} */\n let current = token\n let adjust = 0\n let start = 0\n const breaks = [start]\n\n // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n while (current) {\n // Find the position of the event for this token.\n while (events[++startPosition][1] !== current) {\n // Empty.\n }\n startPositions.push(startPosition)\n if (!current._tokenizer) {\n stream = context.sliceStream(current)\n if (!current.next) {\n stream.push(null)\n }\n if (previous) {\n tokenizer.defineSkip(current.start)\n }\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true\n }\n tokenizer.write(stream)\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined\n }\n }\n\n // Unravel the next token.\n previous = current\n current = current.next\n }\n\n // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n current = token\n while (++index < childEvents.length) {\n if (\n // Find a void token that includes a break.\n childEvents[index][0] === 'exit' &&\n childEvents[index - 1][0] === 'enter' &&\n childEvents[index][1].type === childEvents[index - 1][1].type &&\n childEvents[index][1].start.line !== childEvents[index][1].end.line\n ) {\n start = index + 1\n breaks.push(start)\n // Help GC.\n current._tokenizer = undefined\n current.previous = undefined\n current = current.next\n }\n }\n\n // Help GC.\n tokenizer.events = []\n\n // If there’s one more token (which is the cases for lines that end in an\n // EOF), that’s perfect: the last point we found starts it.\n // If there isn’t then make sure any remaining content is added to it.\n if (current) {\n // Help GC.\n current._tokenizer = undefined\n current.previous = undefined\n } else {\n breaks.pop()\n }\n\n // Now splice the events from the subtokenizer into the current events,\n // moving back to front so that splice indices aren’t affected.\n index = breaks.length\n while (index--) {\n const slice = childEvents.slice(breaks[index], breaks[index + 1])\n const start = startPositions.pop()\n jumps.unshift([start, start + slice.length - 1])\n splice(events, start, 2, slice)\n }\n index = -1\n while (++index < jumps.length) {\n gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]\n adjust += jumps[index][1] - jumps[index][0] - 1\n }\n return gaps\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} from 'micromark-core-commonmark'\nimport {resolver as resolveText} from './initialize/text.js'\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n}\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n}\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n}\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n}\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n}\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n}\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n}\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n}\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Effects} Effects\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenType} TokenType\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\n/**\n * @callback Restore\n * @returns {void}\n *\n * @typedef Info\n * @property {Restore} restore\n * @property {number} from\n *\n * @callback ReturnHandle\n * Handle a successful run.\n * @param {Construct} construct\n * @param {Info} info\n * @returns {void}\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/**\n * Create a tokenizer.\n * Tokenizers deal with one type of data (e.g., containers, flow, text).\n * The parser is the object dealing with it all.\n * `initialize` works like other constructs, except that only its `tokenize`\n * function is used, in which case it doesn’t receive an `ok` or `nok`.\n * `from` can be given to set the point before the first character, although\n * when further lines are indented, they must be set with `defineSkip`.\n *\n * @param {ParseContext} parser\n * @param {InitialConstruct} initialize\n * @param {Omit | undefined} [from]\n * @returns {TokenizeContext}\n */\nexport function createTokenizer(parser, initialize, from) {\n /** @type {Point} */\n let point = Object.assign(\n from\n ? Object.assign({}, from)\n : {\n line: 1,\n column: 1,\n offset: 0\n },\n {\n _index: 0,\n _bufferIndex: -1\n }\n )\n /** @type {Record} */\n const columnStart = {}\n /** @type {Array} */\n const resolveAllConstructs = []\n /** @type {Array} */\n let chunks = []\n /** @type {Array} */\n let stack = []\n /** @type {boolean | undefined} */\n let consumed = true\n\n /**\n * Tools used for tokenizing.\n *\n * @type {Effects}\n */\n const effects = {\n consume,\n enter,\n exit,\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\n interrupt: constructFactory(onsuccessfulcheck, {\n interrupt: true\n })\n }\n\n /**\n * State and tools for resolving and serializing.\n *\n * @type {TokenizeContext}\n */\n const context = {\n previous: null,\n code: null,\n containerState: {},\n events: [],\n parser,\n sliceStream,\n sliceSerialize,\n now,\n defineSkip,\n write\n }\n\n /**\n * The state function.\n *\n * @type {State | void}\n */\n let state = initialize.tokenize.call(context, effects)\n\n /**\n * Track which character we expect to be consumed, to catch bugs.\n *\n * @type {Code}\n */\n let expectedCode\n if (initialize.resolveAll) {\n resolveAllConstructs.push(initialize)\n }\n return context\n\n /** @type {TokenizeContext['write']} */\n function write(slice) {\n chunks = push(chunks, slice)\n main()\n\n // Exit if we’re not done, resolve might change stuff.\n if (chunks[chunks.length - 1] !== null) {\n return []\n }\n addResult(initialize, 0)\n\n // Otherwise, resolve, and exit.\n context.events = resolveAll(resolveAllConstructs, context.events, context)\n return context.events\n }\n\n //\n // Tools.\n //\n\n /** @type {TokenizeContext['sliceSerialize']} */\n function sliceSerialize(token, expandTabs) {\n return serializeChunks(sliceStream(token), expandTabs)\n }\n\n /** @type {TokenizeContext['sliceStream']} */\n function sliceStream(token) {\n return sliceChunks(chunks, token)\n }\n\n /** @type {TokenizeContext['now']} */\n function now() {\n // This is a hot path, so we clone manually instead of `Object.assign({}, point)`\n const {line, column, offset, _index, _bufferIndex} = point\n return {\n line,\n column,\n offset,\n _index,\n _bufferIndex\n }\n }\n\n /** @type {TokenizeContext['defineSkip']} */\n function defineSkip(value) {\n columnStart[value.line] = value.column\n accountForPotentialSkip()\n }\n\n //\n // State management.\n //\n\n /**\n * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by\n * `consume`).\n * Here is where we walk through the chunks, which either include strings of\n * several characters, or numerical character codes.\n * The reason to do this in a loop instead of a call is so the stack can\n * drain.\n *\n * @returns {void}\n */\n function main() {\n /** @type {number} */\n let chunkIndex\n while (point._index < chunks.length) {\n const chunk = chunks[point._index]\n\n // If we’re in a buffer chunk, loop through it.\n if (typeof chunk === 'string') {\n chunkIndex = point._index\n if (point._bufferIndex < 0) {\n point._bufferIndex = 0\n }\n while (\n point._index === chunkIndex &&\n point._bufferIndex < chunk.length\n ) {\n go(chunk.charCodeAt(point._bufferIndex))\n }\n } else {\n go(chunk)\n }\n }\n }\n\n /**\n * Deal with one code.\n *\n * @param {Code} code\n * @returns {void}\n */\n function go(code) {\n consumed = undefined\n expectedCode = code\n state = state(code)\n }\n\n /** @type {Effects['consume']} */\n function consume(code) {\n if (markdownLineEnding(code)) {\n point.line++\n point.column = 1\n point.offset += code === -3 ? 2 : 1\n accountForPotentialSkip()\n } else if (code !== -1) {\n point.column++\n point.offset++\n }\n\n // Not in a string chunk.\n if (point._bufferIndex < 0) {\n point._index++\n } else {\n point._bufferIndex++\n\n // At end of string chunk.\n // @ts-expect-error Points w/ non-negative `_bufferIndex` reference\n // strings.\n if (point._bufferIndex === chunks[point._index].length) {\n point._bufferIndex = -1\n point._index++\n }\n }\n\n // Expose the previous character.\n context.previous = code\n\n // Mark as consumed.\n consumed = true\n }\n\n /** @type {Effects['enter']} */\n function enter(type, fields) {\n /** @type {Token} */\n // @ts-expect-error Patch instead of assign required fields to help GC.\n const token = fields || {}\n token.type = type\n token.start = now()\n context.events.push(['enter', token, context])\n stack.push(token)\n return token\n }\n\n /** @type {Effects['exit']} */\n function exit(type) {\n const token = stack.pop()\n token.end = now()\n context.events.push(['exit', token, context])\n return token\n }\n\n /**\n * Use results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulconstruct(construct, info) {\n addResult(construct, info.from)\n }\n\n /**\n * Discard results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulcheck(_, info) {\n info.restore()\n }\n\n /**\n * Factory to attempt/check/interrupt.\n *\n * @param {ReturnHandle} onreturn\n * @param {{interrupt?: boolean | undefined} | undefined} [fields]\n */\n function constructFactory(onreturn, fields) {\n return hook\n\n /**\n * Handle either an object mapping codes to constructs, a list of\n * constructs, or a single construct.\n *\n * @param {Array | Construct | ConstructRecord} constructs\n * @param {State} returnState\n * @param {State | undefined} [bogusState]\n * @returns {State}\n */\n function hook(constructs, returnState, bogusState) {\n /** @type {Array} */\n let listOfConstructs\n /** @type {number} */\n let constructIndex\n /** @type {Construct} */\n let currentConstruct\n /** @type {Info} */\n let info\n return Array.isArray(constructs) /* c8 ignore next 1 */\n ? handleListOfConstructs(constructs)\n : 'tokenize' in constructs\n ? // @ts-expect-error Looks like a construct.\n handleListOfConstructs([constructs])\n : handleMapOfConstructs(constructs)\n\n /**\n * Handle a list of construct.\n *\n * @param {ConstructRecord} map\n * @returns {State}\n */\n function handleMapOfConstructs(map) {\n return start\n\n /** @type {State} */\n function start(code) {\n const def = code !== null && map[code]\n const all = code !== null && map.null\n const list = [\n // To do: add more extension tests.\n /* c8 ignore next 2 */\n ...(Array.isArray(def) ? def : def ? [def] : []),\n ...(Array.isArray(all) ? all : all ? [all] : [])\n ]\n return handleListOfConstructs(list)(code)\n }\n }\n\n /**\n * Handle a list of construct.\n *\n * @param {Array} list\n * @returns {State}\n */\n function handleListOfConstructs(list) {\n listOfConstructs = list\n constructIndex = 0\n if (list.length === 0) {\n return bogusState\n }\n return handleConstruct(list[constructIndex])\n }\n\n /**\n * Handle a single construct.\n *\n * @param {Construct} construct\n * @returns {State}\n */\n function handleConstruct(construct) {\n return start\n\n /** @type {State} */\n function start(code) {\n // To do: not needed to store if there is no bogus state, probably?\n // Currently doesn’t work because `inspect` in document does a check\n // w/o a bogus, which doesn’t make sense. But it does seem to help perf\n // by not storing.\n info = store()\n currentConstruct = construct\n if (!construct.partial) {\n context.currentConstruct = construct\n }\n\n // Always populated by defaults.\n\n if (\n construct.name &&\n context.parser.constructs.disable.null.includes(construct.name)\n ) {\n return nok(code)\n }\n return construct.tokenize.call(\n // If we do have fields, create an object w/ `context` as its\n // prototype.\n // This allows a “live binding”, which is needed for `interrupt`.\n fields ? Object.assign(Object.create(context), fields) : context,\n effects,\n ok,\n nok\n )(code)\n }\n }\n\n /** @type {State} */\n function ok(code) {\n consumed = true\n onreturn(currentConstruct, info)\n return returnState\n }\n\n /** @type {State} */\n function nok(code) {\n consumed = true\n info.restore()\n if (++constructIndex < listOfConstructs.length) {\n return handleConstruct(listOfConstructs[constructIndex])\n }\n return bogusState\n }\n }\n }\n\n /**\n * @param {Construct} construct\n * @param {number} from\n * @returns {void}\n */\n function addResult(construct, from) {\n if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {\n resolveAllConstructs.push(construct)\n }\n if (construct.resolve) {\n splice(\n context.events,\n from,\n context.events.length - from,\n construct.resolve(context.events.slice(from), context)\n )\n }\n if (construct.resolveTo) {\n context.events = construct.resolveTo(context.events, context)\n }\n }\n\n /**\n * Store state.\n *\n * @returns {Info}\n */\n function store() {\n const startPoint = now()\n const startPrevious = context.previous\n const startCurrentConstruct = context.currentConstruct\n const startEventsIndex = context.events.length\n const startStack = Array.from(stack)\n return {\n restore,\n from: startEventsIndex\n }\n\n /**\n * Restore state.\n *\n * @returns {void}\n */\n function restore() {\n point = startPoint\n context.previous = startPrevious\n context.currentConstruct = startCurrentConstruct\n context.events.length = startEventsIndex\n stack = startStack\n accountForPotentialSkip()\n }\n }\n\n /**\n * Move the current point a bit forward in the line when it’s on a column\n * skip.\n *\n * @returns {void}\n */\n function accountForPotentialSkip() {\n if (point.line in columnStart && point.column < 2) {\n point.column = columnStart[point.line]\n point.offset += columnStart[point.line] - 1\n }\n }\n}\n\n/**\n * Get the chunks from a slice of chunks in the range of a token.\n *\n * @param {Array} chunks\n * @param {Pick} token\n * @returns {Array}\n */\nfunction sliceChunks(chunks, token) {\n const startIndex = token.start._index\n const startBufferIndex = token.start._bufferIndex\n const endIndex = token.end._index\n const endBufferIndex = token.end._bufferIndex\n /** @type {Array} */\n let view\n if (startIndex === endIndex) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]\n } else {\n view = chunks.slice(startIndex, endIndex)\n if (startBufferIndex > -1) {\n const head = view[0]\n if (typeof head === 'string') {\n view[0] = head.slice(startBufferIndex)\n } else {\n view.shift()\n }\n }\n if (endBufferIndex > 0) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view.push(chunks[endIndex].slice(0, endBufferIndex))\n }\n }\n return view\n}\n\n/**\n * Get the string value of a slice of chunks.\n *\n * @param {Array} chunks\n * @param {boolean | undefined} [expandTabs=false]\n * @returns {string}\n */\nfunction serializeChunks(chunks, expandTabs) {\n let index = -1\n /** @type {Array} */\n const result = []\n /** @type {boolean | undefined} */\n let atTab\n while (++index < chunks.length) {\n const chunk = chunks[index]\n /** @type {string} */\n let value\n if (typeof chunk === 'string') {\n value = chunk\n } else\n switch (chunk) {\n case -5: {\n value = '\\r'\n break\n }\n case -4: {\n value = '\\n'\n break\n }\n case -3: {\n value = '\\r' + '\\n'\n break\n }\n case -2: {\n value = expandTabs ? ' ' : '\\t'\n break\n }\n case -1: {\n if (!expandTabs && atTab) continue\n value = ' '\n break\n }\n default: {\n // Currently only replacement character.\n value = String.fromCharCode(chunk)\n }\n }\n atTab = chunk === -2\n result.push(value)\n }\n return result.join('')\n}\n","/**\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {InitialConstruct} */\nexport const content = {\n tokenize: initializeContent\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\nfunction initializeContent(effects) {\n const contentStart = effects.attempt(\n this.parser.constructs.contentInitial,\n afterContentStartConstruct,\n paragraphInitial\n )\n /** @type {Token} */\n let previous\n return contentStart\n\n /** @type {State} */\n function afterContentStartConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, contentStart, 'linePrefix')\n }\n\n /** @type {State} */\n function paragraphInitial(code) {\n effects.enter('paragraph')\n return lineStart(code)\n }\n\n /** @type {State} */\n function lineStart(code) {\n const token = effects.enter('chunkText', {\n contentType: 'text',\n previous\n })\n if (previous) {\n previous.next = token\n }\n previous = token\n return data(code)\n }\n\n /** @type {State} */\n function data(code) {\n if (code === null) {\n effects.exit('chunkText')\n effects.exit('paragraph')\n effects.consume(code)\n return\n }\n if (markdownLineEnding(code)) {\n effects.consume(code)\n effects.exit('chunkText')\n return lineStart\n }\n\n // Data.\n effects.consume(code)\n return data\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ContainerState} ContainerState\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef {[Construct, ContainerState]} StackItem\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\nimport {splice} from 'micromark-util-chunked'\n/** @type {InitialConstruct} */\nexport const document = {\n tokenize: initializeDocument\n}\n\n/** @type {Construct} */\nconst containerConstruct = {\n tokenize: tokenizeContainer\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\nfunction initializeDocument(effects) {\n const self = this\n /** @type {Array} */\n const stack = []\n let continued = 0\n /** @type {TokenizeContext | undefined} */\n let childFlow\n /** @type {Token | undefined} */\n let childToken\n /** @type {number} */\n let lineStartOffset\n return start\n\n /** @type {State} */\n function start(code) {\n // First we iterate through the open blocks, starting with the root\n // document, and descending through last children down to the last open\n // block.\n // Each block imposes a condition that the line must satisfy if the block is\n // to remain open.\n // For example, a block quote requires a `>` character.\n // A paragraph requires a non-blank line.\n // In this phase we may match all or just some of the open blocks.\n // But we cannot close unmatched blocks yet, because we may have a lazy\n // continuation line.\n if (continued < stack.length) {\n const item = stack[continued]\n self.containerState = item[1]\n return effects.attempt(\n item[0].continuation,\n documentContinue,\n checkNewContainers\n )(code)\n }\n\n // Done.\n return checkNewContainers(code)\n }\n\n /** @type {State} */\n function documentContinue(code) {\n continued++\n\n // Note: this field is called `_closeFlow` but it also closes containers.\n // Perhaps a good idea to rename it but it’s already used in the wild by\n // extensions.\n if (self.containerState._closeFlow) {\n self.containerState._closeFlow = undefined\n if (childFlow) {\n closeFlow()\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when dealing with lazy lines in `writeToChild`.\n const indexBeforeExits = self.events.length\n let indexBeforeFlow = indexBeforeExits\n /** @type {Point | undefined} */\n let point\n\n // Find the flow chunk.\n while (indexBeforeFlow--) {\n if (\n self.events[indexBeforeFlow][0] === 'exit' &&\n self.events[indexBeforeFlow][1].type === 'chunkFlow'\n ) {\n point = self.events[indexBeforeFlow][1].end\n break\n }\n }\n exitContainers(continued)\n\n // Fix positions.\n let index = indexBeforeExits\n while (index < self.events.length) {\n self.events[index][1].end = Object.assign({}, point)\n index++\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(\n self.events,\n indexBeforeFlow + 1,\n 0,\n self.events.slice(indexBeforeExits)\n )\n\n // Discard the duplicate exits.\n self.events.length = index\n return checkNewContainers(code)\n }\n return start(code)\n }\n\n /** @type {State} */\n function checkNewContainers(code) {\n // Next, after consuming the continuation markers for existing blocks, we\n // look for new block starts (e.g. `>` for a block quote).\n // If we encounter a new block start, we close any blocks unmatched in\n // step 1 before creating the new block as a child of the last matched\n // block.\n if (continued === stack.length) {\n // No need to `check` whether there’s a container, of `exitContainers`\n // would be moot.\n // We can instead immediately `attempt` to parse one.\n if (!childFlow) {\n return documentContinued(code)\n }\n\n // If we have concrete content, such as block HTML or fenced code,\n // we can’t have containers “pierce” into them, so we can immediately\n // start.\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n return flowStart(code)\n }\n\n // If we do have flow, it could still be a blank line,\n // but we’d be interrupting it w/ a new container if there’s a current\n // construct.\n // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer\n // needed in micromark-extension-gfm-table@1.0.6).\n self.interrupt = Boolean(\n childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack\n )\n }\n\n // Check if there is a new container.\n self.containerState = {}\n return effects.check(\n containerConstruct,\n thereIsANewContainer,\n thereIsNoNewContainer\n )(code)\n }\n\n /** @type {State} */\n function thereIsANewContainer(code) {\n if (childFlow) closeFlow()\n exitContainers(continued)\n return documentContinued(code)\n }\n\n /** @type {State} */\n function thereIsNoNewContainer(code) {\n self.parser.lazy[self.now().line] = continued !== stack.length\n lineStartOffset = self.now().offset\n return flowStart(code)\n }\n\n /** @type {State} */\n function documentContinued(code) {\n // Try new containers.\n self.containerState = {}\n return effects.attempt(\n containerConstruct,\n containerContinue,\n flowStart\n )(code)\n }\n\n /** @type {State} */\n function containerContinue(code) {\n continued++\n stack.push([self.currentConstruct, self.containerState])\n // Try another.\n return documentContinued(code)\n }\n\n /** @type {State} */\n function flowStart(code) {\n if (code === null) {\n if (childFlow) closeFlow()\n exitContainers(0)\n effects.consume(code)\n return\n }\n childFlow = childFlow || self.parser.flow(self.now())\n effects.enter('chunkFlow', {\n contentType: 'flow',\n previous: childToken,\n _tokenizer: childFlow\n })\n return flowContinue(code)\n }\n\n /** @type {State} */\n function flowContinue(code) {\n if (code === null) {\n writeToChild(effects.exit('chunkFlow'), true)\n exitContainers(0)\n effects.consume(code)\n return\n }\n if (markdownLineEnding(code)) {\n effects.consume(code)\n writeToChild(effects.exit('chunkFlow'))\n // Get ready for the next line.\n continued = 0\n self.interrupt = undefined\n return start\n }\n effects.consume(code)\n return flowContinue\n }\n\n /**\n * @param {Token} token\n * @param {boolean | undefined} [eof]\n * @returns {void}\n */\n function writeToChild(token, eof) {\n const stream = self.sliceStream(token)\n if (eof) stream.push(null)\n token.previous = childToken\n if (childToken) childToken.next = token\n childToken = token\n childFlow.defineSkip(token.start)\n childFlow.write(stream)\n\n // Alright, so we just added a lazy line:\n //\n // ```markdown\n // > a\n // b.\n //\n // Or:\n //\n // > ~~~c\n // d\n //\n // Or:\n //\n // > | e |\n // f\n // ```\n //\n // The construct in the second example (fenced code) does not accept lazy\n // lines, so it marked itself as done at the end of its first line, and\n // then the content construct parses `d`.\n // Most constructs in markdown match on the first line: if the first line\n // forms a construct, a non-lazy line can’t “unmake” it.\n //\n // The construct in the third example is potentially a GFM table, and\n // those are *weird*.\n // It *could* be a table, from the first line, if the following line\n // matches a condition.\n // In this case, that second line is lazy, which “unmakes” the first line\n // and turns the whole into one content block.\n //\n // We’ve now parsed the non-lazy and the lazy line, and can figure out\n // whether the lazy line started a new flow block.\n // If it did, we exit the current containers between the two flow blocks.\n if (self.parser.lazy[token.start.line]) {\n let index = childFlow.events.length\n while (index--) {\n if (\n // The token starts before the line ending…\n childFlow.events[index][1].start.offset < lineStartOffset &&\n // …and either is not ended yet…\n (!childFlow.events[index][1].end ||\n // …or ends after it.\n childFlow.events[index][1].end.offset > lineStartOffset)\n ) {\n // Exit: there’s still something open, which means it’s a lazy line\n // part of something.\n return\n }\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when closing flow in `documentContinue`.\n const indexBeforeExits = self.events.length\n let indexBeforeFlow = indexBeforeExits\n /** @type {boolean | undefined} */\n let seen\n /** @type {Point | undefined} */\n let point\n\n // Find the previous chunk (the one before the lazy line).\n while (indexBeforeFlow--) {\n if (\n self.events[indexBeforeFlow][0] === 'exit' &&\n self.events[indexBeforeFlow][1].type === 'chunkFlow'\n ) {\n if (seen) {\n point = self.events[indexBeforeFlow][1].end\n break\n }\n seen = true\n }\n }\n exitContainers(continued)\n\n // Fix positions.\n index = indexBeforeExits\n while (index < self.events.length) {\n self.events[index][1].end = Object.assign({}, point)\n index++\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(\n self.events,\n indexBeforeFlow + 1,\n 0,\n self.events.slice(indexBeforeExits)\n )\n\n // Discard the duplicate exits.\n self.events.length = index\n }\n }\n\n /**\n * @param {number} size\n * @returns {void}\n */\n function exitContainers(size) {\n let index = stack.length\n\n // Exit open containers.\n while (index-- > size) {\n const entry = stack[index]\n self.containerState = entry[1]\n entry[0].exit.call(self, effects)\n }\n stack.length = size\n }\n function closeFlow() {\n childFlow.write([null])\n childToken = undefined\n childFlow = undefined\n self.containerState._closeFlow = undefined\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeContainer(effects, ok, nok) {\n // Always populated by defaults.\n\n return factorySpace(\n effects,\n effects.attempt(this.parser.constructs.document, ok, nok),\n 'linePrefix',\n this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4\n )\n}\n","/**\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\nimport {blankLine, content} from 'micromark-core-commonmark'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {InitialConstruct} */\nexport const flow = {\n tokenize: initializeFlow\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\nfunction initializeFlow(effects) {\n const self = this\n const initial = effects.attempt(\n // Try to parse a blank line.\n blankLine,\n atBlankEnding,\n // Try to parse initial flow (essentially, only code).\n effects.attempt(\n this.parser.constructs.flowInitial,\n afterConstruct,\n factorySpace(\n effects,\n effects.attempt(\n this.parser.constructs.flow,\n afterConstruct,\n effects.attempt(content, afterConstruct)\n ),\n 'linePrefix'\n )\n )\n )\n return initial\n\n /** @type {State} */\n function atBlankEnding(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('lineEndingBlank')\n effects.consume(code)\n effects.exit('lineEndingBlank')\n self.currentConstruct = undefined\n return initial\n }\n\n /** @type {State} */\n function afterConstruct(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n self.currentConstruct = undefined\n return initial\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').Initializer} Initializer\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n */\n\nexport const resolver = {\n resolveAll: createResolver()\n}\nexport const string = initializeFactory('string')\nexport const text = initializeFactory('text')\n\n/**\n * @param {'string' | 'text'} field\n * @returns {InitialConstruct}\n */\nfunction initializeFactory(field) {\n return {\n tokenize: initializeText,\n resolveAll: createResolver(\n field === 'text' ? resolveAllLineSuffixes : undefined\n )\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this\n const constructs = this.parser.constructs[field]\n const text = effects.attempt(constructs, start, notText)\n return start\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code)\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n effects.enter('data')\n effects.consume(code)\n return data\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit('data')\n return text(code)\n }\n\n // Data.\n effects.consume(code)\n return data\n }\n\n /**\n * @param {Code} code\n * @returns {boolean}\n */\n function atBreak(code) {\n if (code === null) {\n return true\n }\n const list = constructs[code]\n let index = -1\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index]\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true\n }\n }\n }\n return false\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * @returns {Resolver}\n */\nfunction createResolver(extraResolver) {\n return resolveAllText\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1\n /** @type {number | undefined} */\n let enter\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === 'data') {\n enter = index\n index++\n }\n } else if (!events[index] || events[index][1].type !== 'data') {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n index = enter + 2\n }\n enter = undefined\n }\n }\n return extraResolver ? extraResolver(events, context) : events\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n let eventIndex = 0 // Skip first.\n\n while (++eventIndex <= events.length) {\n if (\n (eventIndex === events.length ||\n events[eventIndex][1].type === 'lineEnding') &&\n events[eventIndex - 1][1].type === 'data'\n ) {\n const data = events[eventIndex - 1][1]\n const chunks = context.sliceStream(data)\n let index = chunks.length\n let bufferIndex = -1\n let size = 0\n /** @type {boolean | undefined} */\n let tabs\n while (index--) {\n const chunk = chunks[index]\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++\n bufferIndex--\n }\n if (bufferIndex) break\n bufferIndex = -1\n }\n // Number\n else if (chunk === -2) {\n tabs = true\n size++\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++\n break\n }\n }\n if (size) {\n const token = {\n type:\n eventIndex === events.length || tabs || size < 2\n ? 'lineSuffix'\n : 'hardBreakTrailing',\n start: {\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size,\n _index: data.start._index + index,\n _bufferIndex: index\n ? bufferIndex\n : data.start._bufferIndex + bufferIndex\n },\n end: Object.assign({}, data.end)\n }\n data.end = Object.assign({}, token.start)\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token)\n } else {\n events.splice(\n eventIndex,\n 0,\n ['enter', token, context],\n ['exit', token, context]\n )\n eventIndex += 2\n }\n }\n eventIndex++\n }\n }\n return events\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n */\n\nimport {combineExtensions} from 'micromark-util-combine-extensions'\nimport {content} from './initialize/content.js'\nimport {document} from './initialize/document.js'\nimport {flow} from './initialize/flow.js'\nimport {text, string} from './initialize/text.js'\nimport {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\n */\n function create(initial) {\n return creator\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from)\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\n */\nexport function preprocess() {\n let column = 1\n let buffer = ''\n /** @type {boolean | undefined} */\n let start = true\n /** @type {boolean | undefined} */\n let atCarriageReturn\n return preprocessor\n\n /** @type {Preprocessor} */\n function preprocessor(value, encoding, end) {\n /** @type {Array} */\n const chunks = []\n /** @type {RegExpMatchArray | null} */\n let match\n /** @type {number} */\n let next\n /** @type {number} */\n let startPosition\n /** @type {number} */\n let endPosition\n /** @type {Code} */\n let code\n\n // @ts-expect-error `Buffer` does allow an encoding.\n value = buffer + value.toString(encoding)\n startPosition = 0\n buffer = ''\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n start = undefined\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition =\n match && match.index !== undefined ? match.index : value.length\n code = value.charCodeAt(endPosition)\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3)\n atCarriageReturn = undefined\n } else {\n if (atCarriageReturn) {\n chunks.push(-5)\n atCarriageReturn = undefined\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n switch (code) {\n case 0: {\n chunks.push(65533)\n column++\n break\n }\n case 9: {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n while (column++ < next) chunks.push(-1)\n break\n }\n case 10: {\n chunks.push(-4)\n column = 1\n break\n }\n default: {\n atCarriageReturn = true\n column = 1\n }\n }\n }\n startPosition = endPosition + 1\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n return chunks\n }\n}\n","export {attention} from './lib/attention.js'\nexport {autolink} from './lib/autolink.js'\nexport {blankLine} from './lib/blank-line.js'\nexport {blockQuote} from './lib/block-quote.js'\nexport {characterEscape} from './lib/character-escape.js'\nexport {characterReference} from './lib/character-reference.js'\nexport {codeFenced} from './lib/code-fenced.js'\nexport {codeIndented} from './lib/code-indented.js'\nexport {codeText} from './lib/code-text.js'\nexport {content} from './lib/content.js'\nexport {definition} from './lib/definition.js'\nexport {hardBreakEscape} from './lib/hard-break-escape.js'\nexport {headingAtx} from './lib/heading-atx.js'\nexport {htmlFlow} from './lib/html-flow.js'\nexport {htmlText} from './lib/html-text.js'\nexport {labelEnd} from './lib/label-end.js'\nexport {labelStartImage} from './lib/label-start-image.js'\nexport {labelStartLink} from './lib/label-start-link.js'\nexport {lineEnding} from './lib/line-ending.js'\nexport {list} from './lib/list.js'\nexport {setextUnderline} from './lib/setext-underline.js'\nexport {thematicBreak} from './lib/thematic-break.js'\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {push, splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\nfunction resolveAllAttention(events, context) {\n let index = -1\n /** @type {number} */\n let open\n /** @type {Token} */\n let group\n /** @type {Token} */\n let text\n /** @type {Token} */\n let openingSequence\n /** @type {Token} */\n let closingSequence\n /** @type {number} */\n let use\n /** @type {Array} */\n let nextEvents\n /** @type {number} */\n let offset\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n }\n\n // Number of markers to use from the sequence.\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\n nextEvents = []\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n }\n\n // Opening.\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ])\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n )\n\n // Closing.\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ])\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = push(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null\n const previous = this.previous\n const before = classifyCharacter(previous)\n\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code\n effects.enter('attentionSequence')\n return inside(code)\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n const token = effects.exit('attentionSequence')\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code)\n\n // Always populated by defaults.\n\n const open =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !before || (before === 2 && after) || attentionMarkers.includes(previous)\n token._open = Boolean(marker === 42 ? open : open && (before || !close))\n token._close = Boolean(marker === 42 ? close : close && (after || !open))\n return ok(code)\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * @param {number} offset\n * @returns {void}\n */\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0\n return start\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('autolink')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.enter('autolinkProtocol')\n return open\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n return emailAtext(code)\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1\n return schemeInsideOrEmailAtext(code)\n }\n return emailAtext(code)\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n size = 0\n return urlInside\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n size = 0\n return emailAtext(code)\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n effects.consume(code)\n return urlInside\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n return emailAtSignOrDot\n }\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n return nok(code)\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | ab\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n return emailValue(code)\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel\n effects.consume(code)\n return next\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const blankLine = {\n tokenize: tokenizeBlankLine,\n partial: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLine(effects, ok, nok) {\n return start\n\n /**\n * Start of blank line.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n return markdownSpace(code)\n ? factorySpace(effects, after, 'linePrefix')(code)\n : after(code)\n }\n\n /**\n * At eof/eol, after optional whitespace.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const blockQuote = {\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart,\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of block quote.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 62) {\n const state = self.containerState\n if (!state.open) {\n effects.enter('blockQuote', {\n _container: true\n })\n state.open = true\n }\n effects.enter('blockQuotePrefix')\n effects.enter('blockQuoteMarker')\n effects.consume(code)\n effects.exit('blockQuoteMarker')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `>`, before optional whitespace.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownSpace(code)) {\n effects.enter('blockQuotePrefixWhitespace')\n effects.consume(code)\n effects.exit('blockQuotePrefixWhitespace')\n effects.exit('blockQuotePrefix')\n return ok\n }\n effects.exit('blockQuotePrefix')\n return ok(code)\n }\n}\n\n/**\n * Start of block quote continuation.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n const self = this\n return contStart\n\n /**\n * Start of block quote continuation.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contStart(code) {\n if (markdownSpace(code)) {\n // Always populated by defaults.\n\n return factorySpace(\n effects,\n contBefore,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n return contBefore(code)\n }\n\n /**\n * At `>`, after optional whitespace.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contBefore(code) {\n return effects.attempt(blockQuote, ok, nok)(code)\n }\n}\n\n/** @type {Exiter} */\nfunction exit(effects) {\n effects.exit('blockQuote')\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {asciiPunctuation} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return inside\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter('characterEscapeValue')\n effects.consume(code)\n effects.exit('characterEscapeValue')\n effects.exit('characterEscape')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this\n let size = 0\n /** @type {number} */\n let max\n /** @type {(code: Code) => boolean} */\n let test\n return start\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterReference')\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n return open\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter('characterReferenceMarkerHexadecimal')\n effects.consume(code)\n effects.exit('characterReferenceMarkerHexadecimal')\n effects.enter('characterReferenceValue')\n max = 6\n test = asciiHexDigit\n return value\n }\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit('characterReferenceValue')\n if (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n}\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n }\n let initialPrefix = 0\n let sizeOpen = 0\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code)\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1]\n initialPrefix =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n marker = code\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++\n effects.consume(code)\n return sequenceOpen\n }\n if (sizeOpen < 3) {\n return nok(code)\n }\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, infoBefore, 'whitespace')(code)\n : infoBefore(code)\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return self.interrupt\n ? ok(code)\n : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return infoBefore(code)\n }\n if (markdownSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, metaBefore, 'whitespace')(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return info\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code)\n }\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return infoBefore(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return meta\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code)\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return contentStart\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code)\n ? factorySpace(\n effects,\n beforeContentChunk,\n 'linePrefix',\n initialPrefix + 1\n )(code)\n : beforeContentChunk(code)\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFlowValue')\n return contentChunk(code)\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return beforeContentChunk(code)\n }\n effects.consume(code)\n return contentChunk\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0\n return startBefore\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return start\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter('codeFencedFence')\n return markdownSpace(code)\n ? factorySpace(\n effects,\n beforeSequenceClose,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : beforeSequenceClose(code)\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter('codeFencedFenceSequence')\n return sequenceClose(code)\n }\n return nok(code)\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++\n effects.consume(code)\n return sequenceClose\n }\n if (size >= sizeOpen) {\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)\n : sequenceCloseAfter(code)\n }\n return nok(code)\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this\n return start\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code)\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented\n}\n\n/** @type {Construct} */\nconst furtherStart = {\n tokenize: tokenizeFurtherStart,\n partial: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeIndented(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of code (indented).\n *\n * > **Parsing note**: it is not needed to check if this first line is a\n * > filled line (that it has a non-whitespace character), because blank lines\n * > are parsed already, so we never run into that.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: manually check if interrupting like `markdown-rs`.\n\n effects.enter('codeIndented')\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ? atBreak(code)\n : nok(code)\n }\n\n /**\n * At a break.\n *\n * ```markdown\n * > | aaa\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === null) {\n return after(code)\n }\n if (markdownLineEnding(code)) {\n return effects.attempt(furtherStart, atBreak, after)(code)\n }\n effects.enter('codeFlowValue')\n return inside(code)\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * > | aaa\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return atBreak(code)\n }\n effects.consume(code)\n return inside\n }\n\n /** @type {State} */\n function after(code) {\n effects.exit('codeIndented')\n // To do: allow interrupting like `markdown-rs`.\n // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeFurtherStart(effects, ok, nok) {\n const self = this\n return furtherStart\n\n /**\n * At eol, trying to parse another indent.\n *\n * ```markdown\n * > | aaa\n * ^\n * | bbb\n * ```\n *\n * @type {State}\n */\n function furtherStart(code) {\n // To do: improve `lazy` / `pierce` handling.\n // If this is a lazy line, it can’t be code.\n if (self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return furtherStart\n }\n\n // To do: the code here in `micromark-js` is a bit different from\n // `markdown-rs` because there it can attempt spaces.\n // We can’t yet.\n //\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ? ok(code)\n : markdownLineEnding(code)\n ? furtherStart(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\n}\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4\n let headEnterIndex = 3\n /** @type {number} */\n let index\n /** @type {number | undefined} */\n let enter\n\n // If we start and end with an EOL or a space.\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[headEnterIndex][1].type = 'codeTextPadding'\n events[tailExitIndex][1].type = 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1\n tailExitIndex++\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n tailExitIndex -= index - enter - 2\n index = enter + 2\n }\n enter = undefined\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this\n let sizeOpen = 0\n /** @type {number} */\n let size\n /** @type {Token} */\n let token\n return start\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n effects.exit('codeTextSequence')\n return between(code)\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return between\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return sequenceClose(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return between\n }\n\n // Data.\n effects.enter('codeTextData')\n return data(code)\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return between(code)\n }\n effects.consume(code)\n return data\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return sequenceClose\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n }\n\n // More or less accents: mark as data.\n token.type = 'codeTextData'\n return data(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\nimport {subtokenize} from 'micromark-util-subtokenize'\n/**\n * No name because it must not be turned off.\n * @type {Construct}\n */\nexport const content = {\n tokenize: tokenizeContent,\n resolve: resolveContent\n}\n\n/** @type {Construct} */\nconst continuationConstruct = {\n tokenize: tokenizeContinuation,\n partial: true\n}\n\n/**\n * Content is transparent: it’s parsed right now. That way, definitions are also\n * parsed right now: before text in paragraphs (specifically, media) are parsed.\n *\n * @type {Resolver}\n */\nfunction resolveContent(events) {\n subtokenize(events)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeContent(effects, ok) {\n /** @type {Token | undefined} */\n let previous\n return chunkStart\n\n /**\n * Before a content chunk.\n *\n * ```markdown\n * > | abc\n * ^\n * ```\n *\n * @type {State}\n */\n function chunkStart(code) {\n effects.enter('content')\n previous = effects.enter('chunkContent', {\n contentType: 'content'\n })\n return chunkInside(code)\n }\n\n /**\n * In a content chunk.\n *\n * ```markdown\n * > | abc\n * ^^^\n * ```\n *\n * @type {State}\n */\n function chunkInside(code) {\n if (code === null) {\n return contentEnd(code)\n }\n\n // To do: in `markdown-rs`, each line is parsed on its own, and everything\n // is stitched together resolving.\n if (markdownLineEnding(code)) {\n return effects.check(\n continuationConstruct,\n contentContinue,\n contentEnd\n )(code)\n }\n\n // Data.\n effects.consume(code)\n return chunkInside\n }\n\n /**\n *\n *\n * @type {State}\n */\n function contentEnd(code) {\n effects.exit('chunkContent')\n effects.exit('content')\n return ok(code)\n }\n\n /**\n *\n *\n * @type {State}\n */\n function contentContinue(code) {\n effects.consume(code)\n effects.exit('chunkContent')\n previous.next = effects.enter('chunkContent', {\n contentType: 'content',\n previous\n })\n previous = previous.next\n return chunkInside\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeContinuation(effects, ok, nok) {\n const self = this\n return startLookahead\n\n /**\n *\n *\n * @type {State}\n */\n function startLookahead(code) {\n effects.exit('chunkContent')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, prefixed, 'linePrefix')\n }\n\n /**\n *\n *\n * @type {State}\n */\n function prefixed(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n\n // Always populated by defaults.\n\n const tail = self.events[self.events.length - 1]\n if (\n !self.parser.constructs.disable.null.includes('codeIndented') &&\n tail &&\n tail[1].type === 'linePrefix' &&\n tail[2].sliceSerialize(tail[1], true).length >= 4\n ) {\n return ok(code)\n }\n return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factorySpace} from 'micromark-factory-space'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n/** @type {Construct} */\nexport const definition = {\n name: 'definition',\n tokenize: tokenizeDefinition\n}\n\n/** @type {Construct} */\nconst titleBefore = {\n tokenize: tokenizeTitleBefore,\n partial: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinition(effects, ok, nok) {\n const self = this\n /** @type {string} */\n let identifier\n return start\n\n /**\n * At start of a definition.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Do not interrupt paragraphs (but do follow definitions).\n // To do: do `interrupt` the way `markdown-rs` does.\n // To do: parse whitespace the way `markdown-rs` does.\n effects.enter('definition')\n return before(code)\n }\n\n /**\n * After optional whitespace, at `[`.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n // To do: parse whitespace the way `markdown-rs` does.\n\n return factoryLabel.call(\n self,\n effects,\n labelAfter,\n // Note: we don’t need to reset the way `markdown-rs` does.\n nok,\n 'definitionLabel',\n 'definitionLabelMarker',\n 'definitionLabelString'\n )(code)\n }\n\n /**\n * After label.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n identifier = normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker')\n return markerAfter\n }\n return nok(code)\n }\n\n /**\n * After marker.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function markerAfter(code) {\n // Note: whitespace is optional.\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, destinationBefore)(code)\n : destinationBefore(code)\n }\n\n /**\n * Before destination.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function destinationBefore(code) {\n return factoryDestination(\n effects,\n destinationAfter,\n // Note: we don’t need to reset the way `markdown-rs` does.\n nok,\n 'definitionDestination',\n 'definitionDestinationLiteral',\n 'definitionDestinationLiteralMarker',\n 'definitionDestinationRaw',\n 'definitionDestinationString'\n )(code)\n }\n\n /**\n * After destination.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function destinationAfter(code) {\n return effects.attempt(titleBefore, after, after)(code)\n }\n\n /**\n * After definition.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return markdownSpace(code)\n ? factorySpace(effects, afterWhitespace, 'whitespace')(code)\n : afterWhitespace(code)\n }\n\n /**\n * After definition, after optional whitespace.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function afterWhitespace(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('definition')\n\n // Note: we don’t care about uniqueness.\n // It’s likely that that doesn’t happen very frequently.\n // It is more likely that it wastes precious time.\n self.parser.defined.push(identifier)\n\n // To do: `markdown-rs` interrupt.\n // // You’d be interrupting.\n // tokenizer.interrupt = true\n return ok(code)\n }\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTitleBefore(effects, ok, nok) {\n return titleBefore\n\n /**\n * After destination, at whitespace.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, beforeMarker)(code)\n : nok(code)\n }\n\n /**\n * At title.\n *\n * ```markdown\n * | [a]: b\n * > | \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeMarker(code) {\n return factoryTitle(\n effects,\n titleAfter,\n nok,\n 'definitionTitle',\n 'definitionTitleMarker',\n 'definitionTitleString'\n )(code)\n }\n\n /**\n * After title.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleAfter(code) {\n return markdownSpace(code)\n ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code)\n : titleAfterOptionalWhitespace(code)\n }\n\n /**\n * After title, after optional whitespace.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleAfterOptionalWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.consume(code)\n return after\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {splice} from 'micromark-util-chunked'\n/** @type {Construct} */\nexport const headingAtx = {\n name: 'headingAtx',\n tokenize: tokenizeHeadingAtx,\n resolve: resolveHeadingAtx\n}\n\n/** @type {Resolver} */\nfunction resolveHeadingAtx(events, context) {\n let contentEnd = events.length - 2\n let contentStart = 3\n /** @type {Token} */\n let content\n /** @type {Token} */\n let text\n\n // Prefix whitespace, part of the opening.\n if (events[contentStart][1].type === 'whitespace') {\n contentStart += 2\n }\n\n // Suffix whitespace, part of the closing.\n if (\n contentEnd - 2 > contentStart &&\n events[contentEnd][1].type === 'whitespace'\n ) {\n contentEnd -= 2\n }\n if (\n events[contentEnd][1].type === 'atxHeadingSequence' &&\n (contentStart === contentEnd - 1 ||\n (contentEnd - 4 > contentStart &&\n events[contentEnd - 2][1].type === 'whitespace'))\n ) {\n contentEnd -= contentStart + 1 === contentEnd ? 2 : 4\n }\n if (contentEnd > contentStart) {\n content = {\n type: 'atxHeadingText',\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end\n }\n text = {\n type: 'chunkText',\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end,\n contentType: 'text'\n }\n splice(events, contentStart, contentEnd - contentStart + 1, [\n ['enter', content, context],\n ['enter', text, context],\n ['exit', text, context],\n ['exit', content, context]\n ])\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHeadingAtx(effects, ok, nok) {\n let size = 0\n return start\n\n /**\n * Start of a heading (atx).\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse indent like `markdown-rs`.\n effects.enter('atxHeading')\n return before(code)\n }\n\n /**\n * After optional whitespace, at `#`.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter('atxHeadingSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 35 && size++ < 6) {\n effects.consume(code)\n return sequenceOpen\n }\n\n // Always at least one `#`.\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingSequence')\n return atBreak(code)\n }\n return nok(code)\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === 35) {\n effects.enter('atxHeadingSequence')\n return sequenceFurther(code)\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('atxHeading')\n // To do: interrupt like `markdown-rs`.\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code)\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, 'whitespace')(code)\n }\n\n // To do: generate `data` tokens, add the `text` token later.\n // Needs edit map, see: `markdown.rs`.\n effects.enter('atxHeadingText')\n return data(code)\n }\n\n /**\n * In further sequence (after whitespace).\n *\n * Could be normal “visible” hashes in the heading or a final sequence.\n *\n * ```markdown\n * > | ## aa ##\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceFurther(code) {\n if (code === 35) {\n effects.consume(code)\n return sequenceFurther\n }\n effects.exit('atxHeadingSequence')\n return atBreak(code)\n }\n\n /**\n * In text.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {\n effects.exit('atxHeadingText')\n return atBreak(code)\n }\n effects.consume(code)\n return data\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {htmlBlockNames, htmlRawNames} from 'micromark-util-html-tag-name'\nimport {blankLine} from './blank-line.js'\n\n/** @type {Construct} */\nexport const htmlFlow = {\n name: 'htmlFlow',\n tokenize: tokenizeHtmlFlow,\n resolveTo: resolveToHtmlFlow,\n concrete: true\n}\n\n/** @type {Construct} */\nconst blankLineBefore = {\n tokenize: tokenizeBlankLineBefore,\n partial: true\n}\nconst nonLazyContinuationStart = {\n tokenize: tokenizeNonLazyContinuationStart,\n partial: true\n}\n\n/** @type {Resolver} */\nfunction resolveToHtmlFlow(events) {\n let index = events.length\n while (index--) {\n if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {\n break\n }\n }\n if (index > 1 && events[index - 2][1].type === 'linePrefix') {\n // Add the prefix start to the HTML token.\n events[index][1].start = events[index - 2][1].start\n // Add the prefix start to the HTML line token.\n events[index + 1][1].start = events[index - 2][1].start\n // Remove the line prefix.\n events.splice(index - 2, 2)\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlFlow(effects, ok, nok) {\n const self = this\n /** @type {number} */\n let marker\n /** @type {boolean} */\n let closingTag\n /** @type {string} */\n let buffer\n /** @type {number} */\n let index\n /** @type {Code} */\n let markerB\n return start\n\n /**\n * Start of HTML (flow).\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse indent like `markdown-rs`.\n return before(code)\n }\n\n /**\n * At `<`, after optional whitespace.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter('htmlFlow')\n effects.enter('htmlFlowData')\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n closingTag = true\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n marker = 3\n // To do:\n // tokenizer.concrete = true\n // To do: use `markdown-rs` style interrupt.\n // While we’re in an instruction instead of a declaration, we’re on a `?`\n // right now, so we do need to search for `>`, similar to declarations.\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer = String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n marker = 2\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n marker = 5\n index = 0\n return cdataOpenInside\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n marker = 4\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside\n }\n return nok(code)\n }\n\n /**\n * After ` | &<]]>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n if (index === value.length) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation\n }\n return cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer = String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * In tag name.\n *\n * ```markdown\n * > | \n * ^^\n * > | \n * ^^\n * ```\n *\n * @type {State}\n */\n function tagName(code) {\n if (\n code === null ||\n code === 47 ||\n code === 62 ||\n markdownLineEndingOrSpace(code)\n ) {\n const slash = code === 47\n const name = buffer.toLowerCase()\n if (!slash && !closingTag && htmlRawNames.includes(name)) {\n marker = 1\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code)\n }\n if (htmlBlockNames.includes(buffer.toLowerCase())) {\n marker = 6\n if (slash) {\n effects.consume(code)\n return basicSelfClosing\n }\n\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code)\n }\n marker = 7\n // Do not support complete HTML when interrupting.\n return self.interrupt && !self.parser.lazy[self.now().line]\n ? nok(code)\n : closingTag\n ? completeClosingTagAfter(code)\n : completeAttributeNameBefore(code)\n }\n\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n buffer += String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * After closing slash of a basic tag name.\n *\n * ```markdown\n * > |
    \n * ^\n * ```\n *\n * @type {State}\n */\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code)\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation\n }\n return nok(code)\n }\n\n /**\n * After closing slash of a complete tag name.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeClosingTagAfter\n }\n return completeEnd(code)\n }\n\n /**\n * At an attribute name.\n *\n * At first, this state is used after a complete tag name, after whitespace,\n * where it expects optional attributes or the end of the tag.\n * It is also reused after attributes, when expecting more optional\n * attributes.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code)\n return completeEnd\n }\n\n // ASCII alphanumerical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return completeAttributeName\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameBefore\n }\n return completeEnd(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeName(code) {\n // ASCII alphanumerical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return completeAttributeName\n }\n return completeAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, at an optional initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameAfter\n }\n return completeAttributeNameBefore(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n markerB = code\n return completeAttributeValueQuoted\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n return completeAttributeValueUnquoted(code)\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuoted(code) {\n if (code === markerB) {\n effects.consume(code)\n markerB = null\n return completeAttributeValueQuotedAfter\n }\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n effects.consume(code)\n return completeAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 47 ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96 ||\n markdownLineEndingOrSpace(code)\n ) {\n return completeAttributeNameAfter(code)\n }\n effects.consume(code)\n return completeAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the\n * end of the tag.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a complete tag where only an `>` is allowed.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code)\n return completeAfter\n }\n return nok(code)\n }\n\n /**\n * After `>` in a complete tag.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return continuation(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAfter\n }\n return nok(code)\n }\n\n /**\n * In continuation of any HTML kind.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuation(code) {\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationCommentInside\n }\n if (code === 60 && marker === 1) {\n effects.consume(code)\n return continuationRawTagOpen\n }\n if (code === 62 && marker === 4) {\n effects.consume(code)\n return continuationClose\n }\n if (code === 63 && marker === 3) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n if (code === 93 && marker === 5) {\n effects.consume(code)\n return continuationCdataInside\n }\n if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {\n effects.exit('htmlFlowData')\n return effects.check(\n blankLineBefore,\n continuationAfter,\n continuationStart\n )(code)\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationStart(code)\n }\n effects.consume(code)\n return continuation\n }\n\n /**\n * In continuation, at eol.\n *\n * ```markdown\n * > | \n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStart(code) {\n return effects.check(\n nonLazyContinuationStart,\n continuationStartNonLazy,\n continuationAfter\n )(code)\n }\n\n /**\n * In continuation, at eol, before non-lazy content.\n *\n * ```markdown\n * > | \n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStartNonLazy(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return continuationBefore\n }\n\n /**\n * In continuation, before non-lazy content.\n *\n * ```markdown\n * | \n * > | asd\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return continuationStart(code)\n }\n effects.enter('htmlFlowData')\n return continuation(code)\n }\n\n /**\n * In comment continuation, after one `-`, expecting another.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after `<`, at `/`.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase()\n if (htmlRawNames.includes(name)) {\n effects.consume(code)\n return continuationClose\n }\n return continuation(code)\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationAfter(code)\n }\n effects.consume(code)\n return continuationClose\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit('htmlFlow')\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return after\n }\n return nok(code)\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
    \n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable | undefined} */\n let marker\n /** @type {number} */\n let index\n /** @type {State} */\n let returnState\n return start\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n index = 0\n return cdataOpenInside\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n return nok(code)\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return nok(code)\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n if (markdownLineEnding(code)) {\n returnState = comment\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return comment\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return comment(code)\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62\n ? end(code)\n : code === 45\n ? commentClose(code)\n : comment(code)\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n return index === value.length ? cdata : cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n if (markdownLineEnding(code)) {\n returnState = cdata\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return cdata\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n if (markdownLineEnding(code)) {\n returnState = declaration\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return declaration\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n if (markdownLineEnding(code)) {\n returnState = instruction\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return instruction\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n return tagCloseBetween(code)\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n return end(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n return end(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n return tagOpenAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n return tagOpenBetween(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueQuotedAfter\n }\n if (code === null) {\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code)\n effects.exit('htmlTextData')\n effects.exit('htmlText')\n return ok\n }\n return nok(code)\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineEndingAfter\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code)\n ? factorySpace(\n effects,\n lineEndingAfterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : lineEndingAfterPrefix(code)\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n}\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n}\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n}\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1\n while (++index < events.length) {\n const token = events[index][1]\n if (\n token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd'\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n return events\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n let token\n /** @type {number | undefined} */\n let open\n /** @type {number | undefined} */\n let close\n /** @type {Array} */\n let media\n\n // Find an opening.\n while (index--) {\n token = events[index][1]\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n const group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n const label = {\n type: 'label',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n }\n const text = {\n type: 'labelText',\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ]\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3))\n\n // Text open.\n media = push(media, [['enter', text, context]])\n\n // Always populated by defaults.\n\n // Between.\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n )\n\n // Text close, marker close, label close.\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ])\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1))\n\n // Media close.\n media = push(media, [['exit', group, context]])\n splice(events, open, events.length, media)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n let labelStart\n /** @type {boolean} */\n let defined\n\n // Find an opening.\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n return start\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code)\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code)\n }\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n )\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return after\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n labelEndOk,\n defined ? labelEndOk : labelEndNok\n )(code)\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(\n referenceFullConstruct,\n labelEndOk,\n defined ? referenceNotFull : labelEndNok\n )(code)\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code)\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(\n referenceCollapsedConstruct,\n labelEndOk,\n labelEndNok\n )(code)\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code)\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return resourceBefore\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceOpen)(code)\n : resourceOpen(code)\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code)\n }\n return factoryDestination(\n effects,\n resourceDestinationAfter,\n resourceDestinationMissing,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 32\n )(code)\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceBetween)(code)\n : resourceEnd(code)\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code)\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n resourceTitleAfter,\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n return resourceEnd(code)\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceEnd)(code)\n : resourceEnd(code)\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this\n return referenceFull\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(\n self,\n effects,\n referenceFullAfter,\n referenceFullMissing,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return referenceCollapsedOpen\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelImage')\n effects.enter('labelImageMarker')\n effects.consume(code)\n effects.exit('labelImageMarker')\n return open\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelImage')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

    !^a

    \n *

    !^a

    \n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelLink')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelLink')\n return after\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\n /** @type {State} */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, ok, 'linePrefix')\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').ContainerState} ContainerState\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {asciiDigit, markdownSpace} from 'micromark-util-character'\nimport {blankLine} from './blank-line.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/** @type {Construct} */\nexport const list = {\n name: 'list',\n tokenize: tokenizeListStart,\n continuation: {\n tokenize: tokenizeListContinuation\n },\n exit: tokenizeListEnd\n}\n\n/** @type {Construct} */\nconst listItemPrefixWhitespaceConstruct = {\n tokenize: tokenizeListItemPrefixWhitespace,\n partial: true\n}\n\n/** @type {Construct} */\nconst indentConstruct = {\n tokenize: tokenizeIndent,\n partial: true\n}\n\n// To do: `markdown-rs` parses list items on their own and later stitches them\n// together.\n\n/**\n * @type {Tokenizer}\n * @this {TokenizeContext}\n */\nfunction tokenizeListStart(effects, ok, nok) {\n const self = this\n const tail = self.events[self.events.length - 1]\n let initialSize =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n let size = 0\n return start\n\n /** @type {State} */\n function start(code) {\n const kind =\n self.containerState.type ||\n (code === 42 || code === 43 || code === 45\n ? 'listUnordered'\n : 'listOrdered')\n if (\n kind === 'listUnordered'\n ? !self.containerState.marker || code === self.containerState.marker\n : asciiDigit(code)\n ) {\n if (!self.containerState.type) {\n self.containerState.type = kind\n effects.enter(kind, {\n _container: true\n })\n }\n if (kind === 'listUnordered') {\n effects.enter('listItemPrefix')\n return code === 42 || code === 45\n ? effects.check(thematicBreak, nok, atMarker)(code)\n : atMarker(code)\n }\n if (!self.interrupt || code === 49) {\n effects.enter('listItemPrefix')\n effects.enter('listItemValue')\n return inside(code)\n }\n }\n return nok(code)\n }\n\n /** @type {State} */\n function inside(code) {\n if (asciiDigit(code) && ++size < 10) {\n effects.consume(code)\n return inside\n }\n if (\n (!self.interrupt || size < 2) &&\n (self.containerState.marker\n ? code === self.containerState.marker\n : code === 41 || code === 46)\n ) {\n effects.exit('listItemValue')\n return atMarker(code)\n }\n return nok(code)\n }\n\n /**\n * @type {State}\n **/\n function atMarker(code) {\n effects.enter('listItemMarker')\n effects.consume(code)\n effects.exit('listItemMarker')\n self.containerState.marker = self.containerState.marker || code\n return effects.check(\n blankLine,\n // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank,\n effects.attempt(\n listItemPrefixWhitespaceConstruct,\n endOfPrefix,\n otherPrefix\n )\n )\n }\n\n /** @type {State} */\n function onBlank(code) {\n self.containerState.initialBlankLine = true\n initialSize++\n return endOfPrefix(code)\n }\n\n /** @type {State} */\n function otherPrefix(code) {\n if (markdownSpace(code)) {\n effects.enter('listItemPrefixWhitespace')\n effects.consume(code)\n effects.exit('listItemPrefixWhitespace')\n return endOfPrefix\n }\n return nok(code)\n }\n\n /** @type {State} */\n function endOfPrefix(code) {\n self.containerState.size =\n initialSize +\n self.sliceSerialize(effects.exit('listItemPrefix'), true).length\n return ok(code)\n }\n}\n\n/**\n * @type {Tokenizer}\n * @this {TokenizeContext}\n */\nfunction tokenizeListContinuation(effects, ok, nok) {\n const self = this\n self.containerState._closeFlow = undefined\n return effects.check(blankLine, onBlank, notBlank)\n\n /** @type {State} */\n function onBlank(code) {\n self.containerState.furtherBlankLines =\n self.containerState.furtherBlankLines ||\n self.containerState.initialBlankLine\n\n // We have a blank line.\n // Still, try to consume at most the items size.\n return factorySpace(\n effects,\n ok,\n 'listItemIndent',\n self.containerState.size + 1\n )(code)\n }\n\n /** @type {State} */\n function notBlank(code) {\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = undefined\n self.containerState.initialBlankLine = undefined\n return notInCurrentItem(code)\n }\n self.containerState.furtherBlankLines = undefined\n self.containerState.initialBlankLine = undefined\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)\n }\n\n /** @type {State} */\n function notInCurrentItem(code) {\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true\n // As we’re closing flow, we’re no longer interrupting.\n self.interrupt = undefined\n // Always populated by defaults.\n\n return factorySpace(\n effects,\n effects.attempt(list, ok, nok),\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n}\n\n/**\n * @type {Tokenizer}\n * @this {TokenizeContext}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemIndent',\n self.containerState.size + 1\n )\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'listItemIndent' &&\n tail[2].sliceSerialize(tail[1], true).length === self.containerState.size\n ? ok(code)\n : nok(code)\n }\n}\n\n/**\n * @type {Exiter}\n * @this {TokenizeContext}\n */\nfunction tokenizeListEnd(effects) {\n effects.exit(this.containerState.type)\n}\n\n/**\n * @type {Tokenizer}\n * @this {TokenizeContext}\n */\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n const self = this\n\n // Always populated by defaults.\n\n return factorySpace(\n effects,\n afterPrefix,\n 'listItemPrefixWhitespace',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4 + 1\n )\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return !markdownSpace(code) &&\n tail &&\n tail[1].type === 'listItemPrefixWhitespace'\n ? ok(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n tokenize: tokenizeSetextUnderline,\n resolveTo: resolveToSetextUnderline\n}\n\n/** @type {Resolver} */\nfunction resolveToSetextUnderline(events, context) {\n // To do: resolve like `markdown-rs`.\n let index = events.length\n /** @type {number | undefined} */\n let content\n /** @type {number | undefined} */\n let text\n /** @type {number | undefined} */\n let definition\n\n // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === 'content') {\n content = index\n break\n }\n if (events[index][1].type === 'paragraph') {\n text = index\n }\n }\n // Exit\n else {\n if (events[index][1].type === 'content') {\n // Remove the content end (if needed we’ll add it later)\n events.splice(index, 1)\n }\n if (!definition && events[index][1].type === 'definition') {\n definition = index\n }\n }\n }\n const heading = {\n type: 'setextHeading',\n start: Object.assign({}, events[text][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n\n // Change the paragraph to setext heading text.\n events[text][1].type = 'setextHeadingText'\n\n // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n if (definition) {\n events.splice(text, 0, ['enter', heading, context])\n events.splice(definition + 1, 0, ['exit', events[content][1], context])\n events[content][1].end = Object.assign({}, events[definition][1].end)\n } else {\n events[content][1] = heading\n }\n\n // Add the heading exit at the end.\n events.push(['exit', heading, context])\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * At start of heading (setext) underline.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n let index = self.events.length\n /** @type {boolean | undefined} */\n let paragraph\n // Find an opening.\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (\n self.events[index][1].type !== 'lineEnding' &&\n self.events[index][1].type !== 'linePrefix' &&\n self.events[index][1].type !== 'content'\n ) {\n paragraph = self.events[index][1].type === 'paragraph'\n break\n }\n }\n\n // To do: handle lazy/pierce like `markdown-rs`.\n // To do: parse indent like `markdown-rs`.\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter('setextHeadingLine')\n marker = code\n return before(code)\n }\n return nok(code)\n }\n\n /**\n * After optional whitespace, at `-` or `=`.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter('setextHeadingLineSequence')\n return inside(code)\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n effects.exit('setextHeadingLineSequence')\n return markdownSpace(code)\n ? factorySpace(effects, after, 'lineSuffix')(code)\n : after(code)\n }\n\n /**\n * After sequence, after optional whitespace.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('setextHeadingLine')\n return ok(code)\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nexport const thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeThematicBreak(effects, ok, nok) {\n let size = 0\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of thematic break.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('thematicBreak')\n // To do: parse indent like `markdown-rs`.\n return before(code)\n }\n\n /**\n * After optional whitespace, at marker.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n marker = code\n return atBreak(code)\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.enter('thematicBreakSequence')\n return sequence(code)\n }\n if (size >= 3 && (code === null || markdownLineEnding(code))) {\n effects.exit('thematicBreak')\n return ok(code)\n }\n return nok(code)\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return sequence\n }\n effects.exit('thematicBreakSequence')\n return markdownSpace(code)\n ? factorySpace(effects, atBreak, 'whitespace')(code)\n : atBreak(code)\n }\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","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","// Generated by CoffeeScript 1.7.1\n(function() {\n var getNanoSeconds, hrtime, loadTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\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 printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\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\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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 ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\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\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\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","/**\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","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * @typedef {import('./lib/util/info.js').Info} Info\n * @typedef {import('./lib/util/schema.js').Schema} Schema\n */\n\nimport {merge} from './lib/util/merge.js'\nimport {xlink} from './lib/xlink.js'\nimport {xml} from './lib/xml.js'\nimport {xmlns} from './lib/xmlns.js'\nimport {aria} from './lib/aria.js'\nimport {html as htmlBase} from './lib/html.js'\nimport {svg as svgBase} from './lib/svg.js'\n\nexport {find} from './lib/find.js'\nexport {hastToReact} from './lib/hast-to-react.js'\nexport {normalize} from './lib/normalize.js'\nexport const html = merge([xml, xlink, xmlns, aria, htmlBase], 'html')\nexport const svg = merge([xml, xlink, xmlns, aria, svgBase], 'svg')\n","import {booleanish, number, spaceSeparated} from './util/types.js'\nimport {create} from './util/create.js'\n\nexport const aria = create({\n transform(_, prop) {\n return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n },\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","/**\n * @typedef {import('./util/schema.js').Schema} Schema\n */\n\nimport {normalize} from './normalize.js'\nimport {DefinedInfo} from './util/defined-info.js'\nimport {Info} from './util/info.js'\n\nconst valid = /^data[-\\w.:]+$/i\nconst dash = /-[a-z]/g\nconst cap = /[A-Z]/g\n\n/**\n * @param {Schema} schema\n * @param {string} value\n * @returns {Info}\n */\nexport function find(schema, value) {\n const normal = normalize(value)\n let prop = value\n let 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 // Turn it into a property.\n const rest = value.slice(5).replace(dash, camelcase)\n prop = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)\n } else {\n // Turn it into an attribute.\n const rest = value.slice(4)\n\n if (!dash.test(rest)) {\n let dashes = rest.replace(cap, kebab)\n\n if (dashes.charAt(0) !== '-') {\n dashes = '-' + dashes\n }\n\n value = 'data' + dashes\n }\n }\n\n Type = DefinedInfo\n }\n\n return new Type(prop, value)\n}\n\n/**\n * @param {string} $0\n * @returns {string}\n */\nfunction kebab($0) {\n return '-' + $0.toLowerCase()\n}\n\n/**\n * @param {string} $0\n * @returns {string}\n */\nfunction camelcase($0) {\n return $0.charAt(1).toUpperCase()\n}\n","/**\n * `hast` is close to `React`, but differs in a couple of cases.\n *\n * To get a React property from a hast property, check if it is in\n * `hastToReact`, if it is, then use the corresponding value,\n * otherwise, use the hast property.\n *\n * @type {Record}\n */\nexport const hastToReact = {\n classId: 'classID',\n dataType: 'datatype',\n itemId: 'itemID',\n strokeDashArray: 'strokeDasharray',\n strokeDashOffset: 'strokeDashoffset',\n strokeLineCap: 'strokeLinecap',\n strokeLineJoin: 'strokeLinejoin',\n strokeMiterLimit: 'strokeMiterlimit',\n typeOf: 'typeof',\n xLinkActuate: 'xlinkActuate',\n xLinkArcRole: 'xlinkArcrole',\n xLinkHref: 'xlinkHref',\n xLinkRole: 'xlinkRole',\n xLinkShow: 'xlinkShow',\n xLinkTitle: 'xlinkTitle',\n xLinkType: 'xlinkType',\n xmlnsXLink: 'xmlnsXlink'\n}\n","import {\n boolean,\n overloadedBoolean,\n booleanish,\n number,\n spaceSeparated,\n commaSeparated\n} from './util/types.js'\nimport {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const html = 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: null,\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 loading: 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 onBeforeMatch: 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 onContextLost: null,\n onContextMenu: null,\n onContextRestored: 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 onScrollEnd: 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: null,\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, // ``. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // ``. List of URIs to archives\n axis: null, // `` and ``. Use `scope` on ``\n background: null, // ``. Use CSS `background-image` instead\n bgColor: null, // `` and table elements. Use CSS `background-color` instead\n border: number, // ``. Use CSS `border-width` instead,\n borderColor: null, // `
    `. Use CSS `border-color` instead,\n bottomMargin: number, // ``\n cellPadding: null, // `
    `\n cellSpacing: null, // `
    `\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, // ``\n clear: null, // `
    `. Use CSS `clear` instead\n code: null, // ``\n codeBase: null, // ``\n codeType: null, // ``\n color: null, // `` and `
    `. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // ``\n event: null, // `