Mercurial > repos > fubar > jbrowse2
view x/static/js/1725.795fc4d3.chunk.js.map @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
line wrap: on
line source
{"version":3,"file":"static/js/1725.795fc4d3.chunk.js","mappings":"mKAIA,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,6FACD,Q,6DCFJ,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,iOACD,U,2DCFJ,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,4CACD,O,6DCFJ,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,qJACD,Y,4DCFJ,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,kUACD,e,4DCFJ,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,6FACD,O,6DCFJ,SAAe,QAA4B,SAAK,OAAQ,CACtDA,EAAG,oLACD,qB,4KCUJ,MAiBMC,GAAY,EAAAC,EAAA,IAAO,OAAQ,CAC/BC,KAAM,WACNC,KAAM,OACNC,kBAAmB,CAACC,EAAOC,IAAWA,EAAOC,MAH7B,CAIf,CACDC,SAAU,WACVC,QAAS,cAETC,cAAe,SACfC,WAAY,IAERC,GAAa,EAAAX,EAAA,IAAO,OAAQ,CAChCC,KAAM,WACNC,KAAM,QACNC,kBAAmB,CAACC,EAAOC,KACzB,MAAM,WACJO,GACER,EACJ,MAAO,CAACC,EAAOQ,MAAOR,EAAOO,EAAWE,SAAUT,EAAO,gBAAe,EAAAU,EAAA,GAAWH,EAAWI,aAAaC,aAAY,EAAAF,EAAA,GAAWH,EAAWI,aAAaE,eAAc,EAAAH,EAAA,GAAWH,EAAWO,YAAkC,YAArBP,EAAWQ,OAAuBf,EAAO,SAAQ,EAAAU,EAAA,GAAWH,EAAWQ,UAAWR,EAAWS,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OAAe4D,EAA2B,gBAAoB2N,EAAkB7d,OAAO6V,OAAO,CAAC,EAAGtH,EAAM,CAClIkN,UAAWhL,EAAMnE,OACjBqI,SAAUjN,KAAK8M,cAEfwH,QAAS,EAETnC,SAAsB,MAAZA,EAAmBA,EAAWnS,KAAK2Q,YAE7ChX,IAAK+S,IACHqB,EACN,EAEAnB,EAAO+D,YAAc,SAAqB/I,GACxC,OAAO5H,KAAK8H,cAAcF,GAAOjQ,MACnC,EAEOof,CACT,CArE2C,CAqEzC,E","sources":["../../../node_modules/@mui/icons-material/esm/Grade.js","../../../node_modules/@mui/icons-material/esm/History.js","../../../node_modules/@mui/icons-material/esm/Menu.js","../../../node_modules/@mui/icons-material/esm/MoreHoriz.js","../../../node_modules/@mui/icons-material/esm/ShoppingCart.js","../../../node_modules/@mui/icons-material/esm/Star.js","../../../node_modules/@mui/icons-material/esm/StarBorderOutlined.js","../../../node_modules/@mui/material/Badge/Badge.js","../../../node_modules/@mui/material/Badge/useBadge.js","../../../node_modules/@mui/material/Badge/badgeClasses.js","../../../node_modules/@mui/material/Fab/Fab.js","../../../node_modules/@mui/material/Fab/fabClasses.js","../../../node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.esm.js","../../../node_modules/react-vtree/dist/es/utils.js","../../../node_modules/react-vtree/dist/es/Tree.js","../../../node_modules/react-merge-refs/src/index.tsx","../../../node_modules/react-vtree/dist/es/FixedSizeTree.js","../../../node_modules/memoize-one/dist/memoize-one.esm.js","../../../node_modules/react-window/src/timer.js","../../../node_modules/react-window/src/domHelpers.js","../../../node_modules/react-window/src/createGridComponent.js","../../../node_modules/react-window/src/createListComponent.js","../../../node_modules/react-window/src/VariableSizeList.js","../../../node_modules/react-vtree/dist/es/VariableSizeTree.js"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n}), 'Grade');","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z\"\n}), 'History');","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"\n}), 'Menu');","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"\n}), 'MoreHoriz');","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2\"\n}), 'ShoppingCart');","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n}), 'Star');","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z\"\n}), 'StarBorderOutlined');","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport usePreviousProps from '@mui/utils/usePreviousProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport useBadge from \"./useBadge.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport badgeClasses, { getBadgeUtilityClass } from \"./badgeClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst RADIUS_STANDARD = 10;\nconst RADIUS_DOT = 4;\nconst useUtilityClasses = ownerState => {\n const {\n color,\n anchorOrigin,\n invisible,\n overlap,\n variant,\n classes = {}\n } = ownerState;\n const slots = {\n root: ['root'],\n badge: ['badge', variant, invisible && 'invisible', `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`, `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}${capitalize(overlap)}`, `overlap${capitalize(overlap)}`, color !== 'default' && `color${capitalize(color)}`]\n };\n return composeClasses(slots, getBadgeUtilityClass, classes);\n};\nconst BadgeRoot = styled('span', {\n name: 'MuiBadge',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n position: 'relative',\n display: 'inline-flex',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n flexShrink: 0\n});\nconst BadgeBadge = styled('span', {\n name: 'MuiBadge',\n slot: 'Badge',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.badge, styles[ownerState.variant], styles[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}${capitalize(ownerState.overlap)}`], ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.invisible && styles.invisible];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n boxSizing: 'border-box',\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(12),\n minWidth: RADIUS_STANDARD * 2,\n lineHeight: 1,\n padding: '0 6px',\n height: RADIUS_STANDARD * 2,\n borderRadius: RADIUS_STANDARD,\n zIndex: 1,\n // Render the badge on top of potential ripples.\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.enteringScreen\n }),\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({\n props: {\n color\n },\n style: {\n backgroundColor: (theme.vars || theme).palette[color].main,\n color: (theme.vars || theme).palette[color].contrastText\n }\n })), {\n props: {\n variant: 'dot'\n },\n style: {\n borderRadius: RADIUS_DOT,\n height: RADIUS_DOT * 2,\n minWidth: RADIUS_DOT * 2,\n padding: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'rectangular',\n style: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(50%, -50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'rectangular',\n style: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(50%, 50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'rectangular',\n style: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'rectangular',\n style: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'circular',\n style: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(50%, -50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'right' && ownerState.overlap === 'circular',\n style: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(50%, 50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'top' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'circular',\n style: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.anchorOrigin.vertical === 'bottom' && ownerState.anchorOrigin.horizontal === 'left' && ownerState.overlap === 'circular',\n style: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n [`&.${badgeClasses.invisible}`]: {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n }\n }, {\n props: {\n invisible: true\n },\n style: {\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.leavingScreen\n })\n }\n }]\n})));\nconst Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiBadge'\n });\n const {\n anchorOrigin: anchorOriginProp = {\n vertical: 'top',\n horizontal: 'right'\n },\n className,\n classes: classesProp,\n component,\n components = {},\n componentsProps = {},\n children,\n overlap: overlapProp = 'rectangular',\n color: colorProp = 'default',\n invisible: invisibleProp = false,\n max: maxProp = 99,\n badgeContent: badgeContentProp,\n slots,\n slotProps,\n showZero = false,\n variant: variantProp = 'standard',\n ...other\n } = props;\n const {\n badgeContent,\n invisible: invisibleFromHook,\n max,\n displayValue: displayValueFromHook\n } = useBadge({\n max: maxProp,\n invisible: invisibleProp,\n badgeContent: badgeContentProp,\n showZero\n });\n const prevProps = usePreviousProps({\n anchorOrigin: anchorOriginProp,\n color: colorProp,\n overlap: overlapProp,\n variant: variantProp,\n badgeContent: badgeContentProp\n });\n const invisible = invisibleFromHook || badgeContent == null && variantProp !== 'dot';\n const {\n color = colorProp,\n overlap = overlapProp,\n anchorOrigin = anchorOriginProp,\n variant = variantProp\n } = invisible ? prevProps : props;\n const displayValue = variant !== 'dot' ? displayValueFromHook : undefined;\n const ownerState = {\n ...props,\n badgeContent,\n invisible,\n max,\n displayValue,\n showZero,\n anchorOrigin,\n color,\n overlap,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n\n // support both `slots` and `components` for backward compatibility\n const RootSlot = slots?.root ?? components.Root ?? BadgeRoot;\n const BadgeSlot = slots?.badge ?? components.Badge ?? BadgeBadge;\n const rootSlotProps = slotProps?.root ?? componentsProps.root;\n const badgeSlotProps = slotProps?.badge ?? componentsProps.badge;\n const rootProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: rootSlotProps,\n externalForwardedProps: other,\n additionalProps: {\n ref,\n as: component\n },\n ownerState,\n className: clsx(rootSlotProps?.className, classes.root, className)\n });\n const badgeProps = useSlotProps({\n elementType: BadgeSlot,\n externalSlotProps: badgeSlotProps,\n ownerState,\n className: clsx(classes.badge, badgeSlotProps?.className)\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [children, /*#__PURE__*/_jsx(BadgeSlot, {\n ...badgeProps,\n children: displayValue\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Badge.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The anchor of the badge.\n * @default {\n * vertical: 'top',\n * horizontal: 'right',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n /**\n * The content rendered within the badge.\n */\n badgeContent: PropTypes.node,\n /**\n * The badge will be added relative to this node.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Badge: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * If `true`, the badge is invisible.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * Max count to show.\n * @default 99\n */\n max: PropTypes.number,\n /**\n * Wrapped shape the badge should overlap.\n * @default 'rectangular'\n */\n overlap: PropTypes.oneOf(['circular', 'rectangular']),\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n * @default false\n */\n showZero: PropTypes.bool,\n /**\n * The props used for each slot inside the Badge.\n * @default {}\n */\n slotProps: PropTypes.shape({\n badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Badge.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n badge: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'standard'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['dot', 'standard']), PropTypes.string])\n} : void 0;\nexport default Badge;","'use client';\n\nimport { usePreviousProps } from '@mui/utils';\n/**\n *\n * Demos:\n *\n * - [Badge](https://mui.com/base-ui/react-badge/#hook)\n *\n * API:\n *\n * - [useBadge API](https://mui.com/base-ui/react-badge/hooks-api/#use-badge)\n */\nfunction useBadge(parameters) {\n const {\n badgeContent: badgeContentProp,\n invisible: invisibleProp = false,\n max: maxProp = 99,\n showZero = false\n } = parameters;\n const prevProps = usePreviousProps({\n badgeContent: badgeContentProp,\n max: maxProp\n });\n let invisible = invisibleProp;\n if (invisibleProp === false && badgeContentProp === 0 && !showZero) {\n invisible = true;\n }\n const {\n badgeContent,\n max = maxProp\n } = invisible ? prevProps : parameters;\n const displayValue = badgeContent && Number(badgeContent) > max ? `${max}+` : badgeContent;\n return {\n badgeContent,\n invisible,\n max,\n displayValue\n };\n}\nexport default useBadge;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBadgeUtilityClass(slot) {\n return generateUtilityClass('MuiBadge', slot);\n}\nconst badgeClasses = generateUtilityClasses('MuiBadge', ['root', 'badge', 'dot', 'standard', 'anchorOriginTopRight', 'anchorOriginBottomRight', 'anchorOriginTopLeft', 'anchorOriginBottomLeft', 'invisible', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular',\n// TODO: v6 remove the overlap value from these class keys\n'anchorOriginTopLeftCircular', 'anchorOriginTopLeftRectangular', 'anchorOriginTopRightCircular', 'anchorOriginTopRightRectangular', 'anchorOriginBottomLeftCircular', 'anchorOriginBottomLeftRectangular', 'anchorOriginBottomRightCircular', 'anchorOriginBottomRightRectangular']);\nexport default badgeClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport fabClasses, { getFabUtilityClass } from \"./fabClasses.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n variant,\n classes,\n size\n } = ownerState;\n const slots = {\n root: ['root', variant, `size${capitalize(size)}`, color === 'inherit' ? 'colorInherit' : color]\n };\n const composedClasses = composeClasses(slots, getFabUtilityClass, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the ButtonBase\n ...composedClasses\n };\n};\nconst FabRoot = styled(ButtonBase, {\n name: 'MuiFab',\n slot: 'Root',\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, styles[capitalize(ownerState.size)], styles[ownerState.color]];\n }\n})(memoTheme(({\n theme\n}) => ({\n ...theme.typography.button,\n minHeight: 36,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.short\n }),\n borderRadius: '50%',\n padding: 0,\n minWidth: 0,\n width: 56,\n height: 56,\n zIndex: (theme.vars || theme).zIndex.fab,\n boxShadow: (theme.vars || theme).shadows[6],\n '&:active': {\n boxShadow: (theme.vars || theme).shadows[12]\n },\n color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText?.(theme.palette.grey[300]),\n backgroundColor: (theme.vars || theme).palette.grey[300],\n '&:hover': {\n backgroundColor: (theme.vars || theme).palette.grey.A100,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: (theme.vars || theme).palette.grey[300]\n },\n textDecoration: 'none'\n },\n [`&.${fabClasses.focusVisible}`]: {\n boxShadow: (theme.vars || theme).shadows[6]\n },\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n width: 40,\n height: 40\n }\n }, {\n props: {\n size: 'medium'\n },\n style: {\n width: 48,\n height: 48\n }\n }, {\n props: {\n variant: 'extended'\n },\n style: {\n borderRadius: 48 / 2,\n padding: '0 16px',\n width: 'auto',\n minHeight: 'auto',\n minWidth: 48,\n height: 48\n }\n }, {\n props: {\n variant: 'extended',\n size: 'small'\n },\n style: {\n width: 'auto',\n padding: '0 8px',\n borderRadius: 34 / 2,\n minWidth: 34,\n height: 34\n }\n }, {\n props: {\n variant: 'extended',\n size: 'medium'\n },\n style: {\n width: 'auto',\n padding: '0 16px',\n borderRadius: 40 / 2,\n minWidth: 40,\n height: 40\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: 'inherit'\n }\n }]\n})), memoTheme(({\n theme\n}) => ({\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].contrastText,\n backgroundColor: (theme.vars || theme).palette[color].main,\n '&:hover': {\n backgroundColor: (theme.vars || theme).palette[color].dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: (theme.vars || theme).palette[color].main\n }\n }\n }\n }))]\n})), memoTheme(({\n theme\n}) => ({\n [`&.${fabClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled,\n boxShadow: (theme.vars || theme).shadows[0],\n backgroundColor: (theme.vars || theme).palette.action.disabledBackground\n }\n})));\nconst Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFab'\n });\n const {\n children,\n className,\n color = 'default',\n component = 'button',\n disabled = false,\n disableFocusRipple = false,\n focusVisibleClassName,\n size = 'large',\n variant = 'circular',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n disableFocusRipple,\n size,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FabRoot, {\n className: clsx(classes.root, className),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ownerState: ownerState,\n ref: ref,\n ...other,\n classes: classes,\n children: children\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fab.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n */\n disableRipple: PropTypes.bool,\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'large'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'circular'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'extended']), PropTypes.string])\n} : void 0;\nexport default Fab;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFabUtilityClass(slot) {\n return generateUtilityClass('MuiFab', slot);\n}\nconst fabClasses = generateUtilityClasses('MuiFab', ['root', 'primary', 'secondary', 'extended', 'circular', 'focusVisible', 'disabled', 'colorInherit', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'info', 'error', 'warning', 'success']);\nexport default fabClasses;","import { Component, createElement } from 'react';\n\n/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n * 5) Use 'export' statement over 'module.exports' assignment\n **/\n\n// Check `document` and `window` in case of server-side rendering\nlet windowObject;\nif (typeof window !== \"undefined\") {\n windowObject = window;\n\n // eslint-disable-next-line no-restricted-globals\n} else if (typeof self !== \"undefined\") {\n // eslint-disable-next-line no-restricted-globals\n windowObject = self;\n} else {\n windowObject = global;\n}\nlet cancelFrame = null;\nlet requestFrame = null;\nconst TIMEOUT_DURATION = 20;\nconst clearTimeoutFn = windowObject.clearTimeout;\nconst setTimeoutFn = windowObject.setTimeout;\nconst cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;\nconst requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;\nif (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {\n // For environments that don't support animation frame,\n // fallback to a setTimeout based approach.\n cancelFrame = clearTimeoutFn;\n requestFrame = function requestAnimationFrameViaSetTimeout(callback) {\n return setTimeoutFn(callback, TIMEOUT_DURATION);\n };\n} else {\n // Counter intuitively, environments that support animation frames can be trickier.\n // Chrome's \"Throttle non-visible cross-origin iframes\" flag can prevent rAFs from being called.\n // In this case, we should fallback to a setTimeout() implementation.\n cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {\n cancelAnimationFrameFn(animationFrameID);\n clearTimeoutFn(timeoutID);\n };\n requestFrame = function requestAnimationFrameWithSetTimeoutFallback(callback) {\n const animationFrameID = requestAnimationFrameFn(function animationFrameCallback() {\n clearTimeoutFn(timeoutID);\n callback();\n });\n const timeoutID = setTimeoutFn(function timeoutCallback() {\n cancelAnimationFrameFn(animationFrameID);\n callback();\n }, TIMEOUT_DURATION);\n return [animationFrameID, timeoutID];\n };\n}\nfunction createDetectElementResize(nonce) {\n let animationKeyframes;\n let animationName;\n let animationStartEvent;\n let animationStyle;\n let checkTriggers;\n let resetTriggers;\n let scrollListener;\n const attachEvent = typeof document !== \"undefined\" && document.attachEvent;\n if (!attachEvent) {\n resetTriggers = function (element) {\n const triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n checkTriggers = function (element) {\n return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;\n };\n scrollListener = function (e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (e.target.className && typeof e.target.className.indexOf === \"function\" && e.target.className.indexOf(\"contract-trigger\") < 0 && e.target.className.indexOf(\"expand-trigger\") < 0) {\n return;\n }\n const element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function animationFrame() {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function forEachResizeListener(fn) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n let animation = false;\n let keyframeprefix = \"\";\n animationStartEvent = \"animationstart\";\n const domPrefixes = \"Webkit Moz O ms\".split(\" \");\n let startEvents = \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\" \");\n let pfx = \"\";\n {\n const elm = document.createElement(\"fakeelement\");\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n if (animation === false) {\n for (let i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\n animationStartEvent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n animationName = \"resizeanim\";\n animationKeyframes = \"@\" + keyframeprefix + \"keyframes \" + animationName + \" { from { opacity: 0; } to { opacity: 0; } } \";\n animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\n }\n const createStyles = function (doc) {\n if (!doc.getElementById(\"detectElementResize\")) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n const css = (animationKeyframes ? animationKeyframes : \"\") + \".resize-triggers { \" + (animationStyle ? animationStyle : \"\") + \"visibility: hidden; opacity: 0; } \" + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName(\"head\")[0],\n style = doc.createElement(\"style\");\n style.id = \"detectElementResize\";\n style.type = \"text/css\";\n if (nonce != null) {\n style.setAttribute(\"nonce\", nonce);\n }\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n head.appendChild(style);\n }\n };\n const addResizeListener = function (element, fn) {\n if (attachEvent) {\n element.attachEvent(\"onresize\", fn);\n } else {\n if (!element.__resizeTriggers__) {\n const doc = element.ownerDocument;\n const elementStyle = windowObject.getComputedStyle(element);\n if (elementStyle && elementStyle.position === \"static\") {\n element.style.position = \"relative\";\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement(\"div\")).className = \"resize-triggers\";\n const expandTrigger = doc.createElement(\"div\");\n expandTrigger.className = \"expand-trigger\";\n expandTrigger.appendChild(doc.createElement(\"div\"));\n const contractTrigger = doc.createElement(\"div\");\n contractTrigger.className = \"contract-trigger\";\n element.__resizeTriggers__.appendChild(expandTrigger);\n element.__resizeTriggers__.appendChild(contractTrigger);\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener(\"scroll\", scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationStartEvent) {\n element.__resizeTriggers__.__animationListener__ = function animationListener(e) {\n if (e.animationName === animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n const removeResizeListener = function (element, fn) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", fn);\n } else {\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n if (!element.__resizeListeners__.length) {\n element.removeEventListener(\"scroll\", scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n return {\n addResizeListener,\n removeResizeListener\n };\n}\n\nclass AutoSizer extends Component {\n constructor(...args) {\n super(...args);\n this.state = {\n height: this.props.defaultHeight || 0,\n scaledHeight: this.props.defaultHeight || 0,\n scaledWidth: this.props.defaultWidth || 0,\n width: this.props.defaultWidth || 0\n };\n this._autoSizer = null;\n this._detectElementResize = null;\n this._parentNode = null;\n this._resizeObserver = null;\n this._timeoutId = null;\n this._onResize = () => {\n this._timeoutId = null;\n const {\n disableHeight,\n disableWidth,\n onResize\n } = this.props;\n if (this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n const style = window.getComputedStyle(this._parentNode) || {};\n const paddingLeft = parseFloat(style.paddingLeft || \"0\");\n const paddingRight = parseFloat(style.paddingRight || \"0\");\n const paddingTop = parseFloat(style.paddingTop || \"0\");\n const paddingBottom = parseFloat(style.paddingBottom || \"0\");\n const rect = this._parentNode.getBoundingClientRect();\n const scaledHeight = rect.height - paddingTop - paddingBottom;\n const scaledWidth = rect.width - paddingLeft - paddingRight;\n const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;\n const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;\n if (!disableHeight && (this.state.height !== height || this.state.scaledHeight !== scaledHeight) || !disableWidth && (this.state.width !== width || this.state.scaledWidth !== scaledWidth)) {\n this.setState({\n height,\n width,\n scaledHeight,\n scaledWidth\n });\n if (typeof onResize === \"function\") {\n onResize({\n height,\n scaledHeight,\n scaledWidth,\n width\n });\n }\n }\n }\n };\n this._setRef = autoSizer => {\n this._autoSizer = autoSizer;\n };\n }\n componentDidMount() {\n const {\n nonce\n } = this.props;\n const parentNode = this._autoSizer ? this._autoSizer.parentNode : null;\n if (parentNode != null && parentNode.ownerDocument && parentNode.ownerDocument.defaultView && parentNode instanceof parentNode.ownerDocument.defaultView.HTMLElement) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = parentNode;\n\n // Use ResizeObserver from the same context where parentNode (which we will observe) was defined\n // Using just global can result into onResize events not being emitted in cases with multiple realms\n const ResizeObserverInstance = parentNode.ownerDocument.defaultView.ResizeObserver;\n if (ResizeObserverInstance != null) {\n this._resizeObserver = new ResizeObserverInstance(() => {\n // Guard against \"ResizeObserver loop limit exceeded\" error;\n // could be triggered if the state update causes the ResizeObserver handler to run long.\n // See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55\n this._timeoutId = setTimeout(this._onResize, 0);\n });\n this._resizeObserver.observe(parentNode);\n } else {\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n this._detectElementResize = createDetectElementResize(nonce);\n this._detectElementResize.addResizeListener(parentNode, this._onResize);\n }\n this._onResize();\n }\n }\n componentWillUnmount() {\n if (this._parentNode) {\n if (this._detectElementResize) {\n this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);\n }\n if (this._timeoutId !== null) {\n clearTimeout(this._timeoutId);\n }\n if (this._resizeObserver) {\n this._resizeObserver.disconnect();\n }\n }\n }\n render() {\n const {\n children,\n defaultHeight,\n defaultWidth,\n disableHeight = false,\n disableWidth = false,\n doNotBailOutOnEmptyChildren = false,\n nonce,\n onResize,\n style = {},\n tagName = \"div\",\n ...rest\n } = this.props;\n const {\n height,\n scaledHeight,\n scaledWidth,\n width\n } = this.state;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n const outerStyle = {\n overflow: \"visible\"\n };\n const childParams = {};\n\n // Avoid rendering children before the initial measurements have been collected.\n // At best this would just be wasting cycles.\n let bailoutOnChildren = false;\n if (!disableHeight) {\n if (height === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.height = 0;\n childParams.height = height;\n childParams.scaledHeight = scaledHeight;\n }\n if (!disableWidth) {\n if (width === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.width = 0;\n childParams.width = width;\n childParams.scaledWidth = scaledWidth;\n }\n if (doNotBailOutOnEmptyChildren) {\n bailoutOnChildren = false;\n }\n return createElement(tagName, {\n ref: this._setRef,\n style: {\n ...outerStyle,\n ...style\n },\n ...rest\n }, !bailoutOnChildren && children(childParams));\n }\n}\n\nfunction isHeightAndWidthProps(props) {\n return props && props.disableHeight !== true && props.disableWidth !== true;\n}\nfunction isHeightOnlyProps(props) {\n return props && props.disableHeight !== true && props.disableWidth === true;\n}\nfunction isWidthOnlyProps(props) {\n return props && props.disableHeight === true && props.disableWidth !== true;\n}\n\nexport { AutoSizer as default, isHeightAndWidthProps, isHeightOnlyProps, isWidthOnlyProps };\n","// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport var noop = function noop() {};\nexport var identity = function identity(value) {\n return value;\n};\nexport var createBasicRecord = function createBasicRecord(pub, parent) {\n if (parent === void 0) {\n parent = null;\n }\n\n return {\n child: null,\n isShown: parent ? parent.public.isOpen && parent.isShown : true,\n parent: parent,\n public: pub,\n sibling: null,\n visited: false\n };\n};\nexport var getIdByIndex = function getIdByIndex(index, _ref) {\n var getRecordData = _ref.getRecordData;\n\n var _getRecordData = getRecordData(index),\n id = _getRecordData.data.id;\n\n return id;\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\n\n/* eslint-disable no-labels,max-depth,complexity */\nimport React, { createRef, PureComponent } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport { noop } from './utils';\n// eslint-disable-next-line @typescript-eslint/naming-convention,@typescript-eslint/prefer-readonly-parameter-types\nexport var Row = function Row(_ref) {\n var index = _ref.index,\n _ref$data = _ref.data,\n Node = _ref$data.component,\n getRecordData = _ref$data.getRecordData,\n treeData = _ref$data.treeData,\n style = _ref.style,\n isScrolling = _ref.isScrolling;\n var data = getRecordData(index);\n return /*#__PURE__*/React.createElement(Node, Object.assign({\n isScrolling: isScrolling,\n style: style,\n treeData: treeData\n }, data));\n};\n\n// If refresh is required, we will run the TreeWalker. It will completely\n// update all requests and reset every state to default.\nvar generateNewTree = function generateNewTree(_ref2, _ref3, state) {\n var createRecord = _ref2.createRecord;\n var buildingTaskTimeout = _ref3.buildingTaskTimeout,\n placeholder = _ref3.placeholder,\n _ref3$async = _ref3.async,\n async = _ref3$async === void 0 ? false : _ref3$async,\n treeWalker = _ref3.treeWalker;\n var shouldPreservePreviousState = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n async && state.records !== undefined;\n var previousRecords = state.records;\n var order = [];\n var records = new Map();\n var requestIdleCallbackOptions = buildingTaskTimeout ? {\n timeout: buildingTaskTimeout\n } : undefined;\n var meta = new WeakMap();\n var iter = treeWalker();\n\n var _iter$next = iter.next(),\n root = _iter$next.value; // Each record has a link to a parent, the next sibling and the next child.\n // Having this info, we can perform a depth-first traverse.\n\n\n var rootRecord = createRecord(root.data, state, undefined, shouldPreservePreviousState ? previousRecords.get(root.data.id) : undefined);\n records.set(rootRecord.public.data.id, rootRecord);\n meta.set(rootRecord, root);\n var currentRecord = rootRecord;\n var isTraversingRoot = true;\n var tempRecord = rootRecord;\n var useIdleCallback = typeof 'requestIdleCallback' !== 'undefined' && placeholder !== undefined && // If placeholder is set to null and this is the first build, idle callback\n // won't be used. It is necessary for trees with async data which can be\n // extremely complex but the first build is quite easy. During the following\n // idle callbacks the old tree will be shown.\n !(placeholder === null && !state.order);\n var hasTime = useIdleCallback ? function (deadline) {\n return deadline.timeRemaining() > 0;\n } : function () {\n return true;\n };\n\n var task = function task(deadline) {\n while (currentRecord !== null) {\n if (!hasTime(deadline)) {\n requestIdleCallback(task, requestIdleCallbackOptions);\n return;\n }\n\n if (!currentRecord.visited) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n var _iter$next2 = iter.next(meta.get(currentRecord)),\n child = _iter$next2.value; // When the generator returns the undefined value we consider that all\n // children are already sent and we need to select the new parent\n // element to get its children.\n\n\n if (child === undefined) {\n if (isTraversingRoot) {\n isTraversingRoot = false;\n } else {\n if (currentRecord.isShown) {\n order.push(currentRecord.public.data.id);\n }\n\n currentRecord.visited = currentRecord.child !== null;\n currentRecord = currentRecord.child !== null ? currentRecord.child : currentRecord.sibling !== null ? currentRecord.sibling : currentRecord.parent;\n }\n\n tempRecord = currentRecord;\n continue;\n }\n\n var childRecord = createRecord(child.data, state, isTraversingRoot ? undefined : currentRecord, shouldPreservePreviousState ? previousRecords.get(child.data.id) : undefined);\n records.set(childRecord.public.data.id, childRecord);\n meta.set(childRecord, child);\n\n if (!isTraversingRoot && tempRecord === currentRecord) {\n tempRecord.child = childRecord;\n } else {\n tempRecord.sibling = childRecord;\n }\n\n tempRecord = childRecord;\n } else {\n currentRecord.visited = false;\n currentRecord = currentRecord.sibling !== null ? currentRecord.sibling : currentRecord.parent;\n tempRecord = currentRecord;\n }\n }\n\n if (useIdleCallback) {\n state.setState({\n order: order,\n records: records,\n updateRequest: {}\n });\n }\n };\n\n if (useIdleCallback) {\n requestIdleCallback(task, requestIdleCallbackOptions);\n } else {\n task();\n } // If we want to preserve the previous state and use the requestIdleCallback,\n // we need to return the old state.\n\n\n return placeholder !== undefined && async && state.order ? state : {\n order: order,\n records: records\n };\n};\n\nvar MAX_FUNCTION_ARGUMENTS = 32768;\nvar SPLICE_DEFAULT_ARGUMENTS_NUMBER = 2; // If we need to perform only the update, treeWalker won't be used. Update will\n// work internally, traversing only the subtree of elements that require\n// update through the opennessState option.\n\nvar updateExistingTree = function updateExistingTree(_ref4, _ref5) {\n var order = _ref4.order,\n records = _ref4.records;\n var opennessState = _ref5.opennessState;\n\n if (typeof opennessState !== 'object') {\n return null;\n }\n\n for (var id in opennessState) {\n if (!records.has(id)) {\n continue;\n }\n\n var opts = opennessState[id];\n var ownerRecord = records.get(id); // Here we unify the shape of openness state options\n\n var _ref6 = typeof opts === 'boolean' ? {\n open: opts\n } : opts,\n open = _ref6.open,\n _ref6$subtreeCallback = _ref6.subtreeCallback,\n subtreeCallback = _ref6$subtreeCallback === void 0 ? noop : _ref6$subtreeCallback;\n\n var update = noop;\n var apply = noop;\n\n if (ownerRecord.isShown) {\n if (open) {\n (function () {\n // If received rules require us to open the subtree, we have 2 cases:\n // 1. The node is not opened yet. In this case we simply have to\n // calculate and add new ids.\n // 2. The node is opened already. In this case we have to remove all\n // existing ids and replace them with new ids.\n var index = order.indexOf(id); // Here we calculate a count of visible subtree nodes to remove from\n // `order`. Then we will replace the gap with the updated list of\n // subtree nodes.\n\n var recordNextToSubtree = ownerRecord;\n\n while (recordNextToSubtree !== null) {\n if (recordNextToSubtree.sibling !== null) {\n recordNextToSubtree = recordNextToSubtree.sibling;\n break;\n }\n\n recordNextToSubtree = recordNextToSubtree.parent;\n }\n\n var countToRemove = recordNextToSubtree === null ? order.length - 1 - index : order.indexOf(recordNextToSubtree.public.data.id) - 1 - index;\n var orderParts = [[index + 1, countToRemove]]; // Unfortunately, splice cannot work with big arrays. If array exceeds\n // some length it may fire an exception. The length is specific for\n // each engine; e.g., MDN says about 65536 for Webkit. So, to avoid this\n // overflow, I split `order` parts to chunks by 32768 elements in each\n // one. These chunks will be sent as arguments to the `splice` method.\n //\n // To avoid array concatenations which may cause Major GC, I set two\n // first arguments as `splice`'s `start` and `deleteCount` arguments.\n\n update = function update(record) {\n // We have to consider only the newly shown elements that are not in\n // the order list yet. We should do it AFTER the visibility update\n // happens because otherwise we won't be able to distinguish if the\n // element should be included in the order list.\n // Update record visibility\n record.isShown = record.parent ? record.parent.public.isOpen && record.parent.isShown : true;\n\n if (record.isShown) {\n var currentOrderPart = orderParts[orderParts.length - 1];\n currentOrderPart.push(record.public.data.id);\n\n if (currentOrderPart.length === MAX_FUNCTION_ARGUMENTS + SPLICE_DEFAULT_ARGUMENTS_NUMBER) {\n orderParts.push([index + 1 + MAX_FUNCTION_ARGUMENTS * orderParts.length, 0]);\n }\n }\n };\n\n apply = function apply() {\n for (var i = 0; i < orderParts.length; i++) {\n var _ref7;\n\n // @ts-expect-error: too generic for TS\n (_ref7 = order).splice.apply(_ref7, orderParts[i]);\n }\n };\n })();\n } else if (ownerRecord.public.isOpen) {\n (function () {\n // If received rules require us to close the subtree, we have to remove\n // all subtree ids from the order list.\n var index = order.indexOf(id);\n var count = 0;\n\n update = function update(record) {\n // We have to consider only currently visible subtree nodes BEFORE\n // their visibility is updated. Otherwise we will have incorrect\n // number of items to remove: we cannot remove elements that are not\n // in the order list.\n //\n // If we do it after the visibility update, we will be unable to\n // understand if the element is still in the order list.\n if (record.isShown) {\n count += 1;\n } // Update record visibility\n\n\n record.isShown = record.parent ? record.parent.public.isOpen && record.parent.isShown : true;\n };\n\n apply = function apply() {\n // Remove data after element with index\n order.splice(index + 1, count);\n };\n })();\n }\n }\n\n var currentRecord = ownerRecord;\n\n while (currentRecord !== null) {\n if (!currentRecord.visited) {\n currentRecord.public.isOpen = currentRecord === ownerRecord ? open : currentRecord.public.isOpen;\n subtreeCallback(currentRecord.public, ownerRecord.public);\n\n if (currentRecord !== ownerRecord) {\n update(currentRecord);\n }\n\n currentRecord.visited = currentRecord.child !== null; // This algorithm is a bit different from the visit algorithm in the\n // tree generator. We are restricted with the bounds of a subtree and\n // shouldn't go over it. So we cannot search for the ownerRecord's\n // parent or sibling because it will lead us out of the subtree.\n\n currentRecord = // Look for child in any case\n currentRecord.child !== null ? currentRecord.child : // Stop looking for next element if currentRecord is root.\n currentRecord === ownerRecord ? null : // Otherwise, look for sibling or parent\n currentRecord.sibling !== null ? currentRecord.sibling : currentRecord.parent;\n } else {\n currentRecord.visited = false;\n currentRecord = currentRecord === ownerRecord ? null : currentRecord.sibling !== null ? currentRecord.sibling : currentRecord.parent;\n }\n }\n\n apply();\n }\n\n return {\n order: order,\n records: records,\n updateRequest: {}\n };\n};\n\nexport var createTreeComputer = function createTreeComputer(creatorOptions) {\n return function (props, state, options) {\n return options.refresh ? generateNewTree(creatorOptions, props, state) : updateExistingTree(state, options);\n };\n};\n\nvar Tree = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(Tree, _PureComponent);\n\n Tree.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n var _props$listRef = props.listRef,\n listRef = _props$listRef === void 0 ? null : _props$listRef,\n treeWalker = props.treeWalker;\n var computeTree = state.computeTree,\n list = state.list,\n order = state.order,\n oldTreeWalker = state.treeWalker;\n return _extends({\n attachRefs: mergeRefs([list, listRef])\n }, treeWalker !== oldTreeWalker || !order ? computeTree(props, state, {\n refresh: true\n }) : null, {\n treeWalker: treeWalker\n });\n };\n\n function Tree(props, context) {\n var _this;\n\n _this = _PureComponent.call(this, props, context) || this;\n _this.getRecordData = _this.getRecordData.bind(_assertThisInitialized(_this));\n /* eslint-disable react/no-unused-state,@typescript-eslint/consistent-type-assertions */\n\n _this.state = {\n list: /*#__PURE__*/createRef(),\n recomputeTree: _this.recomputeTree.bind(_assertThisInitialized(_this)),\n setState: _this.setState.bind(_assertThisInitialized(_this))\n };\n /* eslint-enable react/no-unused-state,@typescript-eslint/consistent-type-assertions */\n\n return _this;\n }\n\n var _proto = Tree.prototype;\n\n _proto.getItemData = function getItemData() {\n var _this$props = this.props,\n component = _this$props.children,\n treeData = _this$props.itemData;\n return {\n component: component,\n // eslint-disable-next-line @typescript-eslint/unbound-method\n getRecordData: this.getRecordData,\n treeData: treeData\n };\n };\n\n _proto.getRecordData = function getRecordData(index) {\n var _this$state = this.state,\n order = _this$state.order,\n records = _this$state.records;\n return records.get(order[index]).public;\n };\n\n _proto.recomputeTree = function recomputeTree(state) {\n var _this2 = this;\n\n return new Promise(function (resolve) {\n _this2.setState(function (prevState) {\n return prevState.computeTree(_this2.props, prevState, {\n opennessState: state\n });\n }, resolve);\n });\n };\n\n _proto.scrollTo = function scrollTo(scrollOffset) {\n var _this$state$list$curr;\n\n // eslint-disable-next-line react/destructuring-assignment\n (_this$state$list$curr = this.state.list.current) == null ? void 0 : _this$state$list$curr.scrollTo(scrollOffset);\n };\n\n _proto.scrollToItem = function scrollToItem(id, align) {\n var _this$state$list$curr2;\n\n // eslint-disable-next-line react/destructuring-assignment\n (_this$state$list$curr2 = this.state.list.current) == null ? void 0 : _this$state$list$curr2.scrollToItem(this.state.order.indexOf(id), align);\n };\n\n return Tree;\n}(PureComponent);\n\nTree.defaultProps = {\n rowComponent: Row\n};\nexport default Tree;","import * as React from \"react\";\n\nexport default function mergeRefs<T = any>(\n refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>\n): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport React from 'react';\nimport { FixedSizeList } from 'react-window';\nimport Tree, { createTreeComputer } from './Tree';\nimport { createBasicRecord, getIdByIndex } from './utils';\nvar computeTree = createTreeComputer({\n createRecord: function createRecord(data, _ref, parent, previousRecord) {\n var recomputeTree = _ref.recomputeTree;\n return createBasicRecord({\n data: data,\n isOpen: previousRecord ? previousRecord.public.isOpen : data.isOpenByDefault,\n setOpen: function setOpen(state) {\n var _recomputeTree;\n\n return recomputeTree((_recomputeTree = {}, _recomputeTree[data.id] = state, _recomputeTree));\n }\n }, parent);\n }\n});\nexport var FixedSizeTree = /*#__PURE__*/function (_Tree) {\n _inheritsLoose(FixedSizeTree, _Tree);\n\n function FixedSizeTree(props, context) {\n var _this;\n\n _this = _Tree.call(this, props, context) || this;\n _this.state = _extends({}, _this.state, {\n computeTree: computeTree\n });\n return _this;\n }\n\n var _proto = FixedSizeTree.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n listRef = _this$props.listRef,\n placeholder = _this$props.placeholder,\n treeWalker = _this$props.treeWalker,\n rowComponent = _this$props.rowComponent,\n rest = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"listRef\", \"placeholder\", \"treeWalker\", \"rowComponent\"]);\n\n var _this$state = this.state,\n attachRefs = _this$state.attachRefs,\n order = _this$state.order;\n return placeholder && order.length === 0 ? placeholder : /*#__PURE__*/React.createElement(FixedSizeList, Object.assign({}, rest, {\n itemCount: order.length,\n itemData: this.getItemData() // eslint-disable-next-line @typescript-eslint/unbound-method\n ,\n itemKey: getIdByIndex // eslint-disable-next-line @typescript-eslint/unbound-method\n ,\n ref: attachRefs\n }), rowComponent);\n };\n\n return FixedSizeTree;\n}(Tree);","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","// @flow\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\n\nconst hasNativePerformanceNow =\n typeof performance === 'object' && typeof performance.now === 'function';\n\nconst now = hasNativePerformanceNow\n ? () => performance.now()\n : () => Date.now();\n\nexport type TimeoutID = {|\n id: AnimationFrameID,\n|};\n\nexport function cancelTimeout(timeoutID: TimeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\n\nexport function requestTimeout(callback: Function, delay: number): TimeoutID {\n const start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n const timeoutID: TimeoutID = {\n id: requestAnimationFrame(tick),\n };\n\n return timeoutID;\n}\n","// @flow\n\nlet size: number = -1;\n\n// This utility copied from \"dom-helpers\" package.\nexport function getScrollbarSize(recalculate?: boolean = false): number {\n if (size === -1 || recalculate) {\n const div = document.createElement('div');\n const style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n\n ((document.body: any): HTMLBodyElement).appendChild(div);\n\n size = div.offsetWidth - div.clientWidth;\n\n ((document.body: any): HTMLBodyElement).removeChild(div);\n }\n\n return size;\n}\n\nexport type RTLOffsetType =\n | 'negative'\n | 'positive-descending'\n | 'positive-ascending';\n\nlet cachedRTLResult: RTLOffsetType | null = null;\n\n// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\nexport function getRTLOffsetType(recalculate?: boolean = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div');\n const outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n\n const innerDiv = document.createElement('div');\n const innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n\n outerDiv.appendChild(innerDiv);\n\n ((document.body: any): HTMLBodyElement).appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n ((document.body: any): HTMLBodyElement).removeChild(outerDiv);\n\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n","// @flow\n\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport { cancelTimeout, requestTimeout } from './timer';\nimport { getScrollbarSize, getRTLOffsetType } from './domHelpers';\n\nimport type { TimeoutID } from './timer';\n\ntype Direction = 'ltr' | 'rtl';\nexport type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end';\n\ntype itemSize = number | ((index: number) => number);\n\ntype RenderComponentProps<T> = {|\n columnIndex: number,\n data: T,\n isScrolling?: boolean,\n rowIndex: number,\n style: Object,\n|};\nexport type RenderComponent<T> = React$ComponentType<\n $Shape<RenderComponentProps<T>>\n>;\n\ntype ScrollDirection = 'forward' | 'backward';\n\ntype OnItemsRenderedCallback = ({\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number,\n}) => void;\ntype OnScrollCallback = ({\n horizontalScrollDirection: ScrollDirection,\n scrollLeft: number,\n scrollTop: number,\n scrollUpdateWasRequested: boolean,\n verticalScrollDirection: ScrollDirection,\n}) => void;\n\ntype ScrollEvent = SyntheticEvent<HTMLDivElement>;\ntype ItemStyleCache = { [key: string]: Object };\n\ntype OuterProps = {|\n children: React$Node,\n className: string | void,\n onScroll: ScrollEvent => void,\n style: {\n [string]: mixed,\n },\n|};\n\ntype InnerProps = {|\n children: React$Node,\n style: {\n [string]: mixed,\n },\n|};\n\nexport type Props<T> = {|\n children: RenderComponent<T>,\n className?: string,\n columnCount: number,\n columnWidth: itemSize,\n direction: Direction,\n height: number,\n initialScrollLeft?: number,\n initialScrollTop?: number,\n innerRef?: any,\n innerElementType?: string | React$AbstractComponent<InnerProps, any>,\n innerTagName?: string, // deprecated\n itemData: T,\n itemKey?: (params: {|\n columnIndex: number,\n data: T,\n rowIndex: number,\n |}) => any,\n onItemsRendered?: OnItemsRenderedCallback,\n onScroll?: OnScrollCallback,\n outerRef?: any,\n outerElementType?: string | React$AbstractComponent<OuterProps, any>,\n outerTagName?: string, // deprecated\n overscanColumnCount?: number,\n overscanColumnsCount?: number, // deprecated\n overscanCount?: number, // deprecated\n overscanRowCount?: number,\n overscanRowsCount?: number, // deprecated\n rowCount: number,\n rowHeight: itemSize,\n style?: Object,\n useIsScrolling: boolean,\n width: number,\n|};\n\ntype State = {|\n instance: any,\n isScrolling: boolean,\n horizontalScrollDirection: ScrollDirection,\n scrollLeft: number,\n scrollTop: number,\n scrollUpdateWasRequested: boolean,\n verticalScrollDirection: ScrollDirection,\n|};\n\ntype getItemOffset = (\n props: Props<any>,\n index: number,\n instanceProps: any\n) => number;\ntype getItemSize = (\n props: Props<any>,\n index: number,\n instanceProps: any\n) => number;\ntype getEstimatedTotalSize = (props: Props<any>, instanceProps: any) => number;\ntype GetOffsetForItemAndAlignment = (\n props: Props<any>,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: any,\n scrollbarSize: number\n) => number;\ntype GetStartIndexForOffset = (\n props: Props<any>,\n offset: number,\n instanceProps: any\n) => number;\ntype GetStopIndexForStartIndex = (\n props: Props<any>,\n startIndex: number,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype InitInstanceProps = (props: Props<any>, instance: any) => any;\ntype ValidateProps = (props: Props<any>) => void;\n\nconst IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nconst defaultItemKey = ({ columnIndex, data, rowIndex }) =>\n `${rowIndex}:${columnIndex}`;\n\n// In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\nlet devWarningsOverscanCount = null;\nlet devWarningsOverscanRowsColumnsCount = null;\nlet devWarningsTagName = null;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = new WeakSet();\n devWarningsOverscanRowsColumnsCount = new WeakSet();\n devWarningsTagName = new WeakSet();\n }\n}\n\nexport default function createGridComponent({\n getColumnOffset,\n getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex,\n getColumnWidth,\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment,\n getRowHeight,\n getRowOffset,\n getRowStartIndexForOffset,\n getRowStopIndexForStartIndex,\n initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange,\n validateProps,\n}: {|\n getColumnOffset: getItemOffset,\n getColumnStartIndexForOffset: GetStartIndexForOffset,\n getColumnStopIndexForStartIndex: GetStopIndexForStartIndex,\n getColumnWidth: getItemSize,\n getEstimatedTotalHeight: getEstimatedTotalSize,\n getEstimatedTotalWidth: getEstimatedTotalSize,\n getOffsetForColumnAndAlignment: GetOffsetForItemAndAlignment,\n getOffsetForRowAndAlignment: GetOffsetForItemAndAlignment,\n getRowOffset: getItemOffset,\n getRowHeight: getItemSize,\n getRowStartIndexForOffset: GetStartIndexForOffset,\n getRowStopIndexForStartIndex: GetStopIndexForStartIndex,\n initInstanceProps: InitInstanceProps,\n shouldResetStyleCacheOnItemSizeChange: boolean,\n validateProps: ValidateProps,\n|}) {\n return class Grid<T> extends PureComponent<Props<T>, State> {\n _instanceProps: any = initInstanceProps(this.props, this);\n _resetIsScrollingTimeoutId: TimeoutID | null = null;\n _outerRef: ?HTMLDivElement;\n\n static defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false,\n };\n\n state: State = {\n instance: this,\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft:\n typeof this.props.initialScrollLeft === 'number'\n ? this.props.initialScrollLeft\n : 0,\n scrollTop:\n typeof this.props.initialScrollTop === 'number'\n ? this.props.initialScrollTop\n : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward',\n };\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n constructor(props: Props<T>) {\n super(props);\n }\n\n static getDerivedStateFromProps(\n nextProps: Props<T>,\n prevState: State\n ): $Shape<State> | null {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n }\n\n scrollTo({\n scrollLeft,\n scrollTop,\n }: {\n scrollLeft: number,\n scrollTop: number,\n }): void {\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(prevState => {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (\n prevState.scrollLeft === scrollLeft &&\n prevState.scrollTop === scrollTop\n ) {\n return null;\n }\n\n return {\n horizontalScrollDirection:\n prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection:\n prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n };\n }, this._resetIsScrollingDebounced);\n }\n\n scrollToItem({\n align = 'auto',\n columnIndex,\n rowIndex,\n }: {\n align: ScrollToAlign,\n columnIndex?: number,\n rowIndex?: number,\n }): void {\n const { columnCount, height, rowCount, width } = this.props;\n const { scrollLeft, scrollTop } = this.state;\n const scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n const estimatedTotalHeight = getEstimatedTotalHeight(\n this.props,\n this._instanceProps\n );\n const estimatedTotalWidth = getEstimatedTotalWidth(\n this.props,\n this._instanceProps\n );\n\n // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n const horizontalScrollbarSize =\n estimatedTotalWidth > width ? scrollbarSize : 0;\n const verticalScrollbarSize =\n estimatedTotalHeight > height ? scrollbarSize : 0;\n\n this.scrollTo({\n scrollLeft:\n columnIndex !== undefined\n ? getOffsetForColumnAndAlignment(\n this.props,\n columnIndex,\n align,\n scrollLeft,\n this._instanceProps,\n verticalScrollbarSize\n )\n : scrollLeft,\n scrollTop:\n rowIndex !== undefined\n ? getOffsetForRowAndAlignment(\n this.props,\n rowIndex,\n align,\n scrollTop,\n this._instanceProps,\n horizontalScrollbarSize\n )\n : scrollTop,\n });\n }\n\n componentDidMount() {\n const { initialScrollLeft, initialScrollTop } = this.props;\n\n if (this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentDidUpdate() {\n const { direction } = this.props;\n const { scrollLeft, scrollTop, scrollUpdateWasRequested } = this.state;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n default:\n const { clientWidth, scrollWidth } = outerRef;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n }\n\n componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n }\n\n render() {\n const {\n children,\n className,\n columnCount,\n direction,\n height,\n innerRef,\n innerElementType,\n innerTagName,\n itemData,\n itemKey = defaultItemKey,\n outerElementType,\n outerTagName,\n rowCount,\n style,\n useIsScrolling,\n width,\n } = this.props;\n const { isScrolling } = this.state;\n\n const [\n columnStartIndex,\n columnStopIndex,\n ] = this._getHorizontalRangeToRender();\n const [rowStartIndex, rowStopIndex] = this._getVerticalRangeToRender();\n\n const items = [];\n if (columnCount > 0 && rowCount) {\n for (\n let rowIndex = rowStartIndex;\n rowIndex <= rowStopIndex;\n rowIndex++\n ) {\n for (\n let columnIndex = columnStartIndex;\n columnIndex <= columnStopIndex;\n columnIndex++\n ) {\n items.push(\n createElement(children, {\n columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({ columnIndex, data: itemData, rowIndex }),\n rowIndex,\n style: this._getItemStyle(rowIndex, columnIndex),\n })\n );\n }\n }\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalHeight = getEstimatedTotalHeight(\n this.props,\n this._instanceProps\n );\n const estimatedTotalWidth = getEstimatedTotalWidth(\n this.props,\n this._instanceProps\n );\n\n return createElement(\n outerElementType || outerTagName || 'div',\n {\n className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: {\n position: 'relative',\n height,\n width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction,\n ...style,\n },\n },\n createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth,\n },\n })\n );\n }\n\n _callOnItemsRendered: (\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number\n ) => void;\n _callOnItemsRendered = memoizeOne(\n (\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number\n ) =>\n ((this.props.onItemsRendered: any): OnItemsRenderedCallback)({\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex,\n })\n );\n\n _callOnScroll: (\n scrollLeft: number,\n scrollTop: number,\n horizontalScrollDirection: ScrollDirection,\n verticalScrollDirection: ScrollDirection,\n scrollUpdateWasRequested: boolean\n ) => void;\n _callOnScroll = memoizeOne(\n (\n scrollLeft: number,\n scrollTop: number,\n horizontalScrollDirection: ScrollDirection,\n verticalScrollDirection: ScrollDirection,\n scrollUpdateWasRequested: boolean\n ) =>\n ((this.props.onScroll: any): OnScrollCallback)({\n horizontalScrollDirection,\n scrollLeft,\n scrollTop,\n verticalScrollDirection,\n scrollUpdateWasRequested,\n })\n );\n\n _callPropsCallbacks() {\n const { columnCount, onItemsRendered, onScroll, rowCount } = this.props;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n const [\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n ] = this._getHorizontalRangeToRender();\n const [\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex,\n ] = this._getVerticalRangeToRender();\n this._callOnItemsRendered(\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex\n );\n }\n }\n\n if (typeof onScroll === 'function') {\n const {\n horizontalScrollDirection,\n scrollLeft,\n scrollTop,\n scrollUpdateWasRequested,\n verticalScrollDirection,\n } = this.state;\n this._callOnScroll(\n scrollLeft,\n scrollTop,\n horizontalScrollDirection,\n verticalScrollDirection,\n scrollUpdateWasRequested\n );\n }\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getItemStyle: (rowIndex: number, columnIndex: number) => Object;\n _getItemStyle = (rowIndex: number, columnIndex: number): Object => {\n const { columnWidth, direction, rowHeight } = this.props;\n\n const itemStyleCache = this._getItemStyleCache(\n shouldResetStyleCacheOnItemSizeChange && columnWidth,\n shouldResetStyleCacheOnItemSizeChange && direction,\n shouldResetStyleCacheOnItemSizeChange && rowHeight\n );\n\n const key = `${rowIndex}:${columnIndex}`;\n\n let style;\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n const offset = getColumnOffset(\n this.props,\n columnIndex,\n this._instanceProps\n );\n const isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offset,\n right: isRtl ? offset : undefined,\n top: getRowOffset(this.props, rowIndex, this._instanceProps),\n height: getRowHeight(this.props, rowIndex, this._instanceProps),\n width: getColumnWidth(this.props, columnIndex, this._instanceProps),\n };\n }\n\n return style;\n };\n\n _getItemStyleCache: (_: any, __: any, ___: any) => ItemStyleCache;\n _getItemStyleCache = memoizeOne((_: any, __: any, ___: any) => ({}));\n\n _getHorizontalRangeToRender(): [number, number, number, number] {\n const {\n columnCount,\n overscanColumnCount,\n overscanColumnsCount,\n overscanCount,\n rowCount,\n } = this.props;\n const { horizontalScrollDirection, isScrolling, scrollLeft } = this.state;\n\n const overscanCountResolved: number =\n overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getColumnStartIndexForOffset(\n this.props,\n scrollLeft,\n this._instanceProps\n );\n const stopIndex = getColumnStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollLeft,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || horizontalScrollDirection === 'backward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n const overscanForward =\n !isScrolling || horizontalScrollDirection === 'forward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _getVerticalRangeToRender(): [number, number, number, number] {\n const {\n columnCount,\n overscanCount,\n overscanRowCount,\n overscanRowsCount,\n rowCount,\n } = this.props;\n const { isScrolling, verticalScrollDirection, scrollTop } = this.state;\n\n const overscanCountResolved: number =\n overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getRowStartIndexForOffset(\n this.props,\n scrollTop,\n this._instanceProps\n );\n const stopIndex = getRowStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollTop,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || verticalScrollDirection === 'backward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n const overscanForward =\n !isScrolling || verticalScrollDirection === 'forward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _onScroll = (event: ScrollEvent): void => {\n const {\n clientHeight,\n clientWidth,\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth,\n } = event.currentTarget;\n this.setState(prevState => {\n if (\n prevState.scrollLeft === scrollLeft &&\n prevState.scrollTop === scrollTop\n ) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n const { direction } = this.props;\n\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n let calculatedScrollLeft = scrollLeft;\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n calculatedScrollLeft = Math.max(\n 0,\n Math.min(calculatedScrollLeft, scrollWidth - clientWidth)\n );\n const calculatedScrollTop = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n );\n\n return {\n isScrolling: true,\n horizontalScrollDirection:\n prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection:\n prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _outerRefSetter = (ref: any): void => {\n const { outerRef } = this.props;\n\n this._outerRef = ((ref: any): HTMLDivElement);\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (\n outerRef != null &&\n typeof outerRef === 'object' &&\n outerRef.hasOwnProperty('current')\n ) {\n outerRef.current = ref;\n }\n };\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n );\n };\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null;\n\n this.setState({ isScrolling: false }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this._getItemStyleCache(-1);\n });\n };\n };\n}\n\nconst validateSharedProps = (\n {\n children,\n direction,\n height,\n innerTagName,\n outerTagName,\n overscanColumnsCount,\n overscanCount,\n overscanRowsCount,\n width,\n }: Props<any>,\n { instance }: State\n): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn(\n 'The overscanCount prop has been deprecated. ' +\n 'Please use the overscanColumnCount and overscanRowCount props instead.'\n );\n }\n }\n\n if (\n typeof overscanColumnsCount === 'number' ||\n typeof overscanRowsCount === 'number'\n ) {\n if (\n devWarningsOverscanRowsColumnsCount &&\n !devWarningsOverscanRowsColumnsCount.has(instance)\n ) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn(\n 'The overscanColumnsCount and overscanRowsCount props have been deprecated. ' +\n 'Please use the overscanColumnCount and overscanRowCount props instead.'\n );\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn(\n 'The innerTagName and outerTagName props have been deprecated. ' +\n 'Please use the innerElementType and outerElementType props instead.'\n );\n }\n }\n\n if (children == null) {\n throw Error(\n 'An invalid \"children\" prop has been specified. ' +\n 'Value should be a React component. ' +\n `\"${children === null ? 'null' : typeof children}\" was specified.`\n );\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"direction\" prop has been specified. ' +\n 'Value should be either \"ltr\" or \"rtl\". ' +\n `\"${direction}\" was specified.`\n );\n }\n\n if (typeof width !== 'number') {\n throw Error(\n 'An invalid \"width\" prop has been specified. ' +\n 'Grids must specify a number for width. ' +\n `\"${width === null ? 'null' : typeof width}\" was specified.`\n );\n }\n\n if (typeof height !== 'number') {\n throw Error(\n 'An invalid \"height\" prop has been specified. ' +\n 'Grids must specify a number for height. ' +\n `\"${height === null ? 'null' : typeof height}\" was specified.`\n );\n }\n }\n};\n","// @flow\n\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport { cancelTimeout, requestTimeout } from './timer';\nimport { getScrollbarSize, getRTLOffsetType } from './domHelpers';\n\nimport type { TimeoutID } from './timer';\n\nexport type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end';\n\ntype itemSize = number | ((index: number) => number);\n// TODO Deprecate directions \"horizontal\" and \"vertical\"\ntype Direction = 'ltr' | 'rtl' | 'horizontal' | 'vertical';\ntype Layout = 'horizontal' | 'vertical';\n\ntype RenderComponentProps<T> = {|\n data: T,\n index: number,\n isScrolling?: boolean,\n style: Object,\n|};\ntype RenderComponent<T> = React$ComponentType<$Shape<RenderComponentProps<T>>>;\n\ntype ScrollDirection = 'forward' | 'backward';\n\ntype onItemsRenderedCallback = ({\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number,\n}) => void;\ntype onScrollCallback = ({\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean,\n}) => void;\n\ntype ScrollEvent = SyntheticEvent<HTMLDivElement>;\ntype ItemStyleCache = { [index: number]: Object };\n\ntype OuterProps = {|\n children: React$Node,\n className: string | void,\n onScroll: ScrollEvent => void,\n style: {\n [string]: mixed,\n },\n|};\n\ntype InnerProps = {|\n children: React$Node,\n style: {\n [string]: mixed,\n },\n|};\n\nexport type Props<T> = {|\n children: RenderComponent<T>,\n className?: string,\n direction: Direction,\n height: number | string,\n initialScrollOffset?: number,\n innerRef?: any,\n innerElementType?: string | React$AbstractComponent<InnerProps, any>,\n innerTagName?: string, // deprecated\n itemCount: number,\n itemData: T,\n itemKey?: (index: number, data: T) => any,\n itemSize: itemSize,\n layout: Layout,\n onItemsRendered?: onItemsRenderedCallback,\n onScroll?: onScrollCallback,\n outerRef?: any,\n outerElementType?: string | React$AbstractComponent<OuterProps, any>,\n outerTagName?: string, // deprecated\n overscanCount: number,\n style?: Object,\n useIsScrolling: boolean,\n width: number | string,\n|};\n\ntype State = {|\n instance: any,\n isScrolling: boolean,\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean,\n|};\n\ntype GetItemOffset = (\n props: Props<any>,\n index: number,\n instanceProps: any\n) => number;\ntype GetItemSize = (\n props: Props<any>,\n index: number,\n instanceProps: any\n) => number;\ntype GetEstimatedTotalSize = (props: Props<any>, instanceProps: any) => number;\ntype GetOffsetForIndexAndAlignment = (\n props: Props<any>,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype GetStartIndexForOffset = (\n props: Props<any>,\n offset: number,\n instanceProps: any\n) => number;\ntype GetStopIndexForStartIndex = (\n props: Props<any>,\n startIndex: number,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype InitInstanceProps = (props: Props<any>, instance: any) => any;\ntype ValidateProps = (props: Props<any>) => void;\n\nconst IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nconst defaultItemKey = (index: number, data: any) => index;\n\n// In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\nlet devWarningsDirection = null;\nlet devWarningsTagName = null;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = new WeakSet();\n devWarningsTagName = new WeakSet();\n }\n}\n\nexport default function createListComponent({\n getItemOffset,\n getEstimatedTotalSize,\n getItemSize,\n getOffsetForIndexAndAlignment,\n getStartIndexForOffset,\n getStopIndexForStartIndex,\n initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange,\n validateProps,\n}: {|\n getItemOffset: GetItemOffset,\n getEstimatedTotalSize: GetEstimatedTotalSize,\n getItemSize: GetItemSize,\n getOffsetForIndexAndAlignment: GetOffsetForIndexAndAlignment,\n getStartIndexForOffset: GetStartIndexForOffset,\n getStopIndexForStartIndex: GetStopIndexForStartIndex,\n initInstanceProps: InitInstanceProps,\n shouldResetStyleCacheOnItemSizeChange: boolean,\n validateProps: ValidateProps,\n|}) {\n return class List<T> extends PureComponent<Props<T>, State> {\n _instanceProps: any = initInstanceProps(this.props, this);\n _outerRef: ?HTMLDivElement;\n _resetIsScrollingTimeoutId: TimeoutID | null = null;\n\n static defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false,\n };\n\n state: State = {\n instance: this,\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset:\n typeof this.props.initialScrollOffset === 'number'\n ? this.props.initialScrollOffset\n : 0,\n scrollUpdateWasRequested: false,\n };\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n constructor(props: Props<T>) {\n super(props);\n }\n\n static getDerivedStateFromProps(\n nextProps: Props<T>,\n prevState: State\n ): $Shape<State> | null {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n }\n\n scrollTo(scrollOffset: number): void {\n scrollOffset = Math.max(0, scrollOffset);\n\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n return {\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true,\n };\n }, this._resetIsScrollingDebounced);\n }\n\n scrollToItem(index: number, align: ScrollToAlign = 'auto'): void {\n const { itemCount, layout } = this.props;\n const { scrollOffset } = this.state;\n\n index = Math.max(0, Math.min(index, itemCount - 1));\n\n // The scrollbar size should be considered when scrolling an item into view, to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n // This is an edge case for lists; normally they only scroll in the dominant direction.\n let scrollbarSize = 0;\n if (this._outerRef) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (layout === 'vertical') {\n scrollbarSize =\n outerRef.scrollWidth > outerRef.clientWidth\n ? getScrollbarSize()\n : 0;\n } else {\n scrollbarSize =\n outerRef.scrollHeight > outerRef.clientHeight\n ? getScrollbarSize()\n : 0;\n }\n }\n\n this.scrollTo(\n getOffsetForIndexAndAlignment(\n this.props,\n index,\n align,\n scrollOffset,\n this._instanceProps,\n scrollbarSize\n )\n );\n }\n\n componentDidMount() {\n const { direction, initialScrollOffset, layout } = this.props;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n // TODO Deprecate direction \"horizontal\"\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentDidUpdate() {\n const { direction, layout } = this.props;\n const { scrollOffset, scrollUpdateWasRequested } = this.state;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n\n // TODO Deprecate direction \"horizontal\"\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n default:\n const { clientWidth, scrollWidth } = outerRef;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n }\n\n render() {\n const {\n children,\n className,\n direction,\n height,\n innerRef,\n innerElementType,\n innerTagName,\n itemCount,\n itemData,\n itemKey = defaultItemKey,\n layout,\n outerElementType,\n outerTagName,\n style,\n useIsScrolling,\n width,\n } = this.props;\n const { isScrolling } = this.state;\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal =\n direction === 'horizontal' || layout === 'horizontal';\n\n const onScroll = isHorizontal\n ? this._onScrollHorizontal\n : this._onScrollVertical;\n\n const [startIndex, stopIndex] = this._getRangeToRender();\n\n const items = [];\n if (itemCount > 0) {\n for (let index = startIndex; index <= stopIndex; index++) {\n items.push(\n createElement(children, {\n data: itemData,\n key: itemKey(index, itemData),\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(index),\n })\n );\n }\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalSize = getEstimatedTotalSize(\n this.props,\n this._instanceProps\n );\n\n return createElement(\n outerElementType || outerTagName || 'div',\n {\n className,\n onScroll,\n ref: this._outerRefSetter,\n style: {\n position: 'relative',\n height,\n width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction,\n ...style,\n },\n },\n createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%',\n },\n })\n );\n }\n\n _callOnItemsRendered: (\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number\n ) => void;\n _callOnItemsRendered = memoizeOne(\n (\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number\n ) =>\n ((this.props.onItemsRendered: any): onItemsRenderedCallback)({\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex,\n })\n );\n\n _callOnScroll: (\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n _callOnScroll = memoizeOne(\n (\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean\n ) =>\n ((this.props.onScroll: any): onScrollCallback)({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n })\n );\n\n _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n const { itemCount } = this.props;\n if (itemCount > 0) {\n const [\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex,\n ] = this._getRangeToRender();\n this._callOnItemsRendered(\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n );\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n const {\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n } = this.state;\n this._callOnScroll(\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n );\n }\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getItemStyle: (index: number) => Object;\n _getItemStyle = (index: number): Object => {\n const { direction, itemSize, layout } = this.props;\n\n const itemStyleCache = this._getItemStyleCache(\n shouldResetStyleCacheOnItemSizeChange && itemSize,\n shouldResetStyleCacheOnItemSizeChange && layout,\n shouldResetStyleCacheOnItemSizeChange && direction\n );\n\n let style;\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n const offset = getItemOffset(this.props, index, this._instanceProps);\n const size = getItemSize(this.props, index, this._instanceProps);\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal =\n direction === 'horizontal' || layout === 'horizontal';\n\n const isRtl = direction === 'rtl';\n const offsetHorizontal = isHorizontal ? offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%',\n };\n }\n\n return style;\n };\n\n _getItemStyleCache: (_: any, __: any, ___: any) => ItemStyleCache;\n _getItemStyleCache = memoizeOne((_: any, __: any, ___: any) => ({}));\n\n _getRangeToRender(): [number, number, number, number] {\n const { itemCount, overscanCount } = this.props;\n const { isScrolling, scrollDirection, scrollOffset } = this.state;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getStartIndexForOffset(\n this.props,\n scrollOffset,\n this._instanceProps\n );\n const stopIndex = getStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollOffset,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || scrollDirection === 'backward'\n ? Math.max(1, overscanCount)\n : 1;\n const overscanForward =\n !isScrolling || scrollDirection === 'forward'\n ? Math.max(1, overscanCount)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _onScrollHorizontal = (event: ScrollEvent): void => {\n const { clientWidth, scrollLeft, scrollWidth } = event.currentTarget;\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n const { direction } = this.props;\n\n let scrollOffset = scrollLeft;\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n scrollOffset = Math.max(\n 0,\n Math.min(scrollOffset, scrollWidth - clientWidth)\n );\n\n return {\n isScrolling: true,\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _onScrollVertical = (event: ScrollEvent): void => {\n const { clientHeight, scrollHeight, scrollTop } = event.currentTarget;\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n const scrollOffset = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n );\n\n return {\n isScrolling: true,\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _outerRefSetter = (ref: any): void => {\n const { outerRef } = this.props;\n\n this._outerRef = ((ref: any): HTMLDivElement);\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (\n outerRef != null &&\n typeof outerRef === 'object' &&\n outerRef.hasOwnProperty('current')\n ) {\n outerRef.current = ref;\n }\n };\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n );\n };\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null;\n\n this.setState({ isScrolling: false }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this._getItemStyleCache(-1, null);\n });\n };\n };\n}\n\n// NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nconst validateSharedProps = (\n {\n children,\n direction,\n height,\n layout,\n innerTagName,\n outerTagName,\n width,\n }: Props<any>,\n { instance }: State\n): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn(\n 'The innerTagName and outerTagName props have been deprecated. ' +\n 'Please use the innerElementType and outerElementType props instead.'\n );\n }\n }\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn(\n 'The direction prop should be either \"ltr\" (default) or \"rtl\". ' +\n 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.'\n );\n }\n break;\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"direction\" prop has been specified. ' +\n 'Value should be either \"ltr\" or \"rtl\". ' +\n `\"${direction}\" was specified.`\n );\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"layout\" prop has been specified. ' +\n 'Value should be either \"horizontal\" or \"vertical\". ' +\n `\"${layout}\" was specified.`\n );\n }\n\n if (children == null) {\n throw Error(\n 'An invalid \"children\" prop has been specified. ' +\n 'Value should be a React component. ' +\n `\"${children === null ? 'null' : typeof children}\" was specified.`\n );\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error(\n 'An invalid \"width\" prop has been specified. ' +\n 'Horizontal lists must specify a number for width. ' +\n `\"${width === null ? 'null' : typeof width}\" was specified.`\n );\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error(\n 'An invalid \"height\" prop has been specified. ' +\n 'Vertical lists must specify a number for height. ' +\n `\"${height === null ? 'null' : typeof height}\" was specified.`\n );\n }\n }\n};\n","// @flow\n\nimport createListComponent from './createListComponent';\n\nimport type { Props, ScrollToAlign } from './createListComponent';\n\nconst DEFAULT_ESTIMATED_ITEM_SIZE = 50;\n\ntype VariableSizeProps = {|\n estimatedItemSize: number,\n ...Props<any>,\n|};\n\ntype itemSizeGetter = (index: number) => number;\n\ntype ItemMetadata = {|\n offset: number,\n size: number,\n|};\ntype InstanceProps = {|\n itemMetadataMap: { [index: number]: ItemMetadata },\n estimatedItemSize: number,\n lastMeasuredIndex: number,\n|};\n\nconst getItemMetadata = (\n props: Props<any>,\n index: number,\n instanceProps: InstanceProps\n): ItemMetadata => {\n const { itemSize } = ((props: any): VariableSizeProps);\n const { itemMetadataMap, lastMeasuredIndex } = instanceProps;\n\n if (index > lastMeasuredIndex) {\n let offset = 0;\n if (lastMeasuredIndex >= 0) {\n const itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (let i = lastMeasuredIndex + 1; i <= index; i++) {\n let size = ((itemSize: any): itemSizeGetter)(i);\n\n itemMetadataMap[i] = {\n offset,\n size,\n };\n\n offset += size;\n }\n\n instanceProps.lastMeasuredIndex = index;\n }\n\n return itemMetadataMap[index];\n};\n\nconst findNearestItem = (\n props: Props<any>,\n instanceProps: InstanceProps,\n offset: number\n) => {\n const { itemMetadataMap, lastMeasuredIndex } = instanceProps;\n\n const lastMeasuredItemOffset =\n lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch(\n props,\n instanceProps,\n lastMeasuredIndex,\n 0,\n offset\n );\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch(\n props,\n instanceProps,\n Math.max(0, lastMeasuredIndex),\n offset\n );\n }\n};\n\nconst findNearestItemBinarySearch = (\n props: Props<any>,\n instanceProps: InstanceProps,\n high: number,\n low: number,\n offset: number\n): number => {\n while (low <= high) {\n const middle = low + Math.floor((high - low) / 2);\n const currentOffset = getItemMetadata(props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nconst findNearestItemExponentialSearch = (\n props: Props<any>,\n instanceProps: InstanceProps,\n index: number,\n offset: number\n): number => {\n const { itemCount } = props;\n let interval = 1;\n\n while (\n index < itemCount &&\n getItemMetadata(props, index, instanceProps).offset < offset\n ) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch(\n props,\n instanceProps,\n Math.min(index, itemCount - 1),\n Math.floor(index / 2),\n offset\n );\n};\n\nconst getEstimatedTotalSize = (\n { itemCount }: Props<any>,\n { itemMetadataMap, estimatedItemSize, lastMeasuredIndex }: InstanceProps\n) => {\n let totalSizeOfMeasuredItems = 0;\n\n // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n if (lastMeasuredIndex >= itemCount) {\n lastMeasuredIndex = itemCount - 1;\n }\n\n if (lastMeasuredIndex >= 0) {\n const itemMetadata = itemMetadataMap[lastMeasuredIndex];\n totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;\n }\n\n const numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;\n const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\n\nconst VariableSizeList = createListComponent({\n getItemOffset: (\n props: Props<any>,\n index: number,\n instanceProps: InstanceProps\n ): number => getItemMetadata(props, index, instanceProps).offset,\n\n getItemSize: (\n props: Props<any>,\n index: number,\n instanceProps: InstanceProps\n ): number => instanceProps.itemMetadataMap[index].size,\n\n getEstimatedTotalSize,\n\n getOffsetForIndexAndAlignment: (\n props: Props<any>,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: InstanceProps,\n scrollbarSize: number\n ): number => {\n const { direction, height, layout, width } = props;\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n const size = (((isHorizontal ? width : height): any): number);\n const itemMetadata = getItemMetadata(props, index, instanceProps);\n\n // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n const estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);\n\n const maxOffset = Math.max(\n 0,\n Math.min(estimatedTotalSize - size, itemMetadata.offset)\n );\n const minOffset = Math.max(\n 0,\n itemMetadata.offset - size + itemMetadata.size + scrollbarSize\n );\n\n if (align === 'smart') {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n case 'end':\n return minOffset;\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n },\n\n getStartIndexForOffset: (\n props: Props<any>,\n offset: number,\n instanceProps: InstanceProps\n ): number => findNearestItem(props, instanceProps, offset),\n\n getStopIndexForStartIndex: (\n props: Props<any>,\n startIndex: number,\n scrollOffset: number,\n instanceProps: InstanceProps\n ): number => {\n const { direction, height, itemCount, layout, width } = props;\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n const size = (((isHorizontal ? width : height): any): number);\n const itemMetadata = getItemMetadata(props, startIndex, instanceProps);\n const maxOffset = scrollOffset + size;\n\n let offset = itemMetadata.offset + itemMetadata.size;\n let stopIndex = startIndex;\n\n while (stopIndex < itemCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata(props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n\n initInstanceProps(props: Props<any>, instance: any): InstanceProps {\n const { estimatedItemSize } = ((props: any): VariableSizeProps);\n\n const instanceProps = {\n itemMetadataMap: {},\n estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE,\n lastMeasuredIndex: -1,\n };\n\n instance.resetAfterIndex = (\n index: number,\n shouldForceUpdate?: boolean = true\n ) => {\n instanceProps.lastMeasuredIndex = Math.min(\n instanceProps.lastMeasuredIndex,\n index - 1\n );\n\n // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n\n shouldResetStyleCacheOnItemSizeChange: false,\n\n validateProps: ({ itemSize }: Props<any>): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'function') {\n throw Error(\n 'An invalid \"itemSize\" prop has been specified. ' +\n 'Value should be a function. ' +\n `\"${itemSize === null ? 'null' : typeof itemSize}\" was specified.`\n );\n }\n }\n },\n});\n\nexport default VariableSizeList;\n","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport React from 'react';\nimport { VariableSizeList } from 'react-window';\nimport Tree, { createTreeComputer } from './Tree';\nimport { createBasicRecord, getIdByIndex } from './utils';\nvar computeTree = createTreeComputer({\n createRecord: function createRecord(data, _ref, parent, previousRecord) {\n var recomputeTree = _ref.recomputeTree,\n resetAfterId = _ref.resetAfterId;\n var record = createBasicRecord({\n data: data,\n height: previousRecord ? previousRecord.public.height : data.defaultHeight,\n isOpen: previousRecord ? previousRecord.public.isOpen : data.isOpenByDefault,\n resize: function resize(height, shouldForceUpdate) {\n record.public.height = height;\n resetAfterId(record.public.data.id, shouldForceUpdate);\n },\n setOpen: function setOpen(state) {\n var _recomputeTree;\n\n return recomputeTree((_recomputeTree = {}, _recomputeTree[data.id] = state, _recomputeTree));\n }\n }, parent);\n return record;\n }\n});\nexport var VariableSizeTree = /*#__PURE__*/function (_Tree) {\n _inheritsLoose(VariableSizeTree, _Tree);\n\n function VariableSizeTree(props, context) {\n var _this;\n\n _this = _Tree.call(this, props, context) || this;\n _this.getItemSize = _this.getItemSize.bind(_assertThisInitialized(_this));\n _this.state = _extends({}, _this.state, {\n computeTree: computeTree,\n resetAfterId: _this.resetAfterId.bind(_assertThisInitialized(_this))\n });\n return _this;\n }\n\n var _proto = VariableSizeTree.prototype;\n\n _proto.resetAfterId = function resetAfterId(id, shouldForceUpdate) {\n var _list$current;\n\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = false;\n }\n\n var _this$state = this.state,\n list = _this$state.list,\n order = _this$state.order;\n (_list$current = list.current) == null ? void 0 : _list$current.resetAfterIndex(order.indexOf(id), shouldForceUpdate);\n };\n\n _proto.recomputeTree = function recomputeTree(state) {\n var _this2 = this;\n\n return _Tree.prototype.recomputeTree.call(this, state).then(function () {\n var _this2$state$list$cur;\n\n (_this2$state$list$cur = _this2.state.list.current) == null ? void 0 : _this2$state$list$cur.resetAfterIndex(0, true);\n });\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n placeholder = _this$props.placeholder,\n itemSize = _this$props.itemSize,\n rowComponent = _this$props.rowComponent,\n treeWalker = _this$props.treeWalker,\n rest = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"placeholder\", \"itemSize\", \"rowComponent\", \"treeWalker\"]);\n\n var _this$state2 = this.state,\n attachRefs = _this$state2.attachRefs,\n order = _this$state2.order;\n return placeholder && order.length === 0 ? placeholder : /*#__PURE__*/React.createElement(VariableSizeList, Object.assign({}, rest, {\n itemCount: order.length,\n itemData: this.getItemData() // eslint-disable-next-line @typescript-eslint/unbound-method\n ,\n itemKey: getIdByIndex // eslint-disable-next-line @typescript-eslint/unbound-method\n ,\n itemSize: itemSize != null ? itemSize : this.getItemSize // eslint-disable-next-line @typescript-eslint/unbound-method\n ,\n ref: attachRefs\n }), rowComponent);\n };\n\n _proto.getItemSize = function getItemSize(index) {\n return this.getRecordData(index).height;\n };\n\n return VariableSizeTree;\n}(Tree);"],"names":["d","BadgeRoot","styled","name","slot","overridesResolver","props","styles","root","position","display","verticalAlign","flexShrink","BadgeBadge","ownerState","badge","variant","capitalize","anchorOrigin","vertical","horizontal","overlap","color","invisible","memoTheme","theme","flexDirection","flexWrap","justifyContent","alignContent","alignItems","boxSizing","fontFamily","typography","fontWeight","fontWeightMedium","fontSize","pxToRem","minWidth","RADIUS_STANDARD","lineHeight","padding","height","borderRadius","zIndex","transition","transitions","create","easing","easeInOut","duration","enteringScreen","variants","Object","entries","palette","filter","createSimplePaletteValueFilter","map","style","backgroundColor","vars","main","contrastText","RADIUS_DOT","top","right","transform","transformOrigin","badgeClasses","bottom","left","leavingScreen","inProps","ref","anchorOriginProp","className","classes","classesProp","component","components","componentsProps","children","overlapProp","colorProp","invisibleProp","max","maxProp","badgeContent","badgeContentProp","slots","slotProps","showZero","variantProp","other","invisibleFromHook","displayValue","displayValueFromHook","parameters","prevProps","usePreviousProps","Number","undefined","composeClasses","useUtilityClasses","RootSlot","Root","BadgeSlot","Badge","rootSlotProps","badgeSlotProps","rootProps","useSlotProps","elementType","externalSlotProps","externalForwardedProps","additionalProps","as","clsx","badgeProps","getBadgeUtilityClass","FabRoot","shouldForwardProp","prop","size","colorInherit","button","minHeight","short","width","fab","boxShadow","shadows","text","primary","getContrastText","grey","A100","textDecoration","focusVisible","dark","disabled","action","disabledBackground","disableFocusRipple","focusVisibleClassName","composedClasses","focusRipple","getFabUtilityClass","windowObject","window","self","g","cancelFrame","requestFrame","clearTimeoutFn","clearTimeout","setTimeoutFn","setTimeout","cancelAnimationFrameFn","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","requestAnimationFrameFn","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","callback","animationFrameID","timeoutID","AutoSizer","Component","constructor","args","super","this","state","defaultHeight","scaledHeight","scaledWidth","defaultWidth","_autoSizer","_detectElementResize","_parentNode","_resizeObserver","_timeoutId","_onResize","disableHeight","disableWidth","onResize","getComputedStyle","paddingLeft","parseFloat","paddingRight","paddingTop","paddingBottom","rect","getBoundingClientRect","offsetHeight","offsetWidth","setState","_setRef","autoSizer","componentDidMount","nonce","parentNode","ownerDocument","defaultView","HTMLElement","ResizeObserverInstance","ResizeObserver","observe","animationKeyframes","animationName","animationStartEvent","animationStyle","checkTriggers","resetTriggers","scrollListener","attachEvent","document","element","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","scrollHeight","__resizeLast__","e","target","indexOf","__resizeRAF__","__resizeListeners__","forEach","fn","call","animation","keyframeprefix","domPrefixes","split","startEvents","pfx","elm","createElement","i","length","toLowerCase","addResizeListener","doc","elementStyle","getElementById","css","head","getElementsByTagName","id","type","setAttribute","styleSheet","cssText","appendChild","createTextNode","createStyles","expandTrigger","contractTrigger","addEventListener","__animationListener__","push","removeResizeListener","detachEvent","splice","removeEventListener","removeChild","createDetectElementResize","componentWillUnmount","disconnect","render","doNotBailOutOnEmptyChildren","tagName","rest","outerStyle","overflow","childParams","bailoutOnChildren","noop","createBasicRecord","pub","parent","child","isShown","public","isOpen","sibling","visited","index","_ref","getRecordData","data","createTreeComputer","creatorOptions","options","refresh","_ref2","_ref3","createRecord","buildingTaskTimeout","placeholder","_ref3$async","async","treeWalker","shouldPreservePreviousState","records","previousRecords","order","Map","requestIdleCallbackOptions","timeout","meta","WeakMap","iter","next","value","rootRecord","get","set","currentRecord","isTraversingRoot","tempRecord","useIdleCallback","hasTime","deadline","timeRemaining","task","requestIdleCallback","childRecord","updateRequest","generateNewTree","_ref4","_ref5","opennessState","has","opts","ownerRecord","_ref6","open","_ref6$subtreeCallback","subtreeCallback","update","apply","recordNextToSubtree","countToRemove","orderParts","record","currentOrderPart","MAX_FUNCTION_ARGUMENTS","_ref7","count","updateExistingTree","_PureComponent","Tree","context","_this","bind","list","createRef","recomputeTree","getDerivedStateFromProps","refs","_props$listRef","listRef","computeTree","oldTreeWalker","attachRefs","current","_proto","prototype","getItemData","_this$props","treeData","itemData","_this$state","_this2","Promise","resolve","prevState","scrollTo","scrollOffset","_this$state$list$curr","scrollToItem","align","_this$state$list$curr2","PureComponent","defaultProps","rowComponent","_ref$data","Node","isScrolling","assign","previousRecord","isOpenByDefault","setOpen","_recomputeTree","safeIsNaN","isNaN","areInputsEqual","newInputs","lastInputs","first","second","resultFn","isEqual","lastThis","lastResult","lastArgs","calledOnce","newArgs","_i","arguments","now","performance","Date","cancelTimeout","getScrollbarSize","recalculate","div","body","clientWidth","cachedRTLResult","getRTLOffsetType","outerDiv","direction","innerDiv","innerStyle","defaultItemKey","createListComponent","getItemOffset","getEstimatedTotalSize","getItemSize","getOffsetForIndexAndAlignment","getStartIndexForOffset","getStopIndexForStartIndex","initInstanceProps","shouldResetStyleCacheOnItemSizeChange","validateProps","_instanceProps","_outerRef","_resetIsScrollingTimeoutId","instance","scrollDirection","initialScrollOffset","scrollUpdateWasRequested","_callOnItemsRendered","memoizeOne","overscanStartIndex","overscanStopIndex","visibleStartIndex","visibleStopIndex","onItemsRendered","_callOnScroll","onScroll","_getItemStyle","itemSize","layout","itemStyleCache","_getItemStyleCache","hasOwnProperty","offset","isHorizontal","isRtl","offsetHorizontal","_","__","___","_onScrollHorizontal","event","currentTarget","Math","min","_resetIsScrollingDebounced","_onScrollVertical","clientHeight","_outerRefSetter","outerRef","delay","start","_resetIsScrolling","tick","nextProps","validateSharedProps","itemCount","scrollbarSize","_callPropsCallbacks","componentDidUpdate","innerRef","innerElementType","innerTagName","itemKey","outerElementType","outerTagName","useIsScrolling","_getRangeToRender","startIndex","stopIndex","items","key","estimatedTotalSize","WebkitOverflowScrolling","willChange","pointerEvents","overscanCount","overscanBackward","overscanForward","getItemMetadata","instanceProps","itemMetadataMap","lastMeasuredIndex","itemMetadata","findNearestItemBinarySearch","high","low","middle","floor","currentOffset","estimatedItemSize","totalSizeOfMeasuredItems","VariableSizeList","maxOffset","minOffset","round","interval","findNearestItemExponentialSearch","findNearestItem","resetAfterIndex","shouldForceUpdate","forceUpdate","resetAfterId","resize","VariableSizeTree","_Tree","_list$current","then","_this2$state$list$cur","_this$state2"],"sourceRoot":""}