From e2b75b25d597ddfc49f0ebec1de5e2f7ca840281 Mon Sep 17 00:00:00 2001 From: Ben Gazzard Date: Thu, 30 Nov 2023 22:07:01 +0000 Subject: [PATCH] feat: emui package details page (#1873) ## Description: This PR implements the emui package details page. The change @adschwartz to refactor keyboard listener code requested in https://github.com/kurtosis-tech/kurtosis/pull/1865 is also included. It also fixes the poor rendering of the catalog logos on chrome. Additionally it implements feedback Tise left on the designs for me to pick up, specifically: * Value card icon appearance * Use preferred round star icon * Update the run button appearance and interaction behaviour to match the designs. Finally, quite a large addition is included to support the combination of `react-markdown` and `chakra` in the `KurtosisMarkdown` component which includes basic chakra implementations of the html components. This is required because `CSSReset` (part of chakra theme) unsets all of the styling that would apply to markdown. ### Short demo https://github.com/kurtosis-tech/kurtosis/assets/4419574/19826393-10b2-40de-832b-6970f305a2ce ## Is this change user facing? YES ## References (if applicable): * Figma --- .../src/components/KurtosisBreadcrumbs.tsx | 60 ++++---- .../web/src/components/KurtosisMarkdown.tsx | 81 +++++++++++ .../src/components/KurtosisThemeProvider.tsx | 12 +- ...urceButton.tsx => PackageSourceButton.tsx} | 50 ++++--- .../web/src/components/TitledCard.tsx | 14 +- .../web/src/components/ValueCard.tsx | 4 + .../catalog/KurtosisPackageCard.tsx | 89 ++++++------ .../web/src/components/catalog/utils.ts | 9 ++ .../widgets/RunKurtosisPackageButton.tsx | 19 ++- .../widgets/SaveKurtosisPackageButton.tsx | 10 +- .../KurtosisArgumentFormControl.tsx | 4 +- .../components/enclaves/logs/LogViewer.tsx | 89 ++++++------ .../enclaves/modals/ConfigureEnclaveModal.tsx | 4 +- .../enclaves/tables/EnclavesTable.tsx | 4 +- .../web/src/components/useKeyboardAction.ts | 36 +++++ .../web/src/emui/catalog/Catalog.tsx | 45 +++--- .../web/src/emui/catalog/CatalogContext.tsx | 4 +- .../web/src/emui/catalog/CatalogRoutes.tsx | 27 ++++ .../web/src/emui/catalog/package/Package.tsx | 132 ++++++++++++++++++ .../enclaves/enclave/artifact/Artifact.tsx | 5 +- enclave-manager/web/src/utils/index.ts | 7 + engine/server/webapp/asset-manifest.json | 6 +- engine/server/webapp/index.html | 2 +- .../js/{main.d987c6a5.js => main.b8e909a2.js} | 6 +- ...CENSE.txt => main.b8e909a2.js.LICENSE.txt} | 0 ...n.d987c6a5.js.map => main.b8e909a2.js.map} | 2 +- 26 files changed, 533 insertions(+), 188 deletions(-) create mode 100644 enclave-manager/web/src/components/KurtosisMarkdown.tsx rename enclave-manager/web/src/components/{enclaves/widgets/EnclaveSourceButton.tsx => PackageSourceButton.tsx} (53%) create mode 100644 enclave-manager/web/src/components/catalog/utils.ts create mode 100644 enclave-manager/web/src/components/useKeyboardAction.ts create mode 100644 enclave-manager/web/src/emui/catalog/package/Package.tsx rename engine/server/webapp/static/js/{main.d987c6a5.js => main.b8e909a2.js} (57%) rename engine/server/webapp/static/js/{main.d987c6a5.js.LICENSE.txt => main.b8e909a2.js.LICENSE.txt} (100%) rename engine/server/webapp/static/js/{main.d987c6a5.js.map => main.b8e909a2.js.map} (69%) diff --git a/enclave-manager/web/src/components/KurtosisBreadcrumbs.tsx b/enclave-manager/web/src/components/KurtosisBreadcrumbs.tsx index 5cfce79a8d..f10b798379 100644 --- a/enclave-manager/web/src/components/KurtosisBreadcrumbs.tsx +++ b/enclave-manager/web/src/components/KurtosisBreadcrumbs.tsx @@ -16,6 +16,7 @@ import { import { ReactElement, useMemo } from "react"; import { BsCaretDownFill } from "react-icons/bs"; import { Link, Params, UIMatch, useMatches } from "react-router-dom"; +import { CatalogState, useCatalogContext } from "../emui/catalog/CatalogContext"; import { EnclavesState, useEnclavesContext } from "../emui/enclaves/EnclavesContext"; import { isDefined } from "../utils"; import { RemoveFunctions } from "../utils/types"; @@ -33,7 +34,7 @@ export type KurtosisEnclavesBreadcrumbsHandle = KurtosisBaseBreadcrumbsHandle & export type KurtosisCatalogBreadcrumbsHandle = { type: "catalogHandle"; - crumb?: () => KurtosisBreadcrumb | KurtosisBreadcrumb[]; + crumb?: (state: RemoveFunctions, params: Params) => KurtosisBreadcrumb | KurtosisBreadcrumb[]; }; export type KurtosisBreadcrumbsHandle = KurtosisEnclavesBreadcrumbsHandle | KurtosisCatalogBreadcrumbsHandle; @@ -151,16 +152,18 @@ type KurtosisCatalogBreadcrumbsProps = { }; const KurtosisCatalogBreadcrumbs = ({ matches }: KurtosisCatalogBreadcrumbsProps) => { + const { catalog, savedPackages } = useCatalogContext(); + const matchCrumbs = useMemo( () => matches.flatMap((match) => { if (isDefined(match.handle?.crumb)) { - const r = match.handle.crumb(); + const r = match.handle.crumb({ catalog, savedPackages }, match.params); return Array.isArray(r) ? r : [r]; } return []; }), - [matches], + [matches, catalog, savedPackages], ); return ; @@ -173,27 +176,36 @@ type KurtosisBreadcrumbsImplProps = { const KurtosisBreadcrumbsImpl = ({ matchCrumbs, extraControls }: KurtosisBreadcrumbsImplProps) => { return ( - - - - - / - - } - > - {matchCrumbs.map((crumb, i, arr) => ( - - - - ))} - -   - - {extraControls} + + + + / + + } + > + + + Kurtosis + + + {matchCrumbs.map((crumb, i, arr) => ( + + + + ))} + +   + {extraControls} ); }; @@ -205,7 +217,7 @@ type KurtosisBreadcrumbItemProps = KurtosisBreadcrumb & { const KurtosisBreadcrumbItem = ({ name, destination, alternatives, isLastItem }: KurtosisBreadcrumbItemProps) => { if (isLastItem) { return ( - + {name} ); diff --git a/enclave-manager/web/src/components/KurtosisMarkdown.tsx b/enclave-manager/web/src/components/KurtosisMarkdown.tsx new file mode 100644 index 0000000000..164d3564bb --- /dev/null +++ b/enclave-manager/web/src/components/KurtosisMarkdown.tsx @@ -0,0 +1,81 @@ +import { Code, Divider, Heading, Image, Link, Table, Tbody, Td, Text, Th, Thead, Tr } from "@chakra-ui/react"; +import { DetailedHTMLProps, HTMLAttributes } from "react"; +import Markdown, { Components } from "react-markdown"; + +const heading = + (level: 1 | 2 | 3 | 4 | 5 | 6) => + ({ children }: DetailedHTMLProps, HTMLHeadingElement>) => { + const sizes = ["xl", "lg", "md", "sm", "xs", "xs"]; + return ( + + {children} + + ); + }; + +const componentStrategy: Components = { + h1: heading(1), + h2: heading(2), + h3: heading(3), + h4: heading(4), + h5: heading(5), + h6: heading(6), + p: (props) => { + const { children } = props; + return {children}; + }, + em: (props) => { + const { children } = props; + return {children}; + }, + blockquote: (props) => { + const { children } = props; + return ( + + {children} + + ); + }, + code: ({ children }) => { + return ; + }, + del: (props) => { + const { children } = props; + return {children}; + }, + hr: (props) => { + return ; + }, + a: Link, + img: (props) => , + text: (props) => { + const { children } = props; + return {children}; + }, + pre: (props) => { + const { children } = props; + return ( + + {children} + + ); + }, + table: Table, + thead: Thead, + tbody: Tbody, + tr: (props) => {props.children}, + td: (props) => {props.children}, + th: (props) => {props.children}, +}; + +type KurtosisMarkdownProps = { + children?: string; +}; + +export const KurtosisMarkdown = ({ children }: KurtosisMarkdownProps) => { + return ( + + {children} + + ); +}; diff --git a/enclave-manager/web/src/components/KurtosisThemeProvider.tsx b/enclave-manager/web/src/components/KurtosisThemeProvider.tsx index 2e876ebd2d..4416aded73 100644 --- a/enclave-manager/web/src/components/KurtosisThemeProvider.tsx +++ b/enclave-manager/web/src/components/KurtosisThemeProvider.tsx @@ -106,6 +106,16 @@ const theme = extendTheme({ color: `${props.colorScheme}.400`, borderColor: "gray.300", }), + solidOutline: (props: StyleFunctionProps) => { + const outline = theme.components.Button.variants!.outline(props); + return { + ...outline, + _hover: { bg: `${props.colorScheme}.400`, color: "gray.900" }, + _active: { bg: `${props.colorScheme}.400`, color: "gray.900" }, + color: `${props.colorScheme}.400`, + borderColor: `${props.colorScheme}.400`, + }; + }, kurtosisGroupOutline: (props: StyleFunctionProps) => { const outline = theme.components.Button.variants!.outline(props); return { @@ -210,13 +220,11 @@ const theme = extendTheme({ }, titledCard: { container: { - height: "100%", bgColor: "none", borderColor: "gray.500", borderStyle: "solid", borderWidth: "1px", borderRadius: "6px", - overflow: "clip", }, header: { bg: "gray.850", diff --git a/enclave-manager/web/src/components/enclaves/widgets/EnclaveSourceButton.tsx b/enclave-manager/web/src/components/PackageSourceButton.tsx similarity index 53% rename from enclave-manager/web/src/components/enclaves/widgets/EnclaveSourceButton.tsx rename to enclave-manager/web/src/components/PackageSourceButton.tsx index 2f33dc0be4..a2afa8d612 100644 --- a/enclave-manager/web/src/components/enclaves/widgets/EnclaveSourceButton.tsx +++ b/enclave-manager/web/src/components/PackageSourceButton.tsx @@ -1,14 +1,18 @@ -import { Button, ButtonGroup, ButtonProps, Icon, Spinner, Tag, Tooltip } from "@chakra-ui/react"; +import { Button, ButtonGroup, ButtonProps, Icon, Link, Spinner, Tag, Tooltip } from "@chakra-ui/react"; +import { PropsWithChildren } from "react"; import { IoLogoGithub } from "react-icons/io"; -import { useKurtosisPackageIndexerClient } from "../../../client/packageIndexer/KurtosisPackageIndexerClientContext"; -import { isDefined, wrapResult } from "../../../utils"; -import { CopyButton } from "../../CopyButton"; +import { useKurtosisPackageIndexerClient } from "../client/packageIndexer/KurtosisPackageIndexerClientContext"; +import { isDefined, wrapResult } from "../utils"; +import { CopyButton } from "./CopyButton"; -type EnclaveSourceProps = ButtonProps & { - source: "loading" | string | null; -}; +type EnclaveSourceProps = PropsWithChildren< + ButtonProps & { + source: "loading" | string | null; + hideCopy?: boolean; + } +>; -export const EnclaveSourceButton = ({ source, ...buttonProps }: EnclaveSourceProps) => { +export const PackageSourceButton = ({ source, hideCopy, children, ...buttonProps }: EnclaveSourceProps) => { const kurtosisIndexer = useKurtosisPackageIndexerClient(); if (!isDefined(source)) { @@ -20,11 +24,11 @@ export const EnclaveSourceButton = ({ source, ...buttonProps }: EnclaveSourcePro } let button = ( - + - + ); if (source.startsWith("github.com/")) { const repositoryResult = wrapResult(() => kurtosisIndexer.parsePackageUrl(source)); @@ -35,23 +39,23 @@ export const EnclaveSourceButton = ({ source, ...buttonProps }: EnclaveSourcePro }`; button = ( - + - + ); } else { button = ( @@ -62,13 +66,15 @@ export const EnclaveSourceButton = ({ source, ...buttonProps }: EnclaveSourcePro return ( {button} - + {!hideCopy && ( + + )} ); }; diff --git a/enclave-manager/web/src/components/TitledCard.tsx b/enclave-manager/web/src/components/TitledCard.tsx index 1d06d01680..87b2465d7c 100644 --- a/enclave-manager/web/src/components/TitledCard.tsx +++ b/enclave-manager/web/src/components/TitledCard.tsx @@ -4,13 +4,21 @@ import { PropsWithChildren, ReactElement } from "react"; type TitledCardProps = CardProps & PropsWithChildren<{ title: string; + fillContainer?: boolean; controls?: ReactElement; rightControls?: ReactElement; }>; -export const TitledCard = ({ title, controls, rightControls, children, ...cardProps }: TitledCardProps) => { +export const TitledCard = ({ + title, + fillContainer, + controls, + rightControls, + children, + ...cardProps +}: TitledCardProps) => { return ( - + {rightControls} - {children} + {children} ); }; diff --git a/enclave-manager/web/src/components/ValueCard.tsx b/enclave-manager/web/src/components/ValueCard.tsx index a2af182457..539f4f0e8e 100644 --- a/enclave-manager/web/src/components/ValueCard.tsx +++ b/enclave-manager/web/src/components/ValueCard.tsx @@ -19,8 +19,12 @@ export const ValueCard = ({ title, value, copyEnabled, copyValue }: ValueCardPro {copyEnabled && ( )} diff --git a/enclave-manager/web/src/components/catalog/KurtosisPackageCard.tsx b/enclave-manager/web/src/components/catalog/KurtosisPackageCard.tsx index fb86cd91ef..ce55c971e3 100644 --- a/enclave-manager/web/src/components/catalog/KurtosisPackageCard.tsx +++ b/enclave-manager/web/src/components/catalog/KurtosisPackageCard.tsx @@ -1,59 +1,66 @@ import { Flex, Icon, Image, Text } from "@chakra-ui/react"; -import { IoStarSharp } from "react-icons/io5"; +import { IoStar } from "react-icons/io5"; +import { Link } from "react-router-dom"; import { useKurtosisClient } from "../../client/enclaveManager/KurtosisClientContext"; import { KurtosisPackage } from "../../client/packageIndexer/api/kurtosis_package_indexer_pb"; -import { isDefined } from "../../utils"; +import { readablePackageName } from "./utils"; import { RunKurtosisPackageButton } from "./widgets/RunKurtosisPackageButton"; import { SaveKurtosisPackageButton } from "./widgets/SaveKurtosisPackageButton"; -type KurtosisPackageCardProps = { kurtosisPackage: KurtosisPackage; onClick?: () => void }; +type KurtosisPackageCardProps = { kurtosisPackage: KurtosisPackage }; export const KurtosisPackageCard = ({ kurtosisPackage }: KurtosisPackageCardProps) => { const client = useKurtosisClient(); - const name = isDefined(kurtosisPackage.repositoryMetadata) - ? `${kurtosisPackage.repositoryMetadata.name} ${kurtosisPackage.repositoryMetadata.rootPath.split("/").join(" ")}` - : kurtosisPackage.name; - return ( - - - - - - {name} - - - - {kurtosisPackage.repositoryMetadata?.owner.replaceAll("-", " ") || "Unknown owner"} + + + + + + + {readablePackageName(kurtosisPackage.name)} - - {kurtosisPackage.stars > 0 && ( - <> - - {kurtosisPackage.stars.toString()} - - )} + + + {kurtosisPackage.repositoryMetadata?.owner.replaceAll("-", " ") || "Unknown owner"} + + + {kurtosisPackage.stars > 0 && ( + <> + + {kurtosisPackage.stars.toString()} + + )} + + + + + - - - - - + ); }; diff --git a/enclave-manager/web/src/components/catalog/utils.ts b/enclave-manager/web/src/components/catalog/utils.ts new file mode 100644 index 0000000000..8f47e76c7e --- /dev/null +++ b/enclave-manager/web/src/components/catalog/utils.ts @@ -0,0 +1,9 @@ +import { capitalize } from "../../utils"; + +export function readablePackageName(packageName: string): string { + const parts = packageName.replaceAll("-", " ").split("/"); + if (parts.length < 3) { + return packageName; + } + return capitalize(`${parts[2]} ${parts.slice(3).join(" ")}`); +} diff --git a/enclave-manager/web/src/components/catalog/widgets/RunKurtosisPackageButton.tsx b/enclave-manager/web/src/components/catalog/widgets/RunKurtosisPackageButton.tsx index f626c28eb6..001fcd34c6 100644 --- a/enclave-manager/web/src/components/catalog/widgets/RunKurtosisPackageButton.tsx +++ b/enclave-manager/web/src/components/catalog/widgets/RunKurtosisPackageButton.tsx @@ -1,6 +1,6 @@ import { Button, ButtonProps } from "@chakra-ui/react"; import { useState } from "react"; -import { FiDownload } from "react-icons/fi"; +import { FiPlay } from "react-icons/fi"; import { KurtosisPackage } from "../../../client/packageIndexer/api/kurtosis_package_indexer_pb"; import { EnclavesContextProvider } from "../../../emui/enclaves/EnclavesContext"; import { ConfigureEnclaveModal } from "../../enclaves/modals/ConfigureEnclaveModal"; @@ -10,24 +10,31 @@ type RunKurtosisPackageButtonProps = ButtonProps & { }; export const RunKurtosisPackageButton = ({ kurtosisPackage, ...buttonProps }: RunKurtosisPackageButtonProps) => { - const [configuringEnclave, setConfiguringEnclave] = useState(false); + const [isConfiguringEnclave, setIsConfiguringEnclave] = useState(false); return ( <> - {configuringEnclave && ( + {isConfiguringEnclave && ( setConfiguringEnclave(false)} + onClose={() => setIsConfiguringEnclave(false)} kurtosisPackage={kurtosisPackage} /> diff --git a/enclave-manager/web/src/components/catalog/widgets/SaveKurtosisPackageButton.tsx b/enclave-manager/web/src/components/catalog/widgets/SaveKurtosisPackageButton.tsx index 722374cb3c..3ea7513c6d 100644 --- a/enclave-manager/web/src/components/catalog/widgets/SaveKurtosisPackageButton.tsx +++ b/enclave-manager/web/src/components/catalog/widgets/SaveKurtosisPackageButton.tsx @@ -1,5 +1,5 @@ import { Button, ButtonProps } from "@chakra-ui/react"; -import { memo, MouseEventHandler, useCallback, useMemo } from "react"; +import React, { memo, MouseEventHandler, useCallback, useMemo } from "react"; import { MdBookmarkAdd } from "react-icons/md"; import { KurtosisPackage } from "../../../client/packageIndexer/api/kurtosis_package_indexer_pb"; import { useCatalogContext } from "../../../emui/catalog/CatalogContext"; @@ -15,7 +15,13 @@ export const SaveKurtosisPackageButton = ({ kurtosisPackage, ...buttonProps }: S [savedPackages, kurtosisPackage], ); - const handleClick = useCallback(() => togglePackageSaved(kurtosisPackage), [togglePackageSaved, kurtosisPackage]); + const handleClick = useCallback( + (e: React.MouseEvent) => { + e.preventDefault(); + togglePackageSaved(kurtosisPackage); + }, + [togglePackageSaved, kurtosisPackage], + ); return ; }; diff --git a/enclave-manager/web/src/components/enclaves/configuration/KurtosisArgumentFormControl.tsx b/enclave-manager/web/src/components/enclaves/configuration/KurtosisArgumentFormControl.tsx index 668abcb3d4..6f58289332 100644 --- a/enclave-manager/web/src/components/enclaves/configuration/KurtosisArgumentFormControl.tsx +++ b/enclave-manager/web/src/components/enclaves/configuration/KurtosisArgumentFormControl.tsx @@ -1,8 +1,8 @@ import { Badge, Flex, FormControl, FormErrorMessage, FormHelperText, FormLabel } from "@chakra-ui/react"; import { PropsWithChildren } from "react"; import { FieldError, FieldPath } from "react-hook-form"; -import Markdown from "react-markdown"; import { isDefined } from "../../../utils"; +import { KurtosisMarkdown } from "../../KurtosisMarkdown"; import { useEnclaveConfigurationFormContext } from "./EnclaveConfigurationForm"; import { ConfigureEnclaveForm } from "./types"; @@ -39,7 +39,7 @@ export const KurtosisArgumentFormControl = ({ {children} - {helperText} + {helperText} {error?.message} diff --git a/enclave-manager/web/src/components/enclaves/logs/LogViewer.tsx b/enclave-manager/web/src/components/enclaves/logs/LogViewer.tsx index aced192bfb..98250a8a48 100644 --- a/enclave-manager/web/src/components/enclaves/logs/LogViewer.tsx +++ b/enclave-manager/web/src/components/enclaves/logs/LogViewer.tsx @@ -28,6 +28,7 @@ import { isDefined, isNotEmpty, stringifyError, stripAnsi } from "../../../utils import { CopyButton } from "../../CopyButton"; import { DownloadButton } from "../../DownloadButton"; import { FindCommand } from "../../KeyboardCommands"; +import { useKeyboardAction } from "../../useKeyboardAction"; import { LogLine } from "./LogLine"; import { LogLineMessage } from "./types"; import { normalizeLogText } from "./utils"; @@ -253,38 +254,41 @@ const SearchControls = ({ searchState, onChangeSearchState, logLines }: SearchCo debouncedUpdateMatches(e.target.value); }; - const updateSearchIndexBounded = (newIndex: number) => { - if (searchState.type !== "success") { - return; - } - if (newIndex > searchState.searchMatchesIndices.length - 1) { - newIndex = 0; - } - if (newIndex < 0) { - newIndex = searchState.searchMatchesIndices.length - 1; - } - onChangeSearchState((state) => ({ ...state, currentSearchIndex: newIndex })); - }; + const updateSearchIndexBounded = useCallback( + (newIndex: number) => { + if (searchState.type !== "success") { + return; + } + if (newIndex > searchState.searchMatchesIndices.length - 1) { + newIndex = 0; + } + if (newIndex < 0) { + newIndex = searchState.searchMatchesIndices.length - 1; + } + onChangeSearchState((state) => ({ ...state, currentSearchIndex: newIndex })); + }, + [onChangeSearchState, searchState], + ); - const handlePriorMatchClick = () => { + const handlePriorMatchClick = useCallback(() => { updateSearchIndexBounded( searchState.type === "success" && isDefined(searchState.currentSearchIndex) ? searchState.currentSearchIndex - 1 : 0, ); - }; + }, [updateSearchIndexBounded, searchState]); - const handleNextMatchClick = () => { + const handleNextMatchClick = useCallback(() => { updateSearchIndexBounded( searchState.type === "success" && isDefined(searchState.currentSearchIndex) ? searchState.currentSearchIndex + 1 : 0, ); - }; + }, [updateSearchIndexBounded, searchState]); - const handleClearSearch = () => { + const handleClearSearch = useCallback(() => { onChangeSearchState({ type: "init", rawSearchTerm: "" }); - }; + }, [onChangeSearchState]); const handleIndexInputChange = (text: string) => { if (searchState.type !== "success") { @@ -300,34 +304,27 @@ const SearchControls = ({ searchState, onChangeSearchState, logLines }: SearchCo updateSearchIndexBounded(index - 1); }; - useEffect(() => { - const listener = function (e: KeyboardEvent) { - const element = searchRef?.current; - if ((e.ctrlKey && e.keyCode === 70) || (e.metaKey && e.keyCode === 70)) { - setShowSearchForm(true); - if (element !== document.activeElement) { - e.preventDefault(); - element?.focus(); - } - } - // Next search match with cmd/ctrl+G - // if ((e.ctrlKey && e.keyCode === 71) || (e.metaKey && e.keyCode === 71)) { - // console.log("NEXT", e.keyCode); - // e.preventDefault(); - // nextMatch(); - // } - - // Clear the search on escape - if (e.key === "Escape" || e.keyCode === 27) { - if (element === document.activeElement) { - e.preventDefault(); - onChangeSearchState({ type: "init", rawSearchTerm: "" }); - } - } - }; - window.addEventListener("keydown", listener); - return () => window.removeEventListener("keydown", listener); - }, [onChangeSearchState, searchRef]); + useKeyboardAction( + useMemo( + () => ({ + find: () => { + setShowSearchForm(true); + if (isDefined(searchRef.current) && searchRef.current !== document.activeElement) { + searchRef.current.focus(); + } + }, + next: () => { + handleNextMatchClick(); + }, + escape: () => { + if (isDefined(searchRef.current) && searchRef.current === document.activeElement) { + handleClearSearch(); + } + }, + }), + [searchRef, handleNextMatchClick, handleClearSearch], + ), + ); if (!showSearchForm) { return ( diff --git a/enclave-manager/web/src/components/enclaves/modals/ConfigureEnclaveModal.tsx b/enclave-manager/web/src/components/enclaves/modals/ConfigureEnclaveModal.tsx index e3db76ed33..dc3238cbe6 100644 --- a/enclave-manager/web/src/components/enclaves/modals/ConfigureEnclaveModal.tsx +++ b/enclave-manager/web/src/components/enclaves/modals/ConfigureEnclaveModal.tsx @@ -25,6 +25,7 @@ import { assertDefined, isDefined, stringifyError } from "../../../utils"; import { KURTOSIS_PACKAGE_ID_URL_ARG, KURTOSIS_PACKAGE_PARAMS_URL_ARG } from "../../constants"; import { CopyButton } from "../../CopyButton"; import { KurtosisAlert } from "../../KurtosisAlert"; +import { PackageSourceButton } from "../../PackageSourceButton"; import { EnclaveConfigurationForm, EnclaveConfigurationFormImperativeAttributes, @@ -35,7 +36,6 @@ import { KurtosisArgumentFormControl } from "../configuration/KurtosisArgumentFo import { KurtosisPackageArgumentInput } from "../configuration/KurtosisPackageArgumentInput"; import { ConfigureEnclaveForm } from "../configuration/types"; import { allowedEnclaveNamePattern, isEnclaveNameAllowed } from "../utils"; -import { EnclaveSourceButton } from "../widgets/EnclaveSourceButton"; type ConfigureEnclaveModalProps = { isOpen: boolean; @@ -254,7 +254,7 @@ export const ConfigureEnclaveModal = ({ Configuring - + {isDefined(error) && ( diff --git a/enclave-manager/web/src/components/enclaves/tables/EnclavesTable.tsx b/enclave-manager/web/src/components/enclaves/tables/EnclavesTable.tsx index ef24a96e17..7ab9f8aa79 100644 --- a/enclave-manager/web/src/components/enclaves/tables/EnclavesTable.tsx +++ b/enclave-manager/web/src/components/enclaves/tables/EnclavesTable.tsx @@ -9,9 +9,9 @@ import { EnclaveFullInfo } from "../../../emui/enclaves/types"; import { isDefined } from "../../../utils"; import { DataTable } from "../../DataTable"; import { FormatDateTime } from "../../FormatDateTime"; +import { PackageSourceButton } from "../../PackageSourceButton"; import { EnclaveArtifactsSummary } from "../widgets/EnclaveArtifactsSummary"; import { EnclaveServicesSummary } from "../widgets/EnclaveServicesSummary"; -import { EnclaveSourceButton } from "../widgets/EnclaveSourceButton"; import { EnclaveStatus } from "../widgets/EnclaveStatus"; type EnclaveTableRow = { @@ -115,7 +115,7 @@ export const EnclavesTable = ({ enclavesData, selection, onSelectionChange }: En }), columnHelper.accessor("source", { header: "Source", - cell: (sourceCell) => , + cell: (sourceCell) => , }), columnHelper.accessor("services", { cell: (servicesCell) => , diff --git a/enclave-manager/web/src/components/useKeyboardAction.ts b/enclave-manager/web/src/components/useKeyboardAction.ts new file mode 100644 index 0000000000..5f890c0072 --- /dev/null +++ b/enclave-manager/web/src/components/useKeyboardAction.ts @@ -0,0 +1,36 @@ +import { useEffect } from "react"; + +export type KeyboardActions = "escape" | "find" | "omniFind" | "next"; + +export type OnCtrlPressHandlers = Partial void>>; + +const eventIsType = (e: KeyboardEvent, type: KeyboardActions) => { + const ctrlOrMeta = e.ctrlKey || e.metaKey; + + switch (type) { + case "find": + return ctrlOrMeta && e.keyCode === 70; // F + case "next": + return ctrlOrMeta && e.keyCode === 71; // G + case "omniFind": + return ctrlOrMeta && e.keyCode === 75; // K + case "escape": + return e.key === "Escape" || e.keyCode === 27; + } +}; + +export const useKeyboardAction = (handlers: OnCtrlPressHandlers) => { + useEffect(() => { + const listener = function (e: KeyboardEvent) { + for (const [handlerType, handler] of Object.entries(handlers)) { + if (eventIsType(e, handlerType as KeyboardActions)) { + e.preventDefault(); + handler(); + return; + } + } + }; + window.addEventListener("keydown", listener); + return () => window.removeEventListener("keydown", listener); + }, [handlers]); +}; diff --git a/enclave-manager/web/src/emui/catalog/Catalog.tsx b/enclave-manager/web/src/emui/catalog/Catalog.tsx index c3ee02b193..49ff15bc54 100644 --- a/enclave-manager/web/src/emui/catalog/Catalog.tsx +++ b/enclave-manager/web/src/emui/catalog/Catalog.tsx @@ -14,7 +14,7 @@ import { InputRightElement, Text, } from "@chakra-ui/react"; -import { useEffect, useMemo, useRef, useState } from "react"; +import { useMemo, useRef, useState } from "react"; import { FiSearch } from "react-icons/fi"; import { MdBookmarkAdded } from "react-icons/md"; import { GetPackagesResponse, KurtosisPackage } from "../../client/packageIndexer/api/kurtosis_package_indexer_pb"; @@ -23,6 +23,8 @@ import { KurtosisPackageCardGrid } from "../../components/catalog/KurtosisPackag import { OmniboxCommand } from "../../components/KeyboardCommands"; import { KurtosisAlert } from "../../components/KurtosisAlert"; import { PageTitle } from "../../components/PageTitle"; +import { useKeyboardAction } from "../../components/useKeyboardAction"; +import { isDefined } from "../../utils"; import { useCatalogContext } from "./CatalogContext"; export const Catalog = () => { @@ -49,31 +51,27 @@ const CatalogImpl = ({ catalog, savedPackages }: CatalogImplProps) => { const [searchTerm, setSearchTerm] = useState(""); const isSearching = searchTerm.length > 0; const filteredCatalog = useMemo( - () => catalog.packages.filter((kurtosisPackage) => kurtosisPackage.name.toLowerCase().indexOf(searchTerm) > 0), + () => catalog.packages.filter((kurtosisPackage) => kurtosisPackage.name.toLowerCase().indexOf(searchTerm) > -1), [searchTerm, catalog], ); - useEffect(() => { - const listener = function (e: KeyboardEvent) { - const element = searchRef?.current; - if ((e.ctrlKey && e.keyCode === 75) || (e.metaKey && e.keyCode === 75)) { - if (element !== document.activeElement) { - e.preventDefault(); - element?.focus(); - } - } - - // Clear the search on escape - if (e.key === "Escape" || e.keyCode === 27) { - if (element === document.activeElement) { - e.preventDefault(); - setSearchTerm(""); - } - } - }; - window.addEventListener("keydown", listener); - return () => window.removeEventListener("keydown", listener); - }, [searchRef]); + useKeyboardAction( + useMemo( + () => ({ + omniFind: () => { + if (isDefined(searchRef.current) && searchRef.current !== document.activeElement) { + searchRef.current.focus(); + } + }, + escape: () => { + if (isDefined(searchRef.current) && searchRef.current === document.activeElement) { + setSearchTerm(""); + } + }, + }), + [searchRef], + ), + ); return ( @@ -117,7 +115,6 @@ const CatalogImpl = ({ catalog, savedPackages }: CatalogImplProps) => { )} {!isSearching && ( <> - {" "} {savedPackages.length > 0 && ( diff --git a/enclave-manager/web/src/emui/catalog/CatalogContext.tsx b/enclave-manager/web/src/emui/catalog/CatalogContext.tsx index 8c5148198c..a2a4bba142 100644 --- a/enclave-manager/web/src/emui/catalog/CatalogContext.tsx +++ b/enclave-manager/web/src/emui/catalog/CatalogContext.tsx @@ -6,14 +6,14 @@ import { useKurtosisPackageIndexerClient } from "../../client/packageIndexer/Kur import { isDefined } from "../../utils"; import { loadSavedPackageNames, storeSavedPackages } from "./storage"; -export type CatalogsState = { +export type CatalogState = { catalog: Result; savedPackages: KurtosisPackage[]; refreshCatalog: () => Promise>; togglePackageSaved: (kurtosisPackage: KurtosisPackage) => void; }; -const CatalogContext = createContext(null as any); +const CatalogContext = createContext(null as any); export const CatalogContextProvider = ({ children }: PropsWithChildren) => { const packageIndexerClient = useKurtosisPackageIndexerClient(); diff --git a/enclave-manager/web/src/emui/catalog/CatalogRoutes.tsx b/enclave-manager/web/src/emui/catalog/CatalogRoutes.tsx index 293e183cc7..929609d430 100644 --- a/enclave-manager/web/src/emui/catalog/CatalogRoutes.tsx +++ b/enclave-manager/web/src/emui/catalog/CatalogRoutes.tsx @@ -1,7 +1,34 @@ +import { Params } from "react-router-dom"; +import { readablePackageName } from "../../components/catalog/utils"; +import { RemoveFunctions } from "../../utils/types"; import { KurtosisCatalogRouteObject } from "../types"; import { Catalog } from "./Catalog"; +import { CatalogState } from "./CatalogContext"; +import { Package } from "./package/Package"; export const catalogRoutes = (): KurtosisCatalogRouteObject[] => [ + { + path: "/catalog/:packageName", + handle: { + type: "catalogHandle" as "catalogHandle", + crumb: ({ catalog }: RemoveFunctions, params: Params) => { + const { packageName } = params; + if (catalog.isErr) { + return [ + { name: "Catalog", destination: "/catalog" }, + { name: "Unknown", destination: `/catalog/${packageName}` }, + ]; + } + + return [ + { name: "Catalog", destination: "/catalog" }, + { name: readablePackageName(packageName || "Unknown"), destination: `/catalog/${packageName}` }, + ]; + }, + }, + id: "packageDetails", + element: , + }, { path: "/catalog", handle: { type: "catalogHandle" as "catalogHandle", crumb: () => ({ name: "Catalog", destination: "/catalog" }) }, diff --git a/enclave-manager/web/src/emui/catalog/package/Package.tsx b/enclave-manager/web/src/emui/catalog/package/Package.tsx new file mode 100644 index 0000000000..c0e29e5e6e --- /dev/null +++ b/enclave-manager/web/src/emui/catalog/package/Package.tsx @@ -0,0 +1,132 @@ +import { Box, Flex, Icon, Image, Input, InputGroup, InputRightElement, Text } from "@chakra-ui/react"; +import { IoStar } from "react-icons/io5"; +import { useParams } from "react-router-dom"; +import { useKurtosisClient } from "../../../client/enclaveManager/KurtosisClientContext"; +import { KurtosisPackage } from "../../../client/packageIndexer/api/kurtosis_package_indexer_pb"; +import { AppPageLayout } from "../../../components/AppLayout"; +import { readablePackageName } from "../../../components/catalog/utils"; +import { RunKurtosisPackageButton } from "../../../components/catalog/widgets/RunKurtosisPackageButton"; +import { SaveKurtosisPackageButton } from "../../../components/catalog/widgets/SaveKurtosisPackageButton"; +import { CopyButton } from "../../../components/CopyButton"; +import { KurtosisAlert } from "../../../components/KurtosisAlert"; +import { KurtosisMarkdown } from "../../../components/KurtosisMarkdown"; +import { PackageSourceButton } from "../../../components/PackageSourceButton"; +import { TitledCard } from "../../../components/TitledCard"; +import { useKurtosisPackage } from "../CatalogContext"; + +export const Package = () => { + const { packageName } = useParams(); + const kurtosisPackage = useKurtosisPackage(packageName || "unknown"); + + if (kurtosisPackage.isErr) { + return ( + + + + ); + } + + return ; +}; + +type PackageImplProps = { + kurtosisPackage: KurtosisPackage; +}; + +const PackageImpl = ({ kurtosisPackage }: PackageImplProps) => { + const runCommand = `kurtosis run ${kurtosisPackage.name}`; + + return ( + + + + + + + + {kurtosisPackage.description} + + + + + {kurtosisPackage.entrypointDescription} + + + + + {kurtosisPackage.returnsDescription} + + + + + + + + + + + + + View on Github + + + + + + + Stars + + + + {kurtosisPackage.stars.toString()} + + + + + + + + ); +}; + +const PackageHeader = ({ kurtosisPackage }: PackageImplProps) => { + const client = useKurtosisClient(); + + return ( + + + + + + {readablePackageName(kurtosisPackage.name)} + + + {kurtosisPackage.repositoryMetadata?.owner.replaceAll("-", " ") || "Unknown owner"} + + + + + + + + ); +}; diff --git a/enclave-manager/web/src/emui/enclaves/enclave/artifact/Artifact.tsx b/enclave-manager/web/src/emui/enclaves/enclave/artifact/Artifact.tsx index 94e08649ed..045bb65ead 100644 --- a/enclave-manager/web/src/emui/enclaves/enclave/artifact/Artifact.tsx +++ b/enclave-manager/web/src/emui/enclaves/enclave/artifact/Artifact.tsx @@ -132,8 +132,8 @@ const ArtifactImpl = ({ enclave, artifactName, files }: ArtifactImplProps) => { return ( - - + + { (input: Iterable | any): input is AsyncIter return typeof input[Symbol.asyncIterator] === "function"; } +export function capitalize(input: string): string { + return input + .split(" ") + .map((word) => (word.length >= 1 ? word[0].toUpperCase() + word.substring(1) : word)) + .join(" "); +} + const ansiPattern = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))", diff --git a/engine/server/webapp/asset-manifest.json b/engine/server/webapp/asset-manifest.json index eb99fe0bb6..bf0941c653 100644 --- a/engine/server/webapp/asset-manifest.json +++ b/engine/server/webapp/asset-manifest.json @@ -1,10 +1,10 @@ { "files": { - "main.js": "./static/js/main.d987c6a5.js", + "main.js": "./static/js/main.b8e909a2.js", "index.html": "./index.html", - "main.d987c6a5.js.map": "./static/js/main.d987c6a5.js.map" + "main.b8e909a2.js.map": "./static/js/main.b8e909a2.js.map" }, "entrypoints": [ - "static/js/main.d987c6a5.js" + "static/js/main.b8e909a2.js" ] } \ No newline at end of file diff --git a/engine/server/webapp/index.html b/engine/server/webapp/index.html index 16bd042f15..63cb0b2adb 100644 --- a/engine/server/webapp/index.html +++ b/engine/server/webapp/index.html @@ -1 +1 @@ -Kurtosis Enclave Manager
\ No newline at end of file +Kurtosis Enclave Manager
\ No newline at end of file diff --git a/engine/server/webapp/static/js/main.d987c6a5.js b/engine/server/webapp/static/js/main.b8e909a2.js similarity index 57% rename from engine/server/webapp/static/js/main.d987c6a5.js rename to engine/server/webapp/static/js/main.b8e909a2.js index 03169bb5ba..7e9a0c596e 100644 --- a/engine/server/webapp/static/js/main.d987c6a5.js +++ b/engine/server/webapp/static/js/main.b8e909a2.js @@ -1,3 +1,3 @@ -/*! For license information please see main.d987c6a5.js.LICENSE.txt */ -!function(){var e={5304:function(e,t,n){"use strict";function r(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?40*e+55:0,u=t>0?40*t+55:0,l=n>0?40*n+55:0;r[a]=function(e){var t,n=[],r=o(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;n.push(s(a))}}catch(i){r.e(i)}finally{r.f()}return"#"+n.join("")}([i,u,l])}(t,n,r,e)}))}))})),f(0,23).forEach((function(t){var n=t+232,r=s(10*t+8);e[n]="#"+r+r+r})),e}()};function s(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t}function l(e,t,n,r){var o;return"text"===t?o=function(e,t){if(t.escapeXML)return i.encodeXML(e);return e}(n,r):"display"===t?o=function(e,t,n){t=parseInt(t,10);var r,o={"-1":function(){return"
"},0:function(){return e.length&&c(e)},1:function(){return p(e,"b")},3:function(){return p(e,"i")},4:function(){return p(e,"u")},8:function(){return h(e,"display:none")},9:function(){return p(e,"strike")},22:function(){return h(e,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return g(e,"i")},24:function(){return g(e,"u")},39:function(){return v(e,n.fg)},49:function(){return m(e,n.bg)},53:function(){return h(e,"text-decoration:overline")}};o[t]?r=o[t]():4"})).join("")}function f(e,t){for(var n=[],r=e;r<=t;r++)n.push(r);return n}function d(e){var t=null;return 0===(e=parseInt(e,10))?t="all":1===e?t="bold":2")}function h(e,t){return p(e,"span",t)}function v(e,t){return p(e,"span","color:"+t)}function m(e,t){return p(e,"span","background-color:"+t)}function g(e,t){var n;if(e.slice(-1)[0]===t&&(n=e.pop()),n)return""}var y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=t||{}).colors&&(t.colors=Object.assign({},u.colors,t.colors)),this.options=Object.assign({},u,t),this.stack=[],this.stickyStack=[]}var t,n,a;return t=e,(n=[{key:"toHtml",value:function(e){var t=this;e="string"===typeof e?[e]:e;var n=this.stack,r=this.options,a=[];return this.stickyStack.forEach((function(e){var t=l(n,e.token,e.data,r);t&&a.push(t)})),function(e,t,n){var r=!1;function a(){return""}function i(e){return t.newline?n("display",-1):n("text",e),""}var u=[{pattern:/^\x08+/,sub:a},{pattern:/^\x1b\[[012]?K/,sub:a},{pattern:/^\x1b\[\(B/,sub:a},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:function(e){return n("rgb",e),""}},{pattern:/^\x1b\[38;5;(\d+)m/,sub:function(e,t){return n("xterm256Foreground",t),""}},{pattern:/^\x1b\[48;5;(\d+)m/,sub:function(e,t){return n("xterm256Background",t),""}},{pattern:/^\n/,sub:i},{pattern:/^\r+\n/,sub:i},{pattern:/^\r/,sub:i},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:function(e,t){r=!0,0===t.trim().length&&(t="0");var a,i=o(t=t.trimRight(";").split(";"));try{for(i.s();!(a=i.n()).done;){var u=a.value;n("display",u)}}catch(s){i.e(s)}finally{i.f()}return""}},{pattern:/^\x1b\[\d?J/,sub:a},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:a},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:a},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:function(e){return n("text",e),""}}];function s(t,n){n>3&&r||(r=!1,e=e.replace(t.pattern,t.sub))}var l=[],c=e.length;e:for(;c>0;){for(var f=0,d=0,p=u.length;d0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(i);t.NodeWithChildren=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=p;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function v(e){return(0,a.isTag)(e)}function m(e){return e.type===a.ElementType.CDATA}function g(e){return e.type===a.ElementType.Text}function y(e){return e.type===a.ElementType.Comment}function b(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function k(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new s(e.data);else if(y(e))n=new l(e.data);else if(v(e)){var r=t?x(e.children):[],a=new h(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=a})),null!=e.namespace&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=a}else if(m(e)){r=t?x(e.children):[];var i=new d(r);r.forEach((function(e){return e.parent=i})),n=i}else if(w(e)){r=t?x(e.children):[];var u=new p(r);r.forEach((function(e){return e.parent=u})),e["x-mode"]&&(u["x-mode"]=e["x-mode"]),n=u}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var f=new c(e.name,e.data);null!=e["x-name"]&&(f["x-name"]=e["x-name"],f["x-publicId"]=e["x-publicId"],f["x-systemId"]=e["x-systemId"]),n=f}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return k(e,!0)})),n=1;n65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"\ufffd":(e in o.default&&(e=o.default[e]),a(e))}},2056:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var o=c(r(n(2586)).default),a=f(o);t.encodeXML=m(o);var i,u,s=c(r(n(9323)).default),l=f(s);function c(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function f(e){for(var t=[],n=[],r=0,o=Object.keys(e);r1?p(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var v=new RegExp(a.source+"|"+d.source,"g");function m(e){return function(t){return t.replace(v,(function(t){return e[t]||h(t)}))}}t.escape=function(e){return e.replace(v,h)},t.escapeUTF8=function(e){return e.replace(a,h)}},4191:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var r=n(1298),o=n(2056);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?o.encodeXML:o.encodeHTML)(e)};var a=n(2056);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return a.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return a.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return a.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return a.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return a.encodeHTML}});var i=n(1298);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return i.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return i.decodeXML}})},1132:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},i=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(r in e);return"undefined"===typeof r||t.call(e,r)},u=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,l,c,f=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"===typeof f&&(h=f,f=arguments[1]||{},d=2),(null==f||"object"!==typeof f&&"function"!==typeof f)&&(f={});d/i,u=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c="object"===typeof window&&window.DOMParser;if("function"===typeof c){var f=new c;s=l=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),f.parseFromString(e,"text/html")}}if("object"===typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var p,h="object"===typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,c,f=e.match(a),d=f&&f[1]?f[1].toLowerCase():"";switch(d){case n:var h=l(e);if(!i.test(e))null===(t=null===(m=h.querySelector(r))||void 0===m?void 0:m.parentNode)||void 0===t||t.removeChild(m);if(!u.test(e))null===(c=null===(m=h.querySelector(o))||void 0===m?void 0:m.parentNode)||void 0===c||c.removeChild(m);return h.querySelectorAll(n);case r:case o:var v=s(e).querySelectorAll(d);return u.test(e)&&i.test(e)?v[0].parentNode.childNodes:v;default:return p?p(e):(m=s(e,o).querySelector(o)).childNodes;var m}}},159:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(9409)),a=n(1716),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,o.default)(e),null,n)}},1716:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var r=n(8079),o=n(9127);function a(e){for(var t={},n=0,r=e.length;n1&&(f=v(f,{key:f.key||x})),y.push(w(f,l,x));else if("text"!==l.type){switch(d=l.attribs,s(l)?i(d.style,d):d&&(d=o(d,l.name)),p=null,l.type){case"script":case"style":l.children[0]&&(d.dangerouslySetInnerHTML={__html:l.children[0].data});break;case"tag":"textarea"===l.name&&l.children[0]?d.defaultValue=l.children[0].data:l.children&&l.children.length&&(p=e(l.children,n));break;default:continue}S>1&&(d.key=x),y.push(w(m(l.name,d,p),l,x))}else{if((c=!l.data.trim().length)&&l.parent&&!u(l.parent))continue;if(k&&c)continue;y.push(w(l.data,l,x))}return 1===y.length?y[0]:y}},4141:function(e,t,n){var r=n(2791),o=n(5792).default,a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var i={reactCompat:!0};var u=r.version.split(".")[0]>=16,s=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:u,ELEMENTS_WITH_NO_TEXT_CHILDREN:s,isCustomComponent:function(e,t){return-1===e.indexOf("-")?t&&"string"===typeof t.is:!a.has(e)},setStyleProp:function(e,t){if(null!==e&&void 0!==e)try{t.style=o(e,i)}catch(n){t.style={}}},canTextBeChildOfNode:function(e){return!s.has(e.name)},returnFirstArg:function(e){return e}}},1065:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}e.exports=function(e,s){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var f=1,d=1;function p(e){var t=e.match(n);t&&(f+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function h(){var e={line:f,column:d};return function(t){return t.position=new v(e),b(),t}}function v(e){this.start=e,this.end={line:f,column:d},this.source=s.source}v.prototype.content=e;var m=[];function g(t){var n=new Error(s.source+":"+f+":"+d+": "+t);if(n.reason=t,n.filename=s.source,n.line=f,n.column=d,n.source=e,!s.silent)throw n;m.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;l!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,l===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function x(){var e=h(),n=y(o);if(n){if(k(),!y(a))return g("property missing ':'");var r=y(i),s=e({type:"declaration",property:c(n[0].replace(t,l)),value:r?c(r[0].replace(t,l)):l});return y(u),s}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},6198:function(e,t,n){e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",i="[object AsyncFunction]",u="[object Function]",s="[object GeneratorFunction]",l="[object Null]",c="[object Object]",f="[object Proxy]",d="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[a]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[u]=v["[object Map]"]=v["[object Number]"]=v[c]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,y=m||g||Function("return this")(),b=t&&!t.nodeType&&t,w=b&&e&&!e.nodeType&&e,k=w&&w.exports===b,x=k&&m.process,S=function(){try{var e=w&&w.require&&w.require("util").types;return e||x&&x.binding&&x.binding("util")}catch(t){}}(),T=S&&S.isTypedArray;var E,_,C=Array.prototype,I=Function.prototype,O=Object.prototype,P=y["__core-js_shared__"],N=I.toString,A=O.hasOwnProperty,j=function(){var e=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),D=O.toString,R=N.call(Object),F=RegExp("^"+N.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=k?y.Buffer:void 0,M=y.Symbol,L=y.Uint8Array,B=Z?Z.allocUnsafe:void 0,z=(E=Object.getPrototypeOf,_=Object,function(e){return E(_(e))}),V=Object.create,U=O.propertyIsEnumerable,q=C.splice,H=M?M.toStringTag:void 0,W=function(){try{var e=ye(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),J=Z?Z.isBuffer:void 0,G=Math.max,Y=Date.now,K=ye(y,"Map"),X=ye(Object,"create"),$=function(){function e(){}return function(t){if(!Pe(t))return{};if(V)return V(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},ee.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(K||ee),string:new Q}},te.prototype.delete=function(e){var t=ge(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return ge(this,e).get(e)},te.prototype.has=function(e){return ge(this,e).has(e)},te.prototype.set=function(e,t){var n=ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ne.prototype.clear=function(){this.__data__=new ee,this.size=0},ne.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ne.prototype.get=function(e){return this.__data__.get(e)},ne.prototype.has=function(e){return this.__data__.has(e)},ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new te(r)}return n.set(e,t),this.size=n.size,this};var se,le=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var u=a[se?i:++r];if(!1===t(o[u],u,o))break}return e};function ce(e){return null==e?void 0===e?d:l:H&&H in Object(e)?function(e){var t=A.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch(a){}var o=D.call(e);r&&(t?e[H]=n:delete e[H]);return o}(e):function(e){return D.call(e)}(e)}function fe(e){return Ne(e)&&ce(e)==a}function de(e){return!(!Pe(e)||function(e){return!!j&&j in e}(e))&&(Ie(e)?F:p).test(function(e){if(null!=e){try{return N.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function pe(e){if(!Pe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=we(e),n=[];for(var r in e)("constructor"!=r||!t&&A.call(e,r))&&n.push(r);return n}function he(e,t,n,r,o){e!==t&&le(t,(function(a,i){if(o||(o=new ne),Pe(a))!function(e,t,n,r,o,a,i){var u=ke(e,n),s=ke(t,n),l=i.get(s);if(l)return void oe(e,n,l);var f=a?a(u,s,n+"",e,t,i):void 0,d=void 0===f;if(d){var p=Ee(s),h=!p&&Ce(s),v=!p&&!h&&Ae(s);f=s,p||h||v?Ee(u)?f=u:Ne(m=u)&&_e(m)?f=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(me);function Se(e,t){return e===t||e!==e&&t!==t}var Te=fe(function(){return arguments}())?fe:function(e){return Ne(e)&&A.call(e,"callee")&&!U.call(e,"callee")},Ee=Array.isArray;function _e(e){return null!=e&&Oe(e.length)&&!Ie(e)}var Ce=J||function(){return!1};function Ie(e){if(!Pe(e))return!1;var t=ce(e);return t==u||t==s||t==i||t==f}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ne(e){return null!=e&&"object"==typeof e}var Ae=T?function(e){return function(t){return e(t)}}(T):function(e){return Ne(e)&&Oe(e.length)&&!!v[ce(e)]};function je(e){return _e(e)?re(e,!0):pe(e)}var De,Re=(De=function(e,t,n,r){he(e,t,n,r)},ve((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=De.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!Pe(n))return!1;var r=typeof t;return!!("number"==r?_e(n)&&be(t,n.length):"string"==r&&t in n)&&Se(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++n"']/g,K=RegExp(G.source),X=RegExp(Y.source),$=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),ie=/^\s+/,ue=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,Te="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="['\u2019]",Ae="["+Te+"]",je="["+Pe+"]",De="["+Ee+"]",Re="\\d+",Fe="["+_e+"]",Ze="["+Ce+"]",Me="[^"+Te+Pe+Re+_e+Ce+Ie+"]",Le="\\ud83c[\\udffb-\\udfff]",Be="[^"+Te+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ie+"]",qe="\\u200d",He="(?:"+Ze+"|"+Me+")",We="(?:"+Ue+"|"+Me+")",Je="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ge="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+De+"|"+Le+")"+"?",Ke="["+Oe+"]?",Xe=Ke+Ye+("(?:"+qe+"(?:"+[Be,ze,Ve].join("|")+")"+Ke+Ye+")*"),$e="(?:"+[Fe,ze,Ve].join("|")+")"+Xe,Qe="(?:"+[Be+De+"?",De,ze,Ve,Ae].join("|")+")",et=RegExp(Ne,"g"),tt=RegExp(De,"g"),nt=RegExp(Le+"(?="+Le+")|"+Qe+Xe,"g"),rt=RegExp([Ue+"?"+Ze+"+"+Je+"(?="+[je,Ue,"$"].join("|")+")",We+"+"+Ge+"(?="+[je,Ue+He,"$"].join("|")+")",Ue+"?"+He+"+"+Je,Ue+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,$e].join("|"),"g"),ot=RegExp("["+qe+Te+Ee+Oe+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ut=-1,st={};st[F]=st[Z]=st[M]=st[L]=st[B]=st[z]=st[V]=st[U]=st[q]=!0,st[y]=st[b]=st[D]=st[w]=st[R]=st[k]=st[x]=st[S]=st[E]=st[_]=st[C]=st[O]=st[P]=st[N]=st[j]=!1;var lt={};lt[y]=lt[b]=lt[D]=lt[R]=lt[w]=lt[k]=lt[F]=lt[Z]=lt[M]=lt[L]=lt[B]=lt[E]=lt[_]=lt[C]=lt[O]=lt[P]=lt[N]=lt[A]=lt[z]=lt[V]=lt[U]=lt[q]=!0,lt[x]=lt[S]=lt[j]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,dt=parseInt,pt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ht="object"==typeof self&&self&&self.Object===Object&&self,vt=pt||ht||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&>.exports===mt,bt=yt&&pt.process,wt=function(){try{var e=gt&>.require&>.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),kt=wt&&wt.isArrayBuffer,xt=wt&&wt.isDate,St=wt&&wt.isMap,Tt=wt&&wt.isRegExp,Et=wt&&wt.isSet,_t=wt&&wt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function It(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o-1}function Dt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ut(t,e[n],0)>-1;);return n}var on=Gt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function un(e){return"\\"+ct[e]}function sn(e){return ot.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function fn(e,t){for(var n=-1,r=e.length,o=0,a=[];++n",""":'"',"'":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,it))).Array,r=t.Date,ue=t.Error,Te=t.Function,Ee=t.Math,_e=t.Object,Ce=t.RegExp,Ie=t.String,Oe=t.TypeError,Pe=n.prototype,Ne=Te.prototype,Ae=_e.prototype,je=t["__core-js_shared__"],De=Ne.toString,Re=Ae.hasOwnProperty,Fe=0,Ze=function(){var e=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Me=Ae.toString,Le=De.call(_e),Be=vt._,ze=Ce("^"+De.call(Re).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=yt?t.Buffer:o,Ue=t.Symbol,qe=t.Uint8Array,He=Ve?Ve.allocUnsafe:o,We=cn(_e.getPrototypeOf,_e),Je=_e.create,Ge=Ae.propertyIsEnumerable,Ye=Pe.splice,Ke=Ue?Ue.isConcatSpreadable:o,Xe=Ue?Ue.iterator:o,$e=Ue?Ue.toStringTag:o,Qe=function(){try{var e=da(_e,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,ot=r&&r.now!==vt.Date.now&&r.now,ct=t.setTimeout!==vt.setTimeout&&t.setTimeout,pt=Ee.ceil,ht=Ee.floor,mt=_e.getOwnPropertySymbols,gt=Ve?Ve.isBuffer:o,bt=t.isFinite,wt=Pe.join,Bt=cn(_e.keys,_e),Gt=Ee.max,bn=Ee.min,wn=r.now,kn=t.parseInt,xn=Ee.random,Sn=Pe.reverse,Tn=da(t,"DataView"),En=da(t,"Map"),_n=da(t,"Promise"),Cn=da(t,"Set"),In=da(t,"WeakMap"),On=da(_e,"create"),Pn=In&&new In,Nn={},An=Ma(Tn),jn=Ma(En),Dn=Ma(_n),Rn=Ma(Cn),Fn=Ma(In),Zn=Ue?Ue.prototype:o,Mn=Zn?Zn.valueOf:o,Ln=Zn?Zn.toString:o;function Bn(e){if(tu(e)&&!qi(e)&&!(e instanceof qn)){if(e instanceof Un)return e;if(Re.call(e,"__wrapped__"))return La(e)}return new Un(e)}var zn=function(){function e(){}return function(t){if(!eu(t))return{};if(Je)return Je(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sr(e,t,n,r,a,i){var u,s=1&t,l=2&t,c=4&t;if(n&&(u=a?n(e,r,a,i):n(e)),u!==o)return u;if(!eu(e))return e;var f=qi(e);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return Po(e,u)}else{var d=va(e),p=d==S||d==T;if(Gi(e))return To(e,s);if(d==C||d==y||p&&!a){if(u=l||p?{}:ga(e),!s)return l?function(e,t){return No(e,ha(e),t)}(e,function(e,t){return e&&No(t,Au(t),e)}(u,e)):function(e,t){return No(e,pa(e),t)}(e,or(u,e))}else{if(!lt[d])return a?e:{};u=function(e,t,n){var r=e.constructor;switch(t){case D:return Eo(e);case w:case k:return new r(+e);case R:return function(e,t){var n=t?Eo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case F:case Z:case M:case L:case B:case z:case V:case U:case q:return _o(e,n);case E:return new r;case _:case N:return new r(e);case O:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new r;case A:return o=e,Mn?_e(Mn.call(o)):{}}var o}(e,d,s)}}i||(i=new Yn);var h=i.get(e);if(h)return h;i.set(e,u),iu(e)?e.forEach((function(r){u.add(sr(r,t,n,r,e,i))})):nu(e)&&e.forEach((function(r,o){u.set(o,sr(r,t,n,o,e,i))}));var v=f?o:(c?l?aa:oa:l?Au:Nu)(e);return Ot(v||e,(function(r,o){v&&(r=e[o=r]),tr(u,o,sr(r,t,n,o,e,i))})),u}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=_e(e);r--;){var a=n[r],i=t[a],u=e[a];if(u===o&&!(a in e)||!i(u))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Oe(a);return Na((function(){e.apply(o,n)}),t)}function fr(e,t,n,r){var o=-1,a=jt,i=!0,u=e.length,s=[],l=t.length;if(!u)return s;n&&(t=Rt(t,Qt(n))),r?(a=Dt,i=!1):t.length>=200&&(a=tn,i=!1,t=new Gn(t));e:for(;++o-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(En||Wn),string:new Hn}},Jn.prototype.delete=function(e){var t=ca(this,e).delete(e);return this.size-=t?1:0,t},Jn.prototype.get=function(e){return ca(this,e).get(e)},Jn.prototype.has=function(e){return ca(this,e).has(e)},Jn.prototype.set=function(e,t){var n=ca(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,i),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(e,t),this.size=n.size,this};var dr=Do(wr),pr=Do(kr,!0);function hr(e,t){var n=!0;return dr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function vr(e,t,n){for(var r=-1,a=e.length;++r0&&n(u)?t>1?gr(u,t-1,n,r,o):Ft(o,u):r||(o[o.length]=u)}return o}var yr=Ro(),br=Ro(!0);function wr(e,t){return e&&yr(e,t,Nu)}function kr(e,t){return e&&br(e,t,Nu)}function xr(e,t){return At(t,(function(t){return Xi(e[t])}))}function Sr(e,t){for(var n=0,r=(t=wo(t,e)).length;null!=e&&nt}function Cr(e,t){return null!=e&&Re.call(e,t)}function Ir(e,t){return null!=e&&t in _e(e)}function Or(e,t,r){for(var a=r?Dt:jt,i=e[0].length,u=e.length,s=u,l=n(u),c=1/0,f=[];s--;){var d=e[s];s&&t&&(d=Rt(d,Qt(t))),c=bn(d.length,c),l[s]=!r&&(t||i>=120&&d.length>=120)?new Gn(s&&d):o}d=e[0];var p=-1,h=l[0];e:for(;++p=u?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Hr(e,t,n){for(var r=-1,o=t.length,a={};++r-1;)u!==e&&Ye.call(u,s,1),Ye.call(e,s,1);return e}function Jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;ba(o)?Ye.call(e,o,1):fo(e,o)}}return e}function Gr(e,t){return e+ht(xn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Aa(Ca(e,t,rs),e+"")}function Xr(e){return Xn(Bu(e))}function $r(e,t){var n=Bu(e);return Ra(n,ur(t,0,n.length))}function Qr(e,t,n,r){if(!eu(e))return e;for(var a=-1,i=(t=wo(t,e)).length,u=i-1,s=e;null!=s&&++aa?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=n(a);++o>>1,i=e[a];null!==i&&!su(i)&&(n?i<=t:i=200){var l=t?null:Ko(e);if(l)return dn(l);i=!1,o=tn,s=new Gn}else s=t?[]:u;e:for(;++r=r?e:ro(e,t,n)}var So=nt||function(e){return vt.clearTimeout(e)};function To(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function Eo(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function _o(e,t){var n=t?Eo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,r=null===e,a=e===e,i=su(e),u=t!==o,s=null===t,l=t===t,c=su(t);if(!s&&!c&&!i&&e>t||i&&u&&l&&!s&&!c||r&&u&&l||!n&&l||!a)return 1;if(!r&&!i&&!c&&e1?n[a-1]:o,u=a>2?n[2]:o;for(i=e.length>3&&"function"==typeof i?(a--,i):o,u&&wa(n[0],n[1],u)&&(i=a<3?o:i,a=1),t=_e(t);++r-1?a[i?t[u]:u]:o}}function Bo(e){return ra((function(t){var n=t.length,r=n,i=Un.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new Oe(a);if(i&&!s&&"wrapper"==ua(u))var s=new Un([],!0)}for(r=s?r:n;++r1&&w.reverse(),p&&cs))return!1;var c=i.get(e),f=i.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,h=2&n?new Gn:o;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(g,(function(n){var r="_."+n[0];t&n[1]&&!jt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(r),n)))}function Da(e){var t=0,n=0;return function(){var r=wn(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ra(e,t){var n=-1,r=e.length,a=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,ai(e,n)}));function di(e){var t=Bn(e);return t.__chain__=!0,t}function pi(e,t){return t(e)}var hi=ra((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof qn&&ba(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pi,args:[a],thisArg:o}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(a)}));var vi=Ao((function(e,t,n){Re.call(e,n)?++e[n]:ar(e,n,1)}));var mi=Lo(Ua),gi=Lo(qa);function yi(e,t){return(qi(e)?Ot:dr)(e,la(t,3))}function bi(e,t){return(qi(e)?Pt:pr)(e,la(t,3))}var wi=Ao((function(e,t,n){Re.call(e,n)?e[n].push(t):ar(e,n,[t])}));var ki=Kr((function(e,t,r){var o=-1,a="function"==typeof t,i=Wi(e)?n(e.length):[];return dr(e,(function(e){i[++o]=a?Ct(t,e,r):Pr(e,t,r)})),i})),xi=Ao((function(e,t,n){ar(e,n,t)}));function Si(e,t){return(qi(e)?Rt:Lr)(e,la(t,3))}var Ti=Ao((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ei=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wa(e,t[0],t[1])?t=[]:n>2&&wa(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,gr(t,1),[])})),_i=ot||function(){return vt.Date.now()};function Ci(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,$o(e,f,o,o,o,o,t)}function Ii(e,t){var n;if("function"!=typeof t)throw new Oe(a);return e=hu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Oi=Kr((function(e,t,n){var r=1;if(n.length){var o=fn(n,sa(Oi));r|=l}return $o(e,r,t,n,o)})),Pi=Kr((function(e,t,n){var r=3;if(n.length){var o=fn(n,sa(Pi));r|=l}return $o(t,r,e,n,o)}));function Ni(e,t,n){var r,i,u,s,l,c,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Oe(a);function v(t){var n=r,a=i;return r=i=o,f=t,s=e.apply(a,n)}function m(e){var n=e-c;return c===o||n>=t||n<0||p&&e-f>=u}function g(){var e=_i();if(m(e))return y(e);l=Na(g,function(e){var n=t-(e-c);return p?bn(n,u-(e-f)):n}(e))}function y(e){return l=o,h&&r?v(e):(r=i=o,s)}function b(){var e=_i(),n=m(e);if(r=arguments,i=this,c=e,n){if(l===o)return function(e){return f=e,l=Na(g,t),d?v(e):s}(c);if(p)return So(l),l=Na(g,t),v(c)}return l===o&&(l=Na(g,t)),s}return t=mu(t)||0,eu(n)&&(d=!!n.leading,u=(p="maxWait"in n)?Gt(mu(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h),b.cancel=function(){l!==o&&So(l),f=0,r=c=i=l=o},b.flush=function(){return l===o?s:y(_i())},b}var Ai=Kr((function(e,t){return cr(e,1,t)})),ji=Kr((function(e,t,n){return cr(e,mu(t)||0,n)}));function Di(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(a);var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(Di.Cache||Jn),n}function Ri(e){if("function"!=typeof e)throw new Oe(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Di.Cache=Jn;var Fi=ko((function(e,t){var n=(t=1==t.length&&qi(t[0])?Rt(t[0],Qt(la())):Rt(gr(t,1),Qt(la()))).length;return Kr((function(r){for(var o=-1,a=bn(r.length,n);++o=t})),Ui=Nr(function(){return arguments}())?Nr:function(e){return tu(e)&&Re.call(e,"callee")&&!Ge.call(e,"callee")},qi=n.isArray,Hi=kt?Qt(kt):function(e){return tu(e)&&Er(e)==D};function Wi(e){return null!=e&&Qi(e.length)&&!Xi(e)}function Ji(e){return tu(e)&&Wi(e)}var Gi=gt||ms,Yi=xt?Qt(xt):function(e){return tu(e)&&Er(e)==k};function Ki(e){if(!tu(e))return!1;var t=Er(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ou(e)}function Xi(e){if(!eu(e))return!1;var t=Er(e);return t==S||t==T||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $i(e){return"number"==typeof e&&e==hu(e)}function Qi(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function eu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function tu(e){return null!=e&&"object"==typeof e}var nu=St?Qt(St):function(e){return tu(e)&&va(e)==E};function ru(e){return"number"==typeof e||tu(e)&&Er(e)==_}function ou(e){if(!tu(e)||Er(e)!=C)return!1;var t=We(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Le}var au=Tt?Qt(Tt):function(e){return tu(e)&&Er(e)==O};var iu=Et?Qt(Et):function(e){return tu(e)&&va(e)==P};function uu(e){return"string"==typeof e||!qi(e)&&tu(e)&&Er(e)==N}function su(e){return"symbol"==typeof e||tu(e)&&Er(e)==A}var lu=_t?Qt(_t):function(e){return tu(e)&&Qi(e.length)&&!!st[Er(e)]};var cu=Jo(Mr),fu=Jo((function(e,t){return e<=t}));function du(e){if(!e)return[];if(Wi(e))return uu(e)?vn(e):Po(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=va(e);return(t==E?ln:t==P?dn:Bu)(e)}function pu(e){return e?(e=mu(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function hu(e){var t=pu(e),n=t%1;return t===t?n?t-n:t:0}function vu(e){return e?ur(hu(e),0,m):0}function mu(e){if("number"==typeof e)return e;if(su(e))return v;if(eu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=eu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$t(e);var n=ge.test(e);return n||be.test(e)?dt(e.slice(2),n?2:8):me.test(e)?v:+e}function gu(e){return No(e,Au(e))}function yu(e){return null==e?"":lo(e)}var bu=jo((function(e,t){if(Ta(t)||Wi(t))No(t,Nu(t),e);else for(var n in t)Re.call(t,n)&&tr(e,n,t[n])})),wu=jo((function(e,t){No(t,Au(t),e)})),ku=jo((function(e,t,n,r){No(t,Au(t),e,r)})),xu=jo((function(e,t,n,r){No(t,Nu(t),e,r)})),Su=ra(ir);var Tu=Kr((function(e,t){e=_e(e);var n=-1,r=t.length,a=r>2?t[2]:o;for(a&&wa(t[0],t[1],a)&&(r=1);++n1),t})),No(e,aa(e),n),r&&(n=sr(n,7,ta));for(var o=t.length;o--;)fo(n,t[o]);return n}));var Fu=ra((function(e,t){return null==e?{}:function(e,t){return Hr(e,t,(function(t,n){return Cu(e,n)}))}(e,t)}));function Zu(e,t){if(null==e)return{};var n=Rt(aa(e),(function(e){return[e]}));return t=la(t),Hr(e,n,(function(e,n){return t(e,n[0])}))}var Mu=Xo(Nu),Lu=Xo(Au);function Bu(e){return null==e?[]:en(e,Nu(e))}var zu=Zo((function(e,t,n){return t=t.toLowerCase(),e+(n?Vu(t):t)}));function Vu(e){return Ku(yu(e).toLowerCase())}function Uu(e){return(e=yu(e))&&e.replace(ke,on).replace(tt,"")}var qu=Zo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hu=Zo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Wu=Fo("toLowerCase");var Ju=Zo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Gu=Zo((function(e,t,n){return e+(n?" ":"")+Ku(t)}));var Yu=Zo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ku=Fo("toUpperCase");function Xu(e,t,n){return e=yu(e),(t=n?o:t)===o?function(e){return at.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var $u=Kr((function(e,t){try{return Ct(e,o,t)}catch(n){return Ki(n)?n:new ue(n)}})),Qu=ra((function(e,t){return Ot(t,(function(t){t=Za(t),ar(e,t,Oi(e[t],e))})),e}));function es(e){return function(){return e}}var ts=Bo(),ns=Bo(!0);function rs(e){return e}function os(e){return Rr("function"==typeof e?e:sr(e,1))}var as=Kr((function(e,t){return function(n){return Pr(n,e,t)}})),is=Kr((function(e,t){return function(n){return Pr(e,n,t)}}));function us(e,t,n){var r=Nu(t),o=xr(t,r);null!=n||eu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=xr(t,Nu(t)));var a=!(eu(n)&&"chain"in n)||!!n.chain,i=Xi(e);return Ot(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Po(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ft([this.value()],arguments))})})),e}function ss(){}var ls=qo(Rt),cs=qo(Nt),fs=qo(Lt);function ds(e){return ka(e)?Jt(Za(e)):function(e){return function(t){return Sr(t,e)}}(e)}var ps=Wo(),hs=Wo(!0);function vs(){return[]}function ms(){return!1}var gs=Uo((function(e,t){return e+t}),0),ys=Yo("ceil"),bs=Uo((function(e,t){return e/t}),1),ws=Yo("floor");var ks=Uo((function(e,t){return e*t}),1),xs=Yo("round"),Ss=Uo((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Oe(a);return e=hu(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ci,Bn.assign=bu,Bn.assignIn=wu,Bn.assignInWith=ku,Bn.assignWith=xu,Bn.at=Su,Bn.before=Ii,Bn.bind=Oi,Bn.bindAll=Qu,Bn.bindKey=Pi,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qi(e)?e:[e]},Bn.chain=di,Bn.chunk=function(e,t,r){t=(r?wa(e,t,r):t===o)?1:Gt(hu(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var i=0,u=0,s=n(pt(a/t));ia?0:a+n),(r=r===o||r>a?a:hu(r))<0&&(r+=a),r=n>r?0:vu(r);n>>0)?(e=yu(e))&&("string"==typeof t||null!=t&&!au(t))&&!(t=lo(t))&&sn(e)?xo(vn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Oe(a);return t=null==t?0:Gt(hu(t),0),Kr((function(n){var r=n[t],o=xo(n,0,t);return r&&Ft(o,r),Ct(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ro(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ro(e,0,(t=n||t===o?1:hu(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ro(e,(t=r-(t=n||t===o?1:hu(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?ho(e,la(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?ho(e,la(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Oe(a);return eu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ni(e,t,{leading:r,maxWait:t,trailing:o})},Bn.thru=pi,Bn.toArray=du,Bn.toPairs=Mu,Bn.toPairsIn=Lu,Bn.toPath=function(e){return qi(e)?Rt(e,Za):su(e)?[e]:Po(Fa(yu(e)))},Bn.toPlainObject=gu,Bn.transform=function(e,t,n){var r=qi(e),o=r||Gi(e)||lu(e);if(t=la(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:eu(e)&&Xi(a)?zn(We(e)):{}}return(o?Ot:wr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Ci(e,1)},Bn.union=ti,Bn.unionBy=ni,Bn.unionWith=ri,Bn.uniq=function(e){return e&&e.length?co(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?co(e,la(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?co(e,o,t):[]},Bn.unset=function(e,t){return null==e||fo(e,t)},Bn.unzip=oi,Bn.unzipWith=ai,Bn.update=function(e,t,n){return null==e?e:po(e,t,bo(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:po(e,t,bo(n),r)},Bn.values=Bu,Bn.valuesIn=function(e){return null==e?[]:en(e,Au(e))},Bn.without=ii,Bn.words=Xu,Bn.wrap=function(e,t){return Zi(bo(t),e)},Bn.xor=ui,Bn.xorBy=si,Bn.xorWith=li,Bn.zip=ci,Bn.zipObject=function(e,t){return go(e||[],t||[],tr)},Bn.zipObjectDeep=function(e,t){return go(e||[],t||[],Qr)},Bn.zipWith=fi,Bn.entries=Mu,Bn.entriesIn=Lu,Bn.extend=wu,Bn.extendWith=ku,us(Bn,Bn),Bn.add=gs,Bn.attempt=$u,Bn.camelCase=zu,Bn.capitalize=Vu,Bn.ceil=ys,Bn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=mu(n))===n?n:0),t!==o&&(t=(t=mu(t))===t?t:0),ur(mu(e),t,n)},Bn.clone=function(e){return sr(e,4)},Bn.cloneDeep=function(e){return sr(e,5)},Bn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:o)},Bn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:o)},Bn.conformsTo=function(e,t){return null==t||lr(e,t,Nu(t))},Bn.deburr=Uu,Bn.defaultTo=function(e,t){return null==e||e!==e?t:e},Bn.divide=bs,Bn.endsWith=function(e,t,n){e=yu(e),t=lo(t);var r=e.length,a=n=n===o?r:ur(hu(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bn.eq=Bi,Bn.escape=function(e){return(e=yu(e))&&X.test(e)?e.replace(Y,an):e},Bn.escapeRegExp=function(e){return(e=yu(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Bn.every=function(e,t,n){var r=qi(e)?Nt:hr;return n&&wa(e,t,n)&&(t=o),r(e,la(t,3))},Bn.find=mi,Bn.findIndex=Ua,Bn.findKey=function(e,t){return zt(e,la(t,3),wr)},Bn.findLast=gi,Bn.findLastIndex=qa,Bn.findLastKey=function(e,t){return zt(e,la(t,3),kr)},Bn.floor=ws,Bn.forEach=yi,Bn.forEachRight=bi,Bn.forIn=function(e,t){return null==e?e:yr(e,la(t,3),Au)},Bn.forInRight=function(e,t){return null==e?e:br(e,la(t,3),Au)},Bn.forOwn=function(e,t){return e&&wr(e,la(t,3))},Bn.forOwnRight=function(e,t){return e&&kr(e,la(t,3))},Bn.get=_u,Bn.gt=zi,Bn.gte=Vi,Bn.has=function(e,t){return null!=e&&ma(e,t,Cr)},Bn.hasIn=Cu,Bn.head=Wa,Bn.identity=rs,Bn.includes=function(e,t,n,r){e=Wi(e)?e:Bu(e),n=n&&!r?hu(n):0;var o=e.length;return n<0&&(n=Gt(o+n,0)),uu(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ut(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hu(n);return o<0&&(o=Gt(r+o,0)),Ut(e,t,o)},Bn.inRange=function(e,t,n){return t=pu(t),n===o?(n=t,t=0):n=pu(n),function(e,t,n){return e>=bn(t,n)&&e=-9007199254740991&&e<=h},Bn.isSet=iu,Bn.isString=uu,Bn.isSymbol=su,Bn.isTypedArray=lu,Bn.isUndefined=function(e){return e===o},Bn.isWeakMap=function(e){return tu(e)&&va(e)==j},Bn.isWeakSet=function(e){return tu(e)&&"[object WeakSet]"==Er(e)},Bn.join=function(e,t){return null==e?"":wt.call(e,t)},Bn.kebabCase=qu,Bn.last=Ka,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==o&&(a=(a=hu(n))<0?Gt(r+a,0):bn(a,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Vt(e,Ht,a,!0)},Bn.lowerCase=Hu,Bn.lowerFirst=Wu,Bn.lt=cu,Bn.lte=fu,Bn.max=function(e){return e&&e.length?vr(e,rs,_r):o},Bn.maxBy=function(e,t){return e&&e.length?vr(e,la(t,2),_r):o},Bn.mean=function(e){return Wt(e,rs)},Bn.meanBy=function(e,t){return Wt(e,la(t,2))},Bn.min=function(e){return e&&e.length?vr(e,rs,Mr):o},Bn.minBy=function(e,t){return e&&e.length?vr(e,la(t,2),Mr):o},Bn.stubArray=vs,Bn.stubFalse=ms,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=ks,Bn.nth=function(e,t){return e&&e.length?Ur(e,hu(t)):o},Bn.noConflict=function(){return vt._===this&&(vt._=Be),this},Bn.noop=ss,Bn.now=_i,Bn.pad=function(e,t,n){e=yu(e);var r=(t=hu(t))?hn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Ho(ht(o),n)+e+Ho(pt(o),n)},Bn.padEnd=function(e,t,n){e=yu(e);var r=(t=hu(t))?hn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var a=xn();return bn(e+a*(t-e+ft("1e-"+((a+"").length-1))),t)}return Gr(e,t)},Bn.reduce=function(e,t,n){var r=qi(e)?Zt:Yt,o=arguments.length<3;return r(e,la(t,4),n,o,dr)},Bn.reduceRight=function(e,t,n){var r=qi(e)?Mt:Yt,o=arguments.length<3;return r(e,la(t,4),n,o,pr)},Bn.repeat=function(e,t,n){return t=(n?wa(e,t,n):t===o)?1:hu(t),Yr(yu(e),t)},Bn.replace=function(){var e=arguments,t=yu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,a=(t=wo(t,e)).length;for(a||(a=1,e=o);++rh)return[];var n=m,r=bn(e,m);t=la(t),e-=m;for(var o=Xt(r,t);++n=i)return e;var s=n-hn(r);if(s<1)return r;var l=u?xo(u,0,s).join(""):e.slice(0,s);if(a===o)return l+r;if(u&&(s+=l.length-s),au(a)){if(e.slice(s).search(a)){var c,f=l;for(a.global||(a=Ce(a.source,yu(ve.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var d=c.index;l=l.slice(0,d===o?s:d)}}else if(e.indexOf(lo(a),s)!=s){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+r},Bn.unescape=function(e){return(e=yu(e))&&K.test(e)?e.replace(G,gn):e},Bn.uniqueId=function(e){var t=++Fe;return yu(e)+t},Bn.upperCase=Yu,Bn.upperFirst=Ku,Bn.each=yi,Bn.eachRight=bi,Bn.first=Wa,us(Bn,function(){var e={};return wr(Bn,(function(t,n){Re.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Ot(["drop","take"],(function(e,t){qn.prototype[e]=function(n){n=n===o?1:Gt(hu(n),0);var r=this.__filtered__&&!t?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:la(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(rs)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Pr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Ri(la(e)))},qn.prototype.slice=function(e,t){e=hu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=hu(t))<0?n.dropRight(-t):n.take(t-e)),n)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(m)},wr(qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bn[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,s=t instanceof qn,l=u[0],c=s||qi(t),f=function(e){var t=a.apply(Bn,Ft([e],u));return r&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(s=c=!1);var d=this.__chain__,p=!!this.__actions__.length,h=i&&!d,v=s&&!p;if(!i&&c){t=v?t:new qn(this);var m=e.apply(t,u);return m.__actions__.push({func:pi,args:[f],thisArg:o}),new Un(m,d)}return h&&v?e.apply(this,u):(m=this.thru(f),h?r?m.value()[0]:m.value():m)})})),Ot(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(qi(o)?o:[],e)}return this[n]((function(n){return t.apply(qi(n)?n:[],e)}))}})),wr(qn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Re.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[zo(o,2).name]=[{name:"wrapper",func:o}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=La(n);r.__index__=0,r.__values__=o,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var t=e;return this.__actions__.length&&(t=new qn(this)),(t=t.reverse()).__actions__.push({func:pi,args:[ei],thisArg:o}),new Un(t,this.__chain__)}return this.thru(ei)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Xe&&(Bn.prototype[Xe]=function(){return this}),Bn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},4463:function(e,t,n){"use strict";var r=n(2791),o=n(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n