New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-virtuoso

Package Overview
Dependencies
Maintainers
1
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtuoso - npm Package Compare versions

Comparing version 2.8.4 to 2.8.5

850

dist/index.d.ts

@@ -1,3 +0,847 @@

export * from './components';
export * from './interfaces';
export { LogLevel } from './loggerSystem';
import { ComponentPropsWithRef } from 'react';
import { ComponentType } from 'react';
import { Key } from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
import { Ref } from 'react';
/**
* Customize the Virtuoso rendering by passing a set of custom components.
*/
export declare interface Components<Context = unknown> {
/**
* Set to render a component at the top of the list.
*
* The header remains above the top items and does not remain sticky.
*/
Header?: ComponentType<{
context?: Context;
}>;
/**
* Set to render a component at the bottom of the list.
*/
Footer?: ComponentType<{
context?: Context;
}>;
/**
* Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
*/
Item?: ComponentType<ItemProps & {
context?: Context;
}>;
/**
* Set to customize the group item wrapping element. Use only if you would like to render list from elements different than a `div`.
*/
Group?: ComponentType<GroupProps & {
context?: Context;
}>;
/**
* Set to customize the top list item wrapping element. Use if you would like to render list from elements different than a `div`
* or you want to set a custom z-index for the sticky position.
*/
TopItemList?: ComponentType<TopItemListProps & {
context?: Context;
}>;
/**
* Set to customize the outermost scrollable element. This should not be necessary in general,
* as the component passes its HTML attribute props to it.
*/
Scroller?: ComponentType<ScrollerProps & {
context?: Context;
}>;
/**
* Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
*/
List?: ComponentType<ListProps & {
context?: Context;
}>;
/**
* Set to render a custom UI when the list is empty.
*/
EmptyPlaceholder?: ComponentType<{
context?: Context;
}>;
/**
* Set to render an item placeholder when the user scrolls fast. See the `scrollSeek` property for more details.
*/
ScrollSeekPlaceholder?: ComponentType<ScrollSeekPlaceholderProps & {
context?: Context;
}>;
}
export declare interface ComputeItemKey<D, C> {
(index: number, item: D, context: C): Key;
}
export declare type FixedHeaderContent = (() => React.ReactChildren | React.ReactNode) | null;
export declare type FollowOutput = FollowOutputCallback | FollowOutputScalarType;
export declare type FollowOutputCallback = (isAtBottom: boolean) => FollowOutputScalarType;
export declare type FollowOutputScalarType = boolean | 'smooth' | 'auto';
export declare interface GridComponents<Context = any> {
/**
* Set to customize the item wrapping element. Use only if you would like to render list from elements different than a `div`.
*/
Item?: ComponentType<GridItem & {
context?: Context;
}>;
/**
* Set to customize the outermost scrollable element. This should not be necessary in general,
* as the component passes its HTML attribute props to it.
*/
Scroller?: ComponentType<ScrollerProps & {
context?: Context;
}>;
/**
* Set to customize the items wrapper. Use only if you would like to render list from elements different than a `div`.
*/
List?: ComponentType<GridListProps & {
context?: Context;
}>;
/**
* Set to render an item placeholder when the user scrolls fast.
* See the `scrollSeekConfiguration` property for more details.
*/
ScrollSeekPlaceholder?: ComponentType<GridScrollSeekPlaceholderProps & {
context?: Context;
}>;
}
export declare interface GridComputeItemKey {
(index: number): Key;
}
export declare interface GridItem {
'data-index': number;
className?: string;
}
export declare interface GridItemContent<C> {
(index: number, context: C): ReactNode;
}
/**
* Passed to the Components.List custom component
*/
export declare type GridListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'ref' | 'className'>;
export declare type GridRootProps = Omit<React.HTMLProps<'div'>, 'ref' | 'data'>;
/**
* Passed to the GridComponents.ScrollSeekPlaceholder custom component
*/
export declare interface GridScrollSeekPlaceholderProps {
index: number;
height: number;
width: number;
}
export declare interface GroupContent {
(index: number): ReactNode;
}
export declare const GroupedVirtuoso: <ItemData extends unknown = any, Context extends unknown = any>(props: GroupedVirtuosoProps<ItemData, Context> & {
ref?: Ref<GroupedVirtuosoHandle> | undefined;
}) => ReactElement;
export declare interface GroupedVirtuosoHandle {
scrollToIndex(location: number | IndexLocationWithAlign): void;
scrollTo(location: ScrollToOptions): void;
scrollBy(location: ScrollToOptions): void;
}
export declare interface GroupedVirtuosoProps<D, C> extends Omit<VirtuosoProps<D, C>, 'totalCount' | 'itemContent'> {
/**
* Specifies the amount of items in each group (and, actually, how many groups are there).
* For example, passing [20, 30] will display 2 groups with 20 and 30 items each.
*/
groupCounts?: number[];
/**
* Specifies how each each group header gets rendered. The callback receives the zero-based index of the group.
*/
groupContent?: GroupContent;
/**
* Specifies how each each item gets rendered.
*/
itemContent?: GroupItemContent<D, C>;
}
export declare interface GroupItem<D> extends Item<D> {
type: 'group';
originalIndex?: number;
}
export declare interface GroupItemContent<D, C> {
(index: number, groupIndex: number, data: D, context: C): ReactNode;
}
export declare interface GroupProps {
'data-index': number;
'data-item-index': number;
'data-known-size': number;
}
export declare interface IndexLocationWithAlign {
/**
* The index of the item to scroll to.
*/
index: number | 'LAST';
/**
* How to position the item in the viewport.
*/
align?: 'start' | 'center' | 'end';
/**
* Set 'smooth' to have an animated transition to the specified location.
*/
behavior?: 'smooth' | 'auto';
/**
* The offset to scroll.
*/
offset?: number;
}
export declare interface Item<D> {
index: number;
offset: number;
size: number;
data?: D;
}
export declare interface ItemContent<D, C> {
(index: number, data: D, context: C): ReactNode;
}
export declare interface ItemProps {
'data-index': number;
'data-item-index': number;
'data-item-group-index'?: number;
'data-known-size': number;
}
export declare type ListItem<D> = RecordItem<D> | GroupItem<D>;
/**
* Passed to the Components.List custom component
*/
export declare type ListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'ref'> & {
'data-test-id': string;
};
export declare interface ListRange {
startIndex: number;
endIndex: number;
}
export declare type ListRootProps = Omit<React.HTMLProps<'div'>, 'ref' | 'data'>;
export declare enum LogLevel {
DEBUG = 0,
INFO = 1,
WARN = 2,
ERROR = 3
}
export declare interface RecordItem<D> extends Item<D> {
type?: undefined;
groupIndex?: number;
originalIndex?: number;
data?: D;
}
/**
* Passed to the Components.Scroller custom component
*/
export declare type ScrollerProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'tabIndex' | 'ref'> & {
'data-test-id'?: string;
'data-virtuoso-scroller'?: boolean;
};
export declare interface ScrollIntoViewLocation {
index: number;
behavior?: 'auto' | 'smooth';
done?: () => void;
}
export declare interface ScrollSeekConfiguration {
/**
* Callback to determine if the list should enter "scroll seek" mode.
*/
enter: ScrollSeekToggle;
/**
* called during scrolling in scroll seek mode - use to display a hint where the list is.
*/
change?: (velocity: number, range: ListRange) => void;
/**
* Callback to determine if the list should enter "scroll seek" mode.
*/
exit: ScrollSeekToggle;
}
/**
* Passed to the Components.ScrollSeekPlaceholder custom component
*/
export declare interface ScrollSeekPlaceholderProps {
index: number;
height: number;
groupIndex?: number;
type: 'group' | 'item';
}
export declare interface ScrollSeekToggle {
(velocity: number, range: ListRange): boolean;
}
/**
* Passed to the Components.TableBody custom component
*/
export declare type TableBodyProps = Pick<ComponentPropsWithRef<'tbody'>, 'style' | 'children' | 'ref' | 'className'> & {
'data-test-id': string;
};
/**
* Customize the TableVirtuoso rendering by passing a set of custom components.
*/
export declare interface TableComponents<Context = unknown> {
/**
* Set to customize the wrapping `table` element.
*
*/
Table?: ComponentType<TableProps & {
context?: Context;
}>;
/**
* Set to render a fixed header at the top of the table (`thead`). use [[fixedHeaderHeight]] to set the contents
*
*/
TableHead?: ComponentType<{
context?: Context;
}>;
/**
* Set to customize the item wrapping element. Default is `tr`.
*/
TableRow?: ComponentType<ItemProps & {
context?: Context;
}>;
/**
* Set to customize the outermost scrollable element. This should not be necessary in general,
* as the component passes its HTML attribute props to it.
*/
Scroller?: ComponentType<ScrollerProps & {
context?: Context;
}>;
/**
* Set to customize the items wrapper. Default is `tbody`.
*/
TableBody?: ComponentType<TableBodyProps & {
context?: Context;
}>;
/**
* Set to render a custom UI when the list is empty.
*/
EmptyPlaceholder?: ComponentType<{
context?: Context;
}>;
/**
* Set to render an item placeholder when the user scrolls fast. See the `scrollSeek` property for more details.
*/
ScrollSeekPlaceholder?: ComponentType<ScrollSeekPlaceholderProps & {
context?: Context;
}>;
}
export declare type TableProps = Pick<ComponentPropsWithRef<'table'>, 'style'>;
export declare type TableRootProps = Omit<React.HTMLProps<'table'>, 'ref' | 'data'>;
export declare const TableVirtuoso: <ItemData extends unknown = any, Context extends unknown = any>(props: TableVirtuosoProps<ItemData, Context> & {
ref?: Ref<TableVirtuosoHandle> | undefined;
}) => ReactElement;
export declare interface TableVirtuosoHandle {
scrollIntoView(location: ScrollIntoViewLocation): void;
scrollToIndex(location: number | IndexLocationWithAlign): void;
scrollTo(location: ScrollToOptions): void;
scrollBy(location: ScrollToOptions): void;
}
export declare interface TableVirtuosoProps<D, C> extends Omit<VirtuosoProps<D, C>, 'components' | 'headerFooterTag' | 'topItemCount'> {
/**
* Use the `components` property for advanced customization of the elements rendered by the table.
*/
components?: TableComponents<C>;
/**
* Set the contents of the table header.
*/
fixedHeaderContent?: FixedHeaderContent;
/**
* The total amount of items to be rendered.
*/
totalCount?: number;
/**
* The data items to be rendered. If data is set, the total count will be inferred from the length of the array.
*/
data?: readonly D[];
/**
* Set the overscan property to make the component "chunk" the rendering of new items on scroll.
* The property causes the component to render more items than the necessary, but reduces the re-renders on scroll.
* Setting `{ main: number, reverse: number }` lets you extend the list in both the main and the reverse scrollable directions.
* See the `increaseViewportBy` property for a similar behavior (equivalent to the `overscan` in `react-window`).
*/
overscan?: number | {
main: number;
reverse: number;
};
/**
* Set the increaseViewportBy property to artificially increase the viewport size, causing items to be rendered before outside of the viewport.
* The property causes the component to render more items than the necessary, but can help with slow loading content.
* Using `{ top?: number, bottom?: number }` lets you set the increase for each end separately.
*/
increaseViewportBy?: number | {
top: number;
bottom: number;
};
/**
* Set to a value between 0 and totalCount - 1 to make the list start scrolled to that item.
*/
initialTopMostItemIndex?: number;
/**
* Set this value to offset the initial location of the list.
* Warning: using this property will still run a render cycle at the scrollTop: 0 list window.
* If possible, avoid using it and stick to `initialTopMostItemIndex` instead.
*/
initialScrollTop?: number;
/**
* Use for server-side rendering - if set, the list will render the specified amount of items
* regardless of the container / item size.
*/
initialItemCount?: number;
/**
* Set the callback to specify the contents of the item.
*/
itemContent?: ItemContent<D, C>;
/**
* If specified, the component will use the function to generate the `key` property for each list item.
*/
computeItemKey?: ComputeItemKey<D, C>;
/**
* By default, the component assumes the default item height from the first rendered item (rendering it as a "probe").
*
* If the first item turns out to be an outlier (very short or tall), the rest of the rendering will be slower,
* as multiple passes of rendering should happen for the list to fill the viewport.
*
* Setting `defaultItemHeight` causes the component to skip the "probe" rendering and use the property
* value as default height instead.
*/
defaultItemHeight?: number;
/**
* Allows customizing the height/width calculation of `Item` elements.
*
* The default implementation reads `el.getBoundingClientRect().height` and `el.getBoundingClientRect().width`.
*/
itemSize?: (el: HTMLElement, field: 'offsetHeight' | 'offsetWidth') => number;
/**
* Can be used to improve performance if the rendered items are of known size.
* Setting it causes the component to skip item measurements.
*/
fixedItemHeight?: number;
/**
* Use to display placeholders if the user scrolls fast through the list.
*
* Set `components.ScrollSeekPlaceholder` to change the placeholder content.
*/
scrollSeekConfiguration?: ScrollSeekConfiguration | false;
/**
* If set to `true`, the list automatically scrolls to bottom if the total count is changed.
* Set to `"smooth"` for an animated scrolling.
*
* By default, `followOutput` scrolls down only if the list is already at the bottom.
* To implement an arbitrary logic behind that, pass a function:
*
* ```tsx
* <Virtuoso
* followOutput={(isAtBottom: boolean) => {
* if (expression) {
* return 'smooth' // can be 'auto' or false to avoid scrolling
* } else {
* return false
* }
* }} />
* ```
*/
followOutput?: FollowOutput;
/**
* Use when implementing inverse infinite scrolling - decrease the value this property
* in combination with `data` or `totalCount` to prepend items to the top of the list.
*
* Warning: the firstItemIndex should **be a positive number**, based on the total amount of items to be displayed.
*/
firstItemIndex?: number;
/**
* Called when the list starts/stops scrolling.
*/
isScrolling?: (isScrolling: boolean) => void;
/**
* Gets called when the user scrolls to the end of the list.
* Receives the last item index as an argument. Can be used to implement endless scrolling.
*/
endReached?: (index: number) => void;
/**
* Called when the user scrolls to the start of the list.
*/
startReached?: (index: number) => void;
/**
* Called with the new set of items each time the list items are rendered due to scrolling.
*/
rangeChanged?: (range: ListRange) => void;
/**
* Called with true / false when the list has reached the bottom / gets scrolled up.
* Can be used to load newer items, like `tail -f`.
*/
atBottomStateChange?: (atBottom: boolean) => void;
/**
* Called with `true` / `false` when the list has reached the top / gets scrolled down.
*/
atTopStateChange?: (atTop: boolean) => void;
/**
* Called when the total list height is changed due to new items or viewport resize.
*/
totalListHeightChanged?: (height: number) => void;
/**
* Called with the new set of items each time the list items are rendered due to scrolling.
*/
itemsRendered?: (items: ListItem<D>[]) => void;
/**
* Setting `alignToBottom` to `true` aligns the items to the bottom of the list if the list is shorter than the viewport.
* Use `followOutput` property to keep the list aligned when new items are appended.
*/
alignToBottom?: boolean;
/**
* Uses the document scroller rather than wrapping the list in its own.
*/
useWindowScroll?: boolean;
/**
* Pass a reference to a scrollable parent element, so that the table won't wrap in its own.
*/
customScrollParent?: HTMLElement;
/**
* Provides access to the root DOM element
*/
scrollerRef?: (ref: HTMLElement | Window | null) => any;
/**
* By default `4`. Redefine to change how much away from the bottom the scroller can be before the list is not considered not at bottom.
*/
atBottomThreshold?: number;
}
export declare type TopItemListProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children'>;
export declare const Virtuoso: <ItemData extends unknown = any, Context extends unknown = any>(props: VirtuosoProps<ItemData, Context> & {
ref?: Ref<VirtuosoHandle> | undefined;
}) => ReactElement;
export declare const VirtuosoGrid: <Context extends unknown = any>(props: VirtuosoGridProps<Context> & {
ref?: Ref<VirtuosoGridHandle> | undefined;
}) => ReactElement;
export declare interface VirtuosoGridHandle {
scrollToIndex(location: number | IndexLocationWithAlign): void;
scrollTo(location: ScrollToOptions): void;
scrollBy(location: ScrollToOptions): void;
}
export declare interface VirtuosoGridProps<C extends unknown = unknown> {
/**
* The total amount of items to be rendered.
*/
totalCount: number;
/**
* Set the callback to specify the contents of the item.
*/
itemContent?: GridItemContent<C>;
/**
* Use the `components` property for advanced customization of the elements rendered by the list.
*/
components?: GridComponents<C>;
/**
* Set the overscan property to make the component "chunk" the rendering of new items on scroll.
* The property causes the component to render more items than the necessary, but reduces the re-renders on scroll.
* Setting `{ main: number, reverse: number }` lets you extend the list in both the main and the reverse scrollable directions.
*/
overscan?: number | {
main: number;
reverse: number;
};
/**
* If specified, the component will use the function to generate the `key` property for each list item.
*/
computeItemKey?: GridComputeItemKey;
/**
* Use to display placeholders if the user scrolls fast through the list.
*
* Set `components.ScrollSeekPlaceholder` to change the placeholder content.
*/
scrollSeekConfiguration?: ScrollSeekConfiguration | false;
/**
* Called when the list starts/stops scrolling.
*/
isScrolling?: (isScrolling: boolean) => void;
/**
* Gets called when the user scrolls to the end of the list.
* Receives the last item index as an argument. Can be used to implement endless scrolling.
*/
endReached?: (index: number) => void;
/**
* Called when the user scrolls to the start of the list.
*/
startReached?: (index: number) => void;
/**
* Called with the new set of items each time the list items are rendered due to scrolling.
*/
rangeChanged?: (range: ListRange) => void;
/**
* Called with true / false when the list has reached the bottom / gets scrolled up.
* Can be used to load newer items, like `tail -f`.
*/
atBottomStateChange?: (atBottom: boolean) => void;
/**
* Called with `true` / `false` when the list has reached the top / gets scrolled down.
*/
atTopStateChange?: (atTop: boolean) => void;
/**
* Provides access to the root DOM element
*/
scrollerRef?: (ref: HTMLElement | null) => any;
/**
* Sets the className for the list DOM element
*/
listClassName?: string;
/**
* Sets the grid items' className
*/
itemClassName?: string;
/**
* Uses the document scroller rather than wrapping the grid in its own.
*/
useWindowScroll?: boolean;
/**
* Pass a reference to a scrollable parent element, so that the grid won't wrap in its own.
*/
customScrollParent?: HTMLElement;
}
export declare interface VirtuosoHandle {
/**
* Scrolls the component to the specified item index. See {@link IndexLocationWithAlign} for more options.
*/
scrollToIndex(location: number | IndexLocationWithAlign): void;
/**
* Scrolls the item into view if necessary. See [the website example](http://virtuoso.dev/keyboard-navigation/) for an implementation.
*/
scrollIntoView(location: ScrollIntoViewLocation): void;
/**
* Scrolls the component to the specified location. See [ScrollToOptions (MDN)](https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions)
*/
scrollTo(location: ScrollToOptions): void;
/**
* Scrolls the component with the specified amount. See [ScrollToOptions (MDN)](https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions)
*/
scrollBy(location: ScrollToOptions): void;
}
export declare interface VirtuosoProps<D, C> {
/**
* The total amount of items to be rendered.
*/
totalCount?: number;
/**
* The data items to be rendered. If data is set, the total count will be inferred from the length of the array.
*/
data?: readonly D[];
/**
* Additional context available in the custom components and content callbacks
*/
context?: C;
/**
* *The property accepts pixel values.*
*
* Set the overscan property to make the component "chunk" the rendering of new items on scroll.
* The property causes the component to render more items than the necessary, but reduces the re-renders on scroll.
* Setting `{ main: number, reverse: number }` lets you extend the list in both the main and the reverse scrollable directions.
* See the `increaseViewportBy` property for a similar behavior (equivalent to the `overscan` in react-window).
*
*/
overscan?: number | {
main: number;
reverse: number;
};
/**
*
* *The property accepts pixel values.*
*
* Set the increaseViewportBy property to artificially increase the viewport size, causing items to be rendered before outside of the viewport.
* The property causes the component to render more items than the necessary, but can help with slow loading content.
* Using `{ top?: number, bottom?: number }` lets you set the increase for each end separately.
*
*/
increaseViewportBy?: number | {
top: number;
bottom: number;
};
/**
* Set the amount of items to remain fixed at the top of the list.
*
* For a header that scrolls away when scrolling, check the `components.Header` property.
*/
topItemCount?: number;
/**
* Set to a value between 0 and totalCount - 1 to make the list start scrolled to that item.
* Pass in an object to achieve additional effects similar to `scrollToIndex`.
*/
initialTopMostItemIndex?: number | IndexLocationWithAlign;
/**
* Set this value to offset the initial location of the list.
* Warning: using this property will still run a render cycle at the scrollTop: 0 list window.
* If possible, avoid using it and stick to `initialTopMostItemIndex` instead.
*/
initialScrollTop?: number;
/**
* Use for server-side rendering - if set, the list will render the specified amount of items
* regardless of the container / item size.
*/
initialItemCount?: number;
/**
* Use the `components` property for advanced customization of the elements rendered by the list.
*/
components?: Components<C>;
/**
* Set the callback to specify the contents of the item.
*/
itemContent?: ItemContent<D, C>;
/**
* If specified, the component will use the function to generate the `key` property for each list item.
*/
computeItemKey?: ComputeItemKey<D, C>;
/**
* By default, the component assumes the default item height from the first rendered item (rendering it as a "probe").
*
* If the first item turns out to be an outlier (very short or tall), the rest of the rendering will be slower,
* as multiple passes of rendering should happen for the list to fill the viewport.
*
* Setting `defaultItemHeight` causes the component to skip the "probe" rendering and use the property
* value as default height instead.
*/
defaultItemHeight?: number;
/**
* Allows customizing the height/width calculation of `Item` elements.
*
* The default implementation reads `el.getBoundingClientRect().height` and `el.getBoundingClientRect().width`.
*/
itemSize?: (el: HTMLElement, field: 'offsetHeight' | 'offsetWidth') => number;
/**
* Can be used to improve performance if the rendered items are of known size.
* Setting it causes the component to skip item measurements.
*/
fixedItemHeight?: number;
/**
* Use to display placeholders if the user scrolls fast through the list.
*
* Set `components.ScrollSeekPlaceholder` to change the placeholder content.
*/
scrollSeekConfiguration?: ScrollSeekConfiguration | false;
/**
* If set to `true`, the list automatically scrolls to bottom if the total count is changed.
* Set to `"smooth"` for an animated scrolling.
*
* By default, `followOutput` scrolls down only if the list is already at the bottom.
* To implement an arbitrary logic behind that, pass a function:
*
* ```tsx
* <Virtuoso
* followOutput={(isAtBottom: boolean) => {
* if (expression) {
* return 'smooth' // can be 'auto' or false to avoid scrolling
* } else {
* return false
* }
* }} />
* ```
*/
followOutput?: FollowOutput;
/**
* Set to customize the wrapper tag for the header and footer components (default is `div`).
*/
headerFooterTag?: string;
/**
* Use when implementing inverse infinite scrolling - decrease the value this property
* in combination with `data` or `totalCount` to prepend items to the top of the list.
*
* Warning: the firstItemIndex should **be a positive number**, based on the total amount of items to be displayed.
*/
firstItemIndex?: number;
/**
* Called when the list starts/stops scrolling.
*/
isScrolling?: (isScrolling: boolean) => void;
/**
* Gets called when the user scrolls to the end of the list.
* Receives the last item index as an argument. Can be used to implement endless scrolling.
*/
endReached?: (index: number) => void;
/**
* Called when the user scrolls to the start of the list.
*/
startReached?: (index: number) => void;
/**
* Called with the new set of items each time the list items are rendered due to scrolling.
*/
rangeChanged?: (range: ListRange) => void;
/**
* Called with true / false when the list has reached the bottom / gets scrolled up.
* Can be used to load newer items, like `tail -f`.
*/
atBottomStateChange?: (atBottom: boolean) => void;
/**
* Called with `true` / `false` when the list has reached the top / gets scrolled down.
*/
atTopStateChange?: (atTop: boolean) => void;
/**
* Called when the total list height is changed due to new items or viewport resize.
*/
totalListHeightChanged?: (height: number) => void;
/**
* Called with the new set of items each time the list items are rendered due to scrolling.
*/
itemsRendered?: (items: ListItem<D>[]) => void;
/**
* Setting `alignToBottom` to `true` aligns the items to the bottom of the list if the list is shorter than the viewport.
* Use `followOutput` property to keep the list aligned when new items are appended.
*/
alignToBottom?: boolean;
/**
* Uses the document scroller rather than wrapping the list in its own.
*/
useWindowScroll?: boolean;
/**
* Pass a reference to a scrollable parent element, so that the list won't wrap in its own.
*/
customScrollParent?: HTMLElement;
/**
* Provides access to the root DOM element
*/
scrollerRef?: (ref: HTMLElement | Window | null) => any;
/**
* By default `4`. Redefine to change how much away from the bottom the scroller can be before the list is not considered not at bottom.
*/
atBottomThreshold?: number;
}
export declare interface WindowViewportInfo {
offsetTop: number;
visibleHeight: number;
visibleWidth: number;
}
export { }

2

dist/index.js

@@ -1,2 +0,2 @@

"use strict";var e=require("@virtuoso.dev/react-urx"),t=require("@virtuoso.dev/urx"),n=require("react");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var o=r(t),i=r(n);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}function m(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}var d,f,p=o.system(function(){var e=o.stream(),t=o.stream(),n=o.statefulStream(0),r=o.stream(),i=o.statefulStream(0),a=o.stream(),l=o.stream(),s=o.statefulStream(0),u=o.statefulStream(0),c=o.stream(),m=o.stream(),d=o.statefulStream(!1);return o.connect(o.pipe(e,o.map(function(e){return e[0]})),t),o.connect(o.pipe(e,o.map(function(e){return e[1]})),l),o.connect(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:a,headerHeight:s,footerHeight:u,scrollHeight:l,smoothScrollTargetReached:r,scrollTo:c,scrollBy:m,statefulScrollTop:i,deviation:n,scrollingInProgress:d}},[],{singleton:!0});exports.LogLevel=void 0,(f=exports.LogLevel||(exports.LogLevel={}))[f.DEBUG=0]="DEBUG",f[f.INFO=1]="INFO",f[f.WARN=2]="WARN",f[f.ERROR=3]="ERROR";var h=((d={})[exports.LogLevel.DEBUG]="debug",d[exports.LogLevel.INFO]="log",d[exports.LogLevel.WARN]="warn",d[exports.LogLevel.ERROR]="error",d),g=o.system(function(){var e=o.statefulStream(exports.LogLevel.ERROR);return{log:o.statefulStream(function(t,n,r){var i;void 0===r&&(r=exports.LogLevel.INFO),r>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:o.getValue(e))&&console[h[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),v=o.system(function(e){var n=e[0].log,r=o.statefulStream(!1),i=o.streamFromEmitter(o.pipe(r,o.filter(function(e){return e}),o.distinctUntilChanged()));return o.subscribe(r,function(e){e&&t.getValue(n)("props updated",{},exports.LogLevel.DEBUG)}),{propsReady:r,didMount:i}},t.tup(g),{singleton:!0}),S="up",C={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},I=o.system(function(e){var t=e[0],n=t.scrollContainerState,r=t.scrollTop,i=t.viewportHeight,a=t.headerHeight,l=t.footerHeight,s=t.scrollBy,u=o.statefulStream(!1),c=o.statefulStream(!0),m=o.stream(),d=o.stream(),f=o.statefulStream(4),p=o.streamFromEmitter(o.pipe(o.merge(o.pipe(o.duc(r),o.skip(1),o.mapTo(!0)),o.pipe(o.duc(r),o.skip(1),o.mapTo(!1),o.debounceTime(100))),o.distinctUntilChanged())),h=o.statefulStreamFromEmitter(o.pipe(o.merge(o.pipe(s,o.mapTo(!0)),o.pipe(s,o.mapTo(!1),o.debounceTime(200))),o.distinctUntilChanged()),!1);o.connect(o.pipe(o.duc(r),o.map(function(e){return 0===e}),o.distinctUntilChanged()),c),o.connect(c,d);var g=o.streamFromEmitter(o.pipe(o.combineLatest(n,o.duc(i),o.duc(a),o.duc(l),o.duc(f)),o.scan(function(e,t){var n,r,o=t[0],i=o[0],a=o[1],l=t[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-t[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",r=e.state.scrollTop-i):(n="SIZE_DECREASED",r=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:r}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":l<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},C),o.distinctUntilChanged(function(e,t){return e&&e.atBottom===t.atBottom}))),v=o.statefulStreamFromEmitter(o.pipe(n,o.scan(function(e,t){var n=t[0],r=t[1];return e.scrollHeight!==r?e.scrollTop!==n?{scrollHeight:r,scrollTop:n,jump:e.scrollTop-n,changed:!0}:{scrollHeight:r,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:r,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),o.filter(function(e){return e.changed}),o.map(function(e){return e.jump})),0);o.connect(o.pipe(g,o.map(function(e){return e.atBottom})),u),o.connect(o.pipe(u,o.throttleTime(50)),m);var I=o.statefulStream("down");o.connect(o.pipe(n,o.map(function(e){return e[0]}),o.distinctUntilChanged(),o.scan(function(e,t){return o.getValue(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?S:"down",prevScrollTop:t}},{direction:"down",prevScrollTop:0}),o.map(function(e){return e.direction})),I),o.connect(o.pipe(n,o.throttleTime(50),o.mapTo("none")),I);var x=o.statefulStream(0);return o.connect(o.pipe(p,o.filter(function(e){return!e}),o.mapTo(0)),x),o.connect(o.pipe(r,o.throttleTime(100),o.withLatestFrom(p),o.filter(function(e){return!!e[1]}),o.scan(function(e,t){return[e[1],t[0]]},[0,0]),o.map(function(e){return e[1]-e[0]})),x),{isScrolling:p,isAtTop:c,isAtBottom:u,atBottomState:g,atTopStateChange:d,atBottomStateChange:m,scrollDirection:I,atBottomThreshold:f,scrollVelocity:x,lastJumpDueToItemResize:v}},o.tup(p)),x=o.system(function(e){var t=e[0].scrollVelocity,n=o.statefulStream(!1),r=o.stream(),i=o.statefulStream(!1);return o.connect(o.pipe(t,o.withLatestFrom(i,n,r),o.filter(function(e){return!!e[1]}),o.map(function(e){var t=e[0],n=e[1],r=e[2],o=e[3],i=n.enter;if(r){if((0,n.exit)(t,o))return!1}else if(i(t,o))return!0;return r}),o.distinctUntilChanged()),n),o.subscribe(o.pipe(o.combineLatest(n,t,r),o.withLatestFrom(i)),function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])}),{isSeeking:n,scrollSeekConfiguration:i,scrollVelocity:t,scrollSeekRangeChanged:r}},o.tup(I),{singleton:!0}),T={lvl:0};function w(e,t,n,r,o){return void 0===r&&(r=T),void 0===o&&(o=T),{k:e,v:t,lvl:n,l:r,r:o}}function y(e){return e===T}function b(){return T}function E(e,t){if(y(e))return T;var n=e.k,r=e.l,o=e.r;if(t===n){if(y(r))return o;if(y(o))return r;var i=z(r);return O(F(e,{k:i[0],v:i[1],l:B(r)}))}return O(F(e,t<n?{l:E(r,t)}:{r:E(o,t)}))}function L(e,t,n){if(void 0===n&&(n="k"),y(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var r=L(e.r,t,n);return-Infinity===r[0]?[e.k,e.v]:r}return L(e.l,t,n)}function H(e,t,n){return y(e)?w(t,n,1):t===e.k?F(e,{k:t,v:n}):function(e){return U(A(e))}(F(e,t<e.k?{l:H(e.l,t,n)}:{r:H(e.r,t,n)}))}function R(e,t,n){if(y(e))return[];var r=e.k,o=e.v,i=e.r,a=[];return r>t&&(a=a.concat(R(e.l,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(R(i,t,n))),a}function k(e){return y(e)?[]:[].concat(k(e.l),[{k:e.k,v:e.v}],k(e.r))}function z(e){return y(e.r)?[e.k,e.v]:z(e.r)}function B(e){return y(e.r)?e.l:O(F(e,{r:B(e.r)}))}function F(e,t){return w(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function P(e){return y(e)||e.lvl>e.r.lvl}function O(e){var t=e.l,n=e.r,r=e.lvl;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(P(t))return A(F(e,{lvl:r-1}));if(y(t)||y(t.r))throw new Error("Unexpected empty nodes");return F(t.r,{l:F(t,{r:t.r.l}),r:F(e,{l:t.r.r,lvl:r-1}),lvl:r})}if(P(e))return U(F(e,{lvl:r-1}));if(y(n)||y(n.l))throw new Error("Unexpected empty nodes");var o=n.l,i=P(o)?n.lvl-1:n.lvl;return F(o,{l:F(e,{r:o.l,lvl:r-1}),r:U(F(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}function M(e,t,n){return y(e)?[]:V(R(e,L(e,t)[0],n),function(e){return{index:e.k,value:e.v}})}function V(e,t){var n=e.length;if(0===n)return[];for(var r=t(e[0]),o=r.index,i=r.value,a=[],l=1;l<n;l++){var s=t(e[l]),u=s.index,c=s.value;a.push({start:o,end:u-1,value:i}),o=u,i=c}return a.push({start:o,end:Infinity,value:i}),a}function U(e){var t=e.r,n=e.lvl;return y(t)||y(t.r)||t.lvl!==n||t.r.lvl!==n?e:F(t,{l:F(e,{r:t.l}),lvl:n+1})}function A(e){var t=e.l;return y(t)||t.lvl!==e.lvl?e:F(t,{r:F(e,{l:t.r})})}function W(e,t,n,r){void 0===r&&(r=0);for(var o=e.length-1;r<=o;){var i=Math.floor((r+o)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error("Failed binary finding record in array - "+e.join(",")+", searched for "+t)}function N(e,t,n){return e[W(e,t,n)]}function D(e,t){return Math.round(e.getBoundingClientRect()[t])}function G(e){var t=e.size,n=e.startIndex,r=e.endIndex;return function(e){return e.start===n&&(e.end===r||Infinity===e.end)&&e.value===t}}function j(e,t){var n=e.index;return t===n?0:t<n?-1:1}function _(e,t){var n=e.offset;return t===n?0:t<n?-1:1}function K(e){return{index:e.index,value:e}}function Y(e,t,n){var r=e,o=0,i=0,a=0,l=0;if(0!==t){a=r[l=W(r,t-1,j)].offset;var s=L(n,t-1);o=s[0],i=s[1],r.length&&r[l].size===L(n,t)[1]&&(l-=1),r=r.slice(0,l+1)}else r=[];for(var c,m=u(M(n,t,Infinity));!(c=m()).done;){var d=c.value,f=d.start,p=d.value,h=(f-o)*i+a;r.push({offset:h,size:p,index:f}),o=f,a=h,i=p}return{offsetTree:r,lastIndex:o,lastOffset:a,lastSize:i}}function q(e,t){var n=t[0],r=t[1];n.length>0&&(0,t[2])("received item sizes",n,exports.LogLevel.DEBUG);var o=e.sizeTree,i=o,a=0;if(r.length>0&&y(o)&&2===n.length){var l=n[0].size,s=n[1].size;i=r.reduce(function(e,t){return H(H(e,t,l),t+1,s)},i)}else{var c=function(e,t){for(var n,r=y(e)?0:Infinity,o=u(t);!(n=o()).done;){var i=n.value,a=i.size,l=i.startIndex,s=i.endIndex;if(r=Math.min(r,l),y(e))e=H(e,0,a);else{var c=M(e,l-1,s+1);if(!c.some(G(i))){for(var m,d=!1,f=!1,p=u(c);!(m=p()).done;){var h=m.value,g=h.start,v=h.end,S=h.value;d?(s>=g||a===S)&&(e=E(e,g)):(f=S!==a,d=!0),v>s&&s>=g&&S!==a&&(e=H(e,s+1,S))}f&&(e=H(e,l,a))}}}return[e,r]}(i,n);i=c[0],a=c[1]}if(i===o)return e;var m=Y(e.offsetTree,a,i),d=m.offsetTree;return{sizeTree:i,offsetTree:d,lastIndex:m.lastIndex,lastOffset:m.lastOffset,lastSize:m.lastSize,groupOffsetTree:r.reduce(function(e,t){return H(e,t,Z(t,d))},b()),groupIndices:r}}function Z(e,t){if(0===t.length)return 0;var n=N(t,e,j);return n.size*(e-n.index)+n.offset}function J(e,t){if(!$(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function $(e){return!y(e.groupOffsetTree)}var Q={offsetHeight:"height",offsetWidth:"width"},X=o.system(function(e){var t=e[0].log,n=o.stream(),r=o.stream(),i=o.statefulStreamFromEmitter(r,0),l=o.stream(),s=o.stream(),u=o.statefulStream(0),c=o.statefulStream([]),m=o.statefulStream(void 0),d=o.statefulStream(void 0),f=o.statefulStream(function(e,t){return D(e,Q[t])}),p=o.statefulStream(void 0),h={offsetTree:[],sizeTree:b(),groupOffsetTree:b(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},g=o.statefulStreamFromEmitter(o.pipe(n,o.withLatestFrom(c,t),o.scan(q,h),o.distinctUntilChanged()),h);o.connect(o.pipe(c,o.filter(function(e){return e.length>0}),o.withLatestFrom(g),o.map(function(e){var t=e[0],n=e[1],r=t.reduce(function(e,t,r){return H(e,t,Z(t,n.offsetTree)||r)},b());return a({},n,{groupIndices:t,groupOffsetTree:r})})),g),o.connect(o.pipe(r,o.withLatestFrom(g),o.filter(function(e){return e[0]<e[1].lastIndex}),o.map(function(e){var t=e[1];return[{startIndex:e[0],endIndex:t.lastIndex,size:t.lastSize}]})),n),o.connect(m,d);var v=o.statefulStreamFromEmitter(o.pipe(m,o.map(function(e){return void 0===e})),!0);o.connect(o.pipe(d,o.filter(function(e){return void 0!==e&&y(o.getValue(g).sizeTree)}),o.map(function(e){return[{startIndex:0,endIndex:0,size:e}]})),n);var S=o.streamFromEmitter(o.pipe(n,o.withLatestFrom(g),o.scan(function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}},{changed:!1,sizes:h}),o.map(function(e){return e.changed})));o.subscribe(o.pipe(u,o.scan(function(e,t){return{diff:e.prev-t,prev:t}},{diff:0,prev:0}),o.map(function(e){return e.diff})),function(e){e>0?o.publish(l,e):e<0&&o.publish(s,e)}),o.subscribe(o.pipe(u,o.withLatestFrom(t)),function(e){e[0]<0&&(0,e[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:u},exports.LogLevel.ERROR)});var C=o.streamFromEmitter(l);o.connect(o.pipe(l,o.withLatestFrom(g),o.map(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return k(n.sizeTree).reduce(function(e,n){var r=n.k,o=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:r+t-1,size:e.prevSize}]),prevIndex:r+t,prevSize:o}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),n);var I=o.streamFromEmitter(o.pipe(s,o.withLatestFrom(g),o.map(function(e){return Z(-e[0],e[1].offsetTree)})));return o.connect(o.pipe(s,o.withLatestFrom(g),o.map(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: shifting items does not work with groups");var r=k(n.sizeTree).reduce(function(e,n){var r=n.v;return H(e,Math.max(0,n.k+t),r)},b());return a({},n,{sizeTree:r},Y(n.offsetTree,0,r))})),g),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:d,fixedItemSize:m,unshiftWith:l,shiftWith:s,shiftWithOffset:I,beforeUnshiftWith:C,firstItemIndex:u,sizes:g,listRefresh:S,statefulTotalCount:i,trackItemSizes:v,itemSize:f}},o.tup(g),{singleton:!0}),ee="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function te(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&ee||(t.behavior="auto"),t.offset||(t.offset=0),t}var ne=o.system(function(e){var t=e[0],n=t.sizes,r=t.totalCount,i=t.listRefresh,a=e[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=e[2].log,p=o.stream(),h=o.statefulStream(0),g=null,v=null,S=null;function C(){g&&(g(),g=null),S&&(S(),S=null),v&&(clearTimeout(v),v=null),o.publish(l,!1)}return o.connect(o.pipe(p,o.withLatestFrom(n,s,r,h,m,d,f),o.map(function(e){var t=e[0],n=e[1],r=e[2],a=e[3],s=e[4],u=e[5],m=e[6],d=e[7],f=te(t),h=f.align,I=f.behavior,x=f.offset,T=a-1,w=f.index;"LAST"===w&&(w=T),w=J(w,n);var y=Z(w=Math.max(0,w,Math.min(T,w)),n.offsetTree)+u;"end"===h?(y=y-r+L(n.sizeTree,w)[1],w===T&&(y+=m)):"center"===h?y=y-r/2+L(n.sizeTree,w)[1]/2:y-=s,x&&(y+=x);var b=function(e){C(),e?(d("retrying to scroll to",{location:t},exports.LogLevel.DEBUG),o.publish(p,t)):d("list did not change, scroll successful",{},exports.LogLevel.DEBUG)};if(C(),"smooth"===I){var E=!1;S=o.subscribe(i,function(e){E=E||e}),g=o.handleNext(c,function(){b(E)})}else g=o.handleNext(o.pipe(i,function(e){var t=setTimeout(function(){e(!1)},50);return function(n){n&&(e(!0),clearTimeout(t))}}),b);return v=setTimeout(function(){C()},1200),o.publish(l,!0),d("scrolling from index to",{index:w,top:y,behavior:I},exports.LogLevel.DEBUG),{top:y,behavior:I}})),u),{scrollToIndex:p,topListHeight:h}},o.tup(X,p,g),{singleton:!0});function re(e,t,n){return"number"==typeof e?n===S&&"top"===t||"down"===n&&"bottom"===t?e:0:n===S?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse}function oe(e,t){return"number"==typeof e?e:e[t]||0}var ie=o.system(function(e){var t=e[0],n=t.scrollTop,r=t.viewportHeight,i=t.deviation,a=t.headerHeight,l=o.stream(),s=o.statefulStream(0),u=o.statefulStream(0),m=o.statefulStream(0),d=o.statefulStream(0),f=o.statefulStreamFromEmitter(o.pipe(o.combineLatest(o.duc(n),o.duc(r),o.duc(a),o.duc(l,c),o.duc(d),o.duc(s),o.duc(u),o.duc(i),o.duc(m)),o.map(function(e){var t=e[0],n=e[1],r=e[2],o=e[3],i=o[0],a=o[1],l=e[4],s=e[6],u=e[7],c=e[8],m=t-u,d=e[5]+s,f=Math.max(r-m,0),p="none",h=oe(c,"top"),g=oe(c,"bottom");return i-=u,a+=r+s,(i+=r+s)>t+d-h&&(p=S),(a-=u)<t-f+n+g&&(p="down"),"none"!==p?[Math.max(m-r-re(l,"top",p)-h,0),m-f-s+n+re(l,"bottom",p)+g]:null}),o.filter(function(e){return null!=e}),o.distinctUntilChanged(c)),[0,0]);return{listBoundary:l,overscan:d,topListHeight:s,fixedHeaderHeight:u,increaseViewportBy:m,visibleRange:f}},o.tup(p),{singleton:!0}),ae=o.system(function(e){var t=e[0],n=t.scrollTo,r=t.scrollContainerState,i=o.stream(),l=o.stream(),s=o.stream(),u=o.statefulStream(!1),c=o.statefulStream(void 0);return o.connect(o.pipe(o.combineLatest(i,l),o.map(function(e){var t=e[0],n=t[1];return[Math.max(0,t[0]-e[1].offsetTop),n]})),r),o.connect(o.pipe(n,o.withLatestFrom(l),o.map(function(e){var t=e[0];return a({},t,{top:t.top+e[1].offsetTop})})),s),{useWindowScroll:u,customScrollParent:c,windowScrollContainerState:i,windowViewportRect:l,windowScrollTo:s}},o.tup(p)),le={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},se={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},ue=Math.round,ce=Math.ceil,me=Math.floor,de=Math.min,fe=Math.max;function pe(e,t){return Array.from({length:t-e+1}).map(function(t,n){return{index:n+e}})}var he=o.system(function(e){var t=e[0],n=t.overscan,r=t.visibleRange,i=t.listBoundary,l=e[1],s=l.scrollTop,u=l.viewportHeight,d=l.scrollBy,f=l.scrollTo,p=l.smoothScrollTargetReached,h=l.scrollContainerState,g=e[2],v=e[3],S=e[4],C=S.propsReady,I=S.didMount,x=e[5],T=x.windowViewportRect,w=x.windowScrollTo,y=x.useWindowScroll,b=x.customScrollParent,E=x.windowScrollContainerState,L=o.statefulStream(0),H=o.statefulStream(0),R=o.statefulStream(le),k=o.statefulStream({height:0,width:0}),z=o.statefulStream({height:0,width:0}),B=o.stream(),F=o.stream(),P=o.statefulStream(0);o.connect(o.pipe(I,o.withLatestFrom(H),o.filter(function(e){return 0!==e[1]}),o.map(function(e){return{items:pe(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),R),o.connect(o.pipe(o.combineLatest(o.duc(L),r,o.duc(z,function(e,t){return e&&e.width===t.width&&e.height===t.height})),o.withLatestFrom(k),o.map(function(e){var t=e[0],n=t[0],r=t[1],o=r[0],i=r[1],a=t[2],l=e[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return le;if(0===u)return se;var m=Se(c,u),d=m*me(o/s),f=m*ce(i/s)-1;f=de(n-1,f);var p=pe(d=de(f,fe(0,d)),f),h=ge(l,a,p),g=h.top,v=h.bottom;return{items:p,offsetTop:g,offsetBottom:ce(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),R),o.connect(o.pipe(k,o.map(function(e){return e.height})),u),o.connect(o.pipe(o.combineLatest(k,z,R),o.map(function(e){var t=ge(e[0],e[1],e[2].items);return[t.top,t.bottom]}),o.distinctUntilChanged(c)),i);var O=o.streamFromEmitter(o.pipe(o.duc(R),o.filter(function(e){return e.items.length>0}),o.withLatestFrom(L),o.filter(function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1}),o.map(function(e){return e[1]-1}),o.distinctUntilChanged())),M=o.streamFromEmitter(o.pipe(o.duc(R),o.filter(function(e){var t=e.items;return t.length>0&&0===t[0].index}),o.mapTo(0),o.distinctUntilChanged())),V=o.streamFromEmitter(o.pipe(o.duc(R),o.filter(function(e){return e.items.length>0}),o.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),o.distinctUntilChanged(m)));o.connect(V,v.scrollSeekRangeChanged),o.connect(o.pipe(B,o.withLatestFrom(k,z,L),o.map(function(e){var t=e[1],n=e[2],r=e[3],o=te(e[0]),i=o.align,a=o.behavior,l=o.offset,s=o.index;"LAST"===s&&(s=r-1);var u=ve(t,n,s=fe(0,s,de(r-1,s)));return"end"===i?u=ue(u-t.height+n.height):"center"===i&&(u=ue(u-t.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),f);var U=o.statefulStreamFromEmitter(o.pipe(R,o.map(function(e){return e.offsetBottom+e.bottom})),0);return o.connect(o.pipe(T,o.map(function(e){return{width:e.visibleWidth,height:e.visibleHeight}})),k),a({totalCount:L,viewportDimensions:k,itemDimensions:z,scrollTop:s,scrollHeight:F,overscan:n,scrollBy:d,scrollTo:f,scrollToIndex:B,smoothScrollTargetReached:p,windowViewportRect:T,windowScrollTo:w,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:E,deviation:P,scrollContainerState:h,initialItemCount:H},v,{gridState:R,totalListHeight:U},g,{startReached:M,endReached:O,rangeChanged:V,propsReady:C})},o.tup(ie,p,I,x,v,ae));function ge(e,t,n){var r=t.height;return void 0===r||0===n.length?{top:0,bottom:0}:{top:ve(e,t,n[0].index),bottom:ve(e,t,n[n.length-1].index)+r}}function ve(e,t,n){var r=Se(e.width,t.width);return me(n/r)*t.height}function Se(e,t){return fe(1,me(e/t))}function Ce(e,t){void 0===t&&(t=!0);var r=n.useRef(null),o=function(e){};if("undefined"!=typeof ResizeObserver){var i=new ResizeObserver(function(t){var n=t[0].target;null!==n.offsetParent&&e(n)});o=function(e){e&&t?(i.observe(e),r.current=e):(r.current&&i.unobserve(r.current),r.current=null)}}return{ref:r,callbackRef:o}}function Ie(e,t){return void 0===t&&(t=!0),Ce(e,t).callbackRef}function xe(e,t){var r=n.useRef(null),o=n.useCallback(function(n){if(null!==n){var o,i,a=n.getBoundingClientRect(),l=a.width;if(t){var s=t.getBoundingClientRect(),u=a.top-s.top;o=s.height-Math.max(0,u),i=u+t.scrollTop}else o=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;r.current={offsetTop:i,visibleHeight:o,visibleWidth:l},e(r.current)}},[e,t]),i=Ce(o),a=i.callbackRef,l=i.ref,s=n.useCallback(function(){o(l.current)},[o,l]);return n.useEffect(function(){if(t){t.addEventListener("scroll",s);var e=new ResizeObserver(s);return e.observe(t),function(){t.removeEventListener("scroll",s),e.unobserve(t)}}return window.addEventListener("scroll",s),window.addEventListener("resize",s),function(){window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),a}var Te="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function we(e,t,n,r,o,i){return Ie(function(n){for(var a=function(e,t,n,r){var o=e.length;if(0===o)return null;for(var i=[],a=0;a<o;a++){var l=e.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=t(l,"offsetHeight");if(0===c&&r("Zero-sized element, this should not happen",{child:l},exports.LogLevel.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,t,0,o),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;r(i?[Math.max(s,0),i.scrollHeight]:[Math.max(s,0),l.scrollHeight]),null!==a&&e(a)},n)}function ye(e,t,r,i,a){void 0===i&&(i=o.noop);var l=n.useRef(null),s=n.useRef(null),u=n.useRef(null),c=n.useCallback(function(n){var r=n.target,o=r===window||r===document?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,i=r===window?document.documentElement.scrollHeight:r.scrollHeight;e([Math.max(o,0),i]),null!==s.current&&(o===s.current||o<=0||o===r.scrollHeight-D(r,"height"))&&(s.current=null,t(!0),u.current&&(clearTimeout(u.current),u.current=null))},[e,t]);return n.useEffect(function(){var e=a||l.current;return i(a||l.current),c({target:e}),e.addEventListener("scroll",c,{passive:!0}),function(){i(null),e.removeEventListener("scroll",c)}},[l,c,r,i,a]),{scrollerRef:l,scrollByCallback:function(e){null===s.current&&l.current.scrollBy(e)},scrollToCallback:function(n){var r=l.current;if(r&&(!("offsetHeight"in r)||0!==r.offsetHeight)){var o,i,a,c="smooth"===n.behavior;if(r===window?(i=Math.max(D(document.documentElement,"height"),document.documentElement.scrollHeight),o=window.innerHeight,a=document.documentElement.scrollTop):(i=r.scrollHeight,o=D(r,"height"),a=r.scrollTop),n.top=Math.ceil(Math.max(Math.min(i-o,n.top),0)),Math.abs(o-i)<1.01||n.top===a)return e([a,i]),void(c&&t(!0));c?(s.current=n.top,u.current&&clearTimeout(u.current),u.current=setTimeout(function(){u.current=null,s.current=null,t(!0)},1e3)):s.current=null,r.scrollTo(n)}}}}var be=o.system(function(e){var t=e[0],n=t.sizes,r=t.listRefresh,i=t.defaultItemSize,a=e[1].scrollTop,l=e[2].scrollToIndex,s=e[3].didMount,u=o.statefulStream(!0),c=o.statefulStream(0);return o.connect(o.pipe(s,o.withLatestFrom(c),o.filter(function(e){return!!e[1]}),o.mapTo(!1)),u),o.subscribe(o.pipe(o.combineLatest(r,s),o.withLatestFrom(u,n,i),o.filter(function(e){var t=e[1],n=e[3];return e[0][1]&&(!y(e[2].sizeTree)||void 0!==n)&&!t}),o.withLatestFrom(c)),function(e){var t=e[1];setTimeout(function(){o.handleNext(a,function(){o.publish(u,!0)}),o.publish(l,t)})}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},o.tup(X,p,ne,v),{singleton:!0});function Ee(e){return!!e&&("smooth"===e?"smooth":"auto")}var Le=o.system(function(e){var t=e[0],n=t.totalCount,r=t.listRefresh,i=e[1],a=i.isAtBottom,l=i.atBottomState,s=e[2].scrollToIndex,u=e[3].scrolledToInitialItem,c=e[4],m=c.propsReady,d=c.didMount,f=e[5].log,p=e[6].scrollingInProgress,h=o.statefulStream(!1),g=null;function v(e){o.publish(s,{index:"LAST",align:"end",behavior:e})}return o.subscribe(o.pipe(o.combineLatest(o.pipe(o.duc(n),o.skip(1)),d),o.withLatestFrom(o.duc(h),a,u,p),o.map(function(e){var t=e[0],n=t[0],r=t[1]&&e[3],o="auto";return r&&(o=function(e,t){return"function"==typeof e?Ee(e(t)):t&&Ee(e)}(e[1],e[2]||e[4]),r=r&&!!o),{totalCount:n,shouldFollow:r,followOutputBehavior:o}}),o.filter(function(e){return e.shouldFollow})),function(e){var t=e.totalCount,n=e.followOutputBehavior;g&&(g(),g=null),g=o.handleNext(r,function(){o.getValue(f)("following output to ",{totalCount:t},exports.LogLevel.DEBUG),v(n),g=null})}),o.subscribe(o.pipe(o.combineLatest(o.duc(h),n,m),o.filter(function(e){return e[0]&&e[2]}),o.scan(function(e,t){var n=t[1];return{refreshed:e.value===n,value:n}},{refreshed:!1,value:0}),o.filter(function(e){return e.refreshed}),o.withLatestFrom(h,n)),function(e){var t=e[1],n=o.handleNext(l,function(e){!t||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||g||(o.getValue(f)("scrolling to bottom due to increased size",{},exports.LogLevel.DEBUG),v("auto"))});setTimeout(n,100)}),o.subscribe(o.combineLatest(o.duc(h),l),function(e){var t=e[1];e[0]&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&v("auto")}),{followOutput:h}},o.tup(X,I,ne,be,v,g,p));function He(e){return e.reduce(function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e},{totalCount:0,groupIndices:[]})}var Re=t.system(function(e){var n=e[0],r=n.totalCount,o=n.groupIndices,i=n.sizes,a=e[1],l=a.scrollTop,s=a.headerHeight,u=t.stream(),c=t.stream(),m=t.streamFromEmitter(t.pipe(u,t.map(He)));return t.connect(t.pipe(m,t.map(t.prop("totalCount"))),r),t.connect(t.pipe(m,t.map(t.prop("groupIndices"))),o),t.connect(t.pipe(t.combineLatest(l,i,s),t.filter(function(e){return $(e[1])}),t.map(function(e){return L(e[1].groupOffsetTree,Math.max(e[0]-e[2],0),"v")[0]}),t.distinctUntilChanged(),t.map(function(e){return[e]})),c),{groupCounts:u,topItemsIndexes:c}},t.tup(X,p)),ke={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function ze(e,t,n){if(0===e.length)return[];if(!$(t))return e.map(function(e){return a({},e,{index:e.index+n,originalIndex:e.index})});for(var r,o=[],i=M(t.groupOffsetTree,e[0].index,e[e.length-1].index),l=void 0,s=0,c=u(e);!(r=c()).done;){var m=r.value;(!l||l.end<m.index)&&(l=i.shift(),s=t.groupIndices.indexOf(l.start)),o.push(a({},m.index===l.start?{type:"group",index:s}:{index:m.index-(s+1)+n,groupIndex:s},{size:m.size,offset:m.offset,originalIndex:m.index,data:m.data}))}return o}function Be(e,t,n,r,o){var i=0,a=0;if(e.length>0){i=e[0].offset;var l=e[e.length-1];a=l.offset+l.size}var s=i,u=r.lastOffset+(n-r.lastIndex)*r.lastSize-a;return{items:ze(e,r,o),topItems:ze(t,r,o),topListHeight:t.reduce(function(e,t){return t.size+e},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n}}var Fe,Pe,Oe,Me=o.system(function(e){var t=e[0],n=t.sizes,r=t.totalCount,i=t.data,l=t.firstItemIndex,s=e[1],d=e[2],f=d.visibleRange,p=d.listBoundary,h=d.topListHeight,g=e[3],v=g.scrolledToInitialItem,S=g.initialTopMostItemIndex,C=e[4].topListHeight,I=e[5],x=e[6].didMount,T=o.statefulStream([]),w=o.stream();o.connect(s.topItemsIndexes,T);var b=o.statefulStreamFromEmitter(o.pipe(o.combineLatest(x,o.duc(f),o.duc(r),o.duc(n),o.duc(S),v,o.duc(T),o.duc(l),i),o.filter(function(e){return e[0]}),o.map(function(e){var t=e[1],n=t[0],r=t[1],i=e[2],a=e[4],l=e[5],s=e[6],c=e[7],m=e[8],d=e[3],f=d.sizeTree,p=d.offsetTree;if(0===i||0===n&&0===r)return ke;if(y(f))return Be(function(e,t,n){if($(t)){var r=J(e,t);return[{index:L(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(function(e,t){return"number"==typeof e?e:"LAST"===e.index?t-1:e.index}(a,i),d,m),[],i,d,c);var h=[];if(s.length>0)for(var g,v=s[0],S=s[s.length-1],C=0,I=u(M(f,v,S));!(g=I()).done;)for(var x=g.value,T=x.value,w=Math.max(x.start,v),b=Math.min(x.end,S),E=w;E<=b;E++)h.push({index:E,size:T,offset:C,data:m&&m[E]}),C+=T;if(!l)return Be([],h,i,d,c);var H=s.length>0?s[s.length-1]+1:0,R=function(e,t,n,r){return void 0===r&&(r=0),r>0&&(t=Math.max(t,N(e,r,j).offset)),V((i=n,l=W(o=e,t,a=_),s=W(o,i,a,l),o.slice(l,s+1)),K);var o,i,a,l,s}(p,n,r,H);if(0===R.length)return null;var k=i-1;return Be(o.tap([],function(e){for(var t,o=u(R);!(t=o()).done;){var i=t.value,a=i.value,l=a.offset,s=i.start,c=a.size;a.offset<n&&(l+=((s+=Math.floor((n-a.offset)/c))-i.start)*c),s<H&&(l+=(H-s)*c,s=H);for(var d=Math.min(i.end,k),f=s;f<=d&&!(l>=r);f++)e.push({index:f,size:c,offset:l,data:m&&m[f]}),l+=c}}),h,i,d,c)}),o.filter(function(e){return null!==e}),o.distinctUntilChanged()),ke);return o.connect(o.pipe(i,o.filter(function(e){return void 0!==e}),o.map(function(e){return e.length})),r),o.connect(o.pipe(b,o.map(o.prop("topListHeight"))),C),o.connect(C,h),o.connect(o.pipe(b,o.map(function(e){return[e.top,e.bottom]})),p),o.connect(o.pipe(b,o.map(function(e){return e.items})),w),a({listState:b,topItemsIndexes:T,endReached:o.streamFromEmitter(o.pipe(b,o.filter(function(e){return e.items.length>0}),o.withLatestFrom(r,i),o.filter(function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1}),o.map(function(e){return[e[1]-1,e[2]]}),o.distinctUntilChanged(c),o.map(function(e){return e[0]}))),startReached:o.streamFromEmitter(o.pipe(b,o.throttleTime(200),o.filter(function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length}),o.map(function(e){return e.items[0].index}),o.distinctUntilChanged())),rangeChanged:o.streamFromEmitter(o.pipe(b,o.filter(function(e){return e.items.length>0}),o.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),o.distinctUntilChanged(m))),itemsRendered:w},I)},o.tup(X,Re,ie,be,ne,I,v),{singleton:!0}),Ve=o.system(function(e){var t=e[0],n=t.sizes,r=t.firstItemIndex,i=t.data,a=e[1].listState,l=e[2].didMount,s=o.statefulStream(0);return o.connect(o.pipe(l,o.withLatestFrom(s),o.filter(function(e){return 0!==e[1]}),o.withLatestFrom(n,r,i),o.map(function(e){var t=e[0][1],n=e[1],r=e[2],o=e[3],i=void 0===o?[]:o,a=0;if(n.groupIndices.length>0)for(var l,s=u(n.groupIndices);!((l=s()).done||l.value-a>=t);)a++;var c=t+a;return Be(Array.from({length:c}).map(function(e,t){return{index:t,size:0,offset:0,data:i[t]}}),[],c,n,r)})),a),{initialItemCount:s}},o.tup(X,Me,v),{singleton:!0}),Ue=t.system(function(e){var n=e[0].topItemsIndexes,r=t.statefulStream(0);return t.connect(t.pipe(r,t.filter(function(e){return e>0}),t.map(function(e){return Array.from({length:e}).map(function(e,t){return t})})),n),{topItemCount:r}},t.tup(Me)),Ae=o.system(function(e){var t=e[0],n=t.footerHeight,r=t.headerHeight,i=e[1].listState,a=o.stream(),l=o.statefulStreamFromEmitter(o.pipe(o.combineLatest(n,r,i),o.map(function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom})),0);return o.connect(o.duc(l),a),{totalListHeight:l,totalListHeightChanged:a}},o.tup(p,Me),{singleton:!0}),We=o.system(function(e){var t=e[0],n=t.scrollBy,r=t.scrollTop,i=t.deviation,a=t.scrollingInProgress,l=e[1],s=l.isScrolling,u=l.isAtBottom,c=l.atBottomState,m=l.scrollDirection,d=e[3],f=d.beforeUnshiftWith,p=d.shiftWithOffset,h=d.sizes,g=e[4].log,v=o.streamFromEmitter(o.pipe(e[2].listState,o.withLatestFrom(l.lastJumpDueToItemResize),o.scan(function(e,t){var n=e[1],r=t[0],o=r.items,i=r.totalCount,a=t[1],l=0;if(e[2]===i){if(n.length>0&&o.length>0){var s=1===o.length;if(0!==o[0].originalIndex||0!==n[0].originalIndex)for(var u=function(e){var t=o[e],r=n.find(function(e){return e.originalIndex===t.originalIndex});return r?t.offset!==r.offset||s?(l=t.offset-r.offset+t.size-r.size,"break"):void 0:"continue"},c=o.length-1;c>=0;c--){var m=u(c);if("continue"!==m&&"break"===m)break}}0!==l&&(l+=a)}return[l,o,i]},[0,[],0]),o.filter(function(e){return 0!==e[0]}),o.withLatestFrom(r,m,a,g,u,c),o.filter(function(e){return!e[3]&&0!==e[1]&&e[2]===S}),o.map(function(e){var t=e[0][0];return(0,e[4])("Upward scrolling compensation",{amount:t},exports.LogLevel.DEBUG),t})));return o.connect(o.pipe(v,o.withLatestFrom(i),o.map(function(e){return e[1]-e[0]})),i),o.subscribe(o.pipe(o.combineLatest(o.statefulStreamFromEmitter(s,!1),i),o.filter(function(e){return!e[0]&&0!==e[1]}),o.map(function(e){return e[1]}),o.throttleTime(1)),function(e){e>0?(o.publish(n,{top:-e,behavior:"auto"}),o.publish(i,0)):(o.publish(i,0),o.publish(n,{top:-e,behavior:"auto"}))}),o.connect(o.pipe(p,o.map(function(e){return{top:-e}})),n),o.connect(o.pipe(f,o.withLatestFrom(h),o.map(function(e){return e[0]*e[1].lastSize})),v),{deviation:i}},o.tup(p,I,Me,X,g)),Ne=o.system(function(e){var t=e[0].totalListHeight,n=e[1].didMount,r=e[2].scrollTo,i=o.statefulStream(0);return o.subscribe(o.pipe(n,o.withLatestFrom(i),o.filter(function(e){return 0!==e[1]}),o.map(function(e){return{top:e[1]}})),function(e){o.handleNext(o.pipe(t,o.filter(function(e){return 0!==e})),function(){setTimeout(function(){o.publish(r,e)})})}),{initialScrollTop:i}},o.tup(Ae,v,p),{singleton:!0}),De=o.system(function(e){var t=e[0].viewportHeight,n=e[1].totalListHeight,r=o.statefulStream(!1);return{alignToBottom:r,paddingTopAddition:o.statefulStreamFromEmitter(o.pipe(o.combineLatest(r,t,n),o.filter(function(e){return e[0]}),o.map(function(e){return Math.max(0,e[1]-e[2])}),o.distinctUntilChanged()),0)}},o.tup(p,Ae),{singleton:!0}),Ge=o.system(function(e){var t=e[0],n=t.sizes,r=t.totalCount,i=e[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,u=i.scrollingInProgress,c=e[2].scrollToIndex,m=o.stream();return o.connect(o.pipe(m,o.withLatestFrom(n,l,r,s,a),o.map(function(e){var t=e[0],n=t.index,r=t.behavior,i=void 0===r?"auto":r,a=t.done,l=e[1],s=e[2],c=e[4],m=e[5],d=e[3]-1,f=null;n=J(n,l);var p=Z(n=Math.max(0,n,Math.min(d,n)),l.offsetTree)+c;return p<m?f={index:n,behavior:i,align:"start"}:p+L(l.sizeTree,n)[1]>m+s&&(f={index:n,behavior:i,align:"end"}),f?a&&o.handleNext(o.pipe(u,o.skip(1),o.filter(function(e){return!1===e})),a):a&&a(),f}),o.filter(function(e){return null!==e})),c),{scrollIntoView:m}},o.tup(X,p,ne,Me,g),{singleton:!0}),je=["listState","topItemsIndexes"],_e=o.system(function(e){return a({},e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},o.tup(ie,Ve,v,x,Ae,Ne,De,ae,Ge)),Ke=o.system(function(e){var t=e[0],n=t.totalCount,r=t.sizeRanges,i=t.fixedItemSize,s=t.defaultItemSize,u=t.trackItemSizes,c=t.itemSize,m=t.data,d=t.firstItemIndex,f=t.groupIndices,p=t.statefulTotalCount,h=e[1],g=h.initialTopMostItemIndex,v=h.scrolledToInitialItem,S=e[2],C=e[3],I=e[4],x=I.listState,T=I.topItemsIndexes,w=l(I,je),y=e[5].scrollToIndex,b=e[7].topItemCount,E=e[8].groupCounts,L=e[9],H=e[10];return o.connect(w.rangeChanged,L.scrollSeekRangeChanged),o.connect(o.pipe(L.windowViewportRect,o.map(o.prop("visibleHeight"))),S.viewportHeight),a({totalCount:n,data:m,firstItemIndex:d,sizeRanges:r,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:T,topItemCount:b,groupCounts:E,fixedItemHeight:i,defaultItemHeight:s},C,{statefulTotalCount:p,listState:x,scrollToIndex:y,trackItemSizes:u,itemSize:c,groupIndices:f},w,L,S,H)},o.tup(X,be,p,Le,Me,ne,We,Ue,Re,_e,g)),Ye=(Fe=function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"},Oe=!1,function(){return Oe||(Oe=!0,Pe=Fe()),Pe}),qe=["placeholder"],Ze=["style","children"],Je=["style","children"];function $e(e){return e}var Qe=t.system(function(){var e=t.statefulStream(function(e){return"Item "+e}),n=t.statefulStream(null),r=t.statefulStream(function(e){return"Group "+e}),o=t.statefulStream({}),i=t.statefulStream($e),a=t.statefulStream("div"),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(o,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:n,itemContent:e,groupContent:r,components:o,computeItemKey:i,headerFooterTag:a,scrollerRef:l,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}});function Xe(e,n){var r=t.stream();return t.subscribe(r,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+n,"color: red;","color: inherit;","color: blue;")}),t.connect(r,e),r}var et=t.system(function(e){var n=e[0],r=e[1],o={item:Xe(r.itemContent,"Rename the %citem%c prop to %citemContent."),group:Xe(r.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:Xe(n.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:Xe(n.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:Xe(n.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:t.stream(),maxHeightCacheSize:t.stream(),footer:t.stream(),header:t.stream(),HeaderContainer:t.stream(),FooterContainer:t.stream(),ItemContainer:t.stream(),ScrollContainer:t.stream(),GroupContainer:t.stream(),ListContainer:t.stream(),emptyComponent:t.stream(),scrollSeek:t.stream()};function i(e,n,o){t.connect(t.pipe(e,t.withLatestFrom(r.components),t.map(function(e){var t,r=e[0],i=e[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+n+" instead."),a({},i,((t={})[n]=r,t))})),r.components)}return t.subscribe(o.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),t.subscribe(o.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),t.subscribe(o.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),t.subscribe(o.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),t.subscribe(o.scrollSeek,function(e){var o=e.placeholder,i=l(e,qe);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),t.publish(r.components,a({},t.getValue(r.components),{ScrollSeekPlaceholder:o})),t.publish(n.scrollSeekConfiguration,i)}),i(o.footer,"Footer","footer"),i(o.header,"Header","header"),i(o.ItemContainer,"Item","ItemContainer"),i(o.ListContainer,"List","ListContainer"),i(o.ScrollContainer,"Scroller","ScrollContainer"),i(o.emptyComponent,"EmptyPlaceholder","emptyComponent"),i(o.GroupContainer,"Group","GroupContainer"),a({},n,r,o)},t.tup(Ke,Qe)),tt=function(e){return i.createElement("div",{style:{height:e.height}})},nt={position:Ye(),zIndex:1,overflowAnchor:"none"},rt=i.memo(function(e){var r=e.showTopList,o=void 0!==r&&r,i=Ct("listState"),l=Ct("deviation"),s=St("sizeRanges"),u=Ct("useWindowScroll"),c=Ct("customScrollParent"),m=St("windowScrollContainerState"),d=St("scrollContainerState"),f=c||u?m:d,p=Ct("itemContent"),h=Ct("context"),g=Ct("groupContent"),v=Ct("trackItemSizes"),S=Ct("itemSize"),C=Ct("log"),I=we(s,S,v,o?t.noop:f,C,c),x=Ct("EmptyPlaceholder"),T=Ct("ScrollSeekPlaceholder")||tt,w=Ct("ListComponent"),y=Ct("ItemComponent"),b=Ct("GroupComponent"),E=Ct("computeItemKey"),L=Ct("isSeeking"),H=Ct("groupIndices").length>0,R=Ct("paddingTopAddition"),k=Ct("firstItemIndex"),z=Ct("statefulTotalCount"),B=o?{}:{boxSizing:"border-box",paddingTop:i.offsetTop+R,paddingBottom:i.offsetBottom,marginTop:l};return!o&&0===z&&x?n.createElement(x,lt(x,h)):n.createElement(w,a({},lt(w,h),{ref:I,style:B,"data-test-id":o?"virtuoso-top-item-list":"virtuoso-item-list"}),(o?i.topItems:i.items).map(function(e){var t=e.originalIndex,r=E(t+k,e.data,h);return L?n.createElement(T,a({},lt(T,h),{key:r,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?n.createElement(b,a({},lt(b,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:nt}),g(e.index)):n.createElement(y,a({},lt(y,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,style:{overflowAnchor:"none"}}),H?p(e.index,e.groupIndex,e.data,h):p(e.index,e.data,h))}))}),ot={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},it={width:"100%",height:"100%",position:"absolute",top:0},at={width:"100%",position:Ye(),top:0};function lt(e,t){if("string"!=typeof e)return{context:t}}var st=i.memo(function(){var e=Ct("HeaderComponent"),t=St("headerHeight"),r=Ct("headerFooterTag"),o=Ie(function(e){return t(D(e,"height"))}),i=Ct("context");return e?n.createElement(r,{ref:o},n.createElement(e,lt(e,i))):null}),ut=i.memo(function(){var e=Ct("FooterComponent"),t=St("footerHeight"),r=Ct("headerFooterTag"),o=Ie(function(e){return t(D(e,"height"))}),i=Ct("context");return e?n.createElement(r,{ref:o},n.createElement(e,lt(e,i))):null});function ct(e){var t=e.usePublisher,r=e.useEmitter,o=e.useEmitterValue;return i.memo(function(e){var i=e.style,s=e.children,u=l(e,Ze),c=t("scrollContainerState"),m=o("ScrollerComponent"),d=t("smoothScrollTargetReached"),f=o("scrollerRef"),p=o("context"),h=ye(c,d,m,f),g=h.scrollerRef,v=h.scrollByCallback;return r("scrollTo",h.scrollToCallback),r("scrollBy",v),n.createElement(m,a({ref:g,style:a({},ot,i),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},u,lt(m,p)),s)})}function mt(e){var r=e.usePublisher,o=e.useEmitter,s=e.useEmitterValue;return i.memo(function(e){var i=e.style,u=e.children,c=l(e,Je),m=r("windowScrollContainerState"),d=s("ScrollerComponent"),f=r("smoothScrollTargetReached"),p=s("totalListHeight"),h=s("deviation"),g=s("customScrollParent"),v=s("context"),S=ye(m,f,d,t.noop,g),C=S.scrollerRef,I=S.scrollByCallback,x=S.scrollToCallback;return Te(function(){return C.current=g||window,function(){C.current=null}},[C,g]),o("windowScrollTo",x),o("scrollBy",I),n.createElement(d,a({style:a({position:"relative"},i,0!==p?{height:p+h}:{}),"data-virtuoso-scroller":!0},c,lt(d,v)),u)})}var dt=function(e){var n=e.children,r=St("viewportHeight"),o=Ie(t.compose(r,function(e){return D(e,"height")}));return i.createElement("div",{style:it,ref:o,"data-viewport-type":"element"},n)},ft=function(e){var t=e.children,n=xe(St("windowViewportRect"),Ct("customScrollParent"));return i.createElement("div",{ref:n,style:it,"data-viewport-type":"window"},t)},pt=function(e){var t=e.children,r=Ct("TopItemListComponent"),o=Ct("headerHeight"),i=a({},at,{marginTop:o+"px"}),l=Ct("context");return n.createElement(r||"div",{style:i,context:l},t)},ht=i.memo(function(e){var t=Ct("useWindowScroll"),n=Ct("topItemsIndexes").length>0,r=Ct("customScrollParent"),o=r||t?ft:dt;return i.createElement(r||t?Tt:xt,a({},e),i.createElement(o,null,i.createElement(st,null),i.createElement(rt,null),i.createElement(ut,null)),n&&i.createElement(pt,null,i.createElement(rt,{showTopList:!0})))}),gt=e.systemToComponent(et,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},ht),vt=gt.Component,St=gt.usePublisher,Ct=gt.useEmitterValue,It=gt.useEmitter,xt=ct({usePublisher:St,useEmitterValue:Ct,useEmitter:It}),Tt=mt({usePublisher:St,useEmitterValue:Ct,useEmitter:It}),wt=["placeholder"],yt=o.system(function(){var e=o.statefulStream(function(e){return"Item "+e}),t=o.statefulStream({}),n=o.statefulStream(null),r=o.statefulStream("virtuoso-grid-item"),i=o.statefulStream("virtuoso-grid-list"),a=o.statefulStream($e),l=o.statefulStream(o.noop),s=function(e,n){return void 0===n&&(n=null),o.statefulStreamFromEmitter(o.pipe(t,o.map(function(t){return t[e]}),o.distinctUntilChanged()),n)};return{context:n,itemContent:e,components:t,computeItemKey:a,itemClassName:r,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),bt=o.system(function(e){var t=e[0],n=e[1],r={item:Xe(n.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:o.stream(),ScrollContainer:o.stream(),ListContainer:o.stream(),emptyComponent:o.stream(),scrollSeek:o.stream()};function i(e,t,r){o.connect(o.pipe(e,o.withLatestFrom(n.components),o.map(function(e){var n,o=e[0],i=e[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+t+" instead."),a({},i,((n={})[t]=o,n))})),n.components)}return o.subscribe(r.scrollSeek,function(e){var r=e.placeholder,i=l(e,wt);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),o.publish(n.components,a({},o.getValue(n.components),{ScrollSeekPlaceholder:r})),o.publish(t.scrollSeekConfiguration,i)}),i(r.ItemContainer,"Item","ItemContainer"),i(r.ListContainer,"List","ListContainer"),i(r.ScrollContainer,"Scroller","ScrollContainer"),a({},t,n,r)},o.tup(he,yt)),Et=i.memo(function(){var e=Ft("gridState"),t=Ft("listClassName"),r=Ft("itemClassName"),o=Ft("itemContent"),i=Ft("computeItemKey"),l=Ft("isSeeking"),s=Bt("scrollHeight"),u=Ft("ItemComponent"),c=Ft("ListComponent"),m=Ft("ScrollSeekPlaceholder"),d=Ft("context"),f=Bt("itemDimensions"),p=Ie(function(e){s(e.parentElement.parentElement.scrollHeight);var t=e.firstChild;t&&f(t.getBoundingClientRect())});return n.createElement(c,a({ref:p,className:t},lt(c,d),{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}}),e.items.map(function(t){var s=i(t.index);return l?n.createElement(m,a({key:s},lt(m,d),{index:t.index,height:e.itemHeight,width:e.itemWidth})):n.createElement(u,a({},lt(u,d),{className:r,"data-index":t.index,key:s}),o(t.index,d))}))}),Lt=function(e){var t=e.children,n=Bt("viewportDimensions"),r=Ie(function(e){n(e.getBoundingClientRect())});return i.createElement("div",{style:it,ref:r},t)},Ht=function(e){var t=e.children,n=xe(Bt("windowViewportRect"),Ft("customScrollParent"));return i.createElement("div",{ref:n,style:it},t)},Rt=i.memo(function(e){var t=a({},e),n=Ft("useWindowScroll"),r=Ft("customScrollParent"),o=r||n?Ht:Lt;return i.createElement(r||n?Mt:Ot,a({},t),i.createElement(o,null,i.createElement(Et,null)))}),kt=e.systemToComponent(bt,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},Rt),zt=kt.Component,Bt=kt.usePublisher,Ft=kt.useEmitterValue,Pt=kt.useEmitter,Ot=ct({usePublisher:Bt,useEmitterValue:Ft,useEmitter:Pt}),Mt=mt({usePublisher:Bt,useEmitterValue:Ft,useEmitter:Pt}),Vt=t.system(function(){var e=t.statefulStream(function(e){return i.createElement("td",null,"Item $",e)}),n=t.statefulStream(null),r=t.statefulStream(null),o=t.statefulStream({}),a=t.statefulStream($e),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(o,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:n,itemContent:e,fixedHeaderContent:r,components:o,computeItemKey:a,scrollerRef:l,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),Ut=t.system(function(e){return a({},e[0],e[1])},t.tup(Ke,Vt)),At=function(e){return i.createElement("tr",null,i.createElement("td",{style:{height:e.height}}))},Wt=function(e){return i.createElement("tr",null,i.createElement("td",{style:{height:e.height,padding:0,border:0}}))},Nt=i.memo(function(){var e=qt("listState"),t=qt("deviation"),r=Yt("sizeRanges"),o=qt("useWindowScroll"),l=qt("customScrollParent"),s=Yt("windowScrollContainerState"),u=Yt("scrollContainerState"),c=l||o?s:u,m=qt("itemContent"),d=qt("trackItemSizes"),f=we(r,qt("itemSize"),d,c,qt("log"),l),p=qt("EmptyPlaceholder"),h=qt("ScrollSeekPlaceholder")||At,g=qt("TableBodyComponent"),v=qt("TableRowComponent"),S=qt("computeItemKey"),C=qt("isSeeking"),I=qt("paddingTopAddition"),x=qt("firstItemIndex"),T=qt("statefulTotalCount"),w=qt("context");if(0===T&&p)return n.createElement(p,lt(p,w));var y=e.offsetTop+I+t,b=e.offsetBottom,E=y>0?i.createElement(Wt,{height:y,key:"padding-top"}):null,L=b>0?i.createElement(Wt,{height:b,key:"padding-bottom"}):null,H=e.items.map(function(e){var t=e.originalIndex,r=S(t+x,e.data,w);return C?n.createElement(h,a({},lt(h,w),{key:r,index:e.index,height:e.size,type:e.type||"item"})):n.createElement(v,a({},lt(v,w),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:{overflowAnchor:"none"}}),m(e.index,e.data,w))});return n.createElement(g,a({ref:f,"data-test-id":"virtuoso-item-list"},lt(g,w)),[E].concat(H,[L]))}),Dt=function(e){var n=e.children,r=Yt("viewportHeight"),o=Ie(t.compose(r,function(e){return D(e,"height")}));return i.createElement("div",{style:it,ref:o,"data-viewport-type":"element"},n)},Gt=function(e){var t=e.children,n=xe(Yt("windowViewportRect"),qt("customScrollParent"));return i.createElement("div",{ref:n,style:it,"data-viewport-type":"window"},t)},jt=i.memo(function(e){var n=qt("useWindowScroll"),r=qt("customScrollParent"),o=Yt("fixedHeaderHeight"),l=qt("fixedHeaderContent"),s=qt("context"),u=Ie(t.compose(o,function(e){return D(e,"height")})),c=r||n?$t:Jt,m=r||n?Gt:Dt,d=qt("TableComponent"),f=qt("TableHeadComponent"),p=l?i.createElement(f,a({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:u},lt(f,s)),l()):null;return i.createElement(c,a({},e),i.createElement(m,null,i.createElement(d,a({style:{borderSpacing:0}},lt(d,s)),[p,i.createElement(Nt,{key:"TableBody"})])))}),_t=e.systemToComponent(Ut,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},jt),Kt=_t.Component,Yt=_t.usePublisher,qt=_t.useEmitterValue,Zt=_t.useEmitter,Jt=ct({usePublisher:Yt,useEmitterValue:qt,useEmitter:Zt}),$t=mt({usePublisher:Yt,useEmitterValue:qt,useEmitter:Zt}),Qt=vt,Xt=Kt,en=zt;exports.GroupedVirtuoso=vt,exports.TableVirtuoso=Xt,exports.Virtuoso=Qt,exports.VirtuosoGrid=en;
"use strict";var e=require("@virtuoso.dev/react-urx"),t=require("@virtuoso.dev/urx"),n=require("react");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var o=r(t),i=r(n);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,m,d="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;exports.LogLevel=void 0,(m=exports.LogLevel||(exports.LogLevel={}))[m.DEBUG=0]="DEBUG",m[m.INFO=1]="INFO",m[m.WARN=2]="WARN",m[m.ERROR=3]="ERROR";var f=((c={})[exports.LogLevel.DEBUG]="debug",c[exports.LogLevel.INFO]="log",c[exports.LogLevel.WARN]="warn",c[exports.LogLevel.ERROR]="error",c),p=o.system(function(){var e=o.statefulStream(exports.LogLevel.ERROR);return{log:o.statefulStream(function(t,n,r){var i;void 0===r&&(r=exports.LogLevel.INFO),r>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:o.getValue(e))&&console[f[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function h(e,t){void 0===t&&(t=!0);var r=n.useRef(null),o=function(e){};if("undefined"!=typeof ResizeObserver){var i=new ResizeObserver(function(t){var n=t[0].target;null!==n.offsetParent&&e(n)});o=function(e){e&&t?(i.observe(e),r.current=e):(r.current&&i.unobserve(r.current),r.current=null)}}return{ref:r,callbackRef:o}}function g(e,t){return void 0===t&&(t=!0),h(e,t).callbackRef}function v(e,t,n,r,o,i){return g(function(n){for(var a=function(e,t,n,r){var o=e.length;if(0===o)return null;for(var i=[],a=0;a<o;a++){var l=e.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=t(l,"offsetHeight");if(0===c&&r("Zero-sized element, this should not happen",{child:l},exports.LogLevel.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,t,0,o),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;r(i?[Math.max(s,0),i.scrollHeight]:[Math.max(s,0),l.scrollHeight]),null!==a&&e(a)},n)}function S(e,t){return Math.round(e.getBoundingClientRect()[t])}function C(e,t,r,i,a){void 0===i&&(i=o.noop);var l=n.useRef(null),s=n.useRef(null),u=n.useRef(null),c=n.useCallback(function(n){var r=n.target,o=r===window||r===document?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,i=r===window?document.documentElement.scrollHeight:r.scrollHeight;e([Math.max(o,0),i]),null!==s.current&&(o===s.current||o<=0||o===r.scrollHeight-S(r,"height"))&&(s.current=null,t(!0),u.current&&(clearTimeout(u.current),u.current=null))},[e,t]);return n.useEffect(function(){var e=a||l.current;return i(a||l.current),c({target:e}),e.addEventListener("scroll",c,{passive:!0}),function(){i(null),e.removeEventListener("scroll",c)}},[l,c,r,i,a]),{scrollerRef:l,scrollByCallback:function(e){null===s.current&&l.current.scrollBy(e)},scrollToCallback:function(n){var r=l.current;if(r&&(!("offsetHeight"in r)||0!==r.offsetHeight)){var o,i,a,c="smooth"===n.behavior;if(r===window?(i=Math.max(S(document.documentElement,"height"),document.documentElement.scrollHeight),o=window.innerHeight,a=document.documentElement.scrollTop):(i=r.scrollHeight,o=S(r,"height"),a=r.scrollTop),n.top=Math.ceil(Math.max(Math.min(i-o,n.top),0)),Math.abs(o-i)<1.01||n.top===a)return e([a,i]),void(c&&t(!0));c?(s.current=n.top,u.current&&clearTimeout(u.current),u.current=setTimeout(function(){u.current=null,s.current=null,t(!0)},1e3)):s.current=null,r.scrollTo(n)}}}}var I=o.system(function(){var e=o.stream(),t=o.stream(),n=o.statefulStream(0),r=o.stream(),i=o.statefulStream(0),a=o.stream(),l=o.stream(),s=o.statefulStream(0),u=o.statefulStream(0),c=o.stream(),m=o.stream(),d=o.statefulStream(!1);return o.connect(o.pipe(e,o.map(function(e){return e[0]})),t),o.connect(o.pipe(e,o.map(function(e){return e[1]})),l),o.connect(t,i),{scrollContainerState:e,scrollTop:t,viewportHeight:a,headerHeight:s,footerHeight:u,scrollHeight:l,smoothScrollTargetReached:r,scrollTo:c,scrollBy:m,statefulScrollTop:i,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),x={lvl:0};function T(e,t,n,r,o){return void 0===r&&(r=x),void 0===o&&(o=x),{k:e,v:t,lvl:n,l:r,r:o}}function w(e){return e===x}function y(){return x}function b(e,t){if(w(e))return x;var n=e.k,r=e.l,o=e.r;if(t===n){if(w(r))return o;if(w(o))return r;var i=k(r);return P(B(e,{k:i[0],v:i[1],l:z(r)}))}return P(B(e,t<n?{l:b(r,t)}:{r:b(o,t)}))}function E(e,t,n){if(void 0===n&&(n="k"),w(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var r=E(e.r,t,n);return-Infinity===r[0]?[e.k,e.v]:r}return E(e.l,t,n)}function L(e,t,n){return w(e)?T(t,n,1):t===e.k?B(e,{k:t,v:n}):function(e){return V(U(e))}(B(e,t<e.k?{l:L(e.l,t,n)}:{r:L(e.r,t,n)}))}function H(e,t,n){if(w(e))return[];var r=e.k,o=e.v,i=e.r,a=[];return r>t&&(a=a.concat(H(e.l,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(H(i,t,n))),a}function R(e){return w(e)?[]:[].concat(R(e.l),[{k:e.k,v:e.v}],R(e.r))}function k(e){return w(e.r)?[e.k,e.v]:k(e.r)}function z(e){return w(e.r)?e.l:P(B(e,{r:z(e.r)}))}function B(e,t){return T(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function F(e){return w(e)||e.lvl>e.r.lvl}function P(e){var t=e.l,n=e.r,r=e.lvl;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(F(t))return U(B(e,{lvl:r-1}));if(w(t)||w(t.r))throw new Error("Unexpected empty nodes");return B(t.r,{l:B(t,{r:t.r.l}),r:B(e,{l:t.r.r,lvl:r-1}),lvl:r})}if(F(e))return V(B(e,{lvl:r-1}));if(w(n)||w(n.l))throw new Error("Unexpected empty nodes");var o=n.l,i=F(o)?n.lvl-1:n.lvl;return B(o,{l:B(e,{r:o.l,lvl:r-1}),r:V(B(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}function O(e,t,n){return w(e)?[]:M(H(e,E(e,t)[0],n),function(e){return{index:e.k,value:e.v}})}function M(e,t){var n=e.length;if(0===n)return[];for(var r=t(e[0]),o=r.index,i=r.value,a=[],l=1;l<n;l++){var s=t(e[l]),u=s.index,c=s.value;a.push({start:o,end:u-1,value:i}),o=u,i=c}return a.push({start:o,end:Infinity,value:i}),a}function V(e){var t=e.r,n=e.lvl;return w(t)||w(t.r)||t.lvl!==n||t.r.lvl!==n?e:B(t,{l:B(e,{r:t.l}),lvl:n+1})}function U(e){var t=e.l;return w(t)||t.lvl!==e.lvl?e:B(t,{r:B(e,{l:t.r})})}function A(e,t,n,r){void 0===r&&(r=0);for(var o=e.length-1;r<=o;){var i=Math.floor((r+o)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error("Failed binary finding record in array - "+e.join(",")+", searched for "+t)}function W(e,t,n){return e[A(e,t,n)]}function N(e){var t=e.size,n=e.startIndex,r=e.endIndex;return function(e){return e.start===n&&(e.end===r||Infinity===e.end)&&e.value===t}}function D(e,t){var n=e.index;return t===n?0:t<n?-1:1}function G(e,t){var n=e.offset;return t===n?0:t<n?-1:1}function j(e){return{index:e.index,value:e}}function _(e,t,n){var r=e,o=0,i=0,a=0,l=0;if(0!==t){a=r[l=A(r,t-1,D)].offset;var s=E(n,t-1);o=s[0],i=s[1],r.length&&r[l].size===E(n,t)[1]&&(l-=1),r=r.slice(0,l+1)}else r=[];for(var c,m=u(O(n,t,Infinity));!(c=m()).done;){var d=c.value,f=d.start,p=d.value,h=(f-o)*i+a;r.push({offset:h,size:p,index:f}),o=f,a=h,i=p}return{offsetTree:r,lastIndex:o,lastOffset:a,lastSize:i}}function K(e,t){var n=t[0],r=t[1];n.length>0&&(0,t[2])("received item sizes",n,exports.LogLevel.DEBUG);var o=e.sizeTree,i=o,a=0;if(r.length>0&&w(o)&&2===n.length){var l=n[0].size,s=n[1].size;i=r.reduce(function(e,t){return L(L(e,t,l),t+1,s)},i)}else{var c=function(e,t){for(var n,r=w(e)?0:Infinity,o=u(t);!(n=o()).done;){var i=n.value,a=i.size,l=i.startIndex,s=i.endIndex;if(r=Math.min(r,l),w(e))e=L(e,0,a);else{var c=O(e,l-1,s+1);if(!c.some(N(i))){for(var m,d=!1,f=!1,p=u(c);!(m=p()).done;){var h=m.value,g=h.start,v=h.end,S=h.value;d?(s>=g||a===S)&&(e=b(e,g)):(f=S!==a,d=!0),v>s&&s>=g&&S!==a&&(e=L(e,s+1,S))}f&&(e=L(e,l,a))}}}return[e,r]}(i,n);i=c[0],a=c[1]}if(i===o)return e;var m=_(e.offsetTree,a,i),d=m.offsetTree;return{sizeTree:i,offsetTree:d,lastIndex:m.lastIndex,lastOffset:m.lastOffset,lastSize:m.lastSize,groupOffsetTree:r.reduce(function(e,t){return L(e,t,Y(t,d))},y()),groupIndices:r}}function Y(e,t){if(0===t.length)return 0;var n=W(t,e,D);return n.size*(e-n.index)+n.offset}function q(e,t){if(!Z(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function Z(e){return!w(e.groupOffsetTree)}var J={offsetHeight:"height",offsetWidth:"width"},$=o.system(function(e){var t=e[0].log,n=o.stream(),r=o.stream(),i=o.statefulStreamFromEmitter(r,0),l=o.stream(),s=o.stream(),u=o.statefulStream(0),c=o.statefulStream([]),m=o.statefulStream(void 0),d=o.statefulStream(void 0),f=o.statefulStream(function(e,t){return S(e,J[t])}),p=o.statefulStream(void 0),h={offsetTree:[],sizeTree:y(),groupOffsetTree:y(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},g=o.statefulStreamFromEmitter(o.pipe(n,o.withLatestFrom(c,t),o.scan(K,h),o.distinctUntilChanged()),h);o.connect(o.pipe(c,o.filter(function(e){return e.length>0}),o.withLatestFrom(g),o.map(function(e){var t=e[0],n=e[1],r=t.reduce(function(e,t,r){return L(e,t,Y(t,n.offsetTree)||r)},y());return a({},n,{groupIndices:t,groupOffsetTree:r})})),g),o.connect(o.pipe(r,o.withLatestFrom(g),o.filter(function(e){return e[0]<e[1].lastIndex}),o.map(function(e){var t=e[1];return[{startIndex:e[0],endIndex:t.lastIndex,size:t.lastSize}]})),n),o.connect(m,d);var v=o.statefulStreamFromEmitter(o.pipe(m,o.map(function(e){return void 0===e})),!0);o.connect(o.pipe(d,o.filter(function(e){return void 0!==e&&w(o.getValue(g).sizeTree)}),o.map(function(e){return[{startIndex:0,endIndex:0,size:e}]})),n);var C=o.streamFromEmitter(o.pipe(n,o.withLatestFrom(g),o.scan(function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}},{changed:!1,sizes:h}),o.map(function(e){return e.changed})));o.subscribe(o.pipe(u,o.scan(function(e,t){return{diff:e.prev-t,prev:t}},{diff:0,prev:0}),o.map(function(e){return e.diff})),function(e){e>0?o.publish(l,e):e<0&&o.publish(s,e)}),o.subscribe(o.pipe(u,o.withLatestFrom(t)),function(e){e[0]<0&&(0,e[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:u},exports.LogLevel.ERROR)});var I=o.streamFromEmitter(l);o.connect(o.pipe(l,o.withLatestFrom(g),o.map(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return R(n.sizeTree).reduce(function(e,n){var r=n.k,o=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:r+t-1,size:e.prevSize}]),prevIndex:r+t,prevSize:o}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),n);var x=o.streamFromEmitter(o.pipe(s,o.withLatestFrom(g),o.map(function(e){return Y(-e[0],e[1].offsetTree)})));return o.connect(o.pipe(s,o.withLatestFrom(g),o.map(function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: shifting items does not work with groups");var r=R(n.sizeTree).reduce(function(e,n){var r=n.v;return L(e,Math.max(0,n.k+t),r)},y());return a({},n,{sizeTree:r},_(n.offsetTree,0,r))})),g),{data:p,totalCount:r,sizeRanges:n,groupIndices:c,defaultItemSize:d,fixedItemSize:m,unshiftWith:l,shiftWith:s,shiftWithOffset:x,beforeUnshiftWith:I,firstItemIndex:u,sizes:g,listRefresh:C,statefulTotalCount:i,trackItemSizes:v,itemSize:f}},o.tup(p),{singleton:!0}),Q="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function X(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&Q||(t.behavior="auto"),t.offset||(t.offset=0),t}var ee=o.system(function(e){var t=e[0],n=t.sizes,r=t.totalCount,i=t.listRefresh,a=e[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=e[2].log,p=o.stream(),h=o.statefulStream(0),g=null,v=null,S=null;function C(){g&&(g(),g=null),S&&(S(),S=null),v&&(clearTimeout(v),v=null),o.publish(l,!1)}return o.connect(o.pipe(p,o.withLatestFrom(n,s,r,h,m,d,f),o.map(function(e){var t=e[0],n=e[1],r=e[2],a=e[3],s=e[4],u=e[5],m=e[6],d=e[7],f=X(t),h=f.align,I=f.behavior,x=f.offset,T=a-1,w=f.index;"LAST"===w&&(w=T),w=q(w,n);var y=Y(w=Math.max(0,w,Math.min(T,w)),n.offsetTree)+u;"end"===h?(y=y-r+E(n.sizeTree,w)[1],w===T&&(y+=m)):"center"===h?y=y-r/2+E(n.sizeTree,w)[1]/2:y-=s,x&&(y+=x);var b=function(e){C(),e?(d("retrying to scroll to",{location:t},exports.LogLevel.DEBUG),o.publish(p,t)):d("list did not change, scroll successful",{},exports.LogLevel.DEBUG)};if(C(),"smooth"===I){var L=!1;S=o.subscribe(i,function(e){L=L||e}),g=o.handleNext(c,function(){b(L)})}else g=o.handleNext(o.pipe(i,function(e){var t=setTimeout(function(){e(!1)},50);return function(n){n&&(e(!0),clearTimeout(t))}}),b);return v=setTimeout(function(){C()},1200),o.publish(l,!0),d("scrolling from index to",{index:w,top:y,behavior:I},exports.LogLevel.DEBUG),{top:y,behavior:I}})),u),{scrollToIndex:p,topListHeight:h}},o.tup($,I,p),{singleton:!0}),te="up",ne={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},re=o.system(function(e){var t=e[0],n=t.scrollContainerState,r=t.scrollTop,i=t.viewportHeight,a=t.headerHeight,l=t.footerHeight,s=t.scrollBy,u=o.statefulStream(!1),c=o.statefulStream(!0),m=o.stream(),d=o.stream(),f=o.statefulStream(4),p=o.streamFromEmitter(o.pipe(o.merge(o.pipe(o.duc(r),o.skip(1),o.mapTo(!0)),o.pipe(o.duc(r),o.skip(1),o.mapTo(!1),o.debounceTime(100))),o.distinctUntilChanged())),h=o.statefulStreamFromEmitter(o.pipe(o.merge(o.pipe(s,o.mapTo(!0)),o.pipe(s,o.mapTo(!1),o.debounceTime(200))),o.distinctUntilChanged()),!1);o.connect(o.pipe(o.duc(r),o.map(function(e){return 0===e}),o.distinctUntilChanged()),c),o.connect(c,d);var g=o.streamFromEmitter(o.pipe(o.combineLatest(n,o.duc(i),o.duc(a),o.duc(l),o.duc(f)),o.scan(function(e,t){var n,r,o=t[0],i=o[0],a=o[1],l=t[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-t[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",r=e.state.scrollTop-i):(n="SIZE_DECREASED",r=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:r}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":l<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},ne),o.distinctUntilChanged(function(e,t){return e&&e.atBottom===t.atBottom}))),v=o.statefulStreamFromEmitter(o.pipe(n,o.scan(function(e,t){var n=t[0],r=t[1];return e.scrollHeight!==r?e.scrollTop!==n?{scrollHeight:r,scrollTop:n,jump:e.scrollTop-n,changed:!0}:{scrollHeight:r,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:r,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),o.filter(function(e){return e.changed}),o.map(function(e){return e.jump})),0);o.connect(o.pipe(g,o.map(function(e){return e.atBottom})),u),o.connect(o.pipe(u,o.throttleTime(50)),m);var S=o.statefulStream("down");o.connect(o.pipe(n,o.map(function(e){return e[0]}),o.distinctUntilChanged(),o.scan(function(e,t){return o.getValue(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?te:"down",prevScrollTop:t}},{direction:"down",prevScrollTop:0}),o.map(function(e){return e.direction})),S),o.connect(o.pipe(n,o.throttleTime(50),o.mapTo("none")),S);var C=o.statefulStream(0);return o.connect(o.pipe(p,o.filter(function(e){return!e}),o.mapTo(0)),C),o.connect(o.pipe(r,o.throttleTime(100),o.withLatestFrom(p),o.filter(function(e){return!!e[1]}),o.scan(function(e,t){return[e[1],t[0]]},[0,0]),o.map(function(e){return e[1]-e[0]})),C),{isScrolling:p,isAtTop:c,isAtBottom:u,atBottomState:g,atTopStateChange:d,atBottomStateChange:m,scrollDirection:S,atBottomThreshold:f,scrollVelocity:C,lastJumpDueToItemResize:v}},o.tup(I)),oe=o.system(function(e){var n=e[0].log,r=o.statefulStream(!1),i=o.streamFromEmitter(o.pipe(r,o.filter(function(e){return e}),o.distinctUntilChanged()));return o.subscribe(r,function(e){e&&t.getValue(n)("props updated",{},exports.LogLevel.DEBUG)}),{propsReady:r,didMount:i}},t.tup(p),{singleton:!0}),ie=o.system(function(e){var t=e[0],n=t.sizes,r=t.listRefresh,i=t.defaultItemSize,a=e[1].scrollTop,l=e[2].scrollToIndex,s=e[3].didMount,u=o.statefulStream(!0),c=o.statefulStream(0);return o.connect(o.pipe(s,o.withLatestFrom(c),o.filter(function(e){return!!e[1]}),o.mapTo(!1)),u),o.subscribe(o.pipe(o.combineLatest(r,s),o.withLatestFrom(u,n,i),o.filter(function(e){var t=e[1],n=e[3];return e[0][1]&&(!w(e[2].sizeTree)||void 0!==n)&&!t}),o.withLatestFrom(c)),function(e){var t=e[1];setTimeout(function(){o.handleNext(a,function(){o.publish(u,!0)}),o.publish(l,t)})}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},o.tup($,I,ee,oe),{singleton:!0});function ae(e){return!!e&&("smooth"===e?"smooth":"auto")}var le=o.system(function(e){var t=e[0],n=t.totalCount,r=t.listRefresh,i=e[1],a=i.isAtBottom,l=i.atBottomState,s=e[2].scrollToIndex,u=e[3].scrolledToInitialItem,c=e[4],m=c.propsReady,d=c.didMount,f=e[5].log,p=e[6].scrollingInProgress,h=o.statefulStream(!1),g=null;function v(e){o.publish(s,{index:"LAST",align:"end",behavior:e})}return o.subscribe(o.pipe(o.combineLatest(o.pipe(o.duc(n),o.skip(1)),d),o.withLatestFrom(o.duc(h),a,u,p),o.map(function(e){var t=e[0],n=t[0],r=t[1]&&e[3],o="auto";return r&&(o=function(e,t){return"function"==typeof e?ae(e(t)):t&&ae(e)}(e[1],e[2]||e[4]),r=r&&!!o),{totalCount:n,shouldFollow:r,followOutputBehavior:o}}),o.filter(function(e){return e.shouldFollow})),function(e){var t=e.totalCount,n=e.followOutputBehavior;g&&(g(),g=null),g=o.handleNext(r,function(){o.getValue(f)("following output to ",{totalCount:t},exports.LogLevel.DEBUG),v(n),g=null})}),o.subscribe(o.pipe(o.combineLatest(o.duc(h),n,m),o.filter(function(e){return e[0]&&e[2]}),o.scan(function(e,t){var n=t[1];return{refreshed:e.value===n,value:n}},{refreshed:!1,value:0}),o.filter(function(e){return e.refreshed}),o.withLatestFrom(h,n)),function(e){var t=e[1],n=o.handleNext(l,function(e){!t||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||g||(o.getValue(f)("scrolling to bottom due to increased size",{},exports.LogLevel.DEBUG),v("auto"))});setTimeout(n,100)}),o.subscribe(o.combineLatest(o.duc(h),l),function(e){var t=e[1];e[0]&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&v("auto")}),{followOutput:h}},o.tup($,re,ee,ie,oe,p,I));function se(e){return e.reduce(function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e},{totalCount:0,groupIndices:[]})}var ue=t.system(function(e){var n=e[0],r=n.totalCount,o=n.groupIndices,i=n.sizes,a=e[1],l=a.scrollTop,s=a.headerHeight,u=t.stream(),c=t.stream(),m=t.streamFromEmitter(t.pipe(u,t.map(se)));return t.connect(t.pipe(m,t.map(t.prop("totalCount"))),r),t.connect(t.pipe(m,t.map(t.prop("groupIndices"))),o),t.connect(t.pipe(t.combineLatest(l,i,s),t.filter(function(e){return Z(e[1])}),t.map(function(e){return E(e[1].groupOffsetTree,Math.max(e[0]-e[2],0),"v")[0]}),t.distinctUntilChanged(),t.map(function(e){return[e]})),c),{groupCounts:u,topItemsIndexes:c}},t.tup($,I));function ce(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}function me(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function de(e,t,n){return"number"==typeof e?n===te&&"top"===t||"down"===n&&"bottom"===t?e:0:n===te?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse}function fe(e,t){return"number"==typeof e?e:e[t]||0}var pe=o.system(function(e){var t=e[0],n=t.scrollTop,r=t.viewportHeight,i=t.deviation,a=t.headerHeight,l=o.stream(),s=o.statefulStream(0),u=o.statefulStream(0),c=o.statefulStream(0),m=o.statefulStream(0),d=o.statefulStreamFromEmitter(o.pipe(o.combineLatest(o.duc(n),o.duc(r),o.duc(a),o.duc(l,ce),o.duc(m),o.duc(s),o.duc(u),o.duc(i),o.duc(c)),o.map(function(e){var t=e[0],n=e[1],r=e[2],o=e[3],i=o[0],a=o[1],l=e[4],s=e[6],u=e[7],c=e[8],m=t-u,d=e[5]+s,f=Math.max(r-m,0),p="none",h=fe(c,"top"),g=fe(c,"bottom");return i-=u,a+=r+s,(i+=r+s)>t+d-h&&(p=te),(a-=u)<t-f+n+g&&(p="down"),"none"!==p?[Math.max(m-r-de(l,"top",p)-h,0),m-f-s+n+de(l,"bottom",p)+g]:null}),o.filter(function(e){return null!=e}),o.distinctUntilChanged(ce)),[0,0]);return{listBoundary:l,overscan:m,topListHeight:s,fixedHeaderHeight:u,increaseViewportBy:c,visibleRange:d}},o.tup(I),{singleton:!0}),he={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function ge(e,t,n){if(0===e.length)return[];if(!Z(t))return e.map(function(e){return a({},e,{index:e.index+n,originalIndex:e.index})});for(var r,o=[],i=O(t.groupOffsetTree,e[0].index,e[e.length-1].index),l=void 0,s=0,c=u(e);!(r=c()).done;){var m=r.value;(!l||l.end<m.index)&&(l=i.shift(),s=t.groupIndices.indexOf(l.start)),o.push(a({},m.index===l.start?{type:"group",index:s}:{index:m.index-(s+1)+n,groupIndex:s},{size:m.size,offset:m.offset,originalIndex:m.index,data:m.data}))}return o}function ve(e,t,n,r,o){var i=0,a=0;if(e.length>0){i=e[0].offset;var l=e[e.length-1];a=l.offset+l.size}var s=i,u=r.lastOffset+(n-r.lastIndex)*r.lastSize-a;return{items:ge(e,r,o),topItems:ge(t,r,o),topListHeight:t.reduce(function(e,t){return t.size+e},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n}}var Se,Ce,Ie,xe=o.system(function(e){var t=e[0],n=t.sizes,r=t.totalCount,i=t.data,l=t.firstItemIndex,s=e[1],c=e[2],m=c.visibleRange,d=c.listBoundary,f=c.topListHeight,p=e[3],h=p.scrolledToInitialItem,g=p.initialTopMostItemIndex,v=e[4].topListHeight,S=e[5],C=e[6].didMount,I=o.statefulStream([]),x=o.stream();o.connect(s.topItemsIndexes,I);var T=o.statefulStreamFromEmitter(o.pipe(o.combineLatest(C,o.duc(m),o.duc(r),o.duc(n),o.duc(g),h,o.duc(I),o.duc(l),i),o.filter(function(e){return e[0]}),o.map(function(e){var t=e[1],n=t[0],r=t[1],i=e[2],a=e[4],l=e[5],s=e[6],c=e[7],m=e[8],d=e[3],f=d.sizeTree,p=d.offsetTree;if(0===i||0===n&&0===r)return he;if(w(f))return ve(function(e,t,n){if(Z(t)){var r=q(e,t);return[{index:E(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(function(e,t){return"number"==typeof e?e:"LAST"===e.index?t-1:e.index}(a,i),d,m),[],i,d,c);var h=[];if(s.length>0)for(var g,v=s[0],S=s[s.length-1],C=0,I=u(O(f,v,S));!(g=I()).done;)for(var x=g.value,T=x.value,y=Math.max(x.start,v),b=Math.min(x.end,S),L=y;L<=b;L++)h.push({index:L,size:T,offset:C,data:m&&m[L]}),C+=T;if(!l)return ve([],h,i,d,c);var H=s.length>0?s[s.length-1]+1:0,R=function(e,t,n,r){return void 0===r&&(r=0),r>0&&(t=Math.max(t,W(e,r,D).offset)),M((i=n,l=A(o=e,t,a=G),s=A(o,i,a,l),o.slice(l,s+1)),j);var o,i,a,l,s}(p,n,r,H);if(0===R.length)return null;var k=i-1;return ve(o.tap([],function(e){for(var t,o=u(R);!(t=o()).done;){var i=t.value,a=i.value,l=a.offset,s=i.start,c=a.size;a.offset<n&&(l+=((s+=Math.floor((n-a.offset)/c))-i.start)*c),s<H&&(l+=(H-s)*c,s=H);for(var d=Math.min(i.end,k),f=s;f<=d&&!(l>=r);f++)e.push({index:f,size:c,offset:l,data:m&&m[f]}),l+=c}}),h,i,d,c)}),o.filter(function(e){return null!==e}),o.distinctUntilChanged()),he);return o.connect(o.pipe(i,o.filter(function(e){return void 0!==e}),o.map(function(e){return e.length})),r),o.connect(o.pipe(T,o.map(o.prop("topListHeight"))),v),o.connect(v,f),o.connect(o.pipe(T,o.map(function(e){return[e.top,e.bottom]})),d),o.connect(o.pipe(T,o.map(function(e){return e.items})),x),a({listState:T,topItemsIndexes:I,endReached:o.streamFromEmitter(o.pipe(T,o.filter(function(e){return e.items.length>0}),o.withLatestFrom(r,i),o.filter(function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1}),o.map(function(e){return[e[1]-1,e[2]]}),o.distinctUntilChanged(ce),o.map(function(e){return e[0]}))),startReached:o.streamFromEmitter(o.pipe(T,o.throttleTime(200),o.filter(function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length}),o.map(function(e){return e.items[0].index}),o.distinctUntilChanged())),rangeChanged:o.streamFromEmitter(o.pipe(T,o.filter(function(e){return e.items.length>0}),o.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),o.distinctUntilChanged(me))),itemsRendered:x},S)},o.tup($,ue,pe,ie,ee,re,oe),{singleton:!0}),Te=o.system(function(e){var t=e[0],n=t.sizes,r=t.firstItemIndex,i=t.data,a=e[1].listState,l=e[2].didMount,s=o.statefulStream(0);return o.connect(o.pipe(l,o.withLatestFrom(s),o.filter(function(e){return 0!==e[1]}),o.withLatestFrom(n,r,i),o.map(function(e){var t=e[0][1],n=e[1],r=e[2],o=e[3],i=void 0===o?[]:o,a=0;if(n.groupIndices.length>0)for(var l,s=u(n.groupIndices);!((l=s()).done||l.value-a>=t);)a++;var c=t+a;return ve(Array.from({length:c}).map(function(e,t){return{index:t,size:0,offset:0,data:i[t]}}),[],c,n,r)})),a),{initialItemCount:s}},o.tup($,xe,oe),{singleton:!0}),we=o.system(function(e){var t=e[0].scrollVelocity,n=o.statefulStream(!1),r=o.stream(),i=o.statefulStream(!1);return o.connect(o.pipe(t,o.withLatestFrom(i,n,r),o.filter(function(e){return!!e[1]}),o.map(function(e){var t=e[0],n=e[1],r=e[2],o=e[3],i=n.enter;if(r){if((0,n.exit)(t,o))return!1}else if(i(t,o))return!0;return r}),o.distinctUntilChanged()),n),o.subscribe(o.pipe(o.combineLatest(n,t,r),o.withLatestFrom(i)),function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])}),{isSeeking:n,scrollSeekConfiguration:i,scrollVelocity:t,scrollSeekRangeChanged:r}},o.tup(re),{singleton:!0}),ye=t.system(function(e){var n=e[0].topItemsIndexes,r=t.statefulStream(0);return t.connect(t.pipe(r,t.filter(function(e){return e>0}),t.map(function(e){return Array.from({length:e}).map(function(e,t){return t})})),n),{topItemCount:r}},t.tup(xe)),be=o.system(function(e){var t=e[0],n=t.footerHeight,r=t.headerHeight,i=e[1].listState,a=o.stream(),l=o.statefulStreamFromEmitter(o.pipe(o.combineLatest(n,r,i),o.map(function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom})),0);return o.connect(o.duc(l),a),{totalListHeight:l,totalListHeightChanged:a}},o.tup(I,xe),{singleton:!0}),Ee=o.system(function(e){var t=e[0],n=t.scrollBy,r=t.scrollTop,i=t.deviation,a=t.scrollingInProgress,l=e[1],s=l.isScrolling,u=l.isAtBottom,c=l.atBottomState,m=l.scrollDirection,d=e[3],f=d.beforeUnshiftWith,p=d.shiftWithOffset,h=d.sizes,g=e[4].log,v=o.streamFromEmitter(o.pipe(e[2].listState,o.withLatestFrom(l.lastJumpDueToItemResize),o.scan(function(e,t){var n=e[1],r=t[0],o=r.items,i=r.totalCount,a=t[1],l=0;if(e[2]===i){if(n.length>0&&o.length>0){var s=1===o.length;if(0!==o[0].originalIndex||0!==n[0].originalIndex)for(var u=function(e){var t=o[e],r=n.find(function(e){return e.originalIndex===t.originalIndex});return r?t.offset!==r.offset||s?(l=t.offset-r.offset+t.size-r.size,"break"):void 0:"continue"},c=o.length-1;c>=0;c--){var m=u(c);if("continue"!==m&&"break"===m)break}}0!==l&&(l+=a)}return[l,o,i]},[0,[],0]),o.filter(function(e){return 0!==e[0]}),o.withLatestFrom(r,m,a,g,u,c),o.filter(function(e){return!e[3]&&0!==e[1]&&e[2]===te}),o.map(function(e){var t=e[0][0];return(0,e[4])("Upward scrolling compensation",{amount:t},exports.LogLevel.DEBUG),t})));return o.connect(o.pipe(v,o.withLatestFrom(i),o.map(function(e){return e[1]-e[0]})),i),o.subscribe(o.pipe(o.combineLatest(o.statefulStreamFromEmitter(s,!1),i),o.filter(function(e){return!e[0]&&0!==e[1]}),o.map(function(e){return e[1]}),o.throttleTime(1)),function(e){e>0?(o.publish(n,{top:-e,behavior:"auto"}),o.publish(i,0)):(o.publish(i,0),o.publish(n,{top:-e,behavior:"auto"}))}),o.connect(o.pipe(p,o.map(function(e){return{top:-e}})),n),o.connect(o.pipe(f,o.withLatestFrom(h),o.map(function(e){return e[0]*e[1].lastSize})),v),{deviation:i}},o.tup(I,re,xe,$,p)),Le=o.system(function(e){var t=e[0].totalListHeight,n=e[1].didMount,r=e[2].scrollTo,i=o.statefulStream(0);return o.subscribe(o.pipe(n,o.withLatestFrom(i),o.filter(function(e){return 0!==e[1]}),o.map(function(e){return{top:e[1]}})),function(e){o.handleNext(o.pipe(t,o.filter(function(e){return 0!==e})),function(){setTimeout(function(){o.publish(r,e)})})}),{initialScrollTop:i}},o.tup(be,oe,I),{singleton:!0}),He=o.system(function(e){var t=e[0].viewportHeight,n=e[1].totalListHeight,r=o.statefulStream(!1);return{alignToBottom:r,paddingTopAddition:o.statefulStreamFromEmitter(o.pipe(o.combineLatest(r,t,n),o.filter(function(e){return e[0]}),o.map(function(e){return Math.max(0,e[1]-e[2])}),o.distinctUntilChanged()),0)}},o.tup(I,be),{singleton:!0}),Re=o.system(function(e){var t=e[0],n=t.scrollTo,r=t.scrollContainerState,i=o.stream(),l=o.stream(),s=o.stream(),u=o.statefulStream(!1),c=o.statefulStream(void 0);return o.connect(o.pipe(o.combineLatest(i,l),o.map(function(e){var t=e[0],n=t[1];return[Math.max(0,t[0]-e[1].offsetTop),n]})),r),o.connect(o.pipe(n,o.withLatestFrom(l),o.map(function(e){var t=e[0];return a({},t,{top:t.top+e[1].offsetTop})})),s),{useWindowScroll:u,customScrollParent:c,windowScrollContainerState:i,windowViewportRect:l,windowScrollTo:s}},o.tup(I)),ke=o.system(function(e){var t=e[0],n=t.sizes,r=t.totalCount,i=e[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,u=i.scrollingInProgress,c=e[2].scrollToIndex,m=o.stream();return o.connect(o.pipe(m,o.withLatestFrom(n,l,r,s,a),o.map(function(e){var t=e[0],n=t.index,r=t.behavior,i=void 0===r?"auto":r,a=t.done,l=e[1],s=e[2],c=e[4],m=e[5],d=e[3]-1,f=null;n=q(n,l);var p=Y(n=Math.max(0,n,Math.min(d,n)),l.offsetTree)+c;return p<m?f={index:n,behavior:i,align:"start"}:p+E(l.sizeTree,n)[1]>m+s&&(f={index:n,behavior:i,align:"end"}),f?a&&o.handleNext(o.pipe(u,o.skip(1),o.filter(function(e){return!1===e})),a):a&&a(),f}),o.filter(function(e){return null!==e})),c),{scrollIntoView:m}},o.tup($,I,ee,xe,p),{singleton:!0}),ze=["listState","topItemsIndexes"],Be=o.system(function(e){return a({},e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},o.tup(pe,Te,oe,we,be,Le,He,Re,ke)),Fe=o.system(function(e){var t=e[0],n=t.totalCount,r=t.sizeRanges,i=t.fixedItemSize,s=t.defaultItemSize,u=t.trackItemSizes,c=t.itemSize,m=t.data,d=t.firstItemIndex,f=t.groupIndices,p=t.statefulTotalCount,h=e[1],g=h.initialTopMostItemIndex,v=h.scrolledToInitialItem,S=e[2],C=e[3],I=e[4],x=I.listState,T=I.topItemsIndexes,w=l(I,ze),y=e[5].scrollToIndex,b=e[7].topItemCount,E=e[8].groupCounts,L=e[9],H=e[10];return o.connect(w.rangeChanged,L.scrollSeekRangeChanged),o.connect(o.pipe(L.windowViewportRect,o.map(o.prop("visibleHeight"))),S.viewportHeight),a({totalCount:n,data:m,firstItemIndex:d,sizeRanges:r,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:T,topItemCount:b,groupCounts:E,fixedItemHeight:i,defaultItemHeight:s},C,{statefulTotalCount:p,listState:x,scrollToIndex:y,trackItemSizes:u,itemSize:c,groupIndices:f},w,L,S,H)},o.tup($,ie,I,le,xe,ee,Ee,ye,ue,Be,p)),Pe=(Se=function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"},Ie=!1,function(){return Ie||(Ie=!0,Ce=Se()),Ce});function Oe(e,t){var r=n.useRef(null),o=n.useCallback(function(n){if(null!==n){var o,i,a=n.getBoundingClientRect(),l=a.width;if(t){var s=t.getBoundingClientRect(),u=a.top-s.top;o=s.height-Math.max(0,u),i=u+t.scrollTop}else o=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;r.current={offsetTop:i,visibleHeight:o,visibleWidth:l},e(r.current)}},[e,t]),i=h(o),a=i.callbackRef,l=i.ref,s=n.useCallback(function(){o(l.current)},[o,l]);return n.useEffect(function(){if(t){t.addEventListener("scroll",s);var e=new ResizeObserver(s);return e.observe(t),function(){t.removeEventListener("scroll",s),e.unobserve(t)}}return window.addEventListener("scroll",s),window.addEventListener("resize",s),function(){window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),a}var Me=["placeholder"],Ve=["style","children"],Ue=["style","children"];function Ae(e){return e}var We=t.system(function(){var e=t.statefulStream(function(e){return"Item "+e}),n=t.statefulStream(null),r=t.statefulStream(function(e){return"Group "+e}),o=t.statefulStream({}),i=t.statefulStream(Ae),a=t.statefulStream("div"),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(o,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:n,itemContent:e,groupContent:r,components:o,computeItemKey:i,headerFooterTag:a,scrollerRef:l,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}});function Ne(e,n){var r=t.stream();return t.subscribe(r,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+n,"color: red;","color: inherit;","color: blue;")}),t.connect(r,e),r}var De=t.system(function(e){var n=e[0],r=e[1],o={item:Ne(r.itemContent,"Rename the %citem%c prop to %citemContent."),group:Ne(r.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:Ne(n.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:Ne(n.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:Ne(n.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:t.stream(),maxHeightCacheSize:t.stream(),footer:t.stream(),header:t.stream(),HeaderContainer:t.stream(),FooterContainer:t.stream(),ItemContainer:t.stream(),ScrollContainer:t.stream(),GroupContainer:t.stream(),ListContainer:t.stream(),emptyComponent:t.stream(),scrollSeek:t.stream()};function i(e,n,o){t.connect(t.pipe(e,t.withLatestFrom(r.components),t.map(function(e){var t,r=e[0],i=e[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+n+" instead."),a({},i,((t={})[n]=r,t))})),r.components)}return t.subscribe(o.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),t.subscribe(o.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),t.subscribe(o.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),t.subscribe(o.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),t.subscribe(o.scrollSeek,function(e){var o=e.placeholder,i=l(e,Me);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),t.publish(r.components,a({},t.getValue(r.components),{ScrollSeekPlaceholder:o})),t.publish(n.scrollSeekConfiguration,i)}),i(o.footer,"Footer","footer"),i(o.header,"Header","header"),i(o.ItemContainer,"Item","ItemContainer"),i(o.ListContainer,"List","ListContainer"),i(o.ScrollContainer,"Scroller","ScrollContainer"),i(o.emptyComponent,"EmptyPlaceholder","emptyComponent"),i(o.GroupContainer,"Group","GroupContainer"),a({},n,r,o)},t.tup(Fe,We)),Ge=function(e){return i.createElement("div",{style:{height:e.height}})},je={position:Pe(),zIndex:1,overflowAnchor:"none"},_e=i.memo(function(e){var r=e.showTopList,o=void 0!==r&&r,i=lt("listState"),l=lt("deviation"),s=at("sizeRanges"),u=lt("useWindowScroll"),c=lt("customScrollParent"),m=at("windowScrollContainerState"),d=at("scrollContainerState"),f=c||u?m:d,p=lt("itemContent"),h=lt("context"),g=lt("groupContent"),S=lt("trackItemSizes"),C=lt("itemSize"),I=lt("log"),x=v(s,C,S,o?t.noop:f,I,c),T=lt("EmptyPlaceholder"),w=lt("ScrollSeekPlaceholder")||Ge,y=lt("ListComponent"),b=lt("ItemComponent"),E=lt("GroupComponent"),L=lt("computeItemKey"),H=lt("isSeeking"),R=lt("groupIndices").length>0,k=lt("paddingTopAddition"),z=lt("firstItemIndex"),B=lt("statefulTotalCount"),F=o?{}:{boxSizing:"border-box",paddingTop:i.offsetTop+k,paddingBottom:i.offsetBottom,marginTop:l};return!o&&0===B&&T?n.createElement(T,Ze(T,h)):n.createElement(y,a({},Ze(y,h),{ref:x,style:F,"data-test-id":o?"virtuoso-top-item-list":"virtuoso-item-list"}),(o?i.topItems:i.items).map(function(e){var t=e.originalIndex,r=L(t+z,e.data,h);return H?n.createElement(w,a({},Ze(w,h),{key:r,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?n.createElement(E,a({},Ze(E,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:je}),g(e.index)):n.createElement(b,a({},Ze(b,h),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,style:{overflowAnchor:"none"}}),R?p(e.index,e.groupIndex,e.data,h):p(e.index,e.data,h))}))}),Ke={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ye={width:"100%",height:"100%",position:"absolute",top:0},qe={width:"100%",position:Pe(),top:0};function Ze(e,t){if("string"!=typeof e)return{context:t}}var Je=i.memo(function(){var e=lt("HeaderComponent"),t=at("headerHeight"),r=lt("headerFooterTag"),o=g(function(e){return t(S(e,"height"))}),i=lt("context");return e?n.createElement(r,{ref:o},n.createElement(e,Ze(e,i))):null}),$e=i.memo(function(){var e=lt("FooterComponent"),t=at("footerHeight"),r=lt("headerFooterTag"),o=g(function(e){return t(S(e,"height"))}),i=lt("context");return e?n.createElement(r,{ref:o},n.createElement(e,Ze(e,i))):null});function Qe(e){var t=e.usePublisher,r=e.useEmitter,o=e.useEmitterValue;return i.memo(function(e){var i=e.style,s=e.children,u=l(e,Ve),c=t("scrollContainerState"),m=o("ScrollerComponent"),d=t("smoothScrollTargetReached"),f=o("scrollerRef"),p=o("context"),h=C(c,d,m,f),g=h.scrollerRef,v=h.scrollByCallback;return r("scrollTo",h.scrollToCallback),r("scrollBy",v),n.createElement(m,a({ref:g,style:a({},Ke,i),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},u,Ze(m,p)),s)})}function Xe(e){var r=e.usePublisher,o=e.useEmitter,s=e.useEmitterValue;return i.memo(function(e){var i=e.style,u=e.children,c=l(e,Ue),m=r("windowScrollContainerState"),f=s("ScrollerComponent"),p=r("smoothScrollTargetReached"),h=s("totalListHeight"),g=s("deviation"),v=s("customScrollParent"),S=s("context"),I=C(m,p,f,t.noop,v),x=I.scrollerRef,T=I.scrollByCallback,w=I.scrollToCallback;return d(function(){return x.current=v||window,function(){x.current=null}},[x,v]),o("windowScrollTo",w),o("scrollBy",T),n.createElement(f,a({style:a({position:"relative"},i,0!==h?{height:h+g}:{}),"data-virtuoso-scroller":!0},c,Ze(f,S)),u)})}var et=function(e){var n=e.children,r=at("viewportHeight"),o=g(t.compose(r,function(e){return S(e,"height")}));return i.createElement("div",{style:Ye,ref:o,"data-viewport-type":"element"},n)},tt=function(e){var t=e.children,n=Oe(at("windowViewportRect"),lt("customScrollParent"));return i.createElement("div",{ref:n,style:Ye,"data-viewport-type":"window"},t)},nt=function(e){var t=e.children,r=lt("TopItemListComponent"),o=lt("headerHeight"),i=a({},qe,{marginTop:o+"px"}),l=lt("context");return n.createElement(r||"div",{style:i,context:l},t)},rt=i.memo(function(e){var t=lt("useWindowScroll"),n=lt("topItemsIndexes").length>0,r=lt("customScrollParent"),o=r||t?tt:et;return i.createElement(r||t?ct:ut,a({},e),i.createElement(o,null,i.createElement(Je,null),i.createElement(_e,null),i.createElement($e,null)),n&&i.createElement(nt,null,i.createElement(_e,{showTopList:!0})))}),ot=e.systemToComponent(De,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},rt),it=ot.Component,at=ot.usePublisher,lt=ot.useEmitterValue,st=ot.useEmitter,ut=Qe({usePublisher:at,useEmitterValue:lt,useEmitter:st}),ct=Xe({usePublisher:at,useEmitterValue:lt,useEmitter:st}),mt={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},dt={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},ft=Math.round,pt=Math.ceil,ht=Math.floor,gt=Math.min,vt=Math.max;function St(e,t){return Array.from({length:t-e+1}).map(function(t,n){return{index:n+e}})}var Ct=o.system(function(e){var t=e[0],n=t.overscan,r=t.visibleRange,i=t.listBoundary,l=e[1],s=l.scrollTop,u=l.viewportHeight,c=l.scrollBy,m=l.scrollTo,d=l.smoothScrollTargetReached,f=l.scrollContainerState,p=e[2],h=e[3],g=e[4],v=g.propsReady,S=g.didMount,C=e[5],I=C.windowViewportRect,x=C.windowScrollTo,T=C.useWindowScroll,w=C.customScrollParent,y=C.windowScrollContainerState,b=o.statefulStream(0),E=o.statefulStream(0),L=o.statefulStream(mt),H=o.statefulStream({height:0,width:0}),R=o.statefulStream({height:0,width:0}),k=o.stream(),z=o.stream(),B=o.statefulStream(0);o.connect(o.pipe(S,o.withLatestFrom(E),o.filter(function(e){return 0!==e[1]}),o.map(function(e){return{items:St(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),L),o.connect(o.pipe(o.combineLatest(o.duc(b),r,o.duc(R,function(e,t){return e&&e.width===t.width&&e.height===t.height})),o.withLatestFrom(H),o.map(function(e){var t=e[0],n=t[0],r=t[1],o=r[0],i=r[1],a=t[2],l=e[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return mt;if(0===u)return dt;var m=Tt(c,u),d=m*ht(o/s),f=m*pt(i/s)-1;f=gt(n-1,f);var p=St(d=gt(f,vt(0,d)),f),h=It(l,a,p),g=h.top,v=h.bottom;return{items:p,offsetTop:g,offsetBottom:pt(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),L),o.connect(o.pipe(H,o.map(function(e){return e.height})),u),o.connect(o.pipe(o.combineLatest(H,R,L),o.map(function(e){var t=It(e[0],e[1],e[2].items);return[t.top,t.bottom]}),o.distinctUntilChanged(ce)),i);var F=o.streamFromEmitter(o.pipe(o.duc(L),o.filter(function(e){return e.items.length>0}),o.withLatestFrom(b),o.filter(function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1}),o.map(function(e){return e[1]-1}),o.distinctUntilChanged())),P=o.streamFromEmitter(o.pipe(o.duc(L),o.filter(function(e){var t=e.items;return t.length>0&&0===t[0].index}),o.mapTo(0),o.distinctUntilChanged())),O=o.streamFromEmitter(o.pipe(o.duc(L),o.filter(function(e){return e.items.length>0}),o.map(function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}}),o.distinctUntilChanged(me)));o.connect(O,h.scrollSeekRangeChanged),o.connect(o.pipe(k,o.withLatestFrom(H,R,b),o.map(function(e){var t=e[1],n=e[2],r=e[3],o=X(e[0]),i=o.align,a=o.behavior,l=o.offset,s=o.index;"LAST"===s&&(s=r-1);var u=xt(t,n,s=vt(0,s,gt(r-1,s)));return"end"===i?u=ft(u-t.height+n.height):"center"===i&&(u=ft(u-t.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),m);var M=o.statefulStreamFromEmitter(o.pipe(L,o.map(function(e){return e.offsetBottom+e.bottom})),0);return o.connect(o.pipe(I,o.map(function(e){return{width:e.visibleWidth,height:e.visibleHeight}})),H),a({totalCount:b,viewportDimensions:H,itemDimensions:R,scrollTop:s,scrollHeight:z,overscan:n,scrollBy:c,scrollTo:m,scrollToIndex:k,smoothScrollTargetReached:d,windowViewportRect:I,windowScrollTo:x,useWindowScroll:T,customScrollParent:w,windowScrollContainerState:y,deviation:B,scrollContainerState:f,initialItemCount:E},h,{gridState:L,totalListHeight:M},p,{startReached:P,endReached:F,rangeChanged:O,propsReady:v})},o.tup(pe,I,re,we,oe,Re));function It(e,t,n){var r=t.height;return void 0===r||0===n.length?{top:0,bottom:0}:{top:xt(e,t,n[0].index),bottom:xt(e,t,n[n.length-1].index)+r}}function xt(e,t,n){var r=Tt(e.width,t.width);return ht(n/r)*t.height}function Tt(e,t){return vt(1,ht(e/t))}var wt=["placeholder"],yt=o.system(function(){var e=o.statefulStream(function(e){return"Item "+e}),t=o.statefulStream({}),n=o.statefulStream(null),r=o.statefulStream("virtuoso-grid-item"),i=o.statefulStream("virtuoso-grid-list"),a=o.statefulStream(Ae),l=o.statefulStream(o.noop),s=function(e,n){return void 0===n&&(n=null),o.statefulStreamFromEmitter(o.pipe(t,o.map(function(t){return t[e]}),o.distinctUntilChanged()),n)};return{context:n,itemContent:e,components:t,computeItemKey:a,itemClassName:r,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),bt=o.system(function(e){var t=e[0],n=e[1],r={item:Ne(n.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:o.stream(),ScrollContainer:o.stream(),ListContainer:o.stream(),emptyComponent:o.stream(),scrollSeek:o.stream()};function i(e,t,r){o.connect(o.pipe(e,o.withLatestFrom(n.components),o.map(function(e){var n,o=e[0],i=e[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+t+" instead."),a({},i,((n={})[t]=o,n))})),n.components)}return o.subscribe(r.scrollSeek,function(e){var r=e.placeholder,i=l(e,wt);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),o.publish(n.components,a({},o.getValue(n.components),{ScrollSeekPlaceholder:r})),o.publish(t.scrollSeekConfiguration,i)}),i(r.ItemContainer,"Item","ItemContainer"),i(r.ListContainer,"List","ListContainer"),i(r.ScrollContainer,"Scroller","ScrollContainer"),a({},t,n,r)},o.tup(Ct,yt)),Et=i.memo(function(){var e=Ft("gridState"),t=Ft("listClassName"),r=Ft("itemClassName"),o=Ft("itemContent"),i=Ft("computeItemKey"),l=Ft("isSeeking"),s=Bt("scrollHeight"),u=Ft("ItemComponent"),c=Ft("ListComponent"),m=Ft("ScrollSeekPlaceholder"),d=Ft("context"),f=Bt("itemDimensions"),p=g(function(e){s(e.parentElement.parentElement.scrollHeight);var t=e.firstChild;t&&f(t.getBoundingClientRect())});return n.createElement(c,a({ref:p,className:t},Ze(c,d),{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}}),e.items.map(function(t){var s=i(t.index);return l?n.createElement(m,a({key:s},Ze(m,d),{index:t.index,height:e.itemHeight,width:e.itemWidth})):n.createElement(u,a({},Ze(u,d),{className:r,"data-index":t.index,key:s}),o(t.index,d))}))}),Lt=function(e){var t=e.children,n=Bt("viewportDimensions"),r=g(function(e){n(e.getBoundingClientRect())});return i.createElement("div",{style:Ye,ref:r},t)},Ht=function(e){var t=e.children,n=Oe(Bt("windowViewportRect"),Ft("customScrollParent"));return i.createElement("div",{ref:n,style:Ye},t)},Rt=i.memo(function(e){var t=a({},e),n=Ft("useWindowScroll"),r=Ft("customScrollParent"),o=r||n?Ht:Lt;return i.createElement(r||n?Mt:Ot,a({},t),i.createElement(o,null,i.createElement(Et,null)))}),kt=e.systemToComponent(bt,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},Rt),zt=kt.Component,Bt=kt.usePublisher,Ft=kt.useEmitterValue,Pt=kt.useEmitter,Ot=Qe({usePublisher:Bt,useEmitterValue:Ft,useEmitter:Pt}),Mt=Xe({usePublisher:Bt,useEmitterValue:Ft,useEmitter:Pt}),Vt=t.system(function(){var e=t.statefulStream(function(e){return i.createElement("td",null,"Item $",e)}),n=t.statefulStream(null),r=t.statefulStream(null),o=t.statefulStream({}),a=t.statefulStream(Ae),l=t.statefulStream(t.noop),s=function(e,n){return void 0===n&&(n=null),t.statefulStreamFromEmitter(t.pipe(o,t.map(function(t){return t[e]}),t.distinctUntilChanged()),n)};return{context:n,itemContent:e,fixedHeaderContent:r,components:o,computeItemKey:a,scrollerRef:l,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}}),Ut=t.system(function(e){return a({},e[0],e[1])},t.tup(Fe,Vt)),At=function(e){return i.createElement("tr",null,i.createElement("td",{style:{height:e.height}}))},Wt=function(e){return i.createElement("tr",null,i.createElement("td",{style:{height:e.height,padding:0,border:0}}))},Nt=i.memo(function(){var e=qt("listState"),t=qt("deviation"),r=Yt("sizeRanges"),o=qt("useWindowScroll"),l=qt("customScrollParent"),s=Yt("windowScrollContainerState"),u=Yt("scrollContainerState"),c=l||o?s:u,m=qt("itemContent"),d=qt("trackItemSizes"),f=v(r,qt("itemSize"),d,c,qt("log"),l),p=qt("EmptyPlaceholder"),h=qt("ScrollSeekPlaceholder")||At,g=qt("TableBodyComponent"),S=qt("TableRowComponent"),C=qt("computeItemKey"),I=qt("isSeeking"),x=qt("paddingTopAddition"),T=qt("firstItemIndex"),w=qt("statefulTotalCount"),y=qt("context");if(0===w&&p)return n.createElement(p,Ze(p,y));var b=e.offsetTop+x+t,E=e.offsetBottom,L=b>0?i.createElement(Wt,{height:b,key:"padding-top"}):null,H=E>0?i.createElement(Wt,{height:E,key:"padding-bottom"}):null,R=e.items.map(function(e){var t=e.originalIndex,r=C(t+T,e.data,y);return I?n.createElement(h,a({},Ze(h,y),{key:r,index:e.index,height:e.size,type:e.type||"item"})):n.createElement(S,a({},Ze(S,y),{key:r,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:{overflowAnchor:"none"}}),m(e.index,e.data,y))});return n.createElement(g,a({ref:f,"data-test-id":"virtuoso-item-list"},Ze(g,y)),[L].concat(R,[H]))}),Dt=function(e){var n=e.children,r=Yt("viewportHeight"),o=g(t.compose(r,function(e){return S(e,"height")}));return i.createElement("div",{style:Ye,ref:o,"data-viewport-type":"element"},n)},Gt=function(e){var t=e.children,n=Oe(Yt("windowViewportRect"),qt("customScrollParent"));return i.createElement("div",{ref:n,style:Ye,"data-viewport-type":"window"},t)},jt=i.memo(function(e){var n=qt("useWindowScroll"),r=qt("customScrollParent"),o=Yt("fixedHeaderHeight"),l=qt("fixedHeaderContent"),s=qt("context"),u=g(t.compose(o,function(e){return S(e,"height")})),c=r||n?$t:Jt,m=r||n?Gt:Dt,d=qt("TableComponent"),f=qt("TableHeadComponent"),p=l?i.createElement(f,a({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:u},Ze(f,s)),l()):null;return i.createElement(c,a({},e),i.createElement(m,null,i.createElement(d,a({style:{borderSpacing:0}},Ze(d,s)),[p,i.createElement(Nt,{key:"TableBody"})])))}),_t=e.systemToComponent(Ut,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},jt),Kt=_t.Component,Yt=_t.usePublisher,qt=_t.useEmitterValue,Zt=_t.useEmitter,Jt=Qe({usePublisher:Yt,useEmitterValue:qt,useEmitter:Zt}),$t=Xe({usePublisher:Yt,useEmitterValue:qt,useEmitter:Zt}),Qt=it,Xt=Kt,en=zt;exports.GroupedVirtuoso=it,exports.TableVirtuoso=Xt,exports.Virtuoso=Qt,exports.VirtuosoGrid=en;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{systemToComponent as t}from"@virtuoso.dev/react-urx";import*as e from"@virtuoso.dev/urx";import{getValue as n,tup as o,system as r,stream as i,streamFromEmitter as a,pipe as l,map as s,connect as u,prop as c,combineLatest as m,filter as d,distinctUntilChanged as f,statefulStream as p,noop as h,subscribe as g,publish as v,statefulStreamFromEmitter as S,withLatestFrom as I,compose as C}from"@virtuoso.dev/urx";import*as x from"react";import{useRef as T,useCallback as w,useEffect as y,useLayoutEffect as b,createElement as E}from"react";function H(){return H=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},H.apply(this,arguments)}function R(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)e.indexOf(n=i[o])>=0||(r[n]=t[n]);return r}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function k(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(t,e){return!(!t||t[0]!==e[0]||t[1]!==e[1])}function B(t,e){return!(!t||t.startIndex!==e.startIndex||t.endIndex!==e.endIndex)}var F,P,O=e.system(function(){var t=e.stream(),n=e.stream(),o=e.statefulStream(0),r=e.stream(),i=e.statefulStream(0),a=e.stream(),l=e.stream(),s=e.statefulStream(0),u=e.statefulStream(0),c=e.stream(),m=e.stream(),d=e.statefulStream(!1);return e.connect(e.pipe(t,e.map(function(t){return t[0]})),n),e.connect(e.pipe(t,e.map(function(t){return t[1]})),l),e.connect(n,i),{scrollContainerState:t,scrollTop:n,viewportHeight:a,headerHeight:s,footerHeight:u,scrollHeight:l,smoothScrollTargetReached:r,scrollTo:c,scrollBy:m,statefulScrollTop:i,deviation:o,scrollingInProgress:d}},[],{singleton:!0});!function(t){t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR"}(P||(P={}));var M=((F={})[P.DEBUG]="debug",F[P.INFO]="log",F[P.WARN]="warn",F[P.ERROR]="error",F),V=e.system(function(){var t=e.statefulStream(P.ERROR);return{log:e.statefulStream(function(n,o,r){var i;void 0===r&&(r=P.INFO),r>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:e.getValue(t))&&console[M[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:t}},[],{singleton:!0}),U=e.system(function(t){var o=t[0].log,r=e.statefulStream(!1),i=e.streamFromEmitter(e.pipe(r,e.filter(function(t){return t}),e.distinctUntilChanged()));return e.subscribe(r,function(t){t&&n(o)("props updated",{},P.DEBUG)}),{propsReady:r,didMount:i}},o(V),{singleton:!0}),A="up",W={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},N=e.system(function(t){var n=t[0],o=n.scrollContainerState,r=n.scrollTop,i=n.viewportHeight,a=n.headerHeight,l=n.footerHeight,s=n.scrollBy,u=e.statefulStream(!1),c=e.statefulStream(!0),m=e.stream(),d=e.stream(),f=e.statefulStream(4),p=e.streamFromEmitter(e.pipe(e.merge(e.pipe(e.duc(r),e.skip(1),e.mapTo(!0)),e.pipe(e.duc(r),e.skip(1),e.mapTo(!1),e.debounceTime(100))),e.distinctUntilChanged())),h=e.statefulStreamFromEmitter(e.pipe(e.merge(e.pipe(s,e.mapTo(!0)),e.pipe(s,e.mapTo(!1),e.debounceTime(200))),e.distinctUntilChanged()),!1);e.connect(e.pipe(e.duc(r),e.map(function(t){return 0===t}),e.distinctUntilChanged()),c),e.connect(c,d);var g=e.streamFromEmitter(e.pipe(e.combineLatest(o,e.duc(i),e.duc(a),e.duc(l),e.duc(f)),e.scan(function(t,e){var n,o,r=e[0],i=r[0],a=r[1],l=e[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-e[4]?(i>t.state.scrollTop?(n="SCROLLED_DOWN",o=t.state.scrollTop-i):(n="SIZE_DECREASED",o=t.state.scrollTop-i||t.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:o}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>t.state.scrollHeight?"SIZE_INCREASED":l<t.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<t.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},W),e.distinctUntilChanged(function(t,e){return t&&t.atBottom===e.atBottom}))),v=e.statefulStreamFromEmitter(e.pipe(o,e.scan(function(t,e){var n=e[0],o=e[1];return t.scrollHeight!==o?t.scrollTop!==n?{scrollHeight:o,scrollTop:n,jump:t.scrollTop-n,changed:!0}:{scrollHeight:o,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:o,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),e.filter(function(t){return t.changed}),e.map(function(t){return t.jump})),0);e.connect(e.pipe(g,e.map(function(t){return t.atBottom})),u),e.connect(e.pipe(u,e.throttleTime(50)),m);var S=e.statefulStream("down");e.connect(e.pipe(o,e.map(function(t){return t[0]}),e.distinctUntilChanged(),e.scan(function(t,n){return e.getValue(h)?{direction:t.direction,prevScrollTop:n}:{direction:n<t.prevScrollTop?A:"down",prevScrollTop:n}},{direction:"down",prevScrollTop:0}),e.map(function(t){return t.direction})),S),e.connect(e.pipe(o,e.throttleTime(50),e.mapTo("none")),S);var I=e.statefulStream(0);return e.connect(e.pipe(p,e.filter(function(t){return!t}),e.mapTo(0)),I),e.connect(e.pipe(r,e.throttleTime(100),e.withLatestFrom(p),e.filter(function(t){return!!t[1]}),e.scan(function(t,e){return[t[1],e[0]]},[0,0]),e.map(function(t){return t[1]-t[0]})),I),{isScrolling:p,isAtTop:c,isAtBottom:u,atBottomState:g,atTopStateChange:d,atBottomStateChange:m,scrollDirection:S,atBottomThreshold:f,scrollVelocity:I,lastJumpDueToItemResize:v}},e.tup(O)),D=e.system(function(t){var n=t[0].scrollVelocity,o=e.statefulStream(!1),r=e.stream(),i=e.statefulStream(!1);return e.connect(e.pipe(n,e.withLatestFrom(i,o,r),e.filter(function(t){return!!t[1]}),e.map(function(t){var e=t[0],n=t[1],o=t[2],r=t[3],i=n.enter;if(o){if((0,n.exit)(e,r))return!1}else if(i(e,r))return!0;return o}),e.distinctUntilChanged()),o),e.subscribe(e.pipe(e.combineLatest(o,n,r),e.withLatestFrom(i)),function(t){var e=t[0],n=t[1];return e[0]&&n&&n.change&&n.change(e[1],e[2])}),{isSeeking:o,scrollSeekConfiguration:i,scrollVelocity:n,scrollSeekRangeChanged:r}},e.tup(N),{singleton:!0}),G={lvl:0};function _(t,e,n,o,r){return void 0===o&&(o=G),void 0===r&&(r=G),{k:t,v:e,lvl:n,l:o,r:r}}function j(t){return t===G}function K(){return G}function Y(t,e){if(j(t))return G;var n=t.k,o=t.l,r=t.r;if(e===n){if(j(o))return r;if(j(r))return o;var i=Q(o);return nt(tt(t,{k:i[0],v:i[1],l:X(o)}))}return nt(tt(t,e<n?{l:Y(o,e)}:{r:Y(r,e)}))}function Z(t,e,n){if(void 0===n&&(n="k"),j(t))return[-Infinity,void 0];if(t[n]===e)return[t.k,t.v];if(t[n]<e){var o=Z(t.r,e,n);return-Infinity===o[0]?[t.k,t.v]:o}return Z(t.l,e,n)}function q(t,e,n){return j(t)?_(e,n,1):e===t.k?tt(t,{k:e,v:n}):function(t){return it(at(t))}(tt(t,e<t.k?{l:q(t.l,e,n)}:{r:q(t.r,e,n)}))}function J(t,e,n){if(j(t))return[];var o=t.k,r=t.v,i=t.r,a=[];return o>e&&(a=a.concat(J(t.l,e,n))),o>=e&&o<=n&&a.push({k:o,v:r}),o<=n&&(a=a.concat(J(i,e,n))),a}function $(t){return j(t)?[]:[].concat($(t.l),[{k:t.k,v:t.v}],$(t.r))}function Q(t){return j(t.r)?[t.k,t.v]:Q(t.r)}function X(t){return j(t.r)?t.l:nt(tt(t,{r:X(t.r)}))}function tt(t,e){return _(void 0!==e.k?e.k:t.k,void 0!==e.v?e.v:t.v,void 0!==e.lvl?e.lvl:t.lvl,void 0!==e.l?e.l:t.l,void 0!==e.r?e.r:t.r)}function et(t){return j(t)||t.lvl>t.r.lvl}function nt(t){var e=t.l,n=t.r,o=t.lvl;if(n.lvl>=o-1&&e.lvl>=o-1)return t;if(o>n.lvl+1){if(et(e))return at(tt(t,{lvl:o-1}));if(j(e)||j(e.r))throw new Error("Unexpected empty nodes");return tt(e.r,{l:tt(e,{r:e.r.l}),r:tt(t,{l:e.r.r,lvl:o-1}),lvl:o})}if(et(t))return it(tt(t,{lvl:o-1}));if(j(n)||j(n.l))throw new Error("Unexpected empty nodes");var r=n.l,i=et(r)?n.lvl-1:n.lvl;return tt(r,{l:tt(t,{r:r.l,lvl:o-1}),r:it(tt(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}function ot(t,e,n){return j(t)?[]:rt(J(t,Z(t,e)[0],n),function(t){return{index:t.k,value:t.v}})}function rt(t,e){var n=t.length;if(0===n)return[];for(var o=e(t[0]),r=o.index,i=o.value,a=[],l=1;l<n;l++){var s=e(t[l]),u=s.index,c=s.value;a.push({start:r,end:u-1,value:i}),r=u,i=c}return a.push({start:r,end:Infinity,value:i}),a}function it(t){var e=t.r,n=t.lvl;return j(e)||j(e.r)||e.lvl!==n||e.r.lvl!==n?t:tt(e,{l:tt(t,{r:e.l}),lvl:n+1})}function at(t){var e=t.l;return j(e)||e.lvl!==t.lvl?t:tt(e,{r:tt(t,{l:e.r})})}function lt(t,e,n,o){void 0===o&&(o=0);for(var r=t.length-1;o<=r;){var i=Math.floor((o+r)/2),a=n(t[i],e);if(0===a)return i;if(-1===a){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error("Failed binary finding record in array - "+t.join(",")+", searched for "+e)}function st(t,e,n){return t[lt(t,e,n)]}function ut(t,e){return Math.round(t.getBoundingClientRect()[e])}function ct(t){var e=t.size,n=t.startIndex,o=t.endIndex;return function(t){return t.start===n&&(t.end===o||Infinity===t.end)&&t.value===e}}function mt(t,e){var n=t.index;return e===n?0:e<n?-1:1}function dt(t,e){var n=t.offset;return e===n?0:e<n?-1:1}function ft(t){return{index:t.index,value:t}}function pt(t,e,n){var o=t,r=0,i=0,a=0,l=0;if(0!==e){a=o[l=lt(o,e-1,mt)].offset;var s=Z(n,e-1);r=s[0],i=s[1],o.length&&o[l].size===Z(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(var u,c=k(ot(n,e,Infinity));!(u=c()).done;){var m=u.value,d=m.start,f=m.value,p=(d-r)*i+a;o.push({offset:p,size:f,index:d}),r=d,a=p,i=f}return{offsetTree:o,lastIndex:r,lastOffset:a,lastSize:i}}function ht(t,e){var n=e[0],o=e[1];n.length>0&&(0,e[2])("received item sizes",n,P.DEBUG);var r=t.sizeTree,i=r,a=0;if(o.length>0&&j(r)&&2===n.length){var l=n[0].size,s=n[1].size;i=o.reduce(function(t,e){return q(q(t,e,l),e+1,s)},i)}else{var u=function(t,e){for(var n,o=j(t)?0:Infinity,r=k(e);!(n=r()).done;){var i=n.value,a=i.size,l=i.startIndex,s=i.endIndex;if(o=Math.min(o,l),j(t))t=q(t,0,a);else{var u=ot(t,l-1,s+1);if(!u.some(ct(i))){for(var c,m=!1,d=!1,f=k(u);!(c=f()).done;){var p=c.value,h=p.start,g=p.end,v=p.value;m?(s>=h||a===v)&&(t=Y(t,h)):(d=v!==a,m=!0),g>s&&s>=h&&v!==a&&(t=q(t,s+1,v))}d&&(t=q(t,l,a))}}}return[t,o]}(i,n);i=u[0],a=u[1]}if(i===r)return t;var c=pt(t.offsetTree,a,i),m=c.offsetTree;return{sizeTree:i,offsetTree:m,lastIndex:c.lastIndex,lastOffset:c.lastOffset,lastSize:c.lastSize,groupOffsetTree:o.reduce(function(t,e){return q(t,e,gt(e,m))},K()),groupIndices:o}}function gt(t,e){if(0===e.length)return 0;var n=st(e,t,mt);return n.size*(t-n.index)+n.offset}function vt(t,e){if(!St(e))return t;for(var n=0;e.groupIndices[n]<=t+n;)n++;return t+n}function St(t){return!j(t.groupOffsetTree)}var It={offsetHeight:"height",offsetWidth:"width"},Ct=e.system(function(t){var n=t[0].log,o=e.stream(),r=e.stream(),i=e.statefulStreamFromEmitter(r,0),a=e.stream(),l=e.stream(),s=e.statefulStream(0),u=e.statefulStream([]),c=e.statefulStream(void 0),m=e.statefulStream(void 0),d=e.statefulStream(function(t,e){return ut(t,It[e])}),f=e.statefulStream(void 0),p={offsetTree:[],sizeTree:K(),groupOffsetTree:K(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},h=e.statefulStreamFromEmitter(e.pipe(o,e.withLatestFrom(u,n),e.scan(ht,p),e.distinctUntilChanged()),p);e.connect(e.pipe(u,e.filter(function(t){return t.length>0}),e.withLatestFrom(h),e.map(function(t){var e=t[0],n=t[1],o=e.reduce(function(t,e,o){return q(t,e,gt(e,n.offsetTree)||o)},K());return H({},n,{groupIndices:e,groupOffsetTree:o})})),h),e.connect(e.pipe(r,e.withLatestFrom(h),e.filter(function(t){return t[0]<t[1].lastIndex}),e.map(function(t){var e=t[1];return[{startIndex:t[0],endIndex:e.lastIndex,size:e.lastSize}]})),o),e.connect(c,m);var g=e.statefulStreamFromEmitter(e.pipe(c,e.map(function(t){return void 0===t})),!0);e.connect(e.pipe(m,e.filter(function(t){return void 0!==t&&j(e.getValue(h).sizeTree)}),e.map(function(t){return[{startIndex:0,endIndex:0,size:t}]})),o);var v=e.streamFromEmitter(e.pipe(o,e.withLatestFrom(h),e.scan(function(t,e){var n=e[1];return{changed:n!==t.sizes,sizes:n}},{changed:!1,sizes:p}),e.map(function(t){return t.changed})));e.subscribe(e.pipe(s,e.scan(function(t,e){return{diff:t.prev-e,prev:e}},{diff:0,prev:0}),e.map(function(t){return t.diff})),function(t){t>0?e.publish(a,t):t<0&&e.publish(l,t)}),e.subscribe(e.pipe(s,e.withLatestFrom(n)),function(t){t[0]<0&&(0,t[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},P.ERROR)});var S=e.streamFromEmitter(a);e.connect(e.pipe(a,e.withLatestFrom(h),e.map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return $(n.sizeTree).reduce(function(t,n){var o=n.k,r=n.v;return{ranges:[].concat(t.ranges,[{startIndex:t.prevIndex,endIndex:o+e-1,size:t.prevSize}]),prevIndex:o+e,prevSize:r}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),o);var I=e.streamFromEmitter(e.pipe(l,e.withLatestFrom(h),e.map(function(t){return gt(-t[0],t[1].offsetTree)})));return e.connect(e.pipe(l,e.withLatestFrom(h),e.map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: shifting items does not work with groups");var o=$(n.sizeTree).reduce(function(t,n){var o=n.v;return q(t,Math.max(0,n.k+e),o)},K());return H({},n,{sizeTree:o},pt(n.offsetTree,0,o))})),h),{data:f,totalCount:r,sizeRanges:o,groupIndices:u,defaultItemSize:m,fixedItemSize:c,unshiftWith:a,shiftWith:l,shiftWithOffset:I,beforeUnshiftWith:S,firstItemIndex:s,sizes:h,listRefresh:v,statefulTotalCount:i,trackItemSizes:g,itemSize:d}},e.tup(V),{singleton:!0}),xt="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function Tt(t){var e="number"==typeof t?{index:t}:t;return e.align||(e.align="start"),e.behavior&&xt||(e.behavior="auto"),e.offset||(e.offset=0),e}var wt=e.system(function(t){var n=t[0],o=n.sizes,r=n.totalCount,i=n.listRefresh,a=t[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=t[2].log,p=e.stream(),h=e.statefulStream(0),g=null,v=null,S=null;function I(){g&&(g(),g=null),S&&(S(),S=null),v&&(clearTimeout(v),v=null),e.publish(l,!1)}return e.connect(e.pipe(p,e.withLatestFrom(o,s,r,h,m,d,f),e.map(function(t){var n=t[0],o=t[1],r=t[2],a=t[3],s=t[4],u=t[5],m=t[6],d=t[7],f=Tt(n),h=f.align,C=f.behavior,x=f.offset,T=a-1,w=f.index;"LAST"===w&&(w=T),w=vt(w,o);var y=gt(w=Math.max(0,w,Math.min(T,w)),o.offsetTree)+u;"end"===h?(y=y-r+Z(o.sizeTree,w)[1],w===T&&(y+=m)):"center"===h?y=y-r/2+Z(o.sizeTree,w)[1]/2:y-=s,x&&(y+=x);var b=function(t){I(),t?(d("retrying to scroll to",{location:n},P.DEBUG),e.publish(p,n)):d("list did not change, scroll successful",{},P.DEBUG)};if(I(),"smooth"===C){var E=!1;S=e.subscribe(i,function(t){E=E||t}),g=e.handleNext(c,function(){b(E)})}else g=e.handleNext(e.pipe(i,function(t){var e=setTimeout(function(){t(!1)},50);return function(n){n&&(t(!0),clearTimeout(e))}}),b);return v=setTimeout(function(){I()},1200),e.publish(l,!0),d("scrolling from index to",{index:w,top:y,behavior:C},P.DEBUG),{top:y,behavior:C}})),u),{scrollToIndex:p,topListHeight:h}},e.tup(Ct,O,V),{singleton:!0});function yt(t,e,n){return"number"==typeof t?n===A&&"top"===e||"down"===n&&"bottom"===e?t:0:n===A?"top"===e?t.main:t.reverse:"bottom"===e?t.main:t.reverse}function bt(t,e){return"number"==typeof t?t:t[e]||0}var Et=e.system(function(t){var n=t[0],o=n.scrollTop,r=n.viewportHeight,i=n.deviation,a=n.headerHeight,l=e.stream(),s=e.statefulStream(0),u=e.statefulStream(0),c=e.statefulStream(0),m=e.statefulStream(0),d=e.statefulStreamFromEmitter(e.pipe(e.combineLatest(e.duc(o),e.duc(r),e.duc(a),e.duc(l,z),e.duc(m),e.duc(s),e.duc(u),e.duc(i),e.duc(c)),e.map(function(t){var e=t[0],n=t[1],o=t[2],r=t[3],i=r[0],a=r[1],l=t[4],s=t[6],u=t[7],c=t[8],m=e-u,d=t[5]+s,f=Math.max(o-m,0),p="none",h=bt(c,"top"),g=bt(c,"bottom");return i-=u,a+=o+s,(i+=o+s)>e+d-h&&(p=A),(a-=u)<e-f+n+g&&(p="down"),"none"!==p?[Math.max(m-o-yt(l,"top",p)-h,0),m-f-s+n+yt(l,"bottom",p)+g]:null}),e.filter(function(t){return null!=t}),e.distinctUntilChanged(z)),[0,0]);return{listBoundary:l,overscan:m,topListHeight:s,fixedHeaderHeight:u,increaseViewportBy:c,visibleRange:d}},e.tup(O),{singleton:!0}),Ht=e.system(function(t){var n=t[0],o=n.scrollTo,r=n.scrollContainerState,i=e.stream(),a=e.stream(),l=e.stream(),s=e.statefulStream(!1),u=e.statefulStream(void 0);return e.connect(e.pipe(e.combineLatest(i,a),e.map(function(t){var e=t[0],n=e[1];return[Math.max(0,e[0]-t[1].offsetTop),n]})),r),e.connect(e.pipe(o,e.withLatestFrom(a),e.map(function(t){var e=t[0];return H({},e,{top:e.top+t[1].offsetTop})})),l),{useWindowScroll:s,customScrollParent:u,windowScrollContainerState:i,windowViewportRect:a,windowScrollTo:l}},e.tup(O)),Rt={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Lt={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},kt=Math.round,zt=Math.ceil,Bt=Math.floor,Ft=Math.min,Pt=Math.max;function Ot(t,e){return Array.from({length:e-t+1}).map(function(e,n){return{index:n+t}})}var Mt=e.system(function(t){var n=t[0],o=n.overscan,r=n.visibleRange,i=n.listBoundary,a=t[1],l=a.scrollTop,s=a.viewportHeight,u=a.scrollBy,c=a.scrollTo,m=a.smoothScrollTargetReached,d=a.scrollContainerState,f=t[2],p=t[3],h=t[4],g=h.propsReady,v=h.didMount,S=t[5],I=S.windowViewportRect,C=S.windowScrollTo,x=S.useWindowScroll,T=S.customScrollParent,w=S.windowScrollContainerState,y=e.statefulStream(0),b=e.statefulStream(0),E=e.statefulStream(Rt),R=e.statefulStream({height:0,width:0}),L=e.statefulStream({height:0,width:0}),k=e.stream(),F=e.stream(),P=e.statefulStream(0);e.connect(e.pipe(v,e.withLatestFrom(b),e.filter(function(t){return 0!==t[1]}),e.map(function(t){return{items:Ot(0,t[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),E),e.connect(e.pipe(e.combineLatest(e.duc(y),r,e.duc(L,function(t,e){return t&&t.width===e.width&&t.height===e.height})),e.withLatestFrom(R),e.map(function(t){var e=t[0],n=e[0],o=e[1],r=o[0],i=o[1],a=e[2],l=t[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return Rt;if(0===u)return Lt;var m=At(c,u),d=m*Bt(r/s),f=m*zt(i/s)-1;f=Ft(n-1,f);var p=Ot(d=Ft(f,Pt(0,d)),f),h=Vt(l,a,p),g=h.top,v=h.bottom;return{items:p,offsetTop:g,offsetBottom:zt(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),E),e.connect(e.pipe(R,e.map(function(t){return t.height})),s),e.connect(e.pipe(e.combineLatest(R,L,E),e.map(function(t){var e=Vt(t[0],t[1],t[2].items);return[e.top,e.bottom]}),e.distinctUntilChanged(z)),i);var O=e.streamFromEmitter(e.pipe(e.duc(E),e.filter(function(t){return t.items.length>0}),e.withLatestFrom(y),e.filter(function(t){var e=t[0].items;return e[e.length-1].index===t[1]-1}),e.map(function(t){return t[1]-1}),e.distinctUntilChanged())),M=e.streamFromEmitter(e.pipe(e.duc(E),e.filter(function(t){var e=t.items;return e.length>0&&0===e[0].index}),e.mapTo(0),e.distinctUntilChanged())),V=e.streamFromEmitter(e.pipe(e.duc(E),e.filter(function(t){return t.items.length>0}),e.map(function(t){var e=t.items;return{startIndex:e[0].index,endIndex:e[e.length-1].index}}),e.distinctUntilChanged(B)));e.connect(V,p.scrollSeekRangeChanged),e.connect(e.pipe(k,e.withLatestFrom(R,L,y),e.map(function(t){var e=t[1],n=t[2],o=t[3],r=Tt(t[0]),i=r.align,a=r.behavior,l=r.offset,s=r.index;"LAST"===s&&(s=o-1);var u=Ut(e,n,s=Pt(0,s,Ft(o-1,s)));return"end"===i?u=kt(u-e.height+n.height):"center"===i&&(u=kt(u-e.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),c);var U=e.statefulStreamFromEmitter(e.pipe(E,e.map(function(t){return t.offsetBottom+t.bottom})),0);return e.connect(e.pipe(I,e.map(function(t){return{width:t.visibleWidth,height:t.visibleHeight}})),R),H({totalCount:y,viewportDimensions:R,itemDimensions:L,scrollTop:l,scrollHeight:F,overscan:o,scrollBy:u,scrollTo:c,scrollToIndex:k,smoothScrollTargetReached:m,windowViewportRect:I,windowScrollTo:C,useWindowScroll:x,customScrollParent:T,windowScrollContainerState:w,deviation:P,scrollContainerState:d,initialItemCount:b},p,{gridState:E,totalListHeight:U},f,{startReached:M,endReached:O,rangeChanged:V,propsReady:g})},e.tup(Et,O,N,D,U,Ht));function Vt(t,e,n){var o=e.height;return void 0===o||0===n.length?{top:0,bottom:0}:{top:Ut(t,e,n[0].index),bottom:Ut(t,e,n[n.length-1].index)+o}}function Ut(t,e,n){var o=At(t.width,e.width);return Bt(n/o)*e.height}function At(t,e){return Pt(1,Bt(t/e))}function Wt(t,e){void 0===e&&(e=!0);var n=T(null),o=function(t){};if("undefined"!=typeof ResizeObserver){var r=new ResizeObserver(function(e){var n=e[0].target;null!==n.offsetParent&&t(n)});o=function(t){t&&e?(r.observe(t),n.current=t):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Nt(t,e){return void 0===e&&(e=!0),Wt(t,e).callbackRef}function Dt(t,e){var n=T(null),o=w(function(o){if(null!==o){var r,i,a=o.getBoundingClientRect(),l=a.width;if(e){var s=e.getBoundingClientRect(),u=a.top-s.top;r=s.height-Math.max(0,u),i=u+e.scrollTop}else r=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;n.current={offsetTop:i,visibleHeight:r,visibleWidth:l},t(n.current)}},[t,e]),r=Wt(o),i=r.callbackRef,a=r.ref,l=w(function(){o(a.current)},[o,a]);return y(function(){if(e){e.addEventListener("scroll",l);var t=new ResizeObserver(l);return t.observe(e),function(){e.removeEventListener("scroll",l),t.unobserve(e)}}return window.addEventListener("scroll",l),window.addEventListener("resize",l),function(){window.removeEventListener("scroll",l),window.removeEventListener("resize",l)}},[l,e]),i}var Gt="undefined"!=typeof document?b:y;function _t(t,e,n,o,r,i){return Nt(function(n){for(var a=function(t,e,n,o){var r=t.length;if(0===r)return null;for(var i=[],a=0;a<r;a++){var l=t.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=e(l,"offsetHeight");if(0===c&&o("Zero-sized element, this should not happen",{child:l},P.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,e,0,r),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;o(i?[Math.max(s,0),i.scrollHeight]:[Math.max(s,0),l.scrollHeight]),null!==a&&t(a)},n)}function jt(t,n,o,r,i){void 0===r&&(r=e.noop);var a=T(null),l=T(null),s=T(null),u=w(function(e){var o=e.target,r=o===window||o===document?window.pageYOffset||document.documentElement.scrollTop:o.scrollTop,i=o===window?document.documentElement.scrollHeight:o.scrollHeight;t([Math.max(r,0),i]),null!==l.current&&(r===l.current||r<=0||r===o.scrollHeight-ut(o,"height"))&&(l.current=null,n(!0),s.current&&(clearTimeout(s.current),s.current=null))},[t,n]);return y(function(){var t=i||a.current;return r(i||a.current),u({target:t}),t.addEventListener("scroll",u,{passive:!0}),function(){r(null),t.removeEventListener("scroll",u)}},[a,u,o,r,i]),{scrollerRef:a,scrollByCallback:function(t){null===l.current&&a.current.scrollBy(t)},scrollToCallback:function(e){var o=a.current;if(o&&(!("offsetHeight"in o)||0!==o.offsetHeight)){var r,i,u,c="smooth"===e.behavior;if(o===window?(i=Math.max(ut(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,u=document.documentElement.scrollTop):(i=o.scrollHeight,r=ut(o,"height"),u=o.scrollTop),e.top=Math.ceil(Math.max(Math.min(i-r,e.top),0)),Math.abs(r-i)<1.01||e.top===u)return t([u,i]),void(c&&n(!0));c?(l.current=e.top,s.current&&clearTimeout(s.current),s.current=setTimeout(function(){s.current=null,l.current=null,n(!0)},1e3)):l.current=null,o.scrollTo(e)}}}}var Kt=e.system(function(t){var n=t[0],o=n.sizes,r=n.listRefresh,i=n.defaultItemSize,a=t[1].scrollTop,l=t[2].scrollToIndex,s=t[3].didMount,u=e.statefulStream(!0),c=e.statefulStream(0);return e.connect(e.pipe(s,e.withLatestFrom(c),e.filter(function(t){return!!t[1]}),e.mapTo(!1)),u),e.subscribe(e.pipe(e.combineLatest(r,s),e.withLatestFrom(u,o,i),e.filter(function(t){var e=t[1],n=t[3];return t[0][1]&&(!j(t[2].sizeTree)||void 0!==n)&&!e}),e.withLatestFrom(c)),function(t){var n=t[1];setTimeout(function(){e.handleNext(a,function(){e.publish(u,!0)}),e.publish(l,n)})}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},e.tup(Ct,O,wt,U),{singleton:!0});function Yt(t){return!!t&&("smooth"===t?"smooth":"auto")}var Zt=e.system(function(t){var n=t[0],o=n.totalCount,r=n.listRefresh,i=t[1],a=i.isAtBottom,l=i.atBottomState,s=t[2].scrollToIndex,u=t[3].scrolledToInitialItem,c=t[4],m=c.propsReady,d=c.didMount,f=t[5].log,p=t[6].scrollingInProgress,h=e.statefulStream(!1),g=null;function v(t){e.publish(s,{index:"LAST",align:"end",behavior:t})}return e.subscribe(e.pipe(e.combineLatest(e.pipe(e.duc(o),e.skip(1)),d),e.withLatestFrom(e.duc(h),a,u,p),e.map(function(t){var e=t[0],n=e[0],o=e[1]&&t[3],r="auto";return o&&(r=function(t,e){return"function"==typeof t?Yt(t(e)):e&&Yt(t)}(t[1],t[2]||t[4]),o=o&&!!r),{totalCount:n,shouldFollow:o,followOutputBehavior:r}}),e.filter(function(t){return t.shouldFollow})),function(t){var n=t.totalCount,o=t.followOutputBehavior;g&&(g(),g=null),g=e.handleNext(r,function(){e.getValue(f)("following output to ",{totalCount:n},P.DEBUG),v(o),g=null})}),e.subscribe(e.pipe(e.combineLatest(e.duc(h),o,m),e.filter(function(t){return t[0]&&t[2]}),e.scan(function(t,e){var n=e[1];return{refreshed:t.value===n,value:n}},{refreshed:!1,value:0}),e.filter(function(t){return t.refreshed}),e.withLatestFrom(h,o)),function(t){var n=t[1],o=e.handleNext(l,function(t){!n||t.atBottom||"SIZE_INCREASED"!==t.notAtBottomBecause||g||(e.getValue(f)("scrolling to bottom due to increased size",{},P.DEBUG),v("auto"))});setTimeout(o,100)}),e.subscribe(e.combineLatest(e.duc(h),l),function(t){var e=t[1];t[0]&&!e.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===e.notAtBottomBecause&&v("auto")}),{followOutput:h}},e.tup(Ct,N,wt,Kt,U,V,O));function qt(t){return t.reduce(function(t,e){return t.groupIndices.push(t.totalCount),t.totalCount+=e+1,t},{totalCount:0,groupIndices:[]})}var Jt=r(function(t){var e=t[0],n=e.totalCount,o=e.groupIndices,r=e.sizes,p=t[1],h=p.scrollTop,g=p.headerHeight,v=i(),S=i(),I=a(l(v,s(qt)));return u(l(I,s(c("totalCount"))),n),u(l(I,s(c("groupIndices"))),o),u(l(m(h,r,g),d(function(t){return St(t[1])}),s(function(t){return Z(t[1].groupOffsetTree,Math.max(t[0]-t[2],0),"v")[0]}),f(),s(function(t){return[t]})),S),{groupCounts:v,topItemsIndexes:S}},o(Ct,O)),$t={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function Qt(t,e,n){if(0===t.length)return[];if(!St(e))return t.map(function(t){return H({},t,{index:t.index+n,originalIndex:t.index})});for(var o,r=[],i=ot(e.groupOffsetTree,t[0].index,t[t.length-1].index),a=void 0,l=0,s=k(t);!(o=s()).done;){var u=o.value;(!a||a.end<u.index)&&(a=i.shift(),l=e.groupIndices.indexOf(a.start)),r.push(H({},u.index===a.start?{type:"group",index:l}:{index:u.index-(l+1)+n,groupIndex:l},{size:u.size,offset:u.offset,originalIndex:u.index,data:u.data}))}return r}function Xt(t,e,n,o,r){var i=0,a=0;if(t.length>0){i=t[0].offset;var l=t[t.length-1];a=l.offset+l.size}var s=i,u=o.lastOffset+(n-o.lastIndex)*o.lastSize-a;return{items:Qt(t,o,r),topItems:Qt(e,o,r),topListHeight:e.reduce(function(t,e){return e.size+t},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n}}var te,ee,ne,oe=e.system(function(t){var n=t[0],o=n.sizes,r=n.totalCount,i=n.data,a=n.firstItemIndex,l=t[1],s=t[2],u=s.visibleRange,c=s.listBoundary,m=s.topListHeight,d=t[3],f=d.scrolledToInitialItem,p=d.initialTopMostItemIndex,h=t[4].topListHeight,g=t[5],v=t[6].didMount,S=e.statefulStream([]),I=e.stream();e.connect(l.topItemsIndexes,S);var C=e.statefulStreamFromEmitter(e.pipe(e.combineLatest(v,e.duc(u),e.duc(r),e.duc(o),e.duc(p),f,e.duc(S),e.duc(a),i),e.filter(function(t){return t[0]}),e.map(function(t){var n=t[1],o=n[0],r=n[1],i=t[2],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],m=t[3],d=m.sizeTree,f=m.offsetTree;if(0===i||0===o&&0===r)return $t;if(j(d))return Xt(function(t,e,n){if(St(e)){var o=vt(t,e);return[{index:Z(e.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}(function(t,e){return"number"==typeof t?t:"LAST"===t.index?e-1:t.index}(a,i),m,c),[],i,m,u);var p=[];if(s.length>0)for(var h,g=s[0],v=s[s.length-1],S=0,I=k(ot(d,g,v));!(h=I()).done;)for(var C=h.value,x=C.value,T=Math.max(C.start,g),w=Math.min(C.end,v),y=T;y<=w;y++)p.push({index:y,size:x,offset:S,data:c&&c[y]}),S+=x;if(!l)return Xt([],p,i,m,u);var b=s.length>0?s[s.length-1]+1:0,E=function(t,e,n,o){return void 0===o&&(o=0),o>0&&(e=Math.max(e,st(t,o,mt).offset)),rt((i=n,l=lt(r=t,e,a=dt),s=lt(r,i,a,l),r.slice(l,s+1)),ft);var r,i,a,l,s}(f,o,r,b);if(0===E.length)return null;var H=i-1;return Xt(e.tap([],function(t){for(var e,n=k(E);!(e=n()).done;){var i=e.value,a=i.value,l=a.offset,s=i.start,u=a.size;a.offset<o&&(l+=((s+=Math.floor((o-a.offset)/u))-i.start)*u),s<b&&(l+=(b-s)*u,s=b);for(var m=Math.min(i.end,H),d=s;d<=m&&!(l>=r);d++)t.push({index:d,size:u,offset:l,data:c&&c[d]}),l+=u}}),p,i,m,u)}),e.filter(function(t){return null!==t}),e.distinctUntilChanged()),$t);return e.connect(e.pipe(i,e.filter(function(t){return void 0!==t}),e.map(function(t){return t.length})),r),e.connect(e.pipe(C,e.map(e.prop("topListHeight"))),h),e.connect(h,m),e.connect(e.pipe(C,e.map(function(t){return[t.top,t.bottom]})),c),e.connect(e.pipe(C,e.map(function(t){return t.items})),I),H({listState:C,topItemsIndexes:S,endReached:e.streamFromEmitter(e.pipe(C,e.filter(function(t){return t.items.length>0}),e.withLatestFrom(r,i),e.filter(function(t){var e=t[0].items;return e[e.length-1].originalIndex===t[1]-1}),e.map(function(t){return[t[1]-1,t[2]]}),e.distinctUntilChanged(z),e.map(function(t){return t[0]}))),startReached:e.streamFromEmitter(e.pipe(C,e.throttleTime(200),e.filter(function(t){var e=t.items;return e.length>0&&e[0].originalIndex===t.topItems.length}),e.map(function(t){return t.items[0].index}),e.distinctUntilChanged())),rangeChanged:e.streamFromEmitter(e.pipe(C,e.filter(function(t){return t.items.length>0}),e.map(function(t){var e=t.items;return{startIndex:e[0].index,endIndex:e[e.length-1].index}}),e.distinctUntilChanged(B))),itemsRendered:I},g)},e.tup(Ct,Jt,Et,Kt,wt,N,U),{singleton:!0}),re=e.system(function(t){var n=t[0],o=n.sizes,r=n.firstItemIndex,i=n.data,a=t[1].listState,l=t[2].didMount,s=e.statefulStream(0);return e.connect(e.pipe(l,e.withLatestFrom(s),e.filter(function(t){return 0!==t[1]}),e.withLatestFrom(o,r,i),e.map(function(t){var e=t[0][1],n=t[1],o=t[2],r=t[3],i=void 0===r?[]:r,a=0;if(n.groupIndices.length>0)for(var l,s=k(n.groupIndices);!((l=s()).done||l.value-a>=e);)a++;var u=e+a;return Xt(Array.from({length:u}).map(function(t,e){return{index:e,size:0,offset:0,data:i[e]}}),[],u,n,o)})),a),{initialItemCount:s}},e.tup(Ct,oe,U),{singleton:!0}),ie=r(function(t){var e=t[0].topItemsIndexes,n=p(0);return u(l(n,d(function(t){return t>0}),s(function(t){return Array.from({length:t}).map(function(t,e){return e})})),e),{topItemCount:n}},o(oe)),ae=e.system(function(t){var n=t[0],o=n.footerHeight,r=n.headerHeight,i=t[1].listState,a=e.stream(),l=e.statefulStreamFromEmitter(e.pipe(e.combineLatest(o,r,i),e.map(function(t){var e=t[2];return t[0]+t[1]+e.offsetBottom+e.bottom})),0);return e.connect(e.duc(l),a),{totalListHeight:l,totalListHeightChanged:a}},e.tup(O,oe),{singleton:!0}),le=e.system(function(t){var n=t[0],o=n.scrollBy,r=n.scrollTop,i=n.deviation,a=n.scrollingInProgress,l=t[1],s=l.isScrolling,u=l.isAtBottom,c=l.atBottomState,m=l.scrollDirection,d=t[3],f=d.beforeUnshiftWith,p=d.shiftWithOffset,h=d.sizes,g=t[4].log,v=e.streamFromEmitter(e.pipe(t[2].listState,e.withLatestFrom(l.lastJumpDueToItemResize),e.scan(function(t,e){var n=t[1],o=e[0],r=o.items,i=o.totalCount,a=e[1],l=0;if(t[2]===i){if(n.length>0&&r.length>0){var s=1===r.length;if(0!==r[0].originalIndex||0!==n[0].originalIndex)for(var u=function(t){var e=r[t],o=n.find(function(t){return t.originalIndex===e.originalIndex});return o?e.offset!==o.offset||s?(l=e.offset-o.offset+e.size-o.size,"break"):void 0:"continue"},c=r.length-1;c>=0;c--){var m=u(c);if("continue"!==m&&"break"===m)break}}0!==l&&(l+=a)}return[l,r,i]},[0,[],0]),e.filter(function(t){return 0!==t[0]}),e.withLatestFrom(r,m,a,g,u,c),e.filter(function(t){return!t[3]&&0!==t[1]&&t[2]===A}),e.map(function(t){var e=t[0][0];return(0,t[4])("Upward scrolling compensation",{amount:e},P.DEBUG),e})));return e.connect(e.pipe(v,e.withLatestFrom(i),e.map(function(t){return t[1]-t[0]})),i),e.subscribe(e.pipe(e.combineLatest(e.statefulStreamFromEmitter(s,!1),i),e.filter(function(t){return!t[0]&&0!==t[1]}),e.map(function(t){return t[1]}),e.throttleTime(1)),function(t){t>0?(e.publish(o,{top:-t,behavior:"auto"}),e.publish(i,0)):(e.publish(i,0),e.publish(o,{top:-t,behavior:"auto"}))}),e.connect(e.pipe(p,e.map(function(t){return{top:-t}})),o),e.connect(e.pipe(f,e.withLatestFrom(h),e.map(function(t){return t[0]*t[1].lastSize})),v),{deviation:i}},e.tup(O,N,oe,Ct,V)),se=e.system(function(t){var n=t[0].totalListHeight,o=t[1].didMount,r=t[2].scrollTo,i=e.statefulStream(0);return e.subscribe(e.pipe(o,e.withLatestFrom(i),e.filter(function(t){return 0!==t[1]}),e.map(function(t){return{top:t[1]}})),function(t){e.handleNext(e.pipe(n,e.filter(function(t){return 0!==t})),function(){setTimeout(function(){e.publish(r,t)})})}),{initialScrollTop:i}},e.tup(ae,U,O),{singleton:!0}),ue=e.system(function(t){var n=t[0].viewportHeight,o=t[1].totalListHeight,r=e.statefulStream(!1);return{alignToBottom:r,paddingTopAddition:e.statefulStreamFromEmitter(e.pipe(e.combineLatest(r,n,o),e.filter(function(t){return t[0]}),e.map(function(t){return Math.max(0,t[1]-t[2])}),e.distinctUntilChanged()),0)}},e.tup(O,ae),{singleton:!0}),ce=e.system(function(t){var n=t[0],o=n.sizes,r=n.totalCount,i=t[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,u=i.scrollingInProgress,c=t[2].scrollToIndex,m=e.stream();return e.connect(e.pipe(m,e.withLatestFrom(o,l,r,s,a),e.map(function(t){var n=t[0],o=n.index,r=n.behavior,i=void 0===r?"auto":r,a=n.done,l=t[1],s=t[2],c=t[4],m=t[5],d=t[3]-1,f=null;o=vt(o,l);var p=gt(o=Math.max(0,o,Math.min(d,o)),l.offsetTree)+c;return p<m?f={index:o,behavior:i,align:"start"}:p+Z(l.sizeTree,o)[1]>m+s&&(f={index:o,behavior:i,align:"end"}),f?a&&e.handleNext(e.pipe(u,e.skip(1),e.filter(function(t){return!1===t})),a):a&&a(),f}),e.filter(function(t){return null!==t})),c),{scrollIntoView:m}},e.tup(Ct,O,wt,oe,V),{singleton:!0}),me=["listState","topItemsIndexes"],de=e.system(function(t){return H({},t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},e.tup(Et,re,U,D,ae,se,ue,Ht,ce)),fe=e.system(function(t){var n=t[0],o=n.totalCount,r=n.sizeRanges,i=n.fixedItemSize,a=n.defaultItemSize,l=n.trackItemSizes,s=n.itemSize,u=n.data,c=n.firstItemIndex,m=n.groupIndices,d=n.statefulTotalCount,f=t[1],p=f.initialTopMostItemIndex,h=f.scrolledToInitialItem,g=t[2],v=t[3],S=t[4],I=S.listState,C=S.topItemsIndexes,x=R(S,me),T=t[5].scrollToIndex,w=t[7].topItemCount,y=t[8].groupCounts,b=t[9],E=t[10];return e.connect(x.rangeChanged,b.scrollSeekRangeChanged),e.connect(e.pipe(b.windowViewportRect,e.map(e.prop("visibleHeight"))),g.viewportHeight),H({totalCount:o,data:u,firstItemIndex:c,sizeRanges:r,initialTopMostItemIndex:p,scrolledToInitialItem:h,topItemsIndexes:C,topItemCount:w,groupCounts:y,fixedItemHeight:i,defaultItemHeight:a},v,{statefulTotalCount:d,listState:I,scrollToIndex:T,trackItemSizes:l,itemSize:s,groupIndices:m},x,b,g,E)},e.tup(Ct,Kt,O,Zt,oe,wt,le,ie,Jt,de,V)),pe=(te=function(){if("undefined"==typeof document)return"sticky";var t=document.createElement("div");return t.style.position="-webkit-sticky","-webkit-sticky"===t.style.position?"-webkit-sticky":"sticky"},ne=!1,function(){return ne||(ne=!0,ee=te()),ee}),he=["placeholder"],ge=["style","children"],ve=["style","children"];function Se(t){return t}var Ie=r(function(){var t=p(function(t){return"Item "+t}),e=p(null),n=p(function(t){return"Group "+t}),o=p({}),r=p(Se),i=p("div"),a=p(h),u=function(t,e){return void 0===e&&(e=null),S(l(o,s(function(e){return e[t]}),f()),e)};return{context:e,itemContent:t,groupContent:n,components:o,computeItemKey:r,headerFooterTag:i,scrollerRef:a,FooterComponent:u("Footer"),HeaderComponent:u("Header"),TopItemListComponent:u("TopItemList"),ListComponent:u("List","div"),ItemComponent:u("Item","div"),GroupComponent:u("Group","div"),ScrollerComponent:u("Scroller","div"),EmptyPlaceholder:u("EmptyPlaceholder"),ScrollSeekPlaceholder:u("ScrollSeekPlaceholder")}});function Ce(t,e){var n=i();return g(n,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+e,"color: red;","color: inherit;","color: blue;")}),u(n,t),n}var xe=r(function(t){var e=t[0],o=t[1],r={item:Ce(o.itemContent,"Rename the %citem%c prop to %citemContent."),group:Ce(o.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:Ce(e.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:Ce(e.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:Ce(e.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:i(),maxHeightCacheSize:i(),footer:i(),header:i(),HeaderContainer:i(),FooterContainer:i(),ItemContainer:i(),ScrollContainer:i(),GroupContainer:i(),ListContainer:i(),emptyComponent:i(),scrollSeek:i()};function a(t,e,n){u(l(t,I(o.components),s(function(t){var o,r=t[0],i=t[1];return console.warn("react-virtuoso: "+n+" property is deprecated. Pass components."+e+" instead."),H({},i,((o={})[e]=r,o))})),o.components)}return g(r.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),g(r.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),g(r.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),g(r.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),g(r.scrollSeek,function(t){var r=t.placeholder,i=R(t,he);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),v(o.components,H({},n(o.components),{ScrollSeekPlaceholder:r})),v(e.scrollSeekConfiguration,i)}),a(r.footer,"Footer","footer"),a(r.header,"Header","header"),a(r.ItemContainer,"Item","ItemContainer"),a(r.ListContainer,"List","ListContainer"),a(r.ScrollContainer,"Scroller","ScrollContainer"),a(r.emptyComponent,"EmptyPlaceholder","emptyComponent"),a(r.GroupContainer,"Group","GroupContainer"),H({},e,o,r)},o(fe,Ie)),Te=function(t){return x.createElement("div",{style:{height:t.height}})},we={position:pe(),zIndex:1,overflowAnchor:"none"},ye=x.memo(function(t){var e=t.showTopList,n=void 0!==e&&e,o=Ae("listState"),r=Ae("deviation"),i=Ue("sizeRanges"),a=Ae("useWindowScroll"),l=Ae("customScrollParent"),s=Ue("windowScrollContainerState"),u=Ue("scrollContainerState"),c=l||a?s:u,m=Ae("itemContent"),d=Ae("context"),f=Ae("groupContent"),p=Ae("trackItemSizes"),g=Ae("itemSize"),v=Ae("log"),S=_t(i,g,p,n?h:c,v,l),I=Ae("EmptyPlaceholder"),C=Ae("ScrollSeekPlaceholder")||Te,x=Ae("ListComponent"),T=Ae("ItemComponent"),w=Ae("GroupComponent"),y=Ae("computeItemKey"),b=Ae("isSeeking"),R=Ae("groupIndices").length>0,L=Ae("paddingTopAddition"),k=Ae("firstItemIndex"),z=Ae("statefulTotalCount"),B=n?{}:{boxSizing:"border-box",paddingTop:o.offsetTop+L,paddingBottom:o.offsetBottom,marginTop:r};return!n&&0===z&&I?E(I,Re(I,d)):E(x,H({},Re(x,d),{ref:S,style:B,"data-test-id":n?"virtuoso-top-item-list":"virtuoso-item-list"}),(n?o.topItems:o.items).map(function(t){var e=t.originalIndex,n=y(e+k,t.data,d);return b?E(C,H({},Re(C,d),{key:n,index:t.index,height:t.size,type:t.type||"item"},"group"===t.type?{}:{groupIndex:t.groupIndex})):"group"===t.type?E(w,H({},Re(w,d),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:we}),f(t.index)):E(T,H({},Re(T,d),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,"data-item-group-index":t.groupIndex,style:{overflowAnchor:"none"}}),R?m(t.index,t.groupIndex,t.data,d):m(t.index,t.data,d))}))}),be={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ee={width:"100%",height:"100%",position:"absolute",top:0},He={width:"100%",position:pe(),top:0};function Re(t,e){if("string"!=typeof t)return{context:e}}var Le=x.memo(function(){var t=Ae("HeaderComponent"),e=Ue("headerHeight"),n=Ae("headerFooterTag"),o=Nt(function(t){return e(ut(t,"height"))}),r=Ae("context");return t?E(n,{ref:o},E(t,Re(t,r))):null}),ke=x.memo(function(){var t=Ae("FooterComponent"),e=Ue("footerHeight"),n=Ae("headerFooterTag"),o=Nt(function(t){return e(ut(t,"height"))}),r=Ae("context");return t?E(n,{ref:o},E(t,Re(t,r))):null});function ze(t){var e=t.usePublisher,n=t.useEmitter,o=t.useEmitterValue;return x.memo(function(t){var r=t.style,i=t.children,a=R(t,ge),l=e("scrollContainerState"),s=o("ScrollerComponent"),u=e("smoothScrollTargetReached"),c=o("scrollerRef"),m=o("context"),d=jt(l,u,s,c),f=d.scrollerRef,p=d.scrollByCallback;return n("scrollTo",d.scrollToCallback),n("scrollBy",p),E(s,H({ref:f,style:H({},be,r),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},a,Re(s,m)),i)})}function Be(t){var e=t.usePublisher,n=t.useEmitter,o=t.useEmitterValue;return x.memo(function(t){var r=t.style,i=t.children,a=R(t,ve),l=e("windowScrollContainerState"),s=o("ScrollerComponent"),u=e("smoothScrollTargetReached"),c=o("totalListHeight"),m=o("deviation"),d=o("customScrollParent"),f=o("context"),p=jt(l,u,s,h,d),g=p.scrollerRef,v=p.scrollByCallback,S=p.scrollToCallback;return Gt(function(){return g.current=d||window,function(){g.current=null}},[g,d]),n("windowScrollTo",S),n("scrollBy",v),E(s,H({style:H({position:"relative"},r,0!==c?{height:c+m}:{}),"data-virtuoso-scroller":!0},a,Re(s,f)),i)})}var Fe=function(t){var e=t.children,n=Ue("viewportHeight"),o=Nt(C(n,function(t){return ut(t,"height")}));return x.createElement("div",{style:Ee,ref:o,"data-viewport-type":"element"},e)},Pe=function(t){var e=t.children,n=Dt(Ue("windowViewportRect"),Ae("customScrollParent"));return x.createElement("div",{ref:n,style:Ee,"data-viewport-type":"window"},e)},Oe=function(t){var e=t.children,n=Ae("TopItemListComponent"),o=Ae("headerHeight"),r=H({},He,{marginTop:o+"px"}),i=Ae("context");return E(n||"div",{style:r,context:i},e)},Me=t(xe,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},x.memo(function(t){var e=Ae("useWindowScroll"),n=Ae("topItemsIndexes").length>0,o=Ae("customScrollParent"),r=o||e?Pe:Fe;return x.createElement(o||e?De:Ne,H({},t),x.createElement(r,null,x.createElement(Le,null),x.createElement(ye,null),x.createElement(ke,null)),n&&x.createElement(Oe,null,x.createElement(ye,{showTopList:!0})))})),Ve=Me.Component,Ue=Me.usePublisher,Ae=Me.useEmitterValue,We=Me.useEmitter,Ne=ze({usePublisher:Ue,useEmitterValue:Ae,useEmitter:We}),De=Be({usePublisher:Ue,useEmitterValue:Ae,useEmitter:We}),Ge=["placeholder"],_e=e.system(function(){var t=e.statefulStream(function(t){return"Item "+t}),n=e.statefulStream({}),o=e.statefulStream(null),r=e.statefulStream("virtuoso-grid-item"),i=e.statefulStream("virtuoso-grid-list"),a=e.statefulStream(Se),l=e.statefulStream(e.noop),s=function(t,o){return void 0===o&&(o=null),e.statefulStreamFromEmitter(e.pipe(n,e.map(function(e){return e[t]}),e.distinctUntilChanged()),o)};return{context:o,itemContent:t,components:n,computeItemKey:a,itemClassName:r,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),je=e.system(function(t){var n=t[0],o=t[1],r={item:Ce(o.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:e.stream(),ScrollContainer:e.stream(),ListContainer:e.stream(),emptyComponent:e.stream(),scrollSeek:e.stream()};function i(t,n,r){e.connect(e.pipe(t,e.withLatestFrom(o.components),e.map(function(t){var e,o=t[0],i=t[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+n+" instead."),H({},i,((e={})[n]=o,e))})),o.components)}return e.subscribe(r.scrollSeek,function(t){var r=t.placeholder,i=R(t,Ge);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),e.publish(o.components,H({},e.getValue(o.components),{ScrollSeekPlaceholder:r})),e.publish(n.scrollSeekConfiguration,i)}),i(r.ItemContainer,"Item","ItemContainer"),i(r.ListContainer,"List","ListContainer"),i(r.ScrollContainer,"Scroller","ScrollContainer"),H({},n,o,r)},e.tup(Mt,_e)),Ke=x.memo(function(){var t=Qe("gridState"),e=Qe("listClassName"),n=Qe("itemClassName"),o=Qe("itemContent"),r=Qe("computeItemKey"),i=Qe("isSeeking"),a=$e("scrollHeight"),l=Qe("ItemComponent"),s=Qe("ListComponent"),u=Qe("ScrollSeekPlaceholder"),c=Qe("context"),m=$e("itemDimensions"),d=Nt(function(t){a(t.parentElement.parentElement.scrollHeight);var e=t.firstChild;e&&m(e.getBoundingClientRect())});return E(s,H({ref:d,className:e},Re(s,c),{style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom}}),t.items.map(function(e){var a=r(e.index);return i?E(u,H({key:a},Re(u,c),{index:e.index,height:t.itemHeight,width:t.itemWidth})):E(l,H({},Re(l,c),{className:n,"data-index":e.index,key:a}),o(e.index,c))}))}),Ye=function(t){var e=t.children,n=$e("viewportDimensions"),o=Nt(function(t){n(t.getBoundingClientRect())});return x.createElement("div",{style:Ee,ref:o},e)},Ze=function(t){var e=t.children,n=Dt($e("windowViewportRect"),Qe("customScrollParent"));return x.createElement("div",{ref:n,style:Ee},e)},qe=t(je,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},x.memo(function(t){var e=H({},t),n=Qe("useWindowScroll"),o=Qe("customScrollParent"),r=o||n?Ze:Ye;return x.createElement(o||n?en:tn,H({},e),x.createElement(r,null,x.createElement(Ke,null)))})),Je=qe.Component,$e=qe.usePublisher,Qe=qe.useEmitterValue,Xe=qe.useEmitter,tn=ze({usePublisher:$e,useEmitterValue:Qe,useEmitter:Xe}),en=Be({usePublisher:$e,useEmitterValue:Qe,useEmitter:Xe}),nn=r(function(){var t=p(function(t){return x.createElement("td",null,"Item $",t)}),e=p(null),n=p(null),o=p({}),r=p(Se),i=p(h),a=function(t,e){return void 0===e&&(e=null),S(l(o,s(function(e){return e[t]}),f()),e)};return{context:e,itemContent:t,fixedHeaderContent:n,components:o,computeItemKey:r,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),on=r(function(t){return H({},t[0],t[1])},o(fe,nn)),rn=function(t){return x.createElement("tr",null,x.createElement("td",{style:{height:t.height}}))},an=function(t){return x.createElement("tr",null,x.createElement("td",{style:{height:t.height,padding:0,border:0}}))},ln=x.memo(function(){var t=fn("listState"),e=fn("deviation"),n=dn("sizeRanges"),o=fn("useWindowScroll"),r=fn("customScrollParent"),i=dn("windowScrollContainerState"),a=dn("scrollContainerState"),l=r||o?i:a,s=fn("itemContent"),u=fn("trackItemSizes"),c=_t(n,fn("itemSize"),u,l,fn("log"),r),m=fn("EmptyPlaceholder"),d=fn("ScrollSeekPlaceholder")||rn,f=fn("TableBodyComponent"),p=fn("TableRowComponent"),h=fn("computeItemKey"),g=fn("isSeeking"),v=fn("paddingTopAddition"),S=fn("firstItemIndex"),I=fn("statefulTotalCount"),C=fn("context");if(0===I&&m)return E(m,Re(m,C));var T=t.offsetTop+v+e,w=t.offsetBottom,y=T>0?x.createElement(an,{height:T,key:"padding-top"}):null,b=w>0?x.createElement(an,{height:w,key:"padding-bottom"}):null,R=t.items.map(function(t){var e=t.originalIndex,n=h(e+S,t.data,C);return g?E(d,H({},Re(d,C),{key:n,index:t.index,height:t.size,type:t.type||"item"})):E(p,H({},Re(p,C),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:{overflowAnchor:"none"}}),s(t.index,t.data,C))});return E(f,H({ref:c,"data-test-id":"virtuoso-item-list"},Re(f,C)),[y].concat(R,[b]))}),sn=function(t){var e=t.children,n=dn("viewportHeight"),o=Nt(C(n,function(t){return ut(t,"height")}));return x.createElement("div",{style:Ee,ref:o,"data-viewport-type":"element"},e)},un=function(t){var e=t.children,n=Dt(dn("windowViewportRect"),fn("customScrollParent"));return x.createElement("div",{ref:n,style:Ee,"data-viewport-type":"window"},e)},cn=t(on,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},x.memo(function(t){var e=fn("useWindowScroll"),n=fn("customScrollParent"),o=dn("fixedHeaderHeight"),r=fn("fixedHeaderContent"),i=fn("context"),a=Nt(C(o,function(t){return ut(t,"height")})),l=n||e?gn:hn,s=n||e?un:sn,u=fn("TableComponent"),c=fn("TableHeadComponent"),m=r?x.createElement(c,H({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:a},Re(c,i)),r()):null;return x.createElement(l,H({},t),x.createElement(s,null,x.createElement(u,H({style:{borderSpacing:0}},Re(u,i)),[m,x.createElement(ln,{key:"TableBody"})])))})),mn=cn.Component,dn=cn.usePublisher,fn=cn.useEmitterValue,pn=cn.useEmitter,hn=ze({usePublisher:dn,useEmitterValue:fn,useEmitter:pn}),gn=Be({usePublisher:dn,useEmitterValue:fn,useEmitter:pn}),vn=Ve,Sn=Ve,In=mn,Cn=Je;export{Sn as GroupedVirtuoso,P as LogLevel,In as TableVirtuoso,vn as Virtuoso,Cn as VirtuosoGrid};
import{systemToComponent as t}from"@virtuoso.dev/react-urx";import*as e from"@virtuoso.dev/urx";import{getValue as n,tup as o,system as r,stream as i,streamFromEmitter as a,pipe as l,map as s,connect as u,prop as c,combineLatest as m,filter as d,distinctUntilChanged as f,statefulStream as p,noop as h,subscribe as g,publish as v,statefulStreamFromEmitter as S,withLatestFrom as I,compose as C}from"@virtuoso.dev/urx";import*as x from"react";import{useLayoutEffect as T,useEffect as w,useRef as y,useCallback as b,createElement as E}from"react";function H(){return H=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},H.apply(this,arguments)}function R(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)e.indexOf(n=i[o])>=0||(r[n]=t[n]);return r}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function k(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var z,B,F="undefined"!=typeof document?T:w;!function(t){t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR"}(B||(B={}));var P=((z={})[B.DEBUG]="debug",z[B.INFO]="log",z[B.WARN]="warn",z[B.ERROR]="error",z),O=e.system(function(){var t=e.statefulStream(B.ERROR);return{log:e.statefulStream(function(n,o,r){var i;void 0===r&&(r=B.INFO),r>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:e.getValue(t))&&console[P[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,o)}),logLevel:t}},[],{singleton:!0});function M(t,e){void 0===e&&(e=!0);var n=y(null),o=function(t){};if("undefined"!=typeof ResizeObserver){var r=new ResizeObserver(function(e){var n=e[0].target;null!==n.offsetParent&&t(n)});o=function(t){t&&e?(r.observe(t),n.current=t):(n.current&&r.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function V(t,e){return void 0===e&&(e=!0),M(t,e).callbackRef}function U(t,e,n,o,r,i){return V(function(n){for(var a=function(t,e,n,o){var r=t.length;if(0===r)return null;for(var i=[],a=0;a<r;a++){var l=t.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=e(l,"offsetHeight");if(0===c&&o("Zero-sized element, this should not happen",{child:l},B.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++}}}return i}(n.children,e,0,r),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;o(i?[Math.max(s,0),i.scrollHeight]:[Math.max(s,0),l.scrollHeight]),null!==a&&t(a)},n)}function A(t,e){return Math.round(t.getBoundingClientRect()[e])}function W(t,n,o,r,i){void 0===r&&(r=e.noop);var a=y(null),l=y(null),s=y(null),u=b(function(e){var o=e.target,r=o===window||o===document?window.pageYOffset||document.documentElement.scrollTop:o.scrollTop,i=o===window?document.documentElement.scrollHeight:o.scrollHeight;t([Math.max(r,0),i]),null!==l.current&&(r===l.current||r<=0||r===o.scrollHeight-A(o,"height"))&&(l.current=null,n(!0),s.current&&(clearTimeout(s.current),s.current=null))},[t,n]);return w(function(){var t=i||a.current;return r(i||a.current),u({target:t}),t.addEventListener("scroll",u,{passive:!0}),function(){r(null),t.removeEventListener("scroll",u)}},[a,u,o,r,i]),{scrollerRef:a,scrollByCallback:function(t){null===l.current&&a.current.scrollBy(t)},scrollToCallback:function(e){var o=a.current;if(o&&(!("offsetHeight"in o)||0!==o.offsetHeight)){var r,i,u,c="smooth"===e.behavior;if(o===window?(i=Math.max(A(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,u=document.documentElement.scrollTop):(i=o.scrollHeight,r=A(o,"height"),u=o.scrollTop),e.top=Math.ceil(Math.max(Math.min(i-r,e.top),0)),Math.abs(r-i)<1.01||e.top===u)return t([u,i]),void(c&&n(!0));c?(l.current=e.top,s.current&&clearTimeout(s.current),s.current=setTimeout(function(){s.current=null,l.current=null,n(!0)},1e3)):l.current=null,o.scrollTo(e)}}}}var N=e.system(function(){var t=e.stream(),n=e.stream(),o=e.statefulStream(0),r=e.stream(),i=e.statefulStream(0),a=e.stream(),l=e.stream(),s=e.statefulStream(0),u=e.statefulStream(0),c=e.stream(),m=e.stream(),d=e.statefulStream(!1);return e.connect(e.pipe(t,e.map(function(t){return t[0]})),n),e.connect(e.pipe(t,e.map(function(t){return t[1]})),l),e.connect(n,i),{scrollContainerState:t,scrollTop:n,viewportHeight:a,headerHeight:s,footerHeight:u,scrollHeight:l,smoothScrollTargetReached:r,scrollTo:c,scrollBy:m,statefulScrollTop:i,deviation:o,scrollingInProgress:d}},[],{singleton:!0}),D={lvl:0};function G(t,e,n,o,r){return void 0===o&&(o=D),void 0===r&&(r=D),{k:t,v:e,lvl:n,l:o,r:r}}function _(t){return t===D}function j(){return D}function K(t,e){if(_(t))return D;var n=t.k,o=t.l,r=t.r;if(e===n){if(_(o))return r;if(_(r))return o;var i=$(o);return et(X(t,{k:i[0],v:i[1],l:Q(o)}))}return et(X(t,e<n?{l:K(o,e)}:{r:K(r,e)}))}function Y(t,e,n){if(void 0===n&&(n="k"),_(t))return[-Infinity,void 0];if(t[n]===e)return[t.k,t.v];if(t[n]<e){var o=Y(t.r,e,n);return-Infinity===o[0]?[t.k,t.v]:o}return Y(t.l,e,n)}function Z(t,e,n){return _(t)?G(e,n,1):e===t.k?X(t,{k:e,v:n}):function(t){return rt(it(t))}(X(t,e<t.k?{l:Z(t.l,e,n)}:{r:Z(t.r,e,n)}))}function q(t,e,n){if(_(t))return[];var o=t.k,r=t.v,i=t.r,a=[];return o>e&&(a=a.concat(q(t.l,e,n))),o>=e&&o<=n&&a.push({k:o,v:r}),o<=n&&(a=a.concat(q(i,e,n))),a}function J(t){return _(t)?[]:[].concat(J(t.l),[{k:t.k,v:t.v}],J(t.r))}function $(t){return _(t.r)?[t.k,t.v]:$(t.r)}function Q(t){return _(t.r)?t.l:et(X(t,{r:Q(t.r)}))}function X(t,e){return G(void 0!==e.k?e.k:t.k,void 0!==e.v?e.v:t.v,void 0!==e.lvl?e.lvl:t.lvl,void 0!==e.l?e.l:t.l,void 0!==e.r?e.r:t.r)}function tt(t){return _(t)||t.lvl>t.r.lvl}function et(t){var e=t.l,n=t.r,o=t.lvl;if(n.lvl>=o-1&&e.lvl>=o-1)return t;if(o>n.lvl+1){if(tt(e))return it(X(t,{lvl:o-1}));if(_(e)||_(e.r))throw new Error("Unexpected empty nodes");return X(e.r,{l:X(e,{r:e.r.l}),r:X(t,{l:e.r.r,lvl:o-1}),lvl:o})}if(tt(t))return rt(X(t,{lvl:o-1}));if(_(n)||_(n.l))throw new Error("Unexpected empty nodes");var r=n.l,i=tt(r)?n.lvl-1:n.lvl;return X(r,{l:X(t,{r:r.l,lvl:o-1}),r:rt(X(n,{l:r.r,lvl:i})),lvl:r.lvl+1})}function nt(t,e,n){return _(t)?[]:ot(q(t,Y(t,e)[0],n),function(t){return{index:t.k,value:t.v}})}function ot(t,e){var n=t.length;if(0===n)return[];for(var o=e(t[0]),r=o.index,i=o.value,a=[],l=1;l<n;l++){var s=e(t[l]),u=s.index,c=s.value;a.push({start:r,end:u-1,value:i}),r=u,i=c}return a.push({start:r,end:Infinity,value:i}),a}function rt(t){var e=t.r,n=t.lvl;return _(e)||_(e.r)||e.lvl!==n||e.r.lvl!==n?t:X(e,{l:X(t,{r:e.l}),lvl:n+1})}function it(t){var e=t.l;return _(e)||e.lvl!==t.lvl?t:X(e,{r:X(t,{l:e.r})})}function at(t,e,n,o){void 0===o&&(o=0);for(var r=t.length-1;o<=r;){var i=Math.floor((o+r)/2),a=n(t[i],e);if(0===a)return i;if(-1===a){if(r-o<2)return i-1;r=i-1}else{if(r===o)return i;o=i+1}}throw new Error("Failed binary finding record in array - "+t.join(",")+", searched for "+e)}function lt(t,e,n){return t[at(t,e,n)]}function st(t){var e=t.size,n=t.startIndex,o=t.endIndex;return function(t){return t.start===n&&(t.end===o||Infinity===t.end)&&t.value===e}}function ut(t,e){var n=t.index;return e===n?0:e<n?-1:1}function ct(t,e){var n=t.offset;return e===n?0:e<n?-1:1}function mt(t){return{index:t.index,value:t}}function dt(t,e,n){var o=t,r=0,i=0,a=0,l=0;if(0!==e){a=o[l=at(o,e-1,ut)].offset;var s=Y(n,e-1);r=s[0],i=s[1],o.length&&o[l].size===Y(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(var u,c=k(nt(n,e,Infinity));!(u=c()).done;){var m=u.value,d=m.start,f=m.value,p=(d-r)*i+a;o.push({offset:p,size:f,index:d}),r=d,a=p,i=f}return{offsetTree:o,lastIndex:r,lastOffset:a,lastSize:i}}function ft(t,e){var n=e[0],o=e[1];n.length>0&&(0,e[2])("received item sizes",n,B.DEBUG);var r=t.sizeTree,i=r,a=0;if(o.length>0&&_(r)&&2===n.length){var l=n[0].size,s=n[1].size;i=o.reduce(function(t,e){return Z(Z(t,e,l),e+1,s)},i)}else{var u=function(t,e){for(var n,o=_(t)?0:Infinity,r=k(e);!(n=r()).done;){var i=n.value,a=i.size,l=i.startIndex,s=i.endIndex;if(o=Math.min(o,l),_(t))t=Z(t,0,a);else{var u=nt(t,l-1,s+1);if(!u.some(st(i))){for(var c,m=!1,d=!1,f=k(u);!(c=f()).done;){var p=c.value,h=p.start,g=p.end,v=p.value;m?(s>=h||a===v)&&(t=K(t,h)):(d=v!==a,m=!0),g>s&&s>=h&&v!==a&&(t=Z(t,s+1,v))}d&&(t=Z(t,l,a))}}}return[t,o]}(i,n);i=u[0],a=u[1]}if(i===r)return t;var c=dt(t.offsetTree,a,i),m=c.offsetTree;return{sizeTree:i,offsetTree:m,lastIndex:c.lastIndex,lastOffset:c.lastOffset,lastSize:c.lastSize,groupOffsetTree:o.reduce(function(t,e){return Z(t,e,pt(e,m))},j()),groupIndices:o}}function pt(t,e){if(0===e.length)return 0;var n=lt(e,t,ut);return n.size*(t-n.index)+n.offset}function ht(t,e){if(!gt(e))return t;for(var n=0;e.groupIndices[n]<=t+n;)n++;return t+n}function gt(t){return!_(t.groupOffsetTree)}var vt={offsetHeight:"height",offsetWidth:"width"},St=e.system(function(t){var n=t[0].log,o=e.stream(),r=e.stream(),i=e.statefulStreamFromEmitter(r,0),a=e.stream(),l=e.stream(),s=e.statefulStream(0),u=e.statefulStream([]),c=e.statefulStream(void 0),m=e.statefulStream(void 0),d=e.statefulStream(function(t,e){return A(t,vt[e])}),f=e.statefulStream(void 0),p={offsetTree:[],sizeTree:j(),groupOffsetTree:j(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},h=e.statefulStreamFromEmitter(e.pipe(o,e.withLatestFrom(u,n),e.scan(ft,p),e.distinctUntilChanged()),p);e.connect(e.pipe(u,e.filter(function(t){return t.length>0}),e.withLatestFrom(h),e.map(function(t){var e=t[0],n=t[1],o=e.reduce(function(t,e,o){return Z(t,e,pt(e,n.offsetTree)||o)},j());return H({},n,{groupIndices:e,groupOffsetTree:o})})),h),e.connect(e.pipe(r,e.withLatestFrom(h),e.filter(function(t){return t[0]<t[1].lastIndex}),e.map(function(t){var e=t[1];return[{startIndex:t[0],endIndex:e.lastIndex,size:e.lastSize}]})),o),e.connect(c,m);var g=e.statefulStreamFromEmitter(e.pipe(c,e.map(function(t){return void 0===t})),!0);e.connect(e.pipe(m,e.filter(function(t){return void 0!==t&&_(e.getValue(h).sizeTree)}),e.map(function(t){return[{startIndex:0,endIndex:0,size:t}]})),o);var v=e.streamFromEmitter(e.pipe(o,e.withLatestFrom(h),e.scan(function(t,e){var n=e[1];return{changed:n!==t.sizes,sizes:n}},{changed:!1,sizes:p}),e.map(function(t){return t.changed})));e.subscribe(e.pipe(s,e.scan(function(t,e){return{diff:t.prev-e,prev:e}},{diff:0,prev:0}),e.map(function(t){return t.diff})),function(t){t>0?e.publish(a,t):t<0&&e.publish(l,t)}),e.subscribe(e.pipe(s,e.withLatestFrom(n)),function(t){t[0]<0&&(0,t[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},B.ERROR)});var S=e.streamFromEmitter(a);e.connect(e.pipe(a,e.withLatestFrom(h),e.map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return J(n.sizeTree).reduce(function(t,n){var o=n.k,r=n.v;return{ranges:[].concat(t.ranges,[{startIndex:t.prevIndex,endIndex:o+e-1,size:t.prevSize}]),prevIndex:o+e,prevSize:r}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),o);var I=e.streamFromEmitter(e.pipe(l,e.withLatestFrom(h),e.map(function(t){return pt(-t[0],t[1].offsetTree)})));return e.connect(e.pipe(l,e.withLatestFrom(h),e.map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: shifting items does not work with groups");var o=J(n.sizeTree).reduce(function(t,n){var o=n.v;return Z(t,Math.max(0,n.k+e),o)},j());return H({},n,{sizeTree:o},dt(n.offsetTree,0,o))})),h),{data:f,totalCount:r,sizeRanges:o,groupIndices:u,defaultItemSize:m,fixedItemSize:c,unshiftWith:a,shiftWith:l,shiftWithOffset:I,beforeUnshiftWith:S,firstItemIndex:s,sizes:h,listRefresh:v,statefulTotalCount:i,trackItemSizes:g,itemSize:d}},e.tup(O),{singleton:!0}),It="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function Ct(t){var e="number"==typeof t?{index:t}:t;return e.align||(e.align="start"),e.behavior&&It||(e.behavior="auto"),e.offset||(e.offset=0),e}var xt=e.system(function(t){var n=t[0],o=n.sizes,r=n.totalCount,i=n.listRefresh,a=t[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=t[2].log,p=e.stream(),h=e.statefulStream(0),g=null,v=null,S=null;function I(){g&&(g(),g=null),S&&(S(),S=null),v&&(clearTimeout(v),v=null),e.publish(l,!1)}return e.connect(e.pipe(p,e.withLatestFrom(o,s,r,h,m,d,f),e.map(function(t){var n=t[0],o=t[1],r=t[2],a=t[3],s=t[4],u=t[5],m=t[6],d=t[7],f=Ct(n),h=f.align,C=f.behavior,x=f.offset,T=a-1,w=f.index;"LAST"===w&&(w=T),w=ht(w,o);var y=pt(w=Math.max(0,w,Math.min(T,w)),o.offsetTree)+u;"end"===h?(y=y-r+Y(o.sizeTree,w)[1],w===T&&(y+=m)):"center"===h?y=y-r/2+Y(o.sizeTree,w)[1]/2:y-=s,x&&(y+=x);var b=function(t){I(),t?(d("retrying to scroll to",{location:n},B.DEBUG),e.publish(p,n)):d("list did not change, scroll successful",{},B.DEBUG)};if(I(),"smooth"===C){var E=!1;S=e.subscribe(i,function(t){E=E||t}),g=e.handleNext(c,function(){b(E)})}else g=e.handleNext(e.pipe(i,function(t){var e=setTimeout(function(){t(!1)},50);return function(n){n&&(t(!0),clearTimeout(e))}}),b);return v=setTimeout(function(){I()},1200),e.publish(l,!0),d("scrolling from index to",{index:w,top:y,behavior:C},B.DEBUG),{top:y,behavior:C}})),u),{scrollToIndex:p,topListHeight:h}},e.tup(St,N,O),{singleton:!0}),Tt="up",wt={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},yt=e.system(function(t){var n=t[0],o=n.scrollContainerState,r=n.scrollTop,i=n.viewportHeight,a=n.headerHeight,l=n.footerHeight,s=n.scrollBy,u=e.statefulStream(!1),c=e.statefulStream(!0),m=e.stream(),d=e.stream(),f=e.statefulStream(4),p=e.streamFromEmitter(e.pipe(e.merge(e.pipe(e.duc(r),e.skip(1),e.mapTo(!0)),e.pipe(e.duc(r),e.skip(1),e.mapTo(!1),e.debounceTime(100))),e.distinctUntilChanged())),h=e.statefulStreamFromEmitter(e.pipe(e.merge(e.pipe(s,e.mapTo(!0)),e.pipe(s,e.mapTo(!1),e.debounceTime(200))),e.distinctUntilChanged()),!1);e.connect(e.pipe(e.duc(r),e.map(function(t){return 0===t}),e.distinctUntilChanged()),c),e.connect(c,d);var g=e.streamFromEmitter(e.pipe(e.combineLatest(o,e.duc(i),e.duc(a),e.duc(l),e.duc(f)),e.scan(function(t,e){var n,o,r=e[0],i=r[0],a=r[1],l=e[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-e[4]?(i>t.state.scrollTop?(n="SCROLLED_DOWN",o=t.state.scrollTop-i):(n="SIZE_DECREASED",o=t.state.scrollTop-i||t.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:o}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>t.state.scrollHeight?"SIZE_INCREASED":l<t.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<t.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},wt),e.distinctUntilChanged(function(t,e){return t&&t.atBottom===e.atBottom}))),v=e.statefulStreamFromEmitter(e.pipe(o,e.scan(function(t,e){var n=e[0],o=e[1];return t.scrollHeight!==o?t.scrollTop!==n?{scrollHeight:o,scrollTop:n,jump:t.scrollTop-n,changed:!0}:{scrollHeight:o,scrollTop:n,jump:0,changed:!0}:{scrollTop:n,scrollHeight:o,jump:0,changed:!1}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),e.filter(function(t){return t.changed}),e.map(function(t){return t.jump})),0);e.connect(e.pipe(g,e.map(function(t){return t.atBottom})),u),e.connect(e.pipe(u,e.throttleTime(50)),m);var S=e.statefulStream("down");e.connect(e.pipe(o,e.map(function(t){return t[0]}),e.distinctUntilChanged(),e.scan(function(t,n){return e.getValue(h)?{direction:t.direction,prevScrollTop:n}:{direction:n<t.prevScrollTop?Tt:"down",prevScrollTop:n}},{direction:"down",prevScrollTop:0}),e.map(function(t){return t.direction})),S),e.connect(e.pipe(o,e.throttleTime(50),e.mapTo("none")),S);var I=e.statefulStream(0);return e.connect(e.pipe(p,e.filter(function(t){return!t}),e.mapTo(0)),I),e.connect(e.pipe(r,e.throttleTime(100),e.withLatestFrom(p),e.filter(function(t){return!!t[1]}),e.scan(function(t,e){return[t[1],e[0]]},[0,0]),e.map(function(t){return t[1]-t[0]})),I),{isScrolling:p,isAtTop:c,isAtBottom:u,atBottomState:g,atTopStateChange:d,atBottomStateChange:m,scrollDirection:S,atBottomThreshold:f,scrollVelocity:I,lastJumpDueToItemResize:v}},e.tup(N)),bt=e.system(function(t){var o=t[0].log,r=e.statefulStream(!1),i=e.streamFromEmitter(e.pipe(r,e.filter(function(t){return t}),e.distinctUntilChanged()));return e.subscribe(r,function(t){t&&n(o)("props updated",{},B.DEBUG)}),{propsReady:r,didMount:i}},o(O),{singleton:!0}),Et=e.system(function(t){var n=t[0],o=n.sizes,r=n.listRefresh,i=n.defaultItemSize,a=t[1].scrollTop,l=t[2].scrollToIndex,s=t[3].didMount,u=e.statefulStream(!0),c=e.statefulStream(0);return e.connect(e.pipe(s,e.withLatestFrom(c),e.filter(function(t){return!!t[1]}),e.mapTo(!1)),u),e.subscribe(e.pipe(e.combineLatest(r,s),e.withLatestFrom(u,o,i),e.filter(function(t){var e=t[1],n=t[3];return t[0][1]&&(!_(t[2].sizeTree)||void 0!==n)&&!e}),e.withLatestFrom(c)),function(t){var n=t[1];setTimeout(function(){e.handleNext(a,function(){e.publish(u,!0)}),e.publish(l,n)})}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},e.tup(St,N,xt,bt),{singleton:!0});function Ht(t){return!!t&&("smooth"===t?"smooth":"auto")}var Rt=e.system(function(t){var n=t[0],o=n.totalCount,r=n.listRefresh,i=t[1],a=i.isAtBottom,l=i.atBottomState,s=t[2].scrollToIndex,u=t[3].scrolledToInitialItem,c=t[4],m=c.propsReady,d=c.didMount,f=t[5].log,p=t[6].scrollingInProgress,h=e.statefulStream(!1),g=null;function v(t){e.publish(s,{index:"LAST",align:"end",behavior:t})}return e.subscribe(e.pipe(e.combineLatest(e.pipe(e.duc(o),e.skip(1)),d),e.withLatestFrom(e.duc(h),a,u,p),e.map(function(t){var e=t[0],n=e[0],o=e[1]&&t[3],r="auto";return o&&(r=function(t,e){return"function"==typeof t?Ht(t(e)):e&&Ht(t)}(t[1],t[2]||t[4]),o=o&&!!r),{totalCount:n,shouldFollow:o,followOutputBehavior:r}}),e.filter(function(t){return t.shouldFollow})),function(t){var n=t.totalCount,o=t.followOutputBehavior;g&&(g(),g=null),g=e.handleNext(r,function(){e.getValue(f)("following output to ",{totalCount:n},B.DEBUG),v(o),g=null})}),e.subscribe(e.pipe(e.combineLatest(e.duc(h),o,m),e.filter(function(t){return t[0]&&t[2]}),e.scan(function(t,e){var n=e[1];return{refreshed:t.value===n,value:n}},{refreshed:!1,value:0}),e.filter(function(t){return t.refreshed}),e.withLatestFrom(h,o)),function(t){var n=t[1],o=e.handleNext(l,function(t){!n||t.atBottom||"SIZE_INCREASED"!==t.notAtBottomBecause||g||(e.getValue(f)("scrolling to bottom due to increased size",{},B.DEBUG),v("auto"))});setTimeout(o,100)}),e.subscribe(e.combineLatest(e.duc(h),l),function(t){var e=t[1];t[0]&&!e.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===e.notAtBottomBecause&&v("auto")}),{followOutput:h}},e.tup(St,yt,xt,Et,bt,O,N));function Lt(t){return t.reduce(function(t,e){return t.groupIndices.push(t.totalCount),t.totalCount+=e+1,t},{totalCount:0,groupIndices:[]})}var kt=r(function(t){var e=t[0],n=e.totalCount,o=e.groupIndices,r=e.sizes,p=t[1],h=p.scrollTop,g=p.headerHeight,v=i(),S=i(),I=a(l(v,s(Lt)));return u(l(I,s(c("totalCount"))),n),u(l(I,s(c("groupIndices"))),o),u(l(m(h,r,g),d(function(t){return gt(t[1])}),s(function(t){return Y(t[1].groupOffsetTree,Math.max(t[0]-t[2],0),"v")[0]}),f(),s(function(t){return[t]})),S),{groupCounts:v,topItemsIndexes:S}},o(St,N));function zt(t,e){return!(!t||t[0]!==e[0]||t[1]!==e[1])}function Bt(t,e){return!(!t||t.startIndex!==e.startIndex||t.endIndex!==e.endIndex)}function Ft(t,e,n){return"number"==typeof t?n===Tt&&"top"===e||"down"===n&&"bottom"===e?t:0:n===Tt?"top"===e?t.main:t.reverse:"bottom"===e?t.main:t.reverse}function Pt(t,e){return"number"==typeof t?t:t[e]||0}var Ot=e.system(function(t){var n=t[0],o=n.scrollTop,r=n.viewportHeight,i=n.deviation,a=n.headerHeight,l=e.stream(),s=e.statefulStream(0),u=e.statefulStream(0),c=e.statefulStream(0),m=e.statefulStream(0),d=e.statefulStreamFromEmitter(e.pipe(e.combineLatest(e.duc(o),e.duc(r),e.duc(a),e.duc(l,zt),e.duc(m),e.duc(s),e.duc(u),e.duc(i),e.duc(c)),e.map(function(t){var e=t[0],n=t[1],o=t[2],r=t[3],i=r[0],a=r[1],l=t[4],s=t[6],u=t[7],c=t[8],m=e-u,d=t[5]+s,f=Math.max(o-m,0),p="none",h=Pt(c,"top"),g=Pt(c,"bottom");return i-=u,a+=o+s,(i+=o+s)>e+d-h&&(p=Tt),(a-=u)<e-f+n+g&&(p="down"),"none"!==p?[Math.max(m-o-Ft(l,"top",p)-h,0),m-f-s+n+Ft(l,"bottom",p)+g]:null}),e.filter(function(t){return null!=t}),e.distinctUntilChanged(zt)),[0,0]);return{listBoundary:l,overscan:m,topListHeight:s,fixedHeaderHeight:u,increaseViewportBy:c,visibleRange:d}},e.tup(N),{singleton:!0}),Mt={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0};function Vt(t,e,n){if(0===t.length)return[];if(!gt(e))return t.map(function(t){return H({},t,{index:t.index+n,originalIndex:t.index})});for(var o,r=[],i=nt(e.groupOffsetTree,t[0].index,t[t.length-1].index),a=void 0,l=0,s=k(t);!(o=s()).done;){var u=o.value;(!a||a.end<u.index)&&(a=i.shift(),l=e.groupIndices.indexOf(a.start)),r.push(H({},u.index===a.start?{type:"group",index:l}:{index:u.index-(l+1)+n,groupIndex:l},{size:u.size,offset:u.offset,originalIndex:u.index,data:u.data}))}return r}function Ut(t,e,n,o,r){var i=0,a=0;if(t.length>0){i=t[0].offset;var l=t[t.length-1];a=l.offset+l.size}var s=i,u=o.lastOffset+(n-o.lastIndex)*o.lastSize-a;return{items:Vt(t,o,r),topItems:Vt(e,o,r),topListHeight:e.reduce(function(t,e){return e.size+t},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n}}var At,Wt,Nt,Dt=e.system(function(t){var n=t[0],o=n.sizes,r=n.totalCount,i=n.data,a=n.firstItemIndex,l=t[1],s=t[2],u=s.visibleRange,c=s.listBoundary,m=s.topListHeight,d=t[3],f=d.scrolledToInitialItem,p=d.initialTopMostItemIndex,h=t[4].topListHeight,g=t[5],v=t[6].didMount,S=e.statefulStream([]),I=e.stream();e.connect(l.topItemsIndexes,S);var C=e.statefulStreamFromEmitter(e.pipe(e.combineLatest(v,e.duc(u),e.duc(r),e.duc(o),e.duc(p),f,e.duc(S),e.duc(a),i),e.filter(function(t){return t[0]}),e.map(function(t){var n=t[1],o=n[0],r=n[1],i=t[2],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],m=t[3],d=m.sizeTree,f=m.offsetTree;if(0===i||0===o&&0===r)return Mt;if(_(d))return Ut(function(t,e,n){if(gt(e)){var o=ht(t,e);return[{index:Y(e.groupOffsetTree,o)[0],size:0,offset:0},{index:o,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}(function(t,e){return"number"==typeof t?t:"LAST"===t.index?e-1:t.index}(a,i),m,c),[],i,m,u);var p=[];if(s.length>0)for(var h,g=s[0],v=s[s.length-1],S=0,I=k(nt(d,g,v));!(h=I()).done;)for(var C=h.value,x=C.value,T=Math.max(C.start,g),w=Math.min(C.end,v),y=T;y<=w;y++)p.push({index:y,size:x,offset:S,data:c&&c[y]}),S+=x;if(!l)return Ut([],p,i,m,u);var b=s.length>0?s[s.length-1]+1:0,E=function(t,e,n,o){return void 0===o&&(o=0),o>0&&(e=Math.max(e,lt(t,o,ut).offset)),ot((i=n,l=at(r=t,e,a=ct),s=at(r,i,a,l),r.slice(l,s+1)),mt);var r,i,a,l,s}(f,o,r,b);if(0===E.length)return null;var H=i-1;return Ut(e.tap([],function(t){for(var e,n=k(E);!(e=n()).done;){var i=e.value,a=i.value,l=a.offset,s=i.start,u=a.size;a.offset<o&&(l+=((s+=Math.floor((o-a.offset)/u))-i.start)*u),s<b&&(l+=(b-s)*u,s=b);for(var m=Math.min(i.end,H),d=s;d<=m&&!(l>=r);d++)t.push({index:d,size:u,offset:l,data:c&&c[d]}),l+=u}}),p,i,m,u)}),e.filter(function(t){return null!==t}),e.distinctUntilChanged()),Mt);return e.connect(e.pipe(i,e.filter(function(t){return void 0!==t}),e.map(function(t){return t.length})),r),e.connect(e.pipe(C,e.map(e.prop("topListHeight"))),h),e.connect(h,m),e.connect(e.pipe(C,e.map(function(t){return[t.top,t.bottom]})),c),e.connect(e.pipe(C,e.map(function(t){return t.items})),I),H({listState:C,topItemsIndexes:S,endReached:e.streamFromEmitter(e.pipe(C,e.filter(function(t){return t.items.length>0}),e.withLatestFrom(r,i),e.filter(function(t){var e=t[0].items;return e[e.length-1].originalIndex===t[1]-1}),e.map(function(t){return[t[1]-1,t[2]]}),e.distinctUntilChanged(zt),e.map(function(t){return t[0]}))),startReached:e.streamFromEmitter(e.pipe(C,e.throttleTime(200),e.filter(function(t){var e=t.items;return e.length>0&&e[0].originalIndex===t.topItems.length}),e.map(function(t){return t.items[0].index}),e.distinctUntilChanged())),rangeChanged:e.streamFromEmitter(e.pipe(C,e.filter(function(t){return t.items.length>0}),e.map(function(t){var e=t.items;return{startIndex:e[0].index,endIndex:e[e.length-1].index}}),e.distinctUntilChanged(Bt))),itemsRendered:I},g)},e.tup(St,kt,Ot,Et,xt,yt,bt),{singleton:!0}),Gt=e.system(function(t){var n=t[0],o=n.sizes,r=n.firstItemIndex,i=n.data,a=t[1].listState,l=t[2].didMount,s=e.statefulStream(0);return e.connect(e.pipe(l,e.withLatestFrom(s),e.filter(function(t){return 0!==t[1]}),e.withLatestFrom(o,r,i),e.map(function(t){var e=t[0][1],n=t[1],o=t[2],r=t[3],i=void 0===r?[]:r,a=0;if(n.groupIndices.length>0)for(var l,s=k(n.groupIndices);!((l=s()).done||l.value-a>=e);)a++;var u=e+a;return Ut(Array.from({length:u}).map(function(t,e){return{index:e,size:0,offset:0,data:i[e]}}),[],u,n,o)})),a),{initialItemCount:s}},e.tup(St,Dt,bt),{singleton:!0}),_t=e.system(function(t){var n=t[0].scrollVelocity,o=e.statefulStream(!1),r=e.stream(),i=e.statefulStream(!1);return e.connect(e.pipe(n,e.withLatestFrom(i,o,r),e.filter(function(t){return!!t[1]}),e.map(function(t){var e=t[0],n=t[1],o=t[2],r=t[3],i=n.enter;if(o){if((0,n.exit)(e,r))return!1}else if(i(e,r))return!0;return o}),e.distinctUntilChanged()),o),e.subscribe(e.pipe(e.combineLatest(o,n,r),e.withLatestFrom(i)),function(t){var e=t[0],n=t[1];return e[0]&&n&&n.change&&n.change(e[1],e[2])}),{isSeeking:o,scrollSeekConfiguration:i,scrollVelocity:n,scrollSeekRangeChanged:r}},e.tup(yt),{singleton:!0}),jt=r(function(t){var e=t[0].topItemsIndexes,n=p(0);return u(l(n,d(function(t){return t>0}),s(function(t){return Array.from({length:t}).map(function(t,e){return e})})),e),{topItemCount:n}},o(Dt)),Kt=e.system(function(t){var n=t[0],o=n.footerHeight,r=n.headerHeight,i=t[1].listState,a=e.stream(),l=e.statefulStreamFromEmitter(e.pipe(e.combineLatest(o,r,i),e.map(function(t){var e=t[2];return t[0]+t[1]+e.offsetBottom+e.bottom})),0);return e.connect(e.duc(l),a),{totalListHeight:l,totalListHeightChanged:a}},e.tup(N,Dt),{singleton:!0}),Yt=e.system(function(t){var n=t[0],o=n.scrollBy,r=n.scrollTop,i=n.deviation,a=n.scrollingInProgress,l=t[1],s=l.isScrolling,u=l.isAtBottom,c=l.atBottomState,m=l.scrollDirection,d=t[3],f=d.beforeUnshiftWith,p=d.shiftWithOffset,h=d.sizes,g=t[4].log,v=e.streamFromEmitter(e.pipe(t[2].listState,e.withLatestFrom(l.lastJumpDueToItemResize),e.scan(function(t,e){var n=t[1],o=e[0],r=o.items,i=o.totalCount,a=e[1],l=0;if(t[2]===i){if(n.length>0&&r.length>0){var s=1===r.length;if(0!==r[0].originalIndex||0!==n[0].originalIndex)for(var u=function(t){var e=r[t],o=n.find(function(t){return t.originalIndex===e.originalIndex});return o?e.offset!==o.offset||s?(l=e.offset-o.offset+e.size-o.size,"break"):void 0:"continue"},c=r.length-1;c>=0;c--){var m=u(c);if("continue"!==m&&"break"===m)break}}0!==l&&(l+=a)}return[l,r,i]},[0,[],0]),e.filter(function(t){return 0!==t[0]}),e.withLatestFrom(r,m,a,g,u,c),e.filter(function(t){return!t[3]&&0!==t[1]&&t[2]===Tt}),e.map(function(t){var e=t[0][0];return(0,t[4])("Upward scrolling compensation",{amount:e},B.DEBUG),e})));return e.connect(e.pipe(v,e.withLatestFrom(i),e.map(function(t){return t[1]-t[0]})),i),e.subscribe(e.pipe(e.combineLatest(e.statefulStreamFromEmitter(s,!1),i),e.filter(function(t){return!t[0]&&0!==t[1]}),e.map(function(t){return t[1]}),e.throttleTime(1)),function(t){t>0?(e.publish(o,{top:-t,behavior:"auto"}),e.publish(i,0)):(e.publish(i,0),e.publish(o,{top:-t,behavior:"auto"}))}),e.connect(e.pipe(p,e.map(function(t){return{top:-t}})),o),e.connect(e.pipe(f,e.withLatestFrom(h),e.map(function(t){return t[0]*t[1].lastSize})),v),{deviation:i}},e.tup(N,yt,Dt,St,O)),Zt=e.system(function(t){var n=t[0].totalListHeight,o=t[1].didMount,r=t[2].scrollTo,i=e.statefulStream(0);return e.subscribe(e.pipe(o,e.withLatestFrom(i),e.filter(function(t){return 0!==t[1]}),e.map(function(t){return{top:t[1]}})),function(t){e.handleNext(e.pipe(n,e.filter(function(t){return 0!==t})),function(){setTimeout(function(){e.publish(r,t)})})}),{initialScrollTop:i}},e.tup(Kt,bt,N),{singleton:!0}),qt=e.system(function(t){var n=t[0].viewportHeight,o=t[1].totalListHeight,r=e.statefulStream(!1);return{alignToBottom:r,paddingTopAddition:e.statefulStreamFromEmitter(e.pipe(e.combineLatest(r,n,o),e.filter(function(t){return t[0]}),e.map(function(t){return Math.max(0,t[1]-t[2])}),e.distinctUntilChanged()),0)}},e.tup(N,Kt),{singleton:!0}),Jt=e.system(function(t){var n=t[0],o=n.scrollTo,r=n.scrollContainerState,i=e.stream(),a=e.stream(),l=e.stream(),s=e.statefulStream(!1),u=e.statefulStream(void 0);return e.connect(e.pipe(e.combineLatest(i,a),e.map(function(t){var e=t[0],n=e[1];return[Math.max(0,e[0]-t[1].offsetTop),n]})),r),e.connect(e.pipe(o,e.withLatestFrom(a),e.map(function(t){var e=t[0];return H({},e,{top:e.top+t[1].offsetTop})})),l),{useWindowScroll:s,customScrollParent:u,windowScrollContainerState:i,windowViewportRect:a,windowScrollTo:l}},e.tup(N)),$t=e.system(function(t){var n=t[0],o=n.sizes,r=n.totalCount,i=t[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,u=i.scrollingInProgress,c=t[2].scrollToIndex,m=e.stream();return e.connect(e.pipe(m,e.withLatestFrom(o,l,r,s,a),e.map(function(t){var n=t[0],o=n.index,r=n.behavior,i=void 0===r?"auto":r,a=n.done,l=t[1],s=t[2],c=t[4],m=t[5],d=t[3]-1,f=null;o=ht(o,l);var p=pt(o=Math.max(0,o,Math.min(d,o)),l.offsetTree)+c;return p<m?f={index:o,behavior:i,align:"start"}:p+Y(l.sizeTree,o)[1]>m+s&&(f={index:o,behavior:i,align:"end"}),f?a&&e.handleNext(e.pipe(u,e.skip(1),e.filter(function(t){return!1===t})),a):a&&a(),f}),e.filter(function(t){return null!==t})),c),{scrollIntoView:m}},e.tup(St,N,xt,Dt,O),{singleton:!0}),Qt=["listState","topItemsIndexes"],Xt=e.system(function(t){return H({},t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},e.tup(Ot,Gt,bt,_t,Kt,Zt,qt,Jt,$t)),te=e.system(function(t){var n=t[0],o=n.totalCount,r=n.sizeRanges,i=n.fixedItemSize,a=n.defaultItemSize,l=n.trackItemSizes,s=n.itemSize,u=n.data,c=n.firstItemIndex,m=n.groupIndices,d=n.statefulTotalCount,f=t[1],p=f.initialTopMostItemIndex,h=f.scrolledToInitialItem,g=t[2],v=t[3],S=t[4],I=S.listState,C=S.topItemsIndexes,x=R(S,Qt),T=t[5].scrollToIndex,w=t[7].topItemCount,y=t[8].groupCounts,b=t[9],E=t[10];return e.connect(x.rangeChanged,b.scrollSeekRangeChanged),e.connect(e.pipe(b.windowViewportRect,e.map(e.prop("visibleHeight"))),g.viewportHeight),H({totalCount:o,data:u,firstItemIndex:c,sizeRanges:r,initialTopMostItemIndex:p,scrolledToInitialItem:h,topItemsIndexes:C,topItemCount:w,groupCounts:y,fixedItemHeight:i,defaultItemHeight:a},v,{statefulTotalCount:d,listState:I,scrollToIndex:T,trackItemSizes:l,itemSize:s,groupIndices:m},x,b,g,E)},e.tup(St,Et,N,Rt,Dt,xt,Yt,jt,kt,Xt,O)),ee=(At=function(){if("undefined"==typeof document)return"sticky";var t=document.createElement("div");return t.style.position="-webkit-sticky","-webkit-sticky"===t.style.position?"-webkit-sticky":"sticky"},Nt=!1,function(){return Nt||(Nt=!0,Wt=At()),Wt});function ne(t,e){var n=y(null),o=b(function(o){if(null!==o){var r,i,a=o.getBoundingClientRect(),l=a.width;if(e){var s=e.getBoundingClientRect(),u=a.top-s.top;r=s.height-Math.max(0,u),i=u+e.scrollTop}else r=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;n.current={offsetTop:i,visibleHeight:r,visibleWidth:l},t(n.current)}},[t,e]),r=M(o),i=r.callbackRef,a=r.ref,l=b(function(){o(a.current)},[o,a]);return w(function(){if(e){e.addEventListener("scroll",l);var t=new ResizeObserver(l);return t.observe(e),function(){e.removeEventListener("scroll",l),t.unobserve(e)}}return window.addEventListener("scroll",l),window.addEventListener("resize",l),function(){window.removeEventListener("scroll",l),window.removeEventListener("resize",l)}},[l,e]),i}var oe=["placeholder"],re=["style","children"],ie=["style","children"];function ae(t){return t}var le=r(function(){var t=p(function(t){return"Item "+t}),e=p(null),n=p(function(t){return"Group "+t}),o=p({}),r=p(ae),i=p("div"),a=p(h),u=function(t,e){return void 0===e&&(e=null),S(l(o,s(function(e){return e[t]}),f()),e)};return{context:e,itemContent:t,groupContent:n,components:o,computeItemKey:r,headerFooterTag:i,scrollerRef:a,FooterComponent:u("Footer"),HeaderComponent:u("Header"),TopItemListComponent:u("TopItemList"),ListComponent:u("List","div"),ItemComponent:u("Item","div"),GroupComponent:u("Group","div"),ScrollerComponent:u("Scroller","div"),EmptyPlaceholder:u("EmptyPlaceholder"),ScrollSeekPlaceholder:u("ScrollSeekPlaceholder")}});function se(t,e){var n=i();return g(n,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+e,"color: red;","color: inherit;","color: blue;")}),u(n,t),n}var ue=r(function(t){var e=t[0],o=t[1],r={item:se(o.itemContent,"Rename the %citem%c prop to %citemContent."),group:se(o.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:se(e.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:se(e.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:se(e.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:i(),maxHeightCacheSize:i(),footer:i(),header:i(),HeaderContainer:i(),FooterContainer:i(),ItemContainer:i(),ScrollContainer:i(),GroupContainer:i(),ListContainer:i(),emptyComponent:i(),scrollSeek:i()};function a(t,e,n){u(l(t,I(o.components),s(function(t){var o,r=t[0],i=t[1];return console.warn("react-virtuoso: "+n+" property is deprecated. Pass components."+e+" instead."),H({},i,((o={})[e]=r,o))})),o.components)}return g(r.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")}),g(r.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")}),g(r.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")}),g(r.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")}),g(r.scrollSeek,function(t){var r=t.placeholder,i=R(t,oe);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),v(o.components,H({},n(o.components),{ScrollSeekPlaceholder:r})),v(e.scrollSeekConfiguration,i)}),a(r.footer,"Footer","footer"),a(r.header,"Header","header"),a(r.ItemContainer,"Item","ItemContainer"),a(r.ListContainer,"List","ListContainer"),a(r.ScrollContainer,"Scroller","ScrollContainer"),a(r.emptyComponent,"EmptyPlaceholder","emptyComponent"),a(r.GroupContainer,"Group","GroupContainer"),H({},e,o,r)},o(te,le)),ce=function(t){return x.createElement("div",{style:{height:t.height}})},me={position:ee(),zIndex:1,overflowAnchor:"none"},de=x.memo(function(t){var e=t.showTopList,n=void 0!==e&&e,o=He("listState"),r=He("deviation"),i=Ee("sizeRanges"),a=He("useWindowScroll"),l=He("customScrollParent"),s=Ee("windowScrollContainerState"),u=Ee("scrollContainerState"),c=l||a?s:u,m=He("itemContent"),d=He("context"),f=He("groupContent"),p=He("trackItemSizes"),g=He("itemSize"),v=He("log"),S=U(i,g,p,n?h:c,v,l),I=He("EmptyPlaceholder"),C=He("ScrollSeekPlaceholder")||ce,x=He("ListComponent"),T=He("ItemComponent"),w=He("GroupComponent"),y=He("computeItemKey"),b=He("isSeeking"),R=He("groupIndices").length>0,L=He("paddingTopAddition"),k=He("firstItemIndex"),z=He("statefulTotalCount"),B=n?{}:{boxSizing:"border-box",paddingTop:o.offsetTop+L,paddingBottom:o.offsetBottom,marginTop:r};return!n&&0===z&&I?E(I,ge(I,d)):E(x,H({},ge(x,d),{ref:S,style:B,"data-test-id":n?"virtuoso-top-item-list":"virtuoso-item-list"}),(n?o.topItems:o.items).map(function(t){var e=t.originalIndex,n=y(e+k,t.data,d);return b?E(C,H({},ge(C,d),{key:n,index:t.index,height:t.size,type:t.type||"item"},"group"===t.type?{}:{groupIndex:t.groupIndex})):"group"===t.type?E(w,H({},ge(w,d),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:me}),f(t.index)):E(T,H({},ge(T,d),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,"data-item-group-index":t.groupIndex,style:{overflowAnchor:"none"}}),R?m(t.index,t.groupIndex,t.data,d):m(t.index,t.data,d))}))}),fe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},pe={width:"100%",height:"100%",position:"absolute",top:0},he={width:"100%",position:ee(),top:0};function ge(t,e){if("string"!=typeof t)return{context:e}}var ve=x.memo(function(){var t=He("HeaderComponent"),e=Ee("headerHeight"),n=He("headerFooterTag"),o=V(function(t){return e(A(t,"height"))}),r=He("context");return t?E(n,{ref:o},E(t,ge(t,r))):null}),Se=x.memo(function(){var t=He("FooterComponent"),e=Ee("footerHeight"),n=He("headerFooterTag"),o=V(function(t){return e(A(t,"height"))}),r=He("context");return t?E(n,{ref:o},E(t,ge(t,r))):null});function Ie(t){var e=t.usePublisher,n=t.useEmitter,o=t.useEmitterValue;return x.memo(function(t){var r=t.style,i=t.children,a=R(t,re),l=e("scrollContainerState"),s=o("ScrollerComponent"),u=e("smoothScrollTargetReached"),c=o("scrollerRef"),m=o("context"),d=W(l,u,s,c),f=d.scrollerRef,p=d.scrollByCallback;return n("scrollTo",d.scrollToCallback),n("scrollBy",p),E(s,H({ref:f,style:H({},fe,r),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},a,ge(s,m)),i)})}function Ce(t){var e=t.usePublisher,n=t.useEmitter,o=t.useEmitterValue;return x.memo(function(t){var r=t.style,i=t.children,a=R(t,ie),l=e("windowScrollContainerState"),s=o("ScrollerComponent"),u=e("smoothScrollTargetReached"),c=o("totalListHeight"),m=o("deviation"),d=o("customScrollParent"),f=o("context"),p=W(l,u,s,h,d),g=p.scrollerRef,v=p.scrollByCallback,S=p.scrollToCallback;return F(function(){return g.current=d||window,function(){g.current=null}},[g,d]),n("windowScrollTo",S),n("scrollBy",v),E(s,H({style:H({position:"relative"},r,0!==c?{height:c+m}:{}),"data-virtuoso-scroller":!0},a,ge(s,f)),i)})}var xe=function(t){var e=t.children,n=Ee("viewportHeight"),o=V(C(n,function(t){return A(t,"height")}));return x.createElement("div",{style:pe,ref:o,"data-viewport-type":"element"},e)},Te=function(t){var e=t.children,n=ne(Ee("windowViewportRect"),He("customScrollParent"));return x.createElement("div",{ref:n,style:pe,"data-viewport-type":"window"},e)},we=function(t){var e=t.children,n=He("TopItemListComponent"),o=He("headerHeight"),r=H({},he,{marginTop:o+"px"}),i=He("context");return E(n||"div",{style:r,context:i},e)},ye=t(ue,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},x.memo(function(t){var e=He("useWindowScroll"),n=He("topItemsIndexes").length>0,o=He("customScrollParent"),r=o||e?Te:xe;return x.createElement(o||e?ke:Le,H({},t),x.createElement(r,null,x.createElement(ve,null),x.createElement(de,null),x.createElement(Se,null)),n&&x.createElement(we,null,x.createElement(de,{showTopList:!0})))})),be=ye.Component,Ee=ye.usePublisher,He=ye.useEmitterValue,Re=ye.useEmitter,Le=Ie({usePublisher:Ee,useEmitterValue:He,useEmitter:Re}),ke=Ce({usePublisher:Ee,useEmitterValue:He,useEmitter:Re}),ze={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Be={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Fe=Math.round,Pe=Math.ceil,Oe=Math.floor,Me=Math.min,Ve=Math.max;function Ue(t,e){return Array.from({length:e-t+1}).map(function(e,n){return{index:n+t}})}var Ae=e.system(function(t){var n=t[0],o=n.overscan,r=n.visibleRange,i=n.listBoundary,a=t[1],l=a.scrollTop,s=a.viewportHeight,u=a.scrollBy,c=a.scrollTo,m=a.smoothScrollTargetReached,d=a.scrollContainerState,f=t[2],p=t[3],h=t[4],g=h.propsReady,v=h.didMount,S=t[5],I=S.windowViewportRect,C=S.windowScrollTo,x=S.useWindowScroll,T=S.customScrollParent,w=S.windowScrollContainerState,y=e.statefulStream(0),b=e.statefulStream(0),E=e.statefulStream(ze),R=e.statefulStream({height:0,width:0}),L=e.statefulStream({height:0,width:0}),k=e.stream(),z=e.stream(),B=e.statefulStream(0);e.connect(e.pipe(v,e.withLatestFrom(b),e.filter(function(t){return 0!==t[1]}),e.map(function(t){return{items:Ue(0,t[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),E),e.connect(e.pipe(e.combineLatest(e.duc(y),r,e.duc(L,function(t,e){return t&&t.width===e.width&&t.height===e.height})),e.withLatestFrom(R),e.map(function(t){var e=t[0],n=e[0],o=e[1],r=o[0],i=o[1],a=e[2],l=t[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return ze;if(0===u)return Be;var m=De(c,u),d=m*Oe(r/s),f=m*Pe(i/s)-1;f=Me(n-1,f);var p=Ue(d=Me(f,Ve(0,d)),f),h=We(l,a,p),g=h.top,v=h.bottom;return{items:p,offsetTop:g,offsetBottom:Pe(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),E),e.connect(e.pipe(R,e.map(function(t){return t.height})),s),e.connect(e.pipe(e.combineLatest(R,L,E),e.map(function(t){var e=We(t[0],t[1],t[2].items);return[e.top,e.bottom]}),e.distinctUntilChanged(zt)),i);var F=e.streamFromEmitter(e.pipe(e.duc(E),e.filter(function(t){return t.items.length>0}),e.withLatestFrom(y),e.filter(function(t){var e=t[0].items;return e[e.length-1].index===t[1]-1}),e.map(function(t){return t[1]-1}),e.distinctUntilChanged())),P=e.streamFromEmitter(e.pipe(e.duc(E),e.filter(function(t){var e=t.items;return e.length>0&&0===e[0].index}),e.mapTo(0),e.distinctUntilChanged())),O=e.streamFromEmitter(e.pipe(e.duc(E),e.filter(function(t){return t.items.length>0}),e.map(function(t){var e=t.items;return{startIndex:e[0].index,endIndex:e[e.length-1].index}}),e.distinctUntilChanged(Bt)));e.connect(O,p.scrollSeekRangeChanged),e.connect(e.pipe(k,e.withLatestFrom(R,L,y),e.map(function(t){var e=t[1],n=t[2],o=t[3],r=Ct(t[0]),i=r.align,a=r.behavior,l=r.offset,s=r.index;"LAST"===s&&(s=o-1);var u=Ne(e,n,s=Ve(0,s,Me(o-1,s)));return"end"===i?u=Fe(u-e.height+n.height):"center"===i&&(u=Fe(u-e.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),c);var M=e.statefulStreamFromEmitter(e.pipe(E,e.map(function(t){return t.offsetBottom+t.bottom})),0);return e.connect(e.pipe(I,e.map(function(t){return{width:t.visibleWidth,height:t.visibleHeight}})),R),H({totalCount:y,viewportDimensions:R,itemDimensions:L,scrollTop:l,scrollHeight:z,overscan:o,scrollBy:u,scrollTo:c,scrollToIndex:k,smoothScrollTargetReached:m,windowViewportRect:I,windowScrollTo:C,useWindowScroll:x,customScrollParent:T,windowScrollContainerState:w,deviation:B,scrollContainerState:d,initialItemCount:b},p,{gridState:E,totalListHeight:M},f,{startReached:P,endReached:F,rangeChanged:O,propsReady:g})},e.tup(Ot,N,yt,_t,bt,Jt));function We(t,e,n){var o=e.height;return void 0===o||0===n.length?{top:0,bottom:0}:{top:Ne(t,e,n[0].index),bottom:Ne(t,e,n[n.length-1].index)+o}}function Ne(t,e,n){var o=De(t.width,e.width);return Oe(n/o)*e.height}function De(t,e){return Ve(1,Oe(t/e))}var Ge=["placeholder"],_e=e.system(function(){var t=e.statefulStream(function(t){return"Item "+t}),n=e.statefulStream({}),o=e.statefulStream(null),r=e.statefulStream("virtuoso-grid-item"),i=e.statefulStream("virtuoso-grid-list"),a=e.statefulStream(ae),l=e.statefulStream(e.noop),s=function(t,o){return void 0===o&&(o=null),e.statefulStreamFromEmitter(e.pipe(n,e.map(function(e){return e[t]}),e.distinctUntilChanged()),o)};return{context:o,itemContent:t,components:n,computeItemKey:a,itemClassName:r,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),je=e.system(function(t){var n=t[0],o=t[1],r={item:se(o.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:e.stream(),ScrollContainer:e.stream(),ListContainer:e.stream(),emptyComponent:e.stream(),scrollSeek:e.stream()};function i(t,n,r){e.connect(e.pipe(t,e.withLatestFrom(o.components),e.map(function(t){var e,o=t[0],i=t[1];return console.warn("react-virtuoso: "+r+" property is deprecated. Pass components."+n+" instead."),H({},i,((e={})[n]=o,e))})),o.components)}return e.subscribe(r.scrollSeek,function(t){var r=t.placeholder,i=R(t,Ge);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),e.publish(o.components,H({},e.getValue(o.components),{ScrollSeekPlaceholder:r})),e.publish(n.scrollSeekConfiguration,i)}),i(r.ItemContainer,"Item","ItemContainer"),i(r.ListContainer,"List","ListContainer"),i(r.ScrollContainer,"Scroller","ScrollContainer"),H({},n,o,r)},e.tup(Ae,_e)),Ke=x.memo(function(){var t=Qe("gridState"),e=Qe("listClassName"),n=Qe("itemClassName"),o=Qe("itemContent"),r=Qe("computeItemKey"),i=Qe("isSeeking"),a=$e("scrollHeight"),l=Qe("ItemComponent"),s=Qe("ListComponent"),u=Qe("ScrollSeekPlaceholder"),c=Qe("context"),m=$e("itemDimensions"),d=V(function(t){a(t.parentElement.parentElement.scrollHeight);var e=t.firstChild;e&&m(e.getBoundingClientRect())});return E(s,H({ref:d,className:e},ge(s,c),{style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom}}),t.items.map(function(e){var a=r(e.index);return i?E(u,H({key:a},ge(u,c),{index:e.index,height:t.itemHeight,width:t.itemWidth})):E(l,H({},ge(l,c),{className:n,"data-index":e.index,key:a}),o(e.index,c))}))}),Ye=function(t){var e=t.children,n=$e("viewportDimensions"),o=V(function(t){n(t.getBoundingClientRect())});return x.createElement("div",{style:pe,ref:o},e)},Ze=function(t){var e=t.children,n=ne($e("windowViewportRect"),Qe("customScrollParent"));return x.createElement("div",{ref:n,style:pe},e)},qe=t(je,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},x.memo(function(t){var e=H({},t),n=Qe("useWindowScroll"),o=Qe("customScrollParent"),r=o||n?Ze:Ye;return x.createElement(o||n?en:tn,H({},e),x.createElement(r,null,x.createElement(Ke,null)))})),Je=qe.Component,$e=qe.usePublisher,Qe=qe.useEmitterValue,Xe=qe.useEmitter,tn=Ie({usePublisher:$e,useEmitterValue:Qe,useEmitter:Xe}),en=Ce({usePublisher:$e,useEmitterValue:Qe,useEmitter:Xe}),nn=r(function(){var t=p(function(t){return x.createElement("td",null,"Item $",t)}),e=p(null),n=p(null),o=p({}),r=p(ae),i=p(h),a=function(t,e){return void 0===e&&(e=null),S(l(o,s(function(e){return e[t]}),f()),e)};return{context:e,itemContent:t,fixedHeaderContent:n,components:o,computeItemKey:r,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),on=r(function(t){return H({},t[0],t[1])},o(te,nn)),rn=function(t){return x.createElement("tr",null,x.createElement("td",{style:{height:t.height}}))},an=function(t){return x.createElement("tr",null,x.createElement("td",{style:{height:t.height,padding:0,border:0}}))},ln=x.memo(function(){var t=fn("listState"),e=fn("deviation"),n=dn("sizeRanges"),o=fn("useWindowScroll"),r=fn("customScrollParent"),i=dn("windowScrollContainerState"),a=dn("scrollContainerState"),l=r||o?i:a,s=fn("itemContent"),u=fn("trackItemSizes"),c=U(n,fn("itemSize"),u,l,fn("log"),r),m=fn("EmptyPlaceholder"),d=fn("ScrollSeekPlaceholder")||rn,f=fn("TableBodyComponent"),p=fn("TableRowComponent"),h=fn("computeItemKey"),g=fn("isSeeking"),v=fn("paddingTopAddition"),S=fn("firstItemIndex"),I=fn("statefulTotalCount"),C=fn("context");if(0===I&&m)return E(m,ge(m,C));var T=t.offsetTop+v+e,w=t.offsetBottom,y=T>0?x.createElement(an,{height:T,key:"padding-top"}):null,b=w>0?x.createElement(an,{height:w,key:"padding-bottom"}):null,R=t.items.map(function(t){var e=t.originalIndex,n=h(e+S,t.data,C);return g?E(d,H({},ge(d,C),{key:n,index:t.index,height:t.size,type:t.type||"item"})):E(p,H({},ge(p,C),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:{overflowAnchor:"none"}}),s(t.index,t.data,C))});return E(f,H({ref:c,"data-test-id":"virtuoso-item-list"},ge(f,C)),[y].concat(R,[b]))}),sn=function(t){var e=t.children,n=dn("viewportHeight"),o=V(C(n,function(t){return A(t,"height")}));return x.createElement("div",{style:pe,ref:o,"data-viewport-type":"element"},e)},un=function(t){var e=t.children,n=ne(dn("windowViewportRect"),fn("customScrollParent"));return x.createElement("div",{ref:n,style:pe,"data-viewport-type":"window"},e)},cn=t(on,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},x.memo(function(t){var e=fn("useWindowScroll"),n=fn("customScrollParent"),o=dn("fixedHeaderHeight"),r=fn("fixedHeaderContent"),i=fn("context"),a=V(C(o,function(t){return A(t,"height")})),l=n||e?gn:hn,s=n||e?un:sn,u=fn("TableComponent"),c=fn("TableHeadComponent"),m=r?x.createElement(c,H({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:a},ge(c,i)),r()):null;return x.createElement(l,H({},t),x.createElement(s,null,x.createElement(u,H({style:{borderSpacing:0}},ge(u,i)),[m,x.createElement(ln,{key:"TableBody"})])))})),mn=cn.Component,dn=cn.usePublisher,fn=cn.useEmitterValue,pn=cn.useEmitter,hn=Ie({usePublisher:dn,useEmitterValue:fn,useEmitter:pn}),gn=Ce({usePublisher:dn,useEmitterValue:fn,useEmitter:pn}),vn=be,Sn=be,In=mn,Cn=Je;export{Sn as GroupedVirtuoso,B as LogLevel,In as TableVirtuoso,vn as Virtuoso,Cn as VirtuosoGrid};
//# sourceMappingURL=index.m.js.map

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "2.8.4",
"version": "2.8.5",
"homepage": "https://virtuoso.dev/",

@@ -32,3 +32,5 @@ "license": "MIT",

"start": "microbundle watch --raw --no-sourcemap --strict --no-compress --jsx React.createElement --format=cjs,esm",
"build": "microbundle --strict --jsx React.createElement --format=cjs,esm src/index.tsx",
"build": "yarn build:microbundle && yarn build:bundle-dts",
"build:microbundle": "microbundle --strict --jsx React.createElement --format=cjs,esm src/index.tsx",
"build:bundle-dts": "api-extractor run --local && ./scripts/cleanup-dist.sh",
"test": "jest --passWithNoTests",

@@ -54,2 +56,3 @@ "e2e": "playwright test",

"@emotion/styled": "^10.0.27",
"@microsoft/api-extractor": "^7.19.5",
"@playwright/test": "^1.17.1",

@@ -96,2 +99,3 @@ "@types/faker": "^5.1.4",

"react-test-renderer": "^16.13.1",
"rollup-plugin-dts": "^4.2.0",
"semantic-release": "^17.3.0",

@@ -98,0 +102,0 @@ "ts-jest": "^26.5.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc