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

react-functional-select

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-functional-select - npm Package Compare versions

Comparing version 3.2.2 to 3.3.0

dist/hooks/useFirstRenderState.d.ts

14

dist/components/value/Value.d.ts

@@ -0,4 +1,5 @@

import React from 'react';
import type { MultiParams } from '../../Select';
import type { ReactNode, ReactText } from 'react';
import type { OptionData, SelectedOption } from '../../types';
import type { ReactNode, ReactText, FunctionComponent } from 'react';
export declare type ValueProps = Readonly<{

@@ -14,3 +15,12 @@ isMulti?: boolean;

}>;
declare const Value: FunctionComponent<ValueProps>;
declare const Value: React.NamedExoticComponent<Readonly<{
isMulti?: boolean | undefined;
inputValue: string;
placeholder: string;
selectedOption: SelectedOption[];
focusedMultiValue: ReactText | null;
removeSelectedOption: (value?: React.ReactText | undefined) => void;
renderOptionLabel: (data: OptionData) => ReactNode;
renderMultiOptions?: ((params: MultiParams) => ReactNode) | undefined;
}>>;
export default Value;

14

dist/components/value/Value.js

@@ -1,5 +0,6 @@

import React, { Fragment } from 'react';
import React, { memo, Fragment } from 'react';
import MultiValue from './MultiValue';
import { isArrayWithLength } from '../../utils';
import styled, { css } from 'styled-components';
import { useFirstRenderState } from '../../hooks';
const _singleValueBaseStyle = css `

@@ -21,5 +22,7 @@ top: 50%;

color: ${({ theme }) => theme.color.placeholder};
${({ theme, isMulti }) => isMulti && css `animation: ${theme.multiValue.animation};`}
${({ theme, isFirstRender }) => !isFirstRender && css `animation: ${theme.placeholder.animation};`}
`;
const Value = ({ isMulti, inputValue, placeholder, selectedOption, focusedMultiValue, renderOptionLabel, renderMultiOptions, removeSelectedOption }) => {
const Value = memo(({ isMulti, inputValue, placeholder, selectedOption, focusedMultiValue, renderOptionLabel, renderMultiOptions, removeSelectedOption }) => {
// Do not apply Placeholder animation on initial render/mount of component
const isFirstRender = useFirstRenderState();
if (inputValue &&

@@ -30,3 +33,3 @@ (!isMulti || (isMulti && (!isArrayWithLength(selectedOption) || renderMultiOptions)))) {

if (!isArrayWithLength(selectedOption)) {
return (React.createElement(Placeholder, { isMulti: isMulti }, placeholder));
return (React.createElement(Placeholder, { isFirstRender: isFirstRender }, placeholder));
}

@@ -39,3 +42,4 @@ if (!isMulti) {

: selectedOption.map(({ data, value }) => (React.createElement(MultiValue, { key: value, data: data, value: value, renderOptionLabel: renderOptionLabel, isFocused: value === focusedMultiValue, removeSelectedOption: removeSelectedOption })))));
};
});
Value.displayName = 'Value';
export default Value;

@@ -16,3 +16,3 @@ import { css, keyframes } from 'styled-components';

`;
export const FADE_IN_ANIMATION_CSS = css `${_fadeInKeyframes} 0.2s ease-out both`;
export const FADE_IN_ANIMATION_CSS = css `${_fadeInKeyframes} 0.25s ease-in-out both`;
export const BOUNCE_ANIMATION_CSS = css `${_bounceKeyframes} 1.19s ease-in-out infinite`;

@@ -1,5 +0,6 @@

export { useDebounce } from './useDebounce';
export { useMountEffect } from './useMountEffect';
export { useMenuOptions } from './useMenuOptions';
export { useUpdateEffect } from './useUpdateEffect';
export { useMenuPositioner } from './useMenuPositioner';
export { default as useDebounce } from './useDebounce';
export { default as useMountEffect } from './useMountEffect';
export { default as useMenuOptions } from './useMenuOptions';
export { default as useUpdateEffect } from './useUpdateEffect';
export { default as useMenuPositioner } from './useMenuPositioner';
export { default as useFirstRenderState } from './useFirstRenderState';

@@ -1,5 +0,6 @@

export { useDebounce } from './useDebounce';
export { useMountEffect } from './useMountEffect';
export { useMenuOptions } from './useMenuOptions';
export { useUpdateEffect } from './useUpdateEffect';
export { useMenuPositioner } from './useMenuPositioner';
export { default as useDebounce } from './useDebounce';
export { default as useMountEffect } from './useMountEffect';
export { default as useMenuOptions } from './useMenuOptions';
export { default as useUpdateEffect } from './useUpdateEffect';
export { default as useMenuPositioner } from './useMenuPositioner';
export { default as useFirstRenderState } from './useFirstRenderState';

@@ -5,2 +5,3 @@ /**

*/
export declare const useDebounce: <T>(value: T, delay?: number) => T;
declare const useDebounce: <T>(value: T, delay?: number) => T;
export default useDebounce;

@@ -6,3 +6,3 @@ import { useEffect, useState } from 'react';

*/
export const useDebounce = (value, delay = 0) => {
const useDebounce = (value, delay = 0) => {
const [debouncedValue, setDebouncedValue] = useState(value);

@@ -21,1 +21,2 @@ useEffect(() => {

};
export default useDebounce;

@@ -9,2 +9,3 @@ import { FilterMatchEnum } from '../constants';

*/
export declare const useMenuOptions: (options: OptionData[], debouncedInputValue: string, filterMatchFrom: FilterMatchEnum, selectedOption: SelectedOption[], getOptionValue: (data: OptionData) => ReactText, getOptionLabel: (data: OptionData) => ReactText, getIsOptionDisabled?: ((data: OptionData) => boolean) | undefined, getFilterOptionString?: ((option: MenuOption) => string) | undefined, filterIgnoreCase?: boolean | undefined, filterIgnoreAccents?: boolean | undefined, isMulti?: boolean | undefined, hideSelectedOptions?: boolean | undefined, async?: boolean | undefined) => MenuOption[];
declare const useMenuOptions: (options: OptionData[], debouncedInputValue: string, filterMatchFrom: FilterMatchEnum, selectedOption: SelectedOption[], getOptionValue: (data: OptionData) => ReactText, getOptionLabel: (data: OptionData) => ReactText, getIsOptionDisabled?: ((data: OptionData) => boolean) | undefined, getFilterOptionString?: ((option: MenuOption) => string) | undefined, filterIgnoreCase?: boolean | undefined, filterIgnoreAccents?: boolean | undefined, isMulti?: boolean | undefined, hideSelectedOptions?: boolean | undefined, async?: boolean | undefined) => MenuOption[];
export default useMenuOptions;

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

import { useEffect, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import { EMPTY_ARRAY, FilterMatchEnum } from '../constants';

@@ -8,18 +8,23 @@ import { isBoolean, trimAndFormatFilterStr } from '../utils';

*/
export const useMenuOptions = (options, debouncedInputValue, filterMatchFrom, selectedOption, getOptionValue, getOptionLabel, getIsOptionDisabled, getFilterOptionString, filterIgnoreCase, filterIgnoreAccents, isMulti, hideSelectedOptions, async) => {
const useMenuOptions = (options, debouncedInputValue, filterMatchFrom, selectedOption, getOptionValue, getOptionLabel, getIsOptionDisabled, getFilterOptionString, filterIgnoreCase, filterIgnoreAccents, isMulti, hideSelectedOptions, async) => {
const getIsOptionDisabledRef = useRef();
const getFilterOptionStringRef = useRef();
const [menuOptions, setMenuOptions] = useState(EMPTY_ARRAY);
// Prevent effect from executing on search input mutations in 'async' mode (also prevents filtering from executing)
const searchValue = !async ? debouncedInputValue : '';
const hideSelectedOptionsOrDefault = !isBoolean(hideSelectedOptions) ? !!isMulti : hideSelectedOptions;
const hideSelectedOptionsOrDefault = isBoolean(hideSelectedOptions) ? hideSelectedOptions : !!isMulti;
useEffect(() => {
const normalizedInput = trimAndFormatFilterStr(searchValue, filterIgnoreCase, filterIgnoreAccents);
getIsOptionDisabledRef.current = getIsOptionDisabled || ((data) => !!data.isDisabled);
getFilterOptionStringRef.current = getFilterOptionString || (({ label }) => (typeof label === 'string') ? label : `${label}`);
}, [getIsOptionDisabled, getFilterOptionString]);
useEffect(() => {
const isMatchFilter = filterMatchFrom === FilterMatchEnum.ANY;
const normalizedSearch = trimAndFormatFilterStr(searchValue, filterIgnoreCase, filterIgnoreAccents);
const selectedHash = selectedOption.length ? new Set(selectedOption.map((x) => x.value)) : undefined;
const getIsOptionDisabledOrDefault = getIsOptionDisabled || ((data) => !!data.isDisabled);
const getFilterOptionStringOrDefault = getFilterOptionString || ((option) => (typeof option.label === 'string') ? option.label : `${option.label}`);
const isOptionFilterMatch = (option) => {
const optionStr = getFilterOptionStringOrDefault(option);
const optionStr = getFilterOptionStringRef.current(option);
const normalizedOptionLabel = trimAndFormatFilterStr(optionStr, filterIgnoreCase, filterIgnoreAccents);
return (filterMatchFrom === FilterMatchEnum.ANY)
? normalizedOptionLabel.indexOf(normalizedInput) > -1
: normalizedOptionLabel.substr(0, normalizedInput.length) === normalizedInput;
return isMatchFilter
? normalizedOptionLabel.indexOf(normalizedSearch) > -1
: normalizedOptionLabel.substr(0, normalizedSearch.length) === normalizedSearch;
};

@@ -33,6 +38,6 @@ const parseMenuOption = (data) => {

label,
...(getIsOptionDisabledOrDefault(data) && { isDisabled: true }),
...(getIsOptionDisabledRef.current(data) && { isDisabled: true }),
...(selectedHash?.has(value) && { isSelected: true })
};
if ((normalizedInput && !isOptionFilterMatch(menuOption)) ||
if ((normalizedSearch && !isOptionFilterMatch(menuOption)) ||
(hideSelectedOptionsOrDefault && menuOption.isSelected)) {

@@ -50,4 +55,5 @@ return;

setMenuOptions(nextMenuOptions);
}, [options, selectedOption, searchValue, hideSelectedOptionsOrDefault, filterMatchFrom, filterIgnoreCase, filterIgnoreAccents, getFilterOptionString, getIsOptionDisabled, getOptionValue, getOptionLabel]);
}, [options, selectedOption, searchValue, hideSelectedOptionsOrDefault, filterMatchFrom, filterIgnoreCase, filterIgnoreAccents, getOptionValue, getOptionLabel]);
return menuOptions;
};
export default useMenuOptions;

@@ -11,2 +11,3 @@ import { MenuPositionEnum } from '../constants';

*/
export declare const useMenuPositioner: (menuRef: RefObject<HTMLElement | null>, controlRef: RefObject<HTMLElement | null>, menuOpen: boolean, menuPosition: MenuPositionEnum, menuItemSize: number, menuHeightDefault: number, menuOptionsLength: number, isMenuPortaled: boolean, menuScrollDuration?: number | undefined, scrollMenuIntoView?: boolean | undefined, onMenuOpen?: CallbackFunction | undefined, onMenuClose?: CallbackFunction | undefined) => [string | undefined, number];
declare const useMenuPositioner: (menuRef: RefObject<HTMLElement | null>, controlRef: RefObject<HTMLElement | null>, menuOpen: boolean, menuPosition: MenuPositionEnum, menuItemSize: number, menuHeightDefault: number, menuOptionsLength: number, isMenuPortaled: boolean, menuScrollDuration?: number | undefined, scrollMenuIntoView?: boolean | undefined, onMenuOpen?: CallbackFunction | undefined, onMenuClose?: CallbackFunction | undefined) => [string | undefined, number];
export default useMenuPositioner;
import { useEffect, useState, useRef } from 'react';
import { MenuPositionEnum } from '../constants';
import { useUpdateEffect } from './useUpdateEffect';
import useUpdateEffect from './useUpdateEffect';
import { calculateMenuTop, menuFitsBelowControl, scrollMenuIntoViewOnOpen } from '../utils';

@@ -12,3 +12,3 @@ /**

*/
export const useMenuPositioner = (menuRef, controlRef, menuOpen, menuPosition, menuItemSize, menuHeightDefault, menuOptionsLength, isMenuPortaled, menuScrollDuration, scrollMenuIntoView, onMenuOpen, onMenuClose) => {
const useMenuPositioner = (menuRef, controlRef, menuOpen, menuPosition, menuItemSize, menuHeightDefault, menuOptionsLength, isMenuPortaled, menuScrollDuration, scrollMenuIntoView, onMenuOpen, onMenuClose) => {
const onMenuOpenRef = useRef();

@@ -60,1 +60,2 @@ const onMenuCloseRef = useRef();

};
export default useMenuPositioner;

@@ -6,2 +6,3 @@ import type { EffectCallback } from 'react';

*/
export declare const useMountEffect: (effect: EffectCallback) => void;
declare const useMountEffect: (effect: EffectCallback) => void;
export default useMountEffect;

@@ -6,4 +6,5 @@ import { useEffect } from 'react';

*/
export const useMountEffect = (effect) => {
const useMountEffect = (effect) => {
useEffect(effect, []);
};
export default useMountEffect;

@@ -6,2 +6,3 @@ import { useEffect } from 'react';

*/
export declare const useUpdateEffect: typeof useEffect;
declare const useUpdateEffect: typeof useEffect;
export default useUpdateEffect;

@@ -6,3 +6,3 @@ import { useEffect, useRef } from 'react';

*/
export const useUpdateEffect = (effect, deps) => {
const useUpdateEffect = (effect, deps) => {
const isFirstRender = useRef(true);

@@ -19,1 +19,2 @@ useEffect(() => {

};
export default useUpdateEffect;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),n=require("react-window"),o=require("react-dom");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),r=i(t);const l={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container"},s={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input"},d="top",u="auto",c="bottom",p="any",f=0,m=1,g=0,h=1,b=2,v=3,w=t.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),y=t.css([""," 0.2s ease-out both"],t.keyframes(["from{opacity:0;}to{opacity:1;}"])),x=t.css([""," 1.19s ease-in-out infinite"],w),C={index:-1},O=[],S=/[\u0300-\u036f]/g;function E(e){return"boolean"==typeof e}function I(e){return Array.isArray(e)&&!!e.length}function M(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const k=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function z(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(S,"")}(o):o}const L=(e,t,n)=>{const o=Array.isArray(e)?e:M(e)?[e]:O;return I(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},N=(e,t)=>{const n={...e};return Object.keys(t).forEach((o=>{const i=t[o];n[o]="animation"!==o&&M(i)?e[o]?N(e[o],i):i:i||""})),n};function D(e){return R(e)?window.pageYOffset:e.scrollTop}function R(e){return e===document.documentElement||e===document.body||e===window}const T=/(auto|scroll)/;function V({overflow:e,overflowX:t,overflowY:n}){return T.test(`${e}${t}${n}`)}function A(e){let t=getComputedStyle(e);const n=document.documentElement,o="absolute"===t.position;if("fixed"===t.position)return n;for(let n=e;n=null===(i=n)||void 0===i?void 0:i.parentElement;){var i;if(t=getComputedStyle(n),(!o||"static"!==t.position)&&V(t))return n}return n}function F(e,t,n=300,o){let i=0;const a=D(e),r=t-a;requestAnimationFrame((function t(){i+=5;const l=r*((s=(s=i)/n-1)*s*s+1)+a;var s;!function(e,t){R(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),i<n?requestAnimationFrame(t):null==o||o()}))}const B="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,$="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),q={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:x,color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:y,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:y,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:y,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}},P=e.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:i,focusedOptionIndex:r}})=>{const{data:l,value:s,label:d,isDisabled:u,isSelected:c}=n[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(u,c,e===r);return a.default.createElement("div",{style:t,onClick:u?void 0:()=>o({data:l,value:s,label:d},c),className:p},i(l))}),n.areEqual);P.displayName="Option";const W=r.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),j=({width:t,height:o,itemSize:i,direction:r,isLoading:l,loadingMsg:s,menuOptions:d,selectOption:u,noOptionsMsg:c,overscanCount:p,itemKeySelector:f,fixedSizeListRef:m,renderOptionLabel:g,focusedOptionIndex:h})=>{const b=e.useMemo((()=>({menuOptions:d,selectOption:u,renderOptionLabel:g,focusedOptionIndex:h})),[d,h,u,g]);if(l)return a.default.createElement(W,null,s);return a.default.createElement(e.Fragment,null,a.default.createElement(n.FixedSizeList,{width:t,height:o,itemKey:f?(e,t)=>t.menuOptions[e][f]:void 0,itemSize:i,itemData:b,direction:r,ref:m,overscanCount:p,itemCount:d.length},P),!I(d)&&c&&a.default.createElement(W,null,c))},K=r.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:n,hideNoOptionsMsg:o,theme:{menu:i}})=>t.css(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],i.width,i.margin,i.padding,i.animation,i.borderRadius,i.backgroundColor,o?"none":i.boxShadow,n?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>t.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),H=({menuRef:e,menuTop:t,menuOpen:n,onMenuMouseDown:i,menuPortalTarget:r,...l})=>{const{menuOptions:s,noOptionsMsg:d}=l,u=n&&!Boolean(d)&&!I(s),c=a.default.createElement(K,{ref:e,menuTop:t,menuOpen:n,onMouseDown:i,className:"rfs-menu-container",hideNoOptionsMsg:u},a.default.createElement(j,Object.assign({},l)));return r?o.createPortal(c,r):c},U=t.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),Y=r.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>t.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),_=r.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),X=r.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>t.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,U)),(({isFocused:e})=>e&&U)),G=e.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:i})=>a.default.createElement(Y,null,a.default.createElement(_,null,o(e)),a.default.createElement(X,{isFocused:n,onMouseDown:k,onClick:()=>i(t),onTouchEnd:()=>i(t)},"✖"))));G.displayName="MultiValue";const J=t.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),Q=r.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],J),Z=r.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],J,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:n})=>n&&t.css(["animation:",";"],e.multiValue.animation))),ee=({isMulti:t,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:r,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!n||t&&(!t||I(i)&&!s)?I(i)?t?a.default.createElement(e.Fragment,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:t})=>a.default.createElement(G,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===r,removeSelectedOption:d})))):a.default.createElement(Q,null,l(i[0].data)):a.default.createElement(Z,{isMulti:t},o):null,te=(t,n,o,i,a,r,l,s,d,u,c,f,m)=>{const[g,h]=e.useState(O),b=m?"":n,v=E(f)?f:!!c;return e.useEffect((()=>{const e=z(b,d,u),n=i.length?new Set(i.map((e=>e.value))):void 0,c=l||(e=>!!e.isDisabled),f=s||(e=>"string"==typeof e.label?e.label:`${e.label}`),m=t=>{const i=a(t),l={data:t,value:i,label:r(t),...c(t)&&{isDisabled:!0},...(null==n?void 0:n.has(i))&&{isSelected:!0}};if(!(e&&!(t=>{const n=z(f(t),d,u);return o===p?n.indexOf(e)>-1:n.substr(0,e.length)===e})(l)||v&&l.isSelected))return l},{length:g}=t,w=[];for(let e=0;e<g;e++){const n=m(t[e]);n&&w.push(n)}h(w)}),[t,i,b,v,o,d,u,s,l,a,r]),g},ne=(t,n)=>{const o=e.useRef(!0);e.useEffect((()=>{if(!o.current)return t();o.current=!1}),n)},oe=(t,n,o,i,a,r,l,s,c,p,f,m)=>{const g=e.useRef(),h=e.useRef(),b=e.useRef(!1),v=e.useRef(!s),[w,y]=e.useState(r),[x,C]=e.useState(!1);e.useEffect((()=>{g.current=f,h.current=m}),[f,m]),e.useEffect((()=>{v.current=!x&&!s}),[x,s]),e.useEffect((()=>{const e=i===d||i===u&&!(e=>{if(!e)return!0;const t=A(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-D(t)-n>=o})(t.current);C(e)}),[t,i]),ne((()=>{if(o){const e=e=>{var t;null===(t=g.current)||void 0===t||t.call(g),e&&(b.current=!0,y(e))};v.current?((e,t,n,o)=>{if(!e)return void o();const{top:i,height:a,bottom:r}=e.getBoundingClientRect(),l=window.innerHeight;if(l-i>=a)return void o();const s=A(e),d=D(s),u=s.getBoundingClientRect().height-d-i,c=u<a;if(c||!n)return void o(c?u:void 0);F(s,r-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(t.current,c,p,e):e()}else{var e;null===(e=h.current)||void 0===e||e.call(h),b.current&&(b.current=!1,y(r))}}),[t,o,r,p,c]);const O=Math.min(w,l*a);return[x?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,i=n?n.getBoundingClientRect().height:0,a=t&&getComputedStyle(t),r=a?parseInt(a.marginBottom,10):0,l=a?parseInt(a.marginTop,10):0;return"calc("+-Math.abs(o+i)+"px + "+(r+l)+"px)"})(O,t.current,n.current):void 0,O]},ie=r.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),ae=r.default.input.attrs(s).withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),$&&"::-ms-clear{display:none;}"),re=e.memo(e.forwardRef((({id:t,onBlur:n,onFocus:o,readOnly:i,required:r,onChange:l,ariaLabel:s,inputValue:d,ariaLabelledBy:u,selectedOption:c},p)=>{const f=e.useRef(null),[m,g]=e.useState(2),h=!!r&&!I(c);return ne((()=>{f.current&&g(f.current.scrollWidth+2)}),[d]),a.default.createElement(e.Fragment,null,a.default.createElement(ae,{id:t,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:d,readOnly:i,required:h,"aria-label":s,style:{width:m},"aria-labelledby":u,onChange:i?void 0:l}),a.default.createElement(ie,{ref:f},d))})));re.displayName="AutosizeInput";const le=r.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;z-index:9999;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(1px,1px,1px,1px);"]),se=({menuOpen:e,isFocused:t,inputValue:n,optionCount:o,isSearchable:i,focusedOption:r,selectedOption:l,ariaLive:s="polite",ariaLabel:d="Select"})=>{if(!t)return null;const u=` ${o} result(s) available${n?" for search input "+n:""}.`,c=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${d} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,{index:p,value:f,label:m,isDisabled:g}=r,h=f?`Focused option: ${m}${g?" - disabled":""}, ${p+1} of ${o}.`:"",b=l.length?l.map((e=>e.label)).join(" "):"N/A";return a.default.createElement(le,{"aria-atomic":"false","aria-live":s,"aria-relevant":"additions text"},a.default.createElement("span",{id:"aria-selection"},"Selected option: "+b),a.default.createElement("span",{id:"aria-context"},h+u+c))},de=r.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>t.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),ue=()=>a.default.createElement(de,{"aria-hidden":!0,className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),ce=r.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>t.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),pe=()=>a.default.createElement(ce,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),fe=r.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),me=r.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),ge=r.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:n,isInvalid:o})=>n&&t.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),he=r.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),be=e.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:i,isLoading:r,isDisabled:l,loadingNode:s,onCaretMouseDown:d,onClearMouseDown:u})=>{const c=t=>"function"==typeof t?t({menuOpen:e,isLoading:r,isInvalid:o,isDisabled:l}):t;return a.default.createElement(fe,null,i&&!r&&a.default.createElement(me,{onTouchEnd:u,onMouseDown:u},c(t)||a.default.createElement(pe,null)),r&&(s||a.default.createElement(ue,null)),a.default.createElement(he,null),a.default.createElement(me,{onTouchEnd:d,onMouseDown:d},c(n)||a.default.createElement(ge,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));be.displayName="IndicatorIcons";const ve=r.default.div.attrs(l).withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),we=r.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),ye=r.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:n,isInvalid:o,theme:{control:i,color:a}})=>t.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],i.transition,i.borderStyle,i.borderWidth,i.borderRadius,i.height||i.minHeight,o?a.danger:n?i.focusedBorderColor:a.border,i.height?`height: ${i.height};`:"",e?"pointer-events:none;user-select:none;":"",i.backgroundColor||e?`background-color: ${e?a.disabled:i.backgroundColor};`:"",n?`box-shadow: ${i.boxShadow} ${o?a.dangerLight:i.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),xe=e.forwardRef((({async:n,isMulti:o,inputId:i,selectId:r,required:l,ariaLive:s,autoFocus:d,isLoading:u,onKeyDown:w,clearIcon:y,caretIcon:x,isInvalid:S,ariaLabel:z,menuWidth:D,isDisabled:R,inputDelay:T,onMenuOpen:V,onMenuClose:A,onInputBlur:F,isClearable:$,themeConfig:P,loadingNode:W,initialValue:j,onInputFocus:K,onInputChange:U,ariaLabelledBy:Y,onOptionChange:_,onSearchChange:X,getOptionLabel:G,getOptionValue:J,itemKeySelector:Q,openMenuOnFocus:Z,menuPortalTarget:ie,isAriaLiveEnabled:ae,menuOverscanCount:le,blurInputOnSelect:de,menuItemDirection:ue,renderOptionLabel:ce,renderMultiOptions:pe,menuScrollDuration:fe,filterIgnoreAccents:me,hideSelectedOptions:ge,getIsOptionDisabled:he,getFilterOptionString:xe,isSearchable:Ce=!0,lazyLoadMenu:Oe=!1,openMenuOnClick:Se=!0,filterIgnoreCase:Ee=!0,tabSelectsOption:Ie=!0,closeMenuOnSelect:Me=!0,scrollMenuIntoView:ke=!0,backspaceClearsValue:ze=!0,filterMatchFrom:Le=p,menuPosition:Ne=c,options:De=O,loadingMsg:Re="Loading..",placeholder:Te="Select option..",noOptionsMsg:Ve="No options",menuItemSize:Ae=35,menuMaxHeight:Fe=300},Be)=>{const $e=e.useRef(!1),qe=e.useRef(),Pe=e.useRef(!1),We=e.useRef(),je=e.useRef(),Ke=e.useRef(null),He=e.useRef(null),Ue=e.useRef(null),Ye=e.useRef(null),[_e,Xe]=e.useState(""),[Ge,Je]=e.useState(!1),[Qe,Ze]=e.useState(!1),[et,tt]=e.useState(null),[nt,ot]=e.useState(C),it=e.useMemo((()=>M(P)?N(q,P):q),[P]),at=e.useMemo((()=>G||(e=>e.label)),[G]),rt=e.useMemo((()=>J||(e=>e.value)),[J]),lt=e.useMemo((()=>ce||at),[ce,at]),st=((t,n=0)=>{const[o,i]=e.useState(t);return e.useEffect((()=>{if(n<=0)return;const e=setTimeout((()=>{i(t)}),n);return()=>{clearTimeout(e)}}),[t,n]),n<=0?t:o})(_e,T),[dt,ut]=e.useState((()=>L(j,rt,at))),ct=te(De,st,Le,dt,rt,at,he,xe,Ee,me,o,ge,n),[pt,ft]=oe(He,Ye,Ge,Ne,Ae,Fe,ct.length,!!ie,fe,ke,V,A),mt=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.blur()},gt=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.focus()},ht=e=>{var t;return null===(t=Ke.current)||void 0===t?void 0:t.scrollToItem(e)},bt=e.useCallback((e=>{if(!I(ct))return void(!$e.current&&Je(!0));const t=o?-1:ct.findIndex((e=>e.isSelected)),n=t>-1?t:e===v?0:ct.length-1;!$e.current&&Je(!0),ot({index:n,...ct[n]}),ht(n)}),[o,ct]),vt=e.useCallback((e=>{ut((t=>t.filter((t=>t.value!==e))))}),[]),wt=e.useCallback(((e,t)=>{t?o&&vt(e.value):ut((t=>o?[...t,e]:[e]));(E(de)?de:B)?mt():Me&&(Je(!1),Xe(""))}),[o,Me,vt,de]);e.useImperativeHandle(Be,(()=>({empty:!I(dt),menuOpen:Ge,blur:mt,focus:gt,clearValue:()=>{wt.length&&ut(O),nt.data&&ot(C)},setValue:e=>{const t=L(e,rt,at);ut(t)},toggleMenu:e=>{!0===e||void 0===e&&!Ge?(!Qe&&gt(),bt(v)):mt()}}))),e.useEffect((()=>{d&&gt()}),[]),e.useEffect((()=>{$e.current=Ge}),[Ge]),e.useEffect((()=>{je.current=_,We.current=X}),[_,X]),e.useEffect((()=>{Qe&&Z&&bt(v)}),[Qe,Z,bt]),e.useEffect((()=>{const{current:e}=We;e&&Pe.current&&(Pe.current=!1,e(st))}),[st]),ne((()=>{const{current:e}=je;if(!e)return;e(o?dt.map((e=>e.data)):I(dt)?dt[0].data:null)}),[o,dt]),ne((()=>{const{length:e}=ct,t=e>0&&(n||e!==De.length||0===qe.current);0===e?ot(C):(1===e||t)&&(ot({index:0,...ct[0]}),ht(0)),qe.current=e}),[n,De,ct]);const yt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=nt;e&&!i&&wt({data:e,value:t,label:n},o)},xt=e=>{const t="ArrowDown"===e,n=t?v:b;Ge?(e=>{if(!I(ct))return;const t=e===h?(nt.index+1)%ct.length:nt.index>0?nt.index-1:ct.length-1;et&&tt(null),ot({index:t,...ct[t]}),ht(t)})(t?h:g):bt(n)},Ct=e=>{if(R)return;Qe||gt();const t="INPUT"!==e.currentTarget.tagName;Ge?t&&(Ge&&Je(!1),_e&&Xe("")):Se&&bt(v),t&&e.preventDefault()},Ot=e.useCallback((e=>{null==F||F(e),Ze(!1),Je(!1),Xe("")}),[F]),St=e.useCallback((e=>{null==K||K(e),Ze(!0)}),[K]),Et=e.useCallback((e=>{const t=e.currentTarget.value||"";Pe.current=!0,null==U||U(t),!$e.current&&Je(!0),Xe(t)}),[U]),It=e.useCallback((e=>{k(e),ut(O),gt()}),[]),Mt=e.useCallback((e=>{k(e,"mousedown"===e.type),gt(),$e.current?Je(!1):bt(v)}),[bt]),kt=!Oe||Oe&&Ge,zt=R||!Ce||!!et,Lt=!(!$||R||!I(dt)),Nt=R||Se?void 0:Mt;return a.default.createElement(t.ThemeProvider,{theme:it},a.default.createElement(ve,{id:r,"aria-controls":i,"aria-expanded":Ge,onKeyDown:e=>{if(R)return;if(w&&(w(e,_e,nt),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":xt(t);break;case"ArrowLeft":case"ArrowRight":if(!o||_e||pe)return;(e=>{if(!I(dt))return;let t=-1;const n=dt.length-1,o=et?dt.findIndex((e=>e.value===et)):-1;t=e===f?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const i=t>=0?dt[t].value:null;nt.data&&ot(C),i!==et&&tt(i)})("ArrowLeft"===t?m:f);break;case" ":if(_e)return;if(Ge){if(!nt.data)return;yt()}else bt(v);break;case"Enter":Ge&&229!==e.keyCode&&yt();break;case"Escape":Ge&&(Je(!1),Xe(""));break;case"Tab":if(!Ge||!Ie||!nt.data||e.shiftKey)return;yt();break;case"Delete":case"Backspace":if(_e)return;if(et){const e=dt.findIndex((e=>e.value===et)),t=e>-1&&e<dt.length-1?dt[e+1].value:null;vt(et),tt(t)}else{if(!ze)return;if(!I(dt))break;if(o&&!pe){const{value:e}=dt[dt.length-1];vt(e)}else $&&ut(O)}break;default:return}e.preventDefault()}},a.default.createElement(ye,{ref:Ye,isInvalid:S,isFocused:Qe,isDisabled:R,className:"rfs-control-container",onTouchEnd:Ct,onMouseDown:Ct},a.default.createElement(we,null,a.default.createElement(ee,{isMulti:o,inputValue:_e,placeholder:Te,selectedOption:dt,focusedMultiValue:et,renderOptionLabel:lt,renderMultiOptions:pe,removeSelectedOption:vt}),a.default.createElement(re,{id:i,ref:Ue,required:l,ariaLabel:z,inputValue:_e,readOnly:zt,onBlur:Ot,onFocus:St,onChange:Et,ariaLabelledBy:Y,selectedOption:dt})),a.default.createElement(be,{menuOpen:Ge,clearIcon:y,caretIcon:x,isInvalid:S,isLoading:u,showClear:Lt,isDisabled:R,loadingNode:W,onClearMouseDown:It,onCaretMouseDown:Nt})),kt&&a.default.createElement(H,{menuRef:He,menuOpen:Ge,isLoading:u,menuTop:pt,height:ft,itemSize:Ae,loadingMsg:Re,menuOptions:ct,fixedSizeListRef:Ke,noOptionsMsg:Ve,selectOption:wt,direction:ue,itemKeySelector:Q,overscanCount:le,menuPortalTarget:ie,width:D||it.menu.width,onMenuMouseDown:e=>{k(e),gt()},renderOptionLabel:lt,focusedOptionIndex:nt.index}),ae&&a.default.createElement(se,{ariaLive:s,menuOpen:Ge,isFocused:Qe,ariaLabel:z,inputValue:_e,isSearchable:Ce,focusedOption:nt,selectedOption:dt,optionCount:ct.length})))}));xe.displayName="Select",exports.Select=xe;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("styled-components"),n=require("react-window"),o=require("react-dom");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),r=i(t);const l={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container"},s={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input"},d="top",u="auto",c="bottom",p="any",f=0,m=1,g=0,h=1,b=2,v=3,w=t.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),y=t.css([""," 0.25s ease-in-out both"],t.keyframes(["from{opacity:0;}to{opacity:1;}"])),x={index:-1},C=[],O=/[\u0300-\u036f]/g;function S(e){return"boolean"==typeof e}function E(e){return Array.isArray(e)&&!!e.length}function I(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const M=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function k(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(O,"")}(o):o}const z=(e,t,n)=>{const o=Array.isArray(e)?e:I(e)?[e]:C;return E(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},L=(e,t)=>{const n={...e};return Object.keys(t).forEach((o=>{const i=t[o];n[o]="animation"!==o&&I(i)?e[o]?L(e[o],i):i:i||""})),n};function N(e){return R(e)?window.pageYOffset:e.scrollTop}function R(e){return e===document.documentElement||e===document.body||e===window}const D=/(auto|scroll)/;function F({overflow:e,overflowX:t,overflowY:n}){return D.test(`${e}${t}${n}`)}function T(e){let t=getComputedStyle(e);const n=document.documentElement,o="absolute"===t.position;if("fixed"===t.position)return n;for(let n=e;n=null===(i=n)||void 0===i?void 0:i.parentElement;){var i;if(t=getComputedStyle(n),(!o||"static"!==t.position)&&F(t))return n}return n}function V(e,t,n=300,o){let i=0;const a=N(e),r=t-a;requestAnimationFrame((function t(){i+=5;const l=r*((s=(s=i)/n-1)*s*s+1)+a;var s;!function(e,t){R(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),i<n?requestAnimationFrame(t):null==o||o()}))}const A={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:t.css([""," 1.19s ease-in-out infinite"],w),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:y,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:y,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},placeholder:{animation:y},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:y,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}},B="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,$="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),q=e.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:i,focusedOptionIndex:r}})=>{const{data:l,value:s,label:d,isDisabled:u,isSelected:c}=n[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(u,c,e===r);return a.default.createElement("div",{style:t,onClick:u?void 0:()=>o({data:l,value:s,label:d},c),className:p},i(l))}),n.areEqual);q.displayName="Option";const P=r.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),W=({width:t,height:o,itemSize:i,direction:r,isLoading:l,loadingMsg:s,menuOptions:d,selectOption:u,noOptionsMsg:c,overscanCount:p,itemKeySelector:f,fixedSizeListRef:m,renderOptionLabel:g,focusedOptionIndex:h})=>{const b=e.useMemo((()=>({menuOptions:d,selectOption:u,renderOptionLabel:g,focusedOptionIndex:h})),[d,h,u,g]);if(l)return a.default.createElement(P,null,s);return a.default.createElement(e.Fragment,null,a.default.createElement(n.FixedSizeList,{width:t,height:o,itemKey:f?(e,t)=>t.menuOptions[e][f]:void 0,itemSize:i,itemData:b,direction:r,ref:m,overscanCount:p,itemCount:d.length},q),!E(d)&&c&&a.default.createElement(P,null,c))},j=r.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:n,hideNoOptionsMsg:o,theme:{menu:i}})=>t.css(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],i.width,i.margin,i.padding,i.animation,i.borderRadius,i.backgroundColor,o?"none":i.boxShadow,n?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>t.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),K=({menuRef:e,menuTop:t,menuOpen:n,onMenuMouseDown:i,menuPortalTarget:r,...l})=>{const{menuOptions:s,noOptionsMsg:d}=l,u=n&&!Boolean(d)&&!E(s),c=a.default.createElement(j,{ref:e,menuTop:t,menuOpen:n,onMouseDown:i,className:"rfs-menu-container",hideNoOptionsMsg:u},a.default.createElement(W,Object.assign({},l)));return r?o.createPortal(c,r):c},H=t.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),U=r.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>t.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),Y=r.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),_=r.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>t.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,H)),(({isFocused:e})=>e&&H)),X=e.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:i})=>a.default.createElement(U,null,a.default.createElement(Y,null,o(e)),a.default.createElement(_,{isFocused:n,onMouseDown:M,onClick:()=>i(t),onTouchEnd:()=>i(t)},"✖"))));X.displayName="MultiValue";const G=(t,n,o,i,a,r,l,s,d,u,c,f,m)=>{const g=e.useRef(),h=e.useRef(),[b,v]=e.useState(C),w=m?"":n,y=S(f)?f:!!c;return e.useEffect((()=>{g.current=l||(e=>!!e.isDisabled),h.current=s||(({label:e})=>"string"==typeof e?e:`${e}`)}),[l,s]),e.useEffect((()=>{const e=o===p,n=k(w,d,u),l=i.length?new Set(i.map((e=>e.value))):void 0,s=t=>{const o=a(t),i={data:t,value:o,label:r(t),...g.current(t)&&{isDisabled:!0},...(null==l?void 0:l.has(o))&&{isSelected:!0}};if(!(n&&!(t=>{const o=k(h.current(t),d,u);return e?o.indexOf(n)>-1:o.substr(0,n.length)===n})(i)||y&&i.isSelected))return i},{length:c}=t,f=[];for(let e=0;e<c;e++){const n=s(t[e]);n&&f.push(n)}v(f)}),[t,i,w,y,o,d,u,a,r]),b},J=(t,n)=>{const o=e.useRef(!0);e.useEffect((()=>{if(!o.current)return t();o.current=!1}),n)},Q=(t,n,o,i,a,r,l,s,c,p,f,m)=>{const g=e.useRef(),h=e.useRef(),b=e.useRef(!1),v=e.useRef(!s),[w,y]=e.useState(r),[x,C]=e.useState(!1);e.useEffect((()=>{g.current=f,h.current=m}),[f,m]),e.useEffect((()=>{v.current=!x&&!s}),[x,s]),e.useEffect((()=>{const e=i===d||i===u&&!(e=>{if(!e)return!0;const t=T(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-N(t)-n>=o})(t.current);C(e)}),[t,i]),J((()=>{if(o){const e=e=>{var t;null===(t=g.current)||void 0===t||t.call(g),e&&(b.current=!0,y(e))};v.current?((e,t,n,o)=>{if(!e)return void o();const{top:i,height:a,bottom:r}=e.getBoundingClientRect(),l=window.innerHeight;if(l-i>=a)return void o();const s=T(e),d=N(s),u=s.getBoundingClientRect().height-d-i,c=u<a;if(c||!n)return void o(c?u:void 0);V(s,r-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(t.current,c,p,e):e()}else{var e;null===(e=h.current)||void 0===e||e.call(h),b.current&&(b.current=!1,y(r))}}),[t,o,r,p,c]);const O=Math.min(w,l*a);return[x?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,i=n?n.getBoundingClientRect().height:0,a=t&&getComputedStyle(t),r=a?parseInt(a.marginBottom,10):0,l=a?parseInt(a.marginTop,10):0;return"calc("+-Math.abs(o+i)+"px + "+(r+l)+"px)"})(O,t.current,n.current):void 0,O]},Z=t.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),ee=r.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],Z),te=r.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],Z,(({theme:e})=>e.color.placeholder),(({theme:e,isFirstRender:n})=>!n&&t.css(["animation:",";"],e.placeholder.animation))),ne=e.memo((({isMulti:t,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:r,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>{const u=(()=>{const t=e.useRef(!0);return t.current?(t.current=!1,!0):t.current})();return!n||t&&(!t||E(i)&&!s)?E(i)?t?a.default.createElement(e.Fragment,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:t})=>a.default.createElement(X,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===r,removeSelectedOption:d})))):a.default.createElement(ee,null,l(i[0].data)):a.default.createElement(te,{isFirstRender:u},o):null}));ne.displayName="Value";const oe=r.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),ie=r.default.input.attrs(s).withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),$&&"::-ms-clear{display:none;}"),ae=e.memo(e.forwardRef((({id:t,onBlur:n,onFocus:o,readOnly:i,required:r,onChange:l,ariaLabel:s,inputValue:d,ariaLabelledBy:u,selectedOption:c},p)=>{const f=e.useRef(null),[m,g]=e.useState(2),h=!!r&&!E(c);return J((()=>{f.current&&g(f.current.scrollWidth+2)}),[d]),a.default.createElement(e.Fragment,null,a.default.createElement(ie,{id:t,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:d,readOnly:i,required:h,"aria-label":s,style:{width:m},"aria-labelledby":u,onChange:i?void 0:l}),a.default.createElement(oe,{ref:f},d))})));ae.displayName="AutosizeInput";const re=r.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;z-index:9999;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(1px,1px,1px,1px);"]),le=({menuOpen:e,isFocused:t,inputValue:n,optionCount:o,isSearchable:i,focusedOption:r,selectedOption:l,ariaLive:s="polite",ariaLabel:d="Select"})=>{if(!t)return null;const u=` ${o} result(s) available${n?" for search input "+n:""}.`,c=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${d} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,{index:p,value:f,label:m,isDisabled:g}=r,h=f?`Focused option: ${m}${g?" - disabled":""}, ${p+1} of ${o}.`:"",b=l.length?l.map((e=>e.label)).join(" "):"N/A";return a.default.createElement(re,{"aria-atomic":"false","aria-live":s,"aria-relevant":"additions text"},a.default.createElement("span",{id:"aria-selection"},"Selected option: "+b),a.default.createElement("span",{id:"aria-context"},h+u+c))},se=r.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>t.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),de=()=>a.default.createElement(se,{"aria-hidden":!0,className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),ue=r.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>t.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),ce=()=>a.default.createElement(ue,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),pe=r.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),fe=r.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),me=r.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:n,isInvalid:o})=>n&&t.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),ge=r.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),he=e.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:i,isLoading:r,isDisabled:l,loadingNode:s,onCaretMouseDown:d,onClearMouseDown:u})=>{const c=t=>"function"==typeof t?t({menuOpen:e,isLoading:r,isInvalid:o,isDisabled:l}):t;return a.default.createElement(pe,null,i&&!r&&a.default.createElement(fe,{onTouchEnd:u,onMouseDown:u},c(t)||a.default.createElement(ce,null)),r&&(s||a.default.createElement(de,null)),a.default.createElement(ge,null),a.default.createElement(fe,{onTouchEnd:d,onMouseDown:d},c(n)||a.default.createElement(me,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));he.displayName="IndicatorIcons";const be=r.default.div.attrs(l).withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),ve=r.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),we=r.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:n,isInvalid:o,theme:{control:i,color:a}})=>t.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],i.transition,i.borderStyle,i.borderWidth,i.borderRadius,i.height||i.minHeight,o?a.danger:n?i.focusedBorderColor:a.border,i.height?`height: ${i.height};`:"",e?"pointer-events:none;user-select:none;":"",i.backgroundColor||e?`background-color: ${e?a.disabled:i.backgroundColor};`:"",n?`box-shadow: ${i.boxShadow} ${o?a.dangerLight:i.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),ye=e.forwardRef((({async:n,isMulti:o,inputId:i,selectId:r,required:l,ariaLive:s,autoFocus:d,isLoading:u,onKeyDown:w,clearIcon:y,caretIcon:O,isInvalid:k,ariaLabel:N,menuWidth:R,isDisabled:D,inputDelay:F,onMenuOpen:T,onMenuClose:V,onInputBlur:$,isClearable:q,themeConfig:P,loadingNode:W,initialValue:j,onInputFocus:H,onInputChange:U,ariaLabelledBy:Y,onOptionChange:_,onSearchChange:X,getOptionLabel:Z,getOptionValue:ee,itemKeySelector:te,openMenuOnFocus:oe,menuPortalTarget:ie,isAriaLiveEnabled:re,menuOverscanCount:se,blurInputOnSelect:de,menuItemDirection:ue,renderOptionLabel:ce,renderMultiOptions:pe,menuScrollDuration:fe,filterIgnoreAccents:me,hideSelectedOptions:ge,getIsOptionDisabled:ye,getFilterOptionString:xe,isSearchable:Ce=!0,lazyLoadMenu:Oe=!1,openMenuOnClick:Se=!0,filterIgnoreCase:Ee=!0,tabSelectsOption:Ie=!0,closeMenuOnSelect:Me=!0,scrollMenuIntoView:ke=!0,backspaceClearsValue:ze=!0,filterMatchFrom:Le=p,menuPosition:Ne=c,options:Re=C,loadingMsg:De="Loading..",placeholder:Fe="Select option..",noOptionsMsg:Te="No options",menuItemSize:Ve=35,menuMaxHeight:Ae=300},Be)=>{const $e=e.useRef(!1),qe=e.useRef(),Pe=e.useRef(!1),We=e.useRef(),je=e.useRef(),Ke=e.useRef(null),He=e.useRef(null),Ue=e.useRef(null),Ye=e.useRef(null),[_e,Xe]=e.useState(""),[Ge,Je]=e.useState(!1),[Qe,Ze]=e.useState(!1),[et,tt]=e.useState(null),[nt,ot]=e.useState(x),it=e.useMemo((()=>(e=>e&&I(e)?L(A,e):A)(P)),[P]),at=e.useMemo((()=>Z||(e=>e.label)),[Z]),rt=e.useMemo((()=>ee||(e=>e.value)),[ee]),lt=e.useMemo((()=>ce||at),[ce,at]),st=((t,n=0)=>{const[o,i]=e.useState(t);return e.useEffect((()=>{if(n<=0)return;const e=setTimeout((()=>{i(t)}),n);return()=>{clearTimeout(e)}}),[t,n]),n<=0?t:o})(_e,F),[dt,ut]=e.useState((()=>z(j,rt,at))),ct=G(Re,st,Le,dt,rt,at,ye,xe,Ee,me,o,ge,n),[pt,ft]=Q(He,Ye,Ge,Ne,Ve,Ae,ct.length,!!ie,fe,ke,T,V),mt=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.blur()},gt=()=>{var e;return null===(e=Ue.current)||void 0===e?void 0:e.focus()},ht=e=>{var t;return null===(t=Ke.current)||void 0===t?void 0:t.scrollToItem(e)},bt=e.useCallback((e=>{if(!E(ct))return void(!$e.current&&Je(!0));const t=o?-1:ct.findIndex((e=>e.isSelected)),n=t>-1?t:e===v?0:ct.length-1;!$e.current&&Je(!0),ot({index:n,...ct[n]}),ht(n)}),[o,ct]),vt=e.useCallback((e=>{ut((t=>t.filter((t=>t.value!==e))))}),[]),wt=e.useCallback(((e,t)=>{t?o&&vt(e.value):ut((t=>o?[...t,e]:[e]));(S(de)?de:B)?mt():Me&&(Je(!1),Xe(""))}),[o,Me,vt,de]);e.useImperativeHandle(Be,(()=>({empty:!E(dt),menuOpen:Ge,blur:mt,focus:gt,clearValue:()=>{wt.length&&ut(C),nt.data&&ot(x)},setValue:e=>{const t=z(e,rt,at);ut(t)},toggleMenu:e=>{!0===e||void 0===e&&!Ge?(!Qe&&gt(),bt(v)):mt()}}))),e.useEffect((()=>{d&&gt()}),[]),e.useEffect((()=>{$e.current=Ge}),[Ge]),e.useEffect((()=>{je.current=_,We.current=X}),[_,X]),e.useEffect((()=>{Qe&&oe&&bt(v)}),[Qe,oe,bt]),e.useEffect((()=>{const{current:e}=We;e&&Pe.current&&(Pe.current=!1,e(st))}),[st]),J((()=>{const{current:e}=je;if(e){e(o?dt.map((e=>e.data)):E(dt)?dt[0].data:null)}}),[o,dt]),J((()=>{const{length:e}=ct,t=e>0&&(n||e!==Re.length||0===qe.current);0===e?ot(x):(1===e||t)&&(ot({index:0,...ct[0]}),ht(0)),qe.current=e}),[n,Re,ct]);const yt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=nt;e&&!i&&wt({data:e,value:t,label:n},o)},xt=e=>{const t="ArrowDown"===e,n=t?v:b;Ge?(e=>{if(!E(ct))return;const t=e===h?(nt.index+1)%ct.length:nt.index>0?nt.index-1:ct.length-1;et&&tt(null),ot({index:t,...ct[t]}),ht(t)})(t?h:g):bt(n)},Ct=e=>{if(D)return;Qe||gt();const t="INPUT"!==e.currentTarget.tagName;Ge?t&&(Ge&&Je(!1),_e&&Xe("")):Se&&bt(v),t&&e.preventDefault()},Ot=e.useCallback((e=>{null==$||$(e),Ze(!1),Je(!1),Xe("")}),[$]),St=e.useCallback((e=>{null==H||H(e),Ze(!0)}),[H]),Et=e.useCallback((e=>{const t=e.currentTarget.value||"";Pe.current=!0,null==U||U(t),!$e.current&&Je(!0),Xe(t)}),[U]),It=e.useCallback((e=>{ut(C),M(e),gt()}),[]),Mt=e.useCallback((e=>{gt(),$e.current?Je(!1):bt(v),M(e)}),[bt]),kt=!Oe||Oe&&Ge,zt=D||!Ce||!!et,Lt=!(!q||D||!E(dt)),Nt=D||Se?void 0:Mt;return a.default.createElement(t.ThemeProvider,{theme:it},a.default.createElement(be,{id:r,"aria-controls":i,"aria-expanded":Ge,onKeyDown:e=>{if(D)return;if(w&&(w(e,_e,nt),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":xt(t);break;case"ArrowLeft":case"ArrowRight":if(!o||_e||pe)return;(e=>{if(!E(dt))return;let t=-1;const n=dt.length-1,o=et?dt.findIndex((e=>e.value===et)):-1;t=e===f?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const i=t>=0?dt[t].value:null;nt.data&&ot(x),i!==et&&tt(i)})("ArrowLeft"===t?m:f);break;case" ":if(_e)return;if(Ge){if(!nt.data)return;yt()}else bt(v);break;case"Enter":Ge&&229!==e.keyCode&&yt();break;case"Escape":Ge&&(Je(!1),Xe(""));break;case"Tab":if(!Ge||!Ie||!nt.data||e.shiftKey)return;yt();break;case"Delete":case"Backspace":if(_e)return;if(et){const e=dt.findIndex((e=>e.value===et)),t=e>-1&&e<dt.length-1?dt[e+1].value:null;vt(et),tt(t)}else{if(!ze)return;if(!E(dt))break;if(o&&!pe){const{value:e}=dt[dt.length-1];vt(e)}else q&&ut(C)}break;default:return}e.preventDefault()}},a.default.createElement(we,{ref:Ye,isInvalid:k,isFocused:Qe,isDisabled:D,className:"rfs-control-container",onTouchEnd:Ct,onMouseDown:Ct},a.default.createElement(ve,null,a.default.createElement(ne,{isMulti:o,inputValue:_e,placeholder:Fe,selectedOption:dt,focusedMultiValue:et,renderOptionLabel:lt,renderMultiOptions:pe,removeSelectedOption:vt}),a.default.createElement(ae,{id:i,ref:Ue,required:l,ariaLabel:N,inputValue:_e,readOnly:zt,onBlur:Ot,onFocus:St,onChange:Et,ariaLabelledBy:Y,selectedOption:dt})),a.default.createElement(he,{menuOpen:Ge,clearIcon:y,caretIcon:O,isInvalid:k,isLoading:u,showClear:Lt,isDisabled:D,loadingNode:W,onClearMouseDown:It,onCaretMouseDown:Nt})),kt&&a.default.createElement(K,{menuRef:He,menuOpen:Ge,isLoading:u,menuTop:pt,height:ft,itemSize:Ve,loadingMsg:De,menuOptions:ct,fixedSizeListRef:Ke,noOptionsMsg:Te,selectOption:wt,direction:ue,itemKeySelector:te,overscanCount:se,menuPortalTarget:ie,width:R||it.menu.width,onMenuMouseDown:e=>{M(e),gt()},renderOptionLabel:lt,focusedOptionIndex:nt.index}),re&&a.default.createElement(le,{ariaLive:s,menuOpen:Ge,isFocused:Qe,ariaLabel:N,inputValue:_e,isSearchable:Ce,focusedOption:nt,selectedOption:dt,optionCount:ct.length})))}));ye.displayName="Select",exports.Select=ye;

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

import e from"@babel/runtime/helpers/esm/defineProperty";import t,{memo as n,useMemo as o,Fragment as r,useState as i,useEffect as a,useRef as l,forwardRef as s,useCallback as c,useImperativeHandle as d}from"react";import u,{css as p,keyframes as m,ThemeProvider as f}from"styled-components";import g from"@babel/runtime/helpers/esm/objectWithoutProperties";import{areEqual as h,FixedSizeList as b}from"react-window";import{createPortal as v}from"react-dom";const y={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container"},w={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input"},O="top",x="auto",C="bottom",I="any",S=0,E=1,D=0,M=1,k=2,z=3,L=m(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),N=p([""," 0.2s ease-out both"],m(["from{opacity:0;}to{opacity:1;}"])),j=p([""," 1.19s ease-in-out infinite"],L),P={index:-1},T=[];function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const A=/[\u0300-\u036f]/g;function B(e){return"boolean"==typeof e}function R(e){return Array.isArray(e)&&!!e.length}function F(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const $=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function W(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(A,"")}(o):o}const q=(e,t,n)=>{const o=Array.isArray(e)?e:F(e)?[e]:T;return R(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},K=(t,n)=>{const o=function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?V(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({},t);return Object.keys(n).forEach((e=>{const r=n[e];o[e]="animation"!==e&&F(r)?t[e]?K(t[e],r):r:r||""})),o};function H(e){return U(e)?window.pageYOffset:e.scrollTop}function U(e){return e===document.documentElement||e===document.body||e===window}const Y=/(auto|scroll)/;function X({overflow:e,overflowX:t,overflowY:n}){return Y.test(`${e}${t}${n}`)}function G(e){let t=getComputedStyle(e);const n=document.documentElement,o="absolute"===t.position;if("fixed"===t.position)return n;for(let n=e;n=null===(r=n)||void 0===r?void 0:r.parentElement;){var r;if(t=getComputedStyle(n),(!o||"static"!==t.position)&&X(t))return n}return n}function J(e,t,n=300,o){let r=0;const i=H(e),a=t-i;requestAnimationFrame((function t(){r+=5;const l=a*((s=(s=r)/n-1)*s*s+1)+i;var s;!function(e,t){U(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),r<n?requestAnimationFrame(t):null==o||o()}))}const Q="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,Z="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),_={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:j,color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:N,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:N,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:N,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}},ee=n((({index:e,style:n,data:{menuOptions:o,selectOption:r,renderOptionLabel:i,focusedOptionIndex:a}})=>{const{data:l,value:s,label:c,isDisabled:d,isSelected:u}=o[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(d,u,e===a);return t.createElement("div",{style:n,onClick:d?void 0:()=>r({data:l,value:s,label:c},u),className:p},i(l))}),h);ee.displayName="Option";const te=u.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),ne=({width:e,height:n,itemSize:i,direction:a,isLoading:l,loadingMsg:s,menuOptions:c,selectOption:d,noOptionsMsg:u,overscanCount:p,itemKeySelector:m,fixedSizeListRef:f,renderOptionLabel:g,focusedOptionIndex:h})=>{const v=o((()=>({menuOptions:c,selectOption:d,renderOptionLabel:g,focusedOptionIndex:h})),[c,h,d,g]);if(l)return t.createElement(te,null,s);return t.createElement(r,null,t.createElement(b,{width:e,height:n,itemKey:m?(e,t)=>t.menuOptions[e][m]:void 0,itemSize:i,itemData:v,direction:a,ref:f,overscanCount:p,itemCount:c.length},ee),!R(c)&&u&&t.createElement(te,null,u))},oe=u.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,hideNoOptionsMsg:n,theme:{menu:o}})=>p(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],o.width,o.margin,o.padding,o.animation,o.borderRadius,o.backgroundColor,n?"none":o.boxShadow,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>p(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),re=e=>{let{menuRef:n,menuTop:o,menuOpen:r,onMenuMouseDown:i,menuPortalTarget:a}=e,l=g(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:s,noOptionsMsg:c}=l,d=r&&!Boolean(c)&&!R(s),u=t.createElement(oe,{ref:n,menuTop:o,menuOpen:r,onMouseDown:i,className:"rfs-menu-container",hideNoOptionsMsg:d},t.createElement(ne,Object.assign({},l)));return a?v(u,a):u},ie=p(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),ae=u.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>p(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),le=u.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),se=u.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>p(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,ie)),(({isFocused:e})=>e&&ie)),ce=n((({data:e,value:n,isFocused:o,renderOptionLabel:r,removeSelectedOption:i})=>t.createElement(ae,null,t.createElement(le,null,r(e)),t.createElement(se,{isFocused:o,onMouseDown:$,onClick:()=>i(n),onTouchEnd:()=>i(n)},"✖"))));ce.displayName="MultiValue";const de=p(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),ue=u.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],de),pe=u.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],de,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&p(["animation:",";"],e.multiValue.animation))),me=({isMulti:e,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:a,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:c})=>!n||e&&(!e||R(i)&&!s)?R(i)?e?t.createElement(r,null,s?s({renderOptionLabel:l,selected:i}):i.map((({data:e,value:n})=>t.createElement(ce,{key:n,data:e,value:n,renderOptionLabel:l,isFocused:n===a,removeSelectedOption:c})))):t.createElement(ue,null,l(i[0].data)):t.createElement(pe,{isMulti:e},o):null;function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ge(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):fe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}const he=(e,t,n,o,r,l,s,c,d,u,p,m,f)=>{const[g,h]=i(T),b=f?"":t,v=B(m)?m:!!p;return a((()=>{const t=W(b,d,u),i=o.length?new Set(o.map((e=>e.value))):void 0,a=s||(e=>!!e.isDisabled),p=c||(e=>"string"==typeof e.label?e.label:`${e.label}`),m=e=>{const o=r(e),s=ge(ge({data:e,value:o,label:l(e)},a(e)&&{isDisabled:!0}),(null==i?void 0:i.has(o))&&{isSelected:!0});if(!(t&&!(e=>{const o=W(p(e),d,u);return n===I?o.indexOf(t)>-1:o.substr(0,t.length)===t})(s)||v&&s.isSelected))return s},{length:f}=e,g=[];for(let t=0;t<f;t++){const n=m(e[t]);n&&g.push(n)}h(g)}),[e,o,b,v,n,d,u,c,s,r,l]),g},be=(e,t)=>{const n=l(!0);a((()=>{if(!n.current)return e();n.current=!1}),t)},ve=(e,t,n,o,r,s,c,d,u,p,m,f)=>{const g=l(),h=l(),b=l(!1),v=l(!d),[y,w]=i(s),[C,I]=i(!1);a((()=>{g.current=m,h.current=f}),[m,f]),a((()=>{v.current=!C&&!d}),[C,d]),a((()=>{const t=o===O||o===x&&!(e=>{if(!e)return!0;const t=G(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-H(t)-n>=o})(e.current);I(t)}),[e,o]),be((()=>{if(n){const t=e=>{var t;null===(t=g.current)||void 0===t||t.call(g),e&&(b.current=!0,w(e))};v.current?((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=G(e),c=H(s),d=s.getBoundingClientRect().height-c-r,u=d<i;if(u||!n)return void o(u?d:void 0);J(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,u,p,t):t()}else{var t;null===(t=h.current)||void 0===t||t.call(h),b.current&&(b.current=!1,w(s))}}),[e,n,s,p,u]);const S=Math.min(y,c*r);return[C?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(S,e.current,t.current):void 0,S]},ye=u.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),we=u.input.attrs(w).withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),Z&&"::-ms-clear{display:none;}"),Oe=n(s((({id:e,onBlur:n,onFocus:o,readOnly:a,required:s,onChange:c,ariaLabel:d,inputValue:u,ariaLabelledBy:p,selectedOption:m},f)=>{const g=l(null),[h,b]=i(2),v=!!s&&!R(m);return be((()=>{g.current&&b(g.current.scrollWidth+2)}),[u]),t.createElement(r,null,t.createElement(we,{id:e,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:a,required:v,"aria-label":d,style:{width:h},"aria-labelledby":p,onChange:a?void 0:c}),t.createElement(ye,{ref:g},u))})));Oe.displayName="AutosizeInput";const xe=u.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;z-index:9999;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(1px,1px,1px,1px);"]),Ce=({menuOpen:e,isFocused:n,inputValue:o,optionCount:r,isSearchable:i,focusedOption:a,selectedOption:l,ariaLive:s="polite",ariaLabel:c="Select"})=>{if(!n)return null;const d=` ${r} result(s) available${o?" for search input "+o:""}.`,u=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${c} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,{index:p,value:m,label:f,isDisabled:g}=a,h=m?`Focused option: ${f}${g?" - disabled":""}, ${p+1} of ${r}.`:"",b=l.length?l.map((e=>e.label)).join(" "):"N/A";return t.createElement(xe,{"aria-atomic":"false","aria-live":s,"aria-relevant":"additions text"},t.createElement("span",{id:"aria-selection"},"Selected option: "+b),t.createElement("span",{id:"aria-context"},h+d+u))},Ie=u.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>p(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),Se=()=>t.createElement(Ie,{"aria-hidden":!0,className:"rfs-loading-dots"},t.createElement("div",null),t.createElement("div",null),t.createElement("div",null)),Ee=u.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>p(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),De=()=>t.createElement(Ee,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),Me=u.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),ke=u.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),ze=u.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:n})=>t&&p(["transform:rotate(180deg);color:",";"],n?e.color.danger:e.color.caretActive||e.color.primary))),Le=u.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),Ne=n((({menuOpen:e,clearIcon:n,caretIcon:o,isInvalid:r,showClear:i,isLoading:a,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:d})=>{const u=t=>"function"==typeof t?t({menuOpen:e,isLoading:a,isInvalid:r,isDisabled:l}):t;return t.createElement(Me,null,i&&!a&&t.createElement(ke,{onTouchEnd:d,onMouseDown:d},u(n)||t.createElement(De,null)),a&&(s||t.createElement(Se,null)),t.createElement(Le,null),t.createElement(ke,{onTouchEnd:c,onMouseDown:c},u(o)||t.createElement(ze,{"aria-hidden":!0,menuOpen:e,isInvalid:r,className:"rfs-caret-icon"})))}));function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Pe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?je(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):je(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}Ne.displayName="IndicatorIcons";const Te=u.div.attrs(y).withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),Ve=u.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),Ae=u.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:n,theme:{control:o,color:r}})=>p(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],o.transition,o.borderStyle,o.borderWidth,o.borderRadius,o.height||o.minHeight,n?r.danger:t?o.focusedBorderColor:r.border,o.height?`height: ${o.height};`:"",e?"pointer-events:none;user-select:none;":"",o.backgroundColor||e?`background-color: ${e?r.disabled:o.backgroundColor};`:"",t?`box-shadow: ${o.boxShadow} ${n?r.dangerLight:o.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Be=s((({async:e,isMulti:n,inputId:r,selectId:s,required:u,ariaLive:p,autoFocus:m,isLoading:g,onKeyDown:h,clearIcon:b,caretIcon:v,isInvalid:y,ariaLabel:w,menuWidth:O,isDisabled:x,inputDelay:L,onMenuOpen:N,onMenuClose:j,onInputBlur:V,isClearable:A,themeConfig:W,loadingNode:H,initialValue:U,onInputFocus:Y,onInputChange:X,ariaLabelledBy:G,onOptionChange:J,onSearchChange:Z,getOptionLabel:ee,getOptionValue:te,itemKeySelector:ne,openMenuOnFocus:oe,menuPortalTarget:ie,isAriaLiveEnabled:ae,menuOverscanCount:le,blurInputOnSelect:se,menuItemDirection:ce,renderOptionLabel:de,renderMultiOptions:ue,menuScrollDuration:pe,filterIgnoreAccents:fe,hideSelectedOptions:ge,getIsOptionDisabled:ye,getFilterOptionString:we,isSearchable:xe=!0,lazyLoadMenu:Ie=!1,openMenuOnClick:Se=!0,filterIgnoreCase:Ee=!0,tabSelectsOption:De=!0,closeMenuOnSelect:Me=!0,scrollMenuIntoView:ke=!0,backspaceClearsValue:ze=!0,filterMatchFrom:Le=I,menuPosition:je=C,options:Be=T,loadingMsg:Re="Loading..",placeholder:Fe="Select option..",noOptionsMsg:$e="No options",menuItemSize:We=35,menuMaxHeight:qe=300},Ke)=>{const He=l(!1),Ue=l(),Ye=l(!1),Xe=l(),Ge=l(),Je=l(null),Qe=l(null),Ze=l(null),_e=l(null),[et,tt]=i(""),[nt,ot]=i(!1),[rt,it]=i(!1),[at,lt]=i(null),[st,ct]=i(P),dt=o((()=>F(W)?K(_,W):_),[W]),ut=o((()=>ee||(e=>e.label)),[ee]),pt=o((()=>te||(e=>e.value)),[te]),mt=o((()=>de||ut),[de,ut]),ft=((e,t=0)=>{const[n,o]=i(e);return a((()=>{if(t<=0)return;const n=setTimeout((()=>{o(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),t<=0?e:n})(et,L),[gt,ht]=i((()=>q(U,pt,ut))),bt=he(Be,ft,Le,gt,pt,ut,ye,we,Ee,fe,n,ge,e),[vt,yt]=ve(Qe,_e,nt,je,We,qe,bt.length,!!ie,pe,ke,N,j),wt=()=>{var e;return null===(e=Ze.current)||void 0===e?void 0:e.blur()},Ot=()=>{var e;return null===(e=Ze.current)||void 0===e?void 0:e.focus()},xt=e=>{var t;return null===(t=Je.current)||void 0===t?void 0:t.scrollToItem(e)},Ct=c((e=>{if(!R(bt))return void(!He.current&&ot(!0));const t=n?-1:bt.findIndex((e=>e.isSelected)),o=t>-1?t:e===z?0:bt.length-1;!He.current&&ot(!0),ct(Pe({index:o},bt[o])),xt(o)}),[n,bt]),It=c((e=>{ht((t=>t.filter((t=>t.value!==e))))}),[]),St=c(((e,t)=>{t?n&&It(e.value):ht((t=>n?[...t,e]:[e]));(B(se)?se:Q)?wt():Me&&(ot(!1),tt(""))}),[n,Me,It,se]);d(Ke,(()=>({empty:!R(gt),menuOpen:nt,blur:wt,focus:Ot,clearValue:()=>{St.length&&ht(T),st.data&&ct(P)},setValue:e=>{const t=q(e,pt,ut);ht(t)},toggleMenu:e=>{!0===e||void 0===e&&!nt?(!rt&&Ot(),Ct(z)):wt()}}))),a((()=>{m&&Ot()}),[]),a((()=>{He.current=nt}),[nt]),a((()=>{Ge.current=J,Xe.current=Z}),[J,Z]),a((()=>{rt&&oe&&Ct(z)}),[rt,oe,Ct]),a((()=>{const{current:e}=Xe;e&&Ye.current&&(Ye.current=!1,e(ft))}),[ft]),be((()=>{const{current:e}=Ge;if(!e)return;e(n?gt.map((e=>e.data)):R(gt)?gt[0].data:null)}),[n,gt]),be((()=>{const{length:t}=bt,n=t>0&&(e||t!==Be.length||0===Ue.current);0===t?ct(P):(1===t||n)&&(ct(Pe({index:0},bt[0])),xt(0)),Ue.current=t}),[e,Be,bt]);const Et=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=st;e&&!r&&St({data:e,value:t,label:n},o)},Dt=e=>{const t="ArrowDown"===e,n=t?z:k;nt?(e=>{if(!R(bt))return;const t=e===M?(st.index+1)%bt.length:st.index>0?st.index-1:bt.length-1;at&&lt(null),ct(Pe({index:t},bt[t])),xt(t)})(t?M:D):Ct(n)},Mt=e=>{if(x)return;rt||Ot();const t="INPUT"!==e.currentTarget.tagName;nt?t&&(nt&&ot(!1),et&&tt("")):Se&&Ct(z),t&&e.preventDefault()},kt=c((e=>{null==V||V(e),it(!1),ot(!1),tt("")}),[V]),zt=c((e=>{null==Y||Y(e),it(!0)}),[Y]),Lt=c((e=>{const t=e.currentTarget.value||"";Ye.current=!0,null==X||X(t),!He.current&&ot(!0),tt(t)}),[X]),Nt=c((e=>{$(e),ht(T),Ot()}),[]),jt=c((e=>{$(e,"mousedown"===e.type),Ot(),He.current?ot(!1):Ct(z)}),[Ct]),Pt=!Ie||Ie&&nt,Tt=x||!xe||!!at,Vt=!(!A||x||!R(gt)),At=x||Se?void 0:jt;return t.createElement(f,{theme:dt},t.createElement(Te,{id:s,"aria-controls":r,"aria-expanded":nt,onKeyDown:e=>{if(x)return;if(h&&(h(e,et,st),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":Dt(t);break;case"ArrowLeft":case"ArrowRight":if(!n||et||ue)return;(e=>{if(!R(gt))return;let t=-1;const n=gt.length-1,o=at?gt.findIndex((e=>e.value===at)):-1;t=e===S?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const r=t>=0?gt[t].value:null;st.data&&ct(P),r!==at&&lt(r)})("ArrowLeft"===t?E:S);break;case" ":if(et)return;if(nt){if(!st.data)return;Et()}else Ct(z);break;case"Enter":nt&&229!==e.keyCode&&Et();break;case"Escape":nt&&(ot(!1),tt(""));break;case"Tab":if(!nt||!De||!st.data||e.shiftKey)return;Et();break;case"Delete":case"Backspace":if(et)return;if(at){const e=gt.findIndex((e=>e.value===at)),t=e>-1&&e<gt.length-1?gt[e+1].value:null;It(at),lt(t)}else{if(!ze)return;if(!R(gt))break;if(n&&!ue){const{value:e}=gt[gt.length-1];It(e)}else A&&ht(T)}break;default:return}e.preventDefault()}},t.createElement(Ae,{ref:_e,isInvalid:y,isFocused:rt,isDisabled:x,className:"rfs-control-container",onTouchEnd:Mt,onMouseDown:Mt},t.createElement(Ve,null,t.createElement(me,{isMulti:n,inputValue:et,placeholder:Fe,selectedOption:gt,focusedMultiValue:at,renderOptionLabel:mt,renderMultiOptions:ue,removeSelectedOption:It}),t.createElement(Oe,{id:r,ref:Ze,required:u,ariaLabel:w,inputValue:et,readOnly:Tt,onBlur:kt,onFocus:zt,onChange:Lt,ariaLabelledBy:G,selectedOption:gt})),t.createElement(Ne,{menuOpen:nt,clearIcon:b,caretIcon:v,isInvalid:y,isLoading:g,showClear:Vt,isDisabled:x,loadingNode:H,onClearMouseDown:Nt,onCaretMouseDown:At})),Pt&&t.createElement(re,{menuRef:Qe,menuOpen:nt,isLoading:g,menuTop:vt,height:yt,itemSize:We,loadingMsg:Re,menuOptions:bt,fixedSizeListRef:Je,noOptionsMsg:$e,selectOption:St,direction:ce,itemKeySelector:ne,overscanCount:le,menuPortalTarget:ie,width:O||dt.menu.width,onMenuMouseDown:e=>{$(e),Ot()},renderOptionLabel:mt,focusedOptionIndex:st.index}),ae&&t.createElement(Ce,{ariaLive:p,menuOpen:nt,isFocused:rt,ariaLabel:w,inputValue:et,isSearchable:xe,focusedOption:st,selectedOption:gt,optionCount:bt.length})))}));Be.displayName="Select";export{Be as Select};
import e from"@babel/runtime/helpers/esm/defineProperty";import t,{memo as n,useMemo as o,Fragment as r,useState as i,useEffect as a,useRef as l,forwardRef as s,useCallback as c,useImperativeHandle as d}from"react";import u,{css as p,keyframes as m,ThemeProvider as f}from"styled-components";import g from"@babel/runtime/helpers/esm/objectWithoutProperties";import{areEqual as h,FixedSizeList as b}from"react-window";import{createPortal as v}from"react-dom";const y={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container"},w={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input"},O="top",x="auto",C="bottom",I="any",S=0,E=1,D=0,M=1,k=2,z=3,N=m(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),L=p([""," 0.25s ease-in-out both"],m(["from{opacity:0;}to{opacity:1;}"])),j={index:-1},P=[];function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const V=/[\u0300-\u036f]/g;function A(e){return"boolean"==typeof e}function B(e){return Array.isArray(e)&&!!e.length}function R(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const F=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function $(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(V,"")}(o):o}const W=(e,t,n)=>{const o=Array.isArray(e)?e:R(e)?[e]:P;return B(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},q=(t,n)=>{const o=function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?T(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):T(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({},t);return Object.keys(n).forEach((e=>{const r=n[e];o[e]="animation"!==e&&R(r)?t[e]?q(t[e],r):r:r||""})),o};function K(e){return H(e)?window.pageYOffset:e.scrollTop}function H(e){return e===document.documentElement||e===document.body||e===window}const U=/(auto|scroll)/;function Y({overflow:e,overflowX:t,overflowY:n}){return U.test(`${e}${t}${n}`)}function X(e){let t=getComputedStyle(e);const n=document.documentElement,o="absolute"===t.position;if("fixed"===t.position)return n;for(let n=e;n=null===(r=n)||void 0===r?void 0:r.parentElement;){var r;if(t=getComputedStyle(n),(!o||"static"!==t.position)&&Y(t))return n}return n}function G(e,t,n=300,o){let r=0;const i=K(e),a=t-i;requestAnimationFrame((function t(){r+=5;const l=a*((s=(s=r)/n-1)*s*s+1)+i;var s;!function(e,t){H(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),r<n?requestAnimationFrame(t):null==o||o()}))}const J={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:p([""," 1.19s ease-in-out infinite"],N),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:L,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:L,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},placeholder:{animation:L},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:L,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}},Q="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,Z="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),_=n((({index:e,style:n,data:{menuOptions:o,selectOption:r,renderOptionLabel:i,focusedOptionIndex:a}})=>{const{data:l,value:s,label:c,isDisabled:d,isSelected:u}=o[e],p=function(e,t,n){let o="rfs-option";return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(d,u,e===a);return t.createElement("div",{style:n,onClick:d?void 0:()=>r({data:l,value:s,label:c},u),className:p},i(l))}),h);_.displayName="Option";const ee=u.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),te=({width:e,height:n,itemSize:i,direction:a,isLoading:l,loadingMsg:s,menuOptions:c,selectOption:d,noOptionsMsg:u,overscanCount:p,itemKeySelector:m,fixedSizeListRef:f,renderOptionLabel:g,focusedOptionIndex:h})=>{const v=o((()=>({menuOptions:c,selectOption:d,renderOptionLabel:g,focusedOptionIndex:h})),[c,h,d,g]);if(l)return t.createElement(ee,null,s);return t.createElement(r,null,t.createElement(b,{width:e,height:n,itemKey:m?(e,t)=>t.menuOptions[e][m]:void 0,itemSize:i,itemData:v,direction:a,ref:f,overscanCount:p,itemCount:c.length},_),!B(c)&&u&&t.createElement(ee,null,u))},ne=u.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,hideNoOptionsMsg:n,theme:{menu:o}})=>p(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],o.width,o.margin,o.padding,o.animation,o.borderRadius,o.backgroundColor,n?"none":o.boxShadow,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),"rfs-option",(({theme:{menu:{option:e}}})=>p(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,"rfs-option-focused","rfs-option-disabled","rfs-option-selected",e.focusedBgColor,"rfs-option-selected",e.selectedColor,e.selectedBgColor,"rfs-option-disabled"))),oe=e=>{let{menuRef:n,menuTop:o,menuOpen:r,onMenuMouseDown:i,menuPortalTarget:a}=e,l=g(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:s,noOptionsMsg:c}=l,d=r&&!Boolean(c)&&!B(s),u=t.createElement(ne,{ref:n,menuTop:o,menuOpen:r,onMouseDown:i,className:"rfs-menu-container",hideNoOptionsMsg:d},t.createElement(te,Object.assign({},l)));return a?v(u,a):u},re=p(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),ie=u.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>p(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),ae=u.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),le=u.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>p(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,re)),(({isFocused:e})=>e&&re)),se=n((({data:e,value:n,isFocused:o,renderOptionLabel:r,removeSelectedOption:i})=>t.createElement(ie,null,t.createElement(ae,null,r(e)),t.createElement(le,{isFocused:o,onMouseDown:F,onClick:()=>i(n),onTouchEnd:()=>i(n)},"✖"))));se.displayName="MultiValue";function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function de(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ce(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}const ue=(e,t,n,o,r,s,c,d,u,p,m,f,g)=>{const h=l(),b=l(),[v,y]=i(P),w=g?"":t,O=A(f)?f:!!m;return a((()=>{h.current=c||(e=>!!e.isDisabled),b.current=d||(({label:e})=>"string"==typeof e?e:`${e}`)}),[c,d]),a((()=>{const t=n===I,i=$(w,u,p),a=o.length?new Set(o.map((e=>e.value))):void 0,l=e=>{const n=r(e),o=de(de({data:e,value:n,label:s(e)},h.current(e)&&{isDisabled:!0}),(null==a?void 0:a.has(n))&&{isSelected:!0});if(!(i&&!(e=>{const n=$(b.current(e),u,p);return t?n.indexOf(i)>-1:n.substr(0,i.length)===i})(o)||O&&o.isSelected))return o},{length:c}=e,d=[];for(let t=0;t<c;t++){const n=l(e[t]);n&&d.push(n)}y(d)}),[e,o,w,O,n,u,p,r,s]),v},pe=(e,t)=>{const n=l(!0);a((()=>{if(!n.current)return e();n.current=!1}),t)},me=(e,t,n,o,r,s,c,d,u,p,m,f)=>{const g=l(),h=l(),b=l(!1),v=l(!d),[y,w]=i(s),[C,I]=i(!1);a((()=>{g.current=m,h.current=f}),[m,f]),a((()=>{v.current=!C&&!d}),[C,d]),a((()=>{const t=o===O||o===x&&!(e=>{if(!e)return!0;const t=X(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-K(t)-n>=o})(e.current);I(t)}),[e,o]),pe((()=>{if(n){const t=e=>{var t;null===(t=g.current)||void 0===t||t.call(g),e&&(b.current=!0,w(e))};v.current?((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=X(e),c=K(s),d=s.getBoundingClientRect().height-c-r,u=d<i;if(u||!n)return void o(u?d:void 0);G(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,u,p,t):t()}else{var t;null===(t=h.current)||void 0===t||t.call(h),b.current&&(b.current=!1,w(s))}}),[e,n,s,p,u]);const S=Math.min(y,c*r);return[C?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(S,e.current,t.current):void 0,S]},fe=p(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),ge=u.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],fe),he=u.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],fe,(({theme:e})=>e.color.placeholder),(({theme:e,isFirstRender:t})=>!t&&p(["animation:",";"],e.placeholder.animation))),be=n((({isMulti:e,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:a,renderOptionLabel:s,renderMultiOptions:c,removeSelectedOption:d})=>{const u=(()=>{const e=l(!0);return e.current?(e.current=!1,!0):e.current})();return!n||e&&(!e||B(i)&&!c)?B(i)?e?t.createElement(r,null,c?c({renderOptionLabel:s,selected:i}):i.map((({data:e,value:n})=>t.createElement(se,{key:n,data:e,value:n,renderOptionLabel:s,isFocused:n===a,removeSelectedOption:d})))):t.createElement(ge,null,s(i[0].data)):t.createElement(he,{isFirstRender:u},o):null}));be.displayName="Value";const ve=u.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),ye=u.input.attrs(w).withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),Z&&"::-ms-clear{display:none;}"),we=n(s((({id:e,onBlur:n,onFocus:o,readOnly:a,required:s,onChange:c,ariaLabel:d,inputValue:u,ariaLabelledBy:p,selectedOption:m},f)=>{const g=l(null),[h,b]=i(2),v=!!s&&!B(m);return pe((()=>{g.current&&b(g.current.scrollWidth+2)}),[u]),t.createElement(r,null,t.createElement(ye,{id:e,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:a,required:v,"aria-label":d,style:{width:h},"aria-labelledby":p,onChange:a?void 0:c}),t.createElement(ve,{ref:g},u))})));we.displayName="AutosizeInput";const Oe=u.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;z-index:9999;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(1px,1px,1px,1px);"]),xe=({menuOpen:e,isFocused:n,inputValue:o,optionCount:r,isSearchable:i,focusedOption:a,selectedOption:l,ariaLive:s="polite",ariaLabel:c="Select"})=>{if(!n)return null;const d=` ${r} result(s) available${o?" for search input "+o:""}.`,u=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${c} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,{index:p,value:m,label:f,isDisabled:g}=a,h=m?`Focused option: ${f}${g?" - disabled":""}, ${p+1} of ${r}.`:"",b=l.length?l.map((e=>e.label)).join(" "):"N/A";return t.createElement(Oe,{"aria-atomic":"false","aria-live":s,"aria-relevant":"additions text"},t.createElement("span",{id:"aria-selection"},"Selected option: "+b),t.createElement("span",{id:"aria-context"},h+d+u))},Ce=u.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>p(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),Ie=()=>t.createElement(Ce,{"aria-hidden":!0,className:"rfs-loading-dots"},t.createElement("div",null),t.createElement("div",null),t.createElement("div",null)),Se=u.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>p(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),Ee=()=>t.createElement(Se,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),De=u.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),Me=u.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),ke=u.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:n})=>t&&p(["transform:rotate(180deg);color:",";"],n?e.color.danger:e.color.caretActive||e.color.primary))),ze=u.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),Ne=n((({menuOpen:e,clearIcon:n,caretIcon:o,isInvalid:r,showClear:i,isLoading:a,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:d})=>{const u=t=>"function"==typeof t?t({menuOpen:e,isLoading:a,isInvalid:r,isDisabled:l}):t;return t.createElement(De,null,i&&!a&&t.createElement(Me,{onTouchEnd:d,onMouseDown:d},u(n)||t.createElement(Ee,null)),a&&(s||t.createElement(Ie,null)),t.createElement(ze,null),t.createElement(Me,{onTouchEnd:c,onMouseDown:c},u(o)||t.createElement(ke,{"aria-hidden":!0,menuOpen:e,isInvalid:r,className:"rfs-caret-icon"})))}));function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function je(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Le(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}Ne.displayName="IndicatorIcons";const Pe=u.div.attrs(y).withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),Te=u.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),Ve=u.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:n,theme:{control:o,color:r}})=>p(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],o.transition,o.borderStyle,o.borderWidth,o.borderRadius,o.height||o.minHeight,n?r.danger:t?o.focusedBorderColor:r.border,o.height?`height: ${o.height};`:"",e?"pointer-events:none;user-select:none;":"",o.backgroundColor||e?`background-color: ${e?r.disabled:o.backgroundColor};`:"",t?`box-shadow: ${o.boxShadow} ${n?r.dangerLight:o.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Ae=s((({async:e,isMulti:n,inputId:r,selectId:s,required:u,ariaLive:p,autoFocus:m,isLoading:g,onKeyDown:h,clearIcon:b,caretIcon:v,isInvalid:y,ariaLabel:w,menuWidth:O,isDisabled:x,inputDelay:N,onMenuOpen:L,onMenuClose:T,onInputBlur:V,isClearable:$,themeConfig:K,loadingNode:H,initialValue:U,onInputFocus:Y,onInputChange:X,ariaLabelledBy:G,onOptionChange:Z,onSearchChange:_,getOptionLabel:ee,getOptionValue:te,itemKeySelector:ne,openMenuOnFocus:re,menuPortalTarget:ie,isAriaLiveEnabled:ae,menuOverscanCount:le,blurInputOnSelect:se,menuItemDirection:ce,renderOptionLabel:de,renderMultiOptions:fe,menuScrollDuration:ge,filterIgnoreAccents:he,hideSelectedOptions:ve,getIsOptionDisabled:ye,getFilterOptionString:Oe,isSearchable:Ce=!0,lazyLoadMenu:Ie=!1,openMenuOnClick:Se=!0,filterIgnoreCase:Ee=!0,tabSelectsOption:De=!0,closeMenuOnSelect:Me=!0,scrollMenuIntoView:ke=!0,backspaceClearsValue:ze=!0,filterMatchFrom:Le=I,menuPosition:Ae=C,options:Be=P,loadingMsg:Re="Loading..",placeholder:Fe="Select option..",noOptionsMsg:$e="No options",menuItemSize:We=35,menuMaxHeight:qe=300},Ke)=>{const He=l(!1),Ue=l(),Ye=l(!1),Xe=l(),Ge=l(),Je=l(null),Qe=l(null),Ze=l(null),_e=l(null),[et,tt]=i(""),[nt,ot]=i(!1),[rt,it]=i(!1),[at,lt]=i(null),[st,ct]=i(j),dt=o((()=>(e=>e&&R(e)?q(J,e):J)(K)),[K]),ut=o((()=>ee||(e=>e.label)),[ee]),pt=o((()=>te||(e=>e.value)),[te]),mt=o((()=>de||ut),[de,ut]),ft=((e,t=0)=>{const[n,o]=i(e);return a((()=>{if(t<=0)return;const n=setTimeout((()=>{o(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),t<=0?e:n})(et,N),[gt,ht]=i((()=>W(U,pt,ut))),bt=ue(Be,ft,Le,gt,pt,ut,ye,Oe,Ee,he,n,ve,e),[vt,yt]=me(Qe,_e,nt,Ae,We,qe,bt.length,!!ie,ge,ke,L,T),wt=()=>{var e;return null===(e=Ze.current)||void 0===e?void 0:e.blur()},Ot=()=>{var e;return null===(e=Ze.current)||void 0===e?void 0:e.focus()},xt=e=>{var t;return null===(t=Je.current)||void 0===t?void 0:t.scrollToItem(e)},Ct=c((e=>{if(!B(bt))return void(!He.current&&ot(!0));const t=n?-1:bt.findIndex((e=>e.isSelected)),o=t>-1?t:e===z?0:bt.length-1;!He.current&&ot(!0),ct(je({index:o},bt[o])),xt(o)}),[n,bt]),It=c((e=>{ht((t=>t.filter((t=>t.value!==e))))}),[]),St=c(((e,t)=>{t?n&&It(e.value):ht((t=>n?[...t,e]:[e]));(A(se)?se:Q)?wt():Me&&(ot(!1),tt(""))}),[n,Me,It,se]);d(Ke,(()=>({empty:!B(gt),menuOpen:nt,blur:wt,focus:Ot,clearValue:()=>{St.length&&ht(P),st.data&&ct(j)},setValue:e=>{const t=W(e,pt,ut);ht(t)},toggleMenu:e=>{!0===e||void 0===e&&!nt?(!rt&&Ot(),Ct(z)):wt()}}))),a((()=>{m&&Ot()}),[]),a((()=>{He.current=nt}),[nt]),a((()=>{Ge.current=Z,Xe.current=_}),[Z,_]),a((()=>{rt&&re&&Ct(z)}),[rt,re,Ct]),a((()=>{const{current:e}=Xe;e&&Ye.current&&(Ye.current=!1,e(ft))}),[ft]),pe((()=>{const{current:e}=Ge;if(e){e(n?gt.map((e=>e.data)):B(gt)?gt[0].data:null)}}),[n,gt]),pe((()=>{const{length:t}=bt,n=t>0&&(e||t!==Be.length||0===Ue.current);0===t?ct(j):(1===t||n)&&(ct(je({index:0},bt[0])),xt(0)),Ue.current=t}),[e,Be,bt]);const Et=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=st;e&&!r&&St({data:e,value:t,label:n},o)},Dt=e=>{const t="ArrowDown"===e,n=t?z:k;nt?(e=>{if(!B(bt))return;const t=e===M?(st.index+1)%bt.length:st.index>0?st.index-1:bt.length-1;at&&lt(null),ct(je({index:t},bt[t])),xt(t)})(t?M:D):Ct(n)},Mt=e=>{if(x)return;rt||Ot();const t="INPUT"!==e.currentTarget.tagName;nt?t&&(nt&&ot(!1),et&&tt("")):Se&&Ct(z),t&&e.preventDefault()},kt=c((e=>{null==V||V(e),it(!1),ot(!1),tt("")}),[V]),zt=c((e=>{null==Y||Y(e),it(!0)}),[Y]),Nt=c((e=>{const t=e.currentTarget.value||"";Ye.current=!0,null==X||X(t),!He.current&&ot(!0),tt(t)}),[X]),Lt=c((e=>{ht(P),F(e),Ot()}),[]),jt=c((e=>{Ot(),He.current?ot(!1):Ct(z),F(e)}),[Ct]),Pt=!Ie||Ie&&nt,Tt=x||!Ce||!!at,Vt=!(!$||x||!B(gt)),At=x||Se?void 0:jt;return t.createElement(f,{theme:dt},t.createElement(Pe,{id:s,"aria-controls":r,"aria-expanded":nt,onKeyDown:e=>{if(x)return;if(h&&(h(e,et,st),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":Dt(t);break;case"ArrowLeft":case"ArrowRight":if(!n||et||fe)return;(e=>{if(!B(gt))return;let t=-1;const n=gt.length-1,o=at?gt.findIndex((e=>e.value===at)):-1;t=e===S?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const r=t>=0?gt[t].value:null;st.data&&ct(j),r!==at&&lt(r)})("ArrowLeft"===t?E:S);break;case" ":if(et)return;if(nt){if(!st.data)return;Et()}else Ct(z);break;case"Enter":nt&&229!==e.keyCode&&Et();break;case"Escape":nt&&(ot(!1),tt(""));break;case"Tab":if(!nt||!De||!st.data||e.shiftKey)return;Et();break;case"Delete":case"Backspace":if(et)return;if(at){const e=gt.findIndex((e=>e.value===at)),t=e>-1&&e<gt.length-1?gt[e+1].value:null;It(at),lt(t)}else{if(!ze)return;if(!B(gt))break;if(n&&!fe){const{value:e}=gt[gt.length-1];It(e)}else $&&ht(P)}break;default:return}e.preventDefault()}},t.createElement(Ve,{ref:_e,isInvalid:y,isFocused:rt,isDisabled:x,className:"rfs-control-container",onTouchEnd:Mt,onMouseDown:Mt},t.createElement(Te,null,t.createElement(be,{isMulti:n,inputValue:et,placeholder:Fe,selectedOption:gt,focusedMultiValue:at,renderOptionLabel:mt,renderMultiOptions:fe,removeSelectedOption:It}),t.createElement(we,{id:r,ref:Ze,required:u,ariaLabel:w,inputValue:et,readOnly:Tt,onBlur:kt,onFocus:zt,onChange:Nt,ariaLabelledBy:G,selectedOption:gt})),t.createElement(Ne,{menuOpen:nt,clearIcon:b,caretIcon:v,isInvalid:y,isLoading:g,showClear:Vt,isDisabled:x,loadingNode:H,onClearMouseDown:Lt,onCaretMouseDown:At})),Pt&&t.createElement(oe,{menuRef:Qe,menuOpen:nt,isLoading:g,menuTop:vt,height:yt,itemSize:We,loadingMsg:Re,menuOptions:bt,fixedSizeListRef:Je,noOptionsMsg:$e,selectOption:St,direction:ce,itemKeySelector:ne,overscanCount:le,menuPortalTarget:ie,width:O||dt.menu.width,onMenuMouseDown:e=>{F(e),Ot()},renderOptionLabel:mt,focusedOptionIndex:st.index}),ae&&t.createElement(xe,{ariaLive:p,menuOpen:nt,isFocused:rt,ariaLabel:w,inputValue:et,isSearchable:Ce,focusedOption:st,selectedOption:gt,optionCount:bt.length})))}));Ae.displayName="Select";export{Ae as Select};

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("styled-components"),require("react-window"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","styled-components","react-window","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactFunctionalSelect={},e.React,e.styled,e.ReactWindow,e.ReactDOM)}(this,(function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),l=i(n);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c="rfs-option",d="rfs-option-focused",u="rfs-option-selected",p="rfs-option-disabled",f={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},m={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined},g="top",h="auto",b="bottom",y="any",v=0,w=1,O=0,x=1,C=2,S=3,E=n.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),I=n.css([""," 0.2s ease-out both"],n.keyframes(["from{opacity:0;}to{opacity:1;}"])),M=n.css([""," 1.19s ease-in-out infinite"],E),k={index:-1},D=[];function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const z=/[\u0300-\u036f]/g;function L(e){return"boolean"==typeof e}function N(e){return Array.isArray(e)&&!!e.length}function R(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const P=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function T(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(z,"")}(o):o}const V=(e,t,n)=>{const o=Array.isArray(e)?e:R(e)?[e]:D;return N(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},A=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return Object.keys(t).forEach((o=>{const r=t[o];n[o]="animation"!==o&&R(r)?e[o]?A(e[o],r):r:r||""})),n};function F(e){return B(e)?window.pageYOffset:e.scrollTop}function B(e){return e===document.documentElement||e===document.body||e===window}const $=/(auto|scroll)/;function q({overflow:e,overflowX:t,overflowY:n}){return $.test(`${e}${t}${n}`)}function W(e){let t=getComputedStyle(e);const n=document.documentElement,o="absolute"===t.position;if("fixed"===t.position)return n;for(let n=e;n=null===(r=n)||void 0===r?void 0:r.parentElement;){var r;if(t=getComputedStyle(n),(!o||"static"!==t.position)&&q(t))return n}return n}function K(e,t,n=300,o){let r=0;const i=F(e),a=t-i;requestAnimationFrame((function t(){r+=5;const l=a*((s=(s=r)/n-1)*s*s+1)+i;var s;!function(e,t){B(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),r<n?requestAnimationFrame(t):null==o||o()}))}const H="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,U="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),Y={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:M,color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:I,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:I,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:I,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}};function _(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const X=t.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:r,focusedOptionIndex:i}})=>{const{data:l,value:s,label:d,isDisabled:u,isSelected:p}=n[e],f=function(e,t,n){let o=c;return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(u,p,e===i);return a.default.createElement("div",{style:t,onClick:u?void 0:()=>o({data:l,value:s,label:d},p),className:f},r(l))}),o.areEqual);X.displayName="Option";const G=l.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),J=({width:e,height:n,itemSize:r,direction:i,isLoading:l,loadingMsg:s,menuOptions:c,selectOption:d,noOptionsMsg:u,overscanCount:p,itemKeySelector:f,fixedSizeListRef:m,renderOptionLabel:g,focusedOptionIndex:h})=>{const b=t.useMemo((()=>({menuOptions:c,selectOption:d,renderOptionLabel:g,focusedOptionIndex:h})),[c,h,d,g]);if(l)return a.default.createElement(G,null,s);return a.default.createElement(t.Fragment,null,a.default.createElement(o.FixedSizeList,{width:e,height:n,itemKey:f?(e,t)=>t.menuOptions[e][f]:void 0,itemSize:r,itemData:b,direction:i,ref:m,overscanCount:p,itemCount:c.length},X),!N(c)&&u&&a.default.createElement(G,null,u))},Q=l.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,hideNoOptionsMsg:o,theme:{menu:r}})=>n.css(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],r.width,r.margin,r.padding,r.animation,r.borderRadius,r.backgroundColor,o?"none":r.boxShadow,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),c,(({theme:{menu:{option:e}}})=>n.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,d,p,u,e.focusedBgColor,u,e.selectedColor,e.selectedBgColor,p))),Z=e=>{let{menuRef:t,menuTop:n,menuOpen:o,onMenuMouseDown:i,menuPortalTarget:l}=e,s=_(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:c,noOptionsMsg:d}=s,u=o&&!Boolean(d)&&!N(c),p=a.default.createElement(Q,{ref:t,menuTop:n,menuOpen:o,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined,hideNoOptionsMsg:u},a.default.createElement(J,Object.assign({},s)));return l?r.createPortal(p,l):p},ee=n.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),te=l.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>n.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),ne=l.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),oe=l.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>n.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,ee)),(({isFocused:e})=>e&&ee)),re=t.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:r})=>a.default.createElement(te,null,a.default.createElement(ne,null,o(e)),a.default.createElement(oe,{isFocused:n,"data-testid":undefined,onMouseDown:P,onClick:()=>r(t),onTouchEnd:()=>r(t)},"✖"))));re.displayName="MultiValue";const ie=n.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),ae=l.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],ie),le=l.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],ie,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&n.css(["animation:",";"],e.multiValue.animation))),se=({isMulti:e,inputValue:n,placeholder:o,selectedOption:r,focusedMultiValue:i,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:c})=>!n||e&&(!e||N(r)&&!s)?N(r)?e?a.default.createElement(t.Fragment,null,s?s({renderOptionLabel:l,selected:r}):r.map((({data:e,value:t})=>a.default.createElement(re,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===i,removeSelectedOption:c})))):a.default.createElement(ae,null,l(r[0].data)):a.default.createElement(le,{isMulti:e},o):null;function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ue=(e,n,o,r,i,a,l,s,c,d,u,p,f)=>{const[m,g]=t.useState(D),h=f?"":n,b=L(p)?p:!!u;return t.useEffect((()=>{const t=T(h,c,d),n=r.length?new Set(r.map((e=>e.value))):void 0,u=l||(e=>!!e.isDisabled),p=s||(e=>"string"==typeof e.label?e.label:`${e.label}`),f=e=>{const r=i(e),l=de(de({data:e,value:r,label:a(e)},u(e)&&{isDisabled:!0}),(null==n?void 0:n.has(r))&&{isSelected:!0});if(!(t&&!(e=>{const n=T(p(e),c,d);return o===y?n.indexOf(t)>-1:n.substr(0,t.length)===t})(l)||b&&l.isSelected))return l},{length:m}=e,v=[];for(let t=0;t<m;t++){const n=f(e[t]);n&&v.push(n)}g(v)}),[e,r,h,b,o,c,d,s,l,i,a]),m},pe=(e,n)=>{const o=t.useRef(!0);t.useEffect((()=>{if(!o.current)return e();o.current=!1}),n)},fe=(e,n,o,r,i,a,l,s,c,d,u,p)=>{const f=t.useRef(),m=t.useRef(),b=t.useRef(!1),y=t.useRef(!s),[v,w]=t.useState(a),[O,x]=t.useState(!1);t.useEffect((()=>{f.current=u,m.current=p}),[u,p]),t.useEffect((()=>{y.current=!O&&!s}),[O,s]),t.useEffect((()=>{const t=r===g||r===h&&!(e=>{if(!e)return!0;const t=W(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-F(t)-n>=o})(e.current);x(t)}),[e,r]),pe((()=>{if(o){const t=e=>{var t;null===(t=f.current)||void 0===t||t.call(f),e&&(b.current=!0,w(e))};y.current?((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=W(e),c=F(s),d=s.getBoundingClientRect().height-c-r,u=d<i;if(u||!n)return void o(u?d:void 0);K(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,c,d,t):t()}else{var t;null===(t=m.current)||void 0===t||t.call(m),b.current&&(b.current=!1,w(a))}}),[e,o,a,d,c]);const C=Math.min(v,l*i);return[O?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(C,e.current,n.current):void 0,C]},me=l.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),ge=l.default.input.attrs(m).withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),U&&"::-ms-clear{display:none;}"),he=t.memo(t.forwardRef((({id:e,onBlur:n,onFocus:o,readOnly:r,required:i,onChange:l,ariaLabel:s,inputValue:c,ariaLabelledBy:d,selectedOption:u},p)=>{const f=t.useRef(null),[m,g]=t.useState(2),h=!!i&&!N(u);return pe((()=>{f.current&&g(f.current.scrollWidth+2)}),[c]),a.default.createElement(t.Fragment,null,a.default.createElement(ge,{id:e,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:c,readOnly:r,required:h,"aria-label":s,style:{width:m},"aria-labelledby":d,onChange:r?void 0:l}),a.default.createElement(me,{ref:f},c))})));he.displayName="AutosizeInput";const be=l.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;z-index:9999;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(1px,1px,1px,1px);"]),ye=({menuOpen:e,isFocused:t,inputValue:n,optionCount:o,isSearchable:r,focusedOption:i,selectedOption:l,ariaLive:s="polite",ariaLabel:c="Select"})=>{if(!t)return null;const d=` ${o} result(s) available${n?" for search input "+n:""}.`,u=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${c} is focused${r?", type to filter options":""}, press Down arrow key to open the menu.`,{index:p,value:f,label:m,isDisabled:g}=i,h=f?`Focused option: ${m}${g?" - disabled":""}, ${p+1} of ${o}.`:"",b=l.length?l.map((e=>e.label)).join(" "):"N/A";return a.default.createElement(be,{"aria-atomic":"false","aria-live":s,"aria-relevant":"additions text"},a.default.createElement("span",{id:"aria-selection"},"Selected option: "+b),a.default.createElement("span",{id:"aria-context"},h+d+u))},ve=l.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>n.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),we=()=>a.default.createElement(ve,{"aria-hidden":!0,className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),Oe=l.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>n.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),xe=()=>a.default.createElement(Oe,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),Ce=l.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),Se=l.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),Ee=l.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:o})=>t&&n.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),Ie=l.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),Me=t.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:r,isLoading:i,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:d})=>{const u=t=>"function"==typeof t?t({menuOpen:e,isLoading:i,isInvalid:o,isDisabled:l}):t;return a.default.createElement(Ce,null,r&&!i&&a.default.createElement(Se,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},u(t)||a.default.createElement(xe,null)),i&&(s||a.default.createElement(we,null)),a.default.createElement(Ie,null),a.default.createElement(Se,{onTouchEnd:c,onMouseDown:c,"data-testid":undefined},u(n)||a.default.createElement(Ee,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Me.displayName="IndicatorIcons";const je=l.default.div.attrs(f).withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),ze=l.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),Le=l.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:o,theme:{control:r,color:i}})=>n.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],r.transition,r.borderStyle,r.borderWidth,r.borderRadius,r.height||r.minHeight,o?i.danger:t?r.focusedBorderColor:i.border,r.height?`height: ${r.height};`:"",e?"pointer-events:none;user-select:none;":"",r.backgroundColor||e?`background-color: ${e?i.disabled:r.backgroundColor};`:"",t?`box-shadow: ${r.boxShadow} ${o?i.dangerLight:r.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Ne=t.forwardRef((({async:e,isMulti:o,inputId:r,selectId:i,required:l,ariaLive:s,autoFocus:c,isLoading:d,onKeyDown:u,clearIcon:p,caretIcon:f,isInvalid:m,ariaLabel:g,menuWidth:h,isDisabled:E,inputDelay:I,onMenuOpen:M,onMenuClose:j,onInputBlur:z,isClearable:T,themeConfig:F,loadingNode:B,initialValue:$,onInputFocus:q,onInputChange:W,ariaLabelledBy:K,onOptionChange:U,onSearchChange:_,getOptionLabel:X,getOptionValue:G,itemKeySelector:J,openMenuOnFocus:Q,menuPortalTarget:ee,isAriaLiveEnabled:te,menuOverscanCount:ne,blurInputOnSelect:oe,menuItemDirection:re,renderOptionLabel:ie,renderMultiOptions:ae,menuScrollDuration:le,filterIgnoreAccents:ce,hideSelectedOptions:de,getIsOptionDisabled:me,getFilterOptionString:ge,isSearchable:be=!0,lazyLoadMenu:ve=!1,openMenuOnClick:we=!0,filterIgnoreCase:Oe=!0,tabSelectsOption:xe=!0,closeMenuOnSelect:Ce=!0,scrollMenuIntoView:Se=!0,backspaceClearsValue:Ee=!0,filterMatchFrom:Ie=y,menuPosition:ke=b,options:Ne=D,loadingMsg:Re="Loading..",placeholder:Pe="Select option..",noOptionsMsg:Te="No options",menuItemSize:Ve=35,menuMaxHeight:Ae=300},Fe)=>{const Be=t.useRef(!1),$e=t.useRef(),qe=t.useRef(!1),We=t.useRef(),Ke=t.useRef(),He=t.useRef(null),Ue=t.useRef(null),Ye=t.useRef(null),_e=t.useRef(null),[Xe,Ge]=t.useState(""),[Je,Qe]=t.useState(!1),[Ze,et]=t.useState(!1),[tt,nt]=t.useState(null),[ot,rt]=t.useState(k),it=t.useMemo((()=>R(F)?A(Y,F):Y),[F]),at=t.useMemo((()=>X||(e=>e.label)),[X]),lt=t.useMemo((()=>G||(e=>e.value)),[G]),st=t.useMemo((()=>ie||at),[ie,at]),ct=((e,n=0)=>{const[o,r]=t.useState(e);return t.useEffect((()=>{if(n<=0)return;const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),n<=0?e:o})(Xe,I),[dt,ut]=t.useState((()=>V($,lt,at))),pt=ue(Ne,ct,Ie,dt,lt,at,me,ge,Oe,ce,o,de,e),[ft,mt]=fe(Ue,_e,Je,ke,Ve,Ae,pt.length,!!ee,le,Se,M,j),gt=()=>{var e;return null===(e=Ye.current)||void 0===e?void 0:e.blur()},ht=()=>{var e;return null===(e=Ye.current)||void 0===e?void 0:e.focus()},bt=e=>{var t;return null===(t=He.current)||void 0===t?void 0:t.scrollToItem(e)},yt=t.useCallback((e=>{if(!N(pt))return void(!Be.current&&Qe(!0));const t=o?-1:pt.findIndex((e=>e.isSelected)),n=t>-1?t:e===S?0:pt.length-1;!Be.current&&Qe(!0),rt(De({index:n},pt[n])),bt(n)}),[o,pt]),vt=t.useCallback((e=>{ut((t=>t.filter((t=>t.value!==e))))}),[]),wt=t.useCallback(((e,t)=>{t?o&&vt(e.value):ut((t=>o?[...t,e]:[e]));(L(oe)?oe:H)?gt():Ce&&(Qe(!1),Ge(""))}),[o,Ce,vt,oe]);t.useImperativeHandle(Fe,(()=>({empty:!N(dt),menuOpen:Je,blur:gt,focus:ht,clearValue:()=>{wt.length&&ut(D),ot.data&&rt(k)},setValue:e=>{const t=V(e,lt,at);ut(t)},toggleMenu:e=>{!0===e||void 0===e&&!Je?(!Ze&&ht(),yt(S)):gt()}}))),t.useEffect((()=>{c&&ht()}),[]),t.useEffect((()=>{Be.current=Je}),[Je]),t.useEffect((()=>{Ke.current=U,We.current=_}),[U,_]),t.useEffect((()=>{Ze&&Q&&yt(S)}),[Ze,Q,yt]),t.useEffect((()=>{const{current:e}=We;e&&qe.current&&(qe.current=!1,e(ct))}),[ct]),pe((()=>{const{current:e}=Ke;if(!e)return;e(o?dt.map((e=>e.data)):N(dt)?dt[0].data:null)}),[o,dt]),pe((()=>{const{length:t}=pt,n=t>0&&(e||t!==Ne.length||0===$e.current);0===t?rt(k):(1===t||n)&&(rt(De({index:0},pt[0])),bt(0)),$e.current=t}),[e,Ne,pt]);const Ot=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=ot;e&&!r&&wt({data:e,value:t,label:n},o)},xt=e=>{const t="ArrowDown"===e,n=t?S:C;Je?(e=>{if(!N(pt))return;const t=e===x?(ot.index+1)%pt.length:ot.index>0?ot.index-1:pt.length-1;tt&&nt(null),rt(De({index:t},pt[t])),bt(t)})(t?x:O):yt(n)},Ct=e=>{if(E)return;Ze||ht();const t="INPUT"!==e.currentTarget.tagName;Je?t&&(Je&&Qe(!1),Xe&&Ge("")):we&&yt(S),t&&e.preventDefault()},St=t.useCallback((e=>{null==z||z(e),et(!1),Qe(!1),Ge("")}),[z]),Et=t.useCallback((e=>{null==q||q(e),et(!0)}),[q]),It=t.useCallback((e=>{const t=e.currentTarget.value||"";qe.current=!0,null==W||W(t),!Be.current&&Qe(!0),Ge(t)}),[W]),Mt=t.useCallback((e=>{P(e),ut(D),ht()}),[]),kt=t.useCallback((e=>{P(e,"mousedown"===e.type),ht(),Be.current?Qe(!1):yt(S)}),[yt]),Dt=!ve||ve&&Je,jt=E||!be||!!tt,zt=!(!T||E||!N(dt)),Lt=E||we?void 0:kt;return a.default.createElement(n.ThemeProvider,{theme:it},a.default.createElement(je,{id:i,"aria-controls":r,"aria-expanded":Je,onKeyDown:e=>{if(E)return;if(u&&(u(e,Xe,ot),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":xt(t);break;case"ArrowLeft":case"ArrowRight":if(!o||Xe||ae)return;(e=>{if(!N(dt))return;let t=-1;const n=dt.length-1,o=tt?dt.findIndex((e=>e.value===tt)):-1;t=e===v?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const r=t>=0?dt[t].value:null;ot.data&&rt(k),r!==tt&&nt(r)})("ArrowLeft"===t?w:v);break;case" ":if(Xe)return;if(Je){if(!ot.data)return;Ot()}else yt(S);break;case"Enter":Je&&229!==e.keyCode&&Ot();break;case"Escape":Je&&(Qe(!1),Ge(""));break;case"Tab":if(!Je||!xe||!ot.data||e.shiftKey)return;Ot();break;case"Delete":case"Backspace":if(Xe)return;if(tt){const e=dt.findIndex((e=>e.value===tt)),t=e>-1&&e<dt.length-1?dt[e+1].value:null;vt(tt),nt(t)}else{if(!Ee)return;if(!N(dt))break;if(o&&!ae){const{value:e}=dt[dt.length-1];vt(e)}else T&&ut(D)}break;default:return}e.preventDefault()}},a.default.createElement(Le,{ref:_e,isInvalid:m,isFocused:Ze,isDisabled:E,className:"rfs-control-container",onTouchEnd:Ct,onMouseDown:Ct,"data-testid":undefined},a.default.createElement(ze,null,a.default.createElement(se,{isMulti:o,inputValue:Xe,placeholder:Pe,selectedOption:dt,focusedMultiValue:tt,renderOptionLabel:st,renderMultiOptions:ae,removeSelectedOption:vt}),a.default.createElement(he,{id:r,ref:Ye,required:l,ariaLabel:g,inputValue:Xe,readOnly:jt,onBlur:St,onFocus:Et,onChange:It,ariaLabelledBy:K,selectedOption:dt})),a.default.createElement(Me,{menuOpen:Je,clearIcon:p,caretIcon:f,isInvalid:m,isLoading:d,showClear:zt,isDisabled:E,loadingNode:B,onClearMouseDown:Mt,onCaretMouseDown:Lt})),Dt&&a.default.createElement(Z,{menuRef:Ue,menuOpen:Je,isLoading:d,menuTop:ft,height:mt,itemSize:Ve,loadingMsg:Re,menuOptions:pt,fixedSizeListRef:He,noOptionsMsg:Te,selectOption:wt,direction:re,itemKeySelector:J,overscanCount:ne,menuPortalTarget:ee,width:h||it.menu.width,onMenuMouseDown:e=>{P(e),ht()},renderOptionLabel:st,focusedOptionIndex:ot.index}),te&&a.default.createElement(ye,{ariaLive:s,menuOpen:Je,isFocused:Ze,ariaLabel:g,inputValue:Xe,isSearchable:be,focusedOption:ot,selectedOption:dt,optionCount:pt.length})))}));Ne.displayName="Select",e.Select=Ne,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("styled-components"),require("react-window"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","styled-components","react-window","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactFunctionalSelect={},e.React,e.styled,e.ReactWindow,e.ReactDOM)}(this,(function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),l=i(n);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c="rfs-option",u="rfs-option-focused",d="rfs-option-selected",p="rfs-option-disabled",f={role:"combobox","aria-haspopup":"listbox",className:"rfs-select-container","data-testid":undefined},m={tabIndex:0,type:"text",spellCheck:!1,autoCorrect:"off",autoComplete:"off",autoCapitalize:"none","aria-autocomplete":"list",className:"rfs-autosize-input","data-testid":undefined},g="top",h="auto",b="bottom",y="any",v=0,w=1,O=0,x=1,C=2,S=3,E=n.keyframes(["0%,80%,100%{transform:scale(0);}40%{transform:scale(1.0);}"]),I=n.css([""," 0.25s ease-in-out both"],n.keyframes(["from{opacity:0;}to{opacity:1;}"])),M={index:-1},k=[];function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}const R=/[\u0300-\u036f]/g;function j(e){return"boolean"==typeof e}function z(e){return Array.isArray(e)&&!!e.length}function L(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const N=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function P(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(R,"")}(o):o}const T=(e,t,n)=>{const o=Array.isArray(e)?e:L(e)?[e]:k;return z(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},F=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return Object.keys(t).forEach((o=>{const r=t[o];n[o]="animation"!==o&&L(r)?e[o]?F(e[o],r):r:r||""})),n};function V(e){return A(e)?window.pageYOffset:e.scrollTop}function A(e){return e===document.documentElement||e===document.body||e===window}const B=/(auto|scroll)/;function $({overflow:e,overflowX:t,overflowY:n}){return B.test(`${e}${t}${n}`)}function q(e){let t=getComputedStyle(e);const n=document.documentElement,o="absolute"===t.position;if("fixed"===t.position)return n;for(let n=e;n=null===(r=n)||void 0===r?void 0:r.parentElement;){var r;if(t=getComputedStyle(n),(!o||"static"!==t.position)&&$(t))return n}return n}function W(e,t,n=300,o){let r=0;const i=V(e),a=t-i;requestAnimationFrame((function t(){r+=5;const l=a*((s=(s=r)/n-1)*s*s+1)+i;var s;!function(e,t){A(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),r<n?requestAnimationFrame(t):null==o||o()}))}const K={color:{border:"#ced4da",danger:"#dc3545",primary:"#007bff",disabled:"#e9ecef",placeholder:"#6E7276",dangerLight:"rgba(220, 53, 69, 0.25)"},input:{},select:{},loader:{size:"0.625rem",padding:"0.375rem 0.75rem",animation:n.css([""," 1.19s ease-in-out infinite"],E),color:"rgba(0, 123, 255, 0.42)"},icon:{color:"#ccc",hoverColor:"#A6A6A6",padding:"0 0.9375rem",clear:{width:"14px",height:"16px",animation:I,transition:"color 0.2s ease-out"},caret:{size:"7px",transition:"transform 0.3s ease-in-out, color 0.2s ease-out"}},control:{minHeight:"38px",borderWidth:"1px",borderStyle:"solid",borderRadius:"3px",boxShadow:"0 0 0 0.2rem",padding:"0.375rem 0.75rem",boxShadowColor:"rgba(0, 123, 255, 0.25)",focusedBorderColor:"rgba(0, 123, 255, 0.75)",transition:"box-shadow 0.2s ease-out, border-color 0.2s ease-out"},menu:{padding:"0",width:"100%",margin:"0.5rem 0",borderRadius:"3px",backgroundColor:"#fff",animation:I,boxShadow:"0 0.5em 1em -0.125em rgb(10 10 10 / 12%), 0 0 0 1px rgb(10 10 10 / 4%)",option:{textAlign:"left",selectedColor:"#fff",selectedBgColor:"#007bff",padding:"0.375rem 0.75rem",focusedBgColor:"rgba(0, 123, 255, 0.15)"}},noOptions:{fontSize:"1.25rem",margin:"0.25rem 0",color:"hsl(0, 0%, 60%)",padding:"0.375rem 0.75rem"},placeholder:{animation:I},multiValue:{margin:"1px 2px",borderRadius:"3px",backgroundColor:"#e7edf3",animation:I,label:{borderRadius:"3px",fontSize:"0.825em",padding:"1px 0 1px 6px"},clear:{fontWeight:600,padding:"0 6px",color:"#a6a6a6",fontSize:"0.65em",alignSelf:"center",focusColor:"#808080",transition:"color 0.2s ease-out, transform 0.2s ease-out, z-index 0.2s ease-out"}}},H="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,U="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent);function Y(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const _=t.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:r,focusedOptionIndex:i}})=>{const{data:l,value:s,label:u,isDisabled:d,isSelected:p}=n[e],f=function(e,t,n){let o=c;return e&&(o+=" rfs-option-disabled"),t&&(o+=" rfs-option-selected"),n&&(o+=" rfs-option-focused"),o}(d,p,e===i);return a.default.createElement("div",{style:t,onClick:d?void 0:()=>o({data:l,value:s,label:u},p),className:f},r(l))}),o.areEqual);_.displayName="Option";const X=l.default.div.withConfig({displayName:"NoOptionsMsg",componentId:"v1y124-0"})(["text-align:center;color:",";margin:",";padding:",";font-size:",";",""],(({theme:e})=>e.noOptions.color),(({theme:e})=>e.noOptions.margin),(({theme:e})=>e.noOptions.padding),(({theme:e})=>e.noOptions.fontSize),(({theme:e})=>e.noOptions.css)),G=({width:e,height:n,itemSize:r,direction:i,isLoading:l,loadingMsg:s,menuOptions:c,selectOption:u,noOptionsMsg:d,overscanCount:p,itemKeySelector:f,fixedSizeListRef:m,renderOptionLabel:g,focusedOptionIndex:h})=>{const b=t.useMemo((()=>({menuOptions:c,selectOption:u,renderOptionLabel:g,focusedOptionIndex:h})),[c,h,u,g]);if(l)return a.default.createElement(X,null,s);return a.default.createElement(t.Fragment,null,a.default.createElement(o.FixedSizeList,{width:e,height:n,itemKey:f?(e,t)=>t.menuOptions[e][f]:void 0,itemSize:r,itemData:b,direction:i,ref:m,overscanCount:p,itemCount:c.length},_),!z(c)&&d&&a.default.createElement(X,null,d))},J=l.default.div.withConfig({displayName:"MenuWrapper",componentId:"yf5myu-0"})(["z-index:999;cursor:default;position:absolute;"," "," .","{display:block;overflow:hidden;user-select:none;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:transparent;","}"],(({menuTop:e,menuOpen:t,hideNoOptionsMsg:o,theme:{menu:r}})=>n.css(["width:",";margin:",";padding:",";animation:",";border-radius:",";background-color:",";box-shadow:",";"," ",""],r.width,r.margin,r.padding,r.animation,r.borderRadius,r.backgroundColor,o?"none":r.boxShadow,t?"":"display: none;",e?`top: ${e};`:"")),(({theme:e})=>e.menu.css),c,(({theme:{menu:{option:e}}})=>n.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,u,p,d,e.focusedBgColor,d,e.selectedColor,e.selectedBgColor,p))),Q=e=>{let{menuRef:t,menuTop:n,menuOpen:o,onMenuMouseDown:i,menuPortalTarget:l}=e,s=Y(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:c,noOptionsMsg:u}=s,d=o&&!Boolean(u)&&!z(c),p=a.default.createElement(J,{ref:t,menuTop:n,menuOpen:o,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined,hideNoOptionsMsg:d},a.default.createElement(G,Object.assign({},s)));return l?r.createPortal(p,l):p},Z=n.css(["z-index:5000;transform:scale(1.26);color:",";"],(({theme:e})=>e.multiValue.clear.focusColor)),ee=l.default.div.withConfig({displayName:"MultiValueWrapper",componentId:"sc-211cx7-0"})(["min-width:0;display:flex;"," ",""],(({theme:{multiValue:e}})=>n.css(["margin:",";animation:",";border-radius:",";background-color:",";"],e.margin,e.animation,e.borderRadius,e.backgroundColor)),(({theme:e})=>e.multiValue.css)),te=l.default.div.withConfig({displayName:"Label",componentId:"sc-211cx7-1"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:",";font-size:",";border-radius:",";"],(({theme:e})=>e.multiValue.label.padding),(({theme:e})=>e.multiValue.label.fontSize),(({theme:e})=>e.multiValue.label.borderRadius)),ne=l.default.i.withConfig({displayName:"Clear",componentId:"sc-211cx7-2"})(["display:flex;font-style:inherit;"," ",""],(({theme:{multiValue:{clear:e}}})=>n.css(["color:",";padding:",";font-size:",";align-self:",";transition:",";font-weight:",";:hover{","}"],e.color,e.padding,e.fontSize,e.alignSelf,e.transition,e.fontWeight,Z)),(({isFocused:e})=>e&&Z)),oe=t.memo((({data:e,value:t,isFocused:n,renderOptionLabel:o,removeSelectedOption:r})=>a.default.createElement(ee,null,a.default.createElement(te,null,o(e)),a.default.createElement(ne,{isFocused:n,"data-testid":undefined,onMouseDown:N,onClick:()=>r(t),onTouchEnd:()=>r(t)},"✖"))));oe.displayName="MultiValue";function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ae=(e,n,o,r,i,a,l,s,c,u,d,p,f)=>{const m=t.useRef(),g=t.useRef(),[h,b]=t.useState(k),v=f?"":n,w=j(p)?p:!!d;return t.useEffect((()=>{m.current=l||(e=>!!e.isDisabled),g.current=s||(({label:e})=>"string"==typeof e?e:`${e}`)}),[l,s]),t.useEffect((()=>{const t=o===y,n=P(v,c,u),l=r.length?new Set(r.map((e=>e.value))):void 0,s=e=>{const o=i(e),r=ie(ie({data:e,value:o,label:a(e)},m.current(e)&&{isDisabled:!0}),(null==l?void 0:l.has(o))&&{isSelected:!0});if(!(n&&!(e=>{const o=P(g.current(e),c,u);return t?o.indexOf(n)>-1:o.substr(0,n.length)===n})(r)||w&&r.isSelected))return r},{length:d}=e,p=[];for(let t=0;t<d;t++){const n=s(e[t]);n&&p.push(n)}b(p)}),[e,r,v,w,o,c,u,i,a]),h},le=(e,n)=>{const o=t.useRef(!0);t.useEffect((()=>{if(!o.current)return e();o.current=!1}),n)},se=(e,n,o,r,i,a,l,s,c,u,d,p)=>{const f=t.useRef(),m=t.useRef(),b=t.useRef(!1),y=t.useRef(!s),[v,w]=t.useState(a),[O,x]=t.useState(!1);t.useEffect((()=>{f.current=d,m.current=p}),[d,p]),t.useEffect((()=>{y.current=!O&&!s}),[O,s]),t.useEffect((()=>{const t=r===g||r===h&&!(e=>{if(!e)return!0;const t=q(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-V(t)-n>=o})(e.current);x(t)}),[e,r]),le((()=>{if(o){const t=e=>{var t;null===(t=f.current)||void 0===t||t.call(f),e&&(b.current=!0,w(e))};y.current?((e,t,n,o)=>{if(!e)return void o();const{top:r,height:i,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-r>=i)return void o();const s=q(e),c=V(s),u=s.getBoundingClientRect().height-c-r,d=u<i;if(d||!n)return void o(d?u:void 0);W(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,c,u,t):t()}else{var t;null===(t=m.current)||void 0===t||t.call(m),b.current&&(b.current=!1,w(a))}}),[e,o,a,u,c]);const C=Math.min(v,l*i);return[O?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,r=n?n.getBoundingClientRect().height:0,i=t&&getComputedStyle(t),a=i?parseInt(i.marginBottom,10):0,l=i?parseInt(i.marginTop,10):0;return"calc("+-Math.abs(o+r)+"px + "+(a+l)+"px)"})(C,e.current,n.current):void 0,C]},ce=n.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),ue=l.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],ce),de=l.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],ce,(({theme:e})=>e.color.placeholder),(({theme:e,isFirstRender:t})=>!t&&n.css(["animation:",";"],e.placeholder.animation))),pe=t.memo((({isMulti:e,inputValue:n,placeholder:o,selectedOption:r,focusedMultiValue:i,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:c})=>{const u=(()=>{const e=t.useRef(!0);return e.current?(e.current=!1,!0):e.current})();return!n||e&&(!e||z(r)&&!s)?z(r)?e?a.default.createElement(t.Fragment,null,s?s({renderOptionLabel:l,selected:r}):r.map((({data:e,value:t})=>a.default.createElement(oe,{key:t,data:e,value:t,renderOptionLabel:l,isFocused:t===i,removeSelectedOption:c})))):a.default.createElement(ue,null,l(r[0].data)):a.default.createElement(de,{isFirstRender:u},o):null}));pe.displayName="Value";const fe=l.default.div.withConfig({displayName:"SizerDiv",componentId:"o2ype2-0"})(["top:0;left:0;height:0;overflow:scroll;white-space:pre;position:absolute;visibility:hidden;font-size:inherit;font-weight:inherit;font-family:inherit;",""],(({theme:e})=>e.input.css)),me=l.default.input.attrs(m).withConfig({displayName:"Input",componentId:"o2ype2-1"})(["border:0;outline:0;padding:0;cursor:text;background:0;color:inherit;font-size:inherit;font-weight:inherit;font-family:inherit;box-sizing:content-box;:read-only{opacity:0;cursor:default;}:required{","}"," ",""],(({theme:e,isInvalid:t})=>t&&e.input.cssRequired),(({theme:e})=>e.input.css),U&&"::-ms-clear{display:none;}"),ge=t.memo(t.forwardRef((({id:e,onBlur:n,onFocus:o,readOnly:r,required:i,onChange:l,ariaLabel:s,inputValue:c,ariaLabelledBy:u,selectedOption:d},p)=>{const f=t.useRef(null),[m,g]=t.useState(2),h=!!i&&!z(d);return le((()=>{f.current&&g(f.current.scrollWidth+2)}),[c]),a.default.createElement(t.Fragment,null,a.default.createElement(me,{id:e,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:c,readOnly:r,required:h,"aria-label":s,style:{width:m},"aria-labelledby":u,onChange:r?void 0:l}),a.default.createElement(fe,{ref:f},c))})));ge.displayName="AutosizeInput";const he=l.default.span.withConfig({displayName:"A11yText",componentId:"zxgkbx-0"})(["border:0;padding:0;width:1px;height:1px;z-index:9999;overflow:hidden;position:absolute;white-space:nowrap;clip:rect(1px,1px,1px,1px);"]),be=({menuOpen:e,isFocused:t,inputValue:n,optionCount:o,isSearchable:r,focusedOption:i,selectedOption:l,ariaLive:s="polite",ariaLabel:c="Select"})=>{if(!t)return null;const u=` ${o} result(s) available${n?" for search input "+n:""}.`,d=e?"Use Up and Down arrow keys to choose options, press Enter or Tab to select the currently focused option, press Escape to close the menu.":`${c} is focused${r?", type to filter options":""}, press Down arrow key to open the menu.`,{index:p,value:f,label:m,isDisabled:g}=i,h=f?`Focused option: ${m}${g?" - disabled":""}, ${p+1} of ${o}.`:"",b=l.length?l.map((e=>e.label)).join(" "):"N/A";return a.default.createElement(he,{"aria-atomic":"false","aria-live":s,"aria-relevant":"additions text"},a.default.createElement("span",{id:"aria-selection"},"Selected option: "+b),a.default.createElement("span",{id:"aria-context"},h+u+d))},ye=l.default.div.withConfig({displayName:"StyledLoadingDots",componentId:"sc-1j9e0pa-0"})(["display:flex;align-self:center;text-align:center;margin-right:0.25rem;padding:",";> div{border-radius:100%;display:inline-block;",":nth-of-type(1){animation-delay:-0.272s;}:nth-of-type(2){animation-delay:-0.136s;}}"],(({theme:e})=>e.loader.padding),(({theme:{loader:e}})=>n.css(["width:",";height:",";animation:",";background-color:",";"],e.size,e.size,e.animation,e.color))),ve=()=>a.default.createElement(ye,{"aria-hidden":!0,className:"rfs-loading-dots"},a.default.createElement("div",null),a.default.createElement("div",null),a.default.createElement("div",null)),we=l.default.svg.withConfig({displayName:"ClearSvg",componentId:"sc-1v5ipi2-0"})(["fill:currentColor;",""],(({theme:e})=>n.css(["width:",";height:",";animation:",";transition:",";"],e.icon.clear.width,e.icon.clear.height,e.icon.clear.animation,e.icon.clear.transition))),Oe=()=>a.default.createElement(we,{"aria-hidden":!0,viewBox:"0 0 14 16",className:"rfs-clear-icon"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})),xe=l.default.div.withConfig({displayName:"IndicatorIconsWrapper",componentId:"sc-1561oeb-0"})(["display:flex;flex-shrink:0;align-items:center;align-self:stretch;box-sizing:border-box;"]),Ce=l.default.div.withConfig({displayName:"IndicatorIcon",componentId:"sc-1561oeb-1"})(["height:100%;display:flex;align-items:center;box-sizing:border-box;color:",";padding:",";:hover{color:",";}",""],(({theme:e})=>e.icon.color),(({theme:e})=>e.icon.padding),(({theme:e})=>e.icon.hoverColor),(({theme:e})=>e.icon.css)),Se=l.default.div.withConfig({displayName:"Caret",componentId:"sc-1561oeb-2"})(["transition:",";border-top:"," dashed;border-left:"," solid transparent;border-right:"," solid transparent;",""],(({theme:e})=>e.icon.caret.transition),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e})=>e.icon.caret.size),(({theme:e,menuOpen:t,isInvalid:o})=>t&&n.css(["transform:rotate(180deg);color:",";"],o?e.color.danger:e.color.caretActive||e.color.primary))),Ee=l.default.div.withConfig({displayName:"Separator",componentId:"sc-1561oeb-3"})(["width:1px;margin:0.5rem 0;align-self:stretch;box-sizing:border-box;background-color:",";"],(({theme:e})=>e.color.iconSeparator||e.color.border)),Ie=t.memo((({menuOpen:e,clearIcon:t,caretIcon:n,isInvalid:o,showClear:r,isLoading:i,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:u})=>{const d=t=>"function"==typeof t?t({menuOpen:e,isLoading:i,isInvalid:o,isDisabled:l}):t;return a.default.createElement(xe,null,r&&!i&&a.default.createElement(Ce,{onTouchEnd:u,onMouseDown:u,"data-testid":undefined},d(t)||a.default.createElement(Oe,null)),i&&(s||a.default.createElement(ve,null)),a.default.createElement(Ee,null),a.default.createElement(Ce,{onTouchEnd:c,onMouseDown:c,"data-testid":undefined},d(n)||a.default.createElement(Se,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ie.displayName="IndicatorIcons";const De=l.default.div.attrs(f).withConfig({displayName:"SelectWrapper",componentId:"kcrmu9-0"})(["position:relative;box-sizing:border-box;",""],(({theme:e})=>e.select.css)),Re=l.default.div.withConfig({displayName:"ValueWrapper",componentId:"kcrmu9-1"})(["flex:1 1 0%;display:flex;flex-wrap:wrap;overflow:hidden;position:relative;align-items:center;box-sizing:border-box;padding:",";"],(({theme:e})=>e.control.padding)),je=l.default.div.withConfig({displayName:"ControlWrapper",componentId:"kcrmu9-2"})(["outline:0;display:flex;flex-wrap:wrap;cursor:default;position:relative;align-items:center;box-sizing:border-box;justify-content:space-between;"," "," ",""],(({isDisabled:e,isFocused:t,isInvalid:o,theme:{control:r,color:i}})=>n.css(["transition:",";border-style:",";border-width:",";border-radius:",";min-height:",";border-color:",";"," "," "," ",""],r.transition,r.borderStyle,r.borderWidth,r.borderRadius,r.height||r.minHeight,o?i.danger:t?r.focusedBorderColor:i.border,r.height?`height: ${r.height};`:"",e?"pointer-events:none;user-select:none;":"",r.backgroundColor||e?`background-color: ${e?i.disabled:r.backgroundColor};`:"",t?`box-shadow: ${r.boxShadow} ${o?i.dangerLight:r.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),ze=t.forwardRef((({async:e,isMulti:o,inputId:r,selectId:i,required:l,ariaLive:s,autoFocus:c,isLoading:u,onKeyDown:d,clearIcon:p,caretIcon:f,isInvalid:m,ariaLabel:g,menuWidth:h,isDisabled:E,inputDelay:I,onMenuOpen:D,onMenuClose:R,onInputBlur:P,isClearable:V,themeConfig:A,loadingNode:B,initialValue:$,onInputFocus:q,onInputChange:W,ariaLabelledBy:U,onOptionChange:Y,onSearchChange:_,getOptionLabel:X,getOptionValue:G,itemKeySelector:J,openMenuOnFocus:Z,menuPortalTarget:ee,isAriaLiveEnabled:te,menuOverscanCount:ne,blurInputOnSelect:oe,menuItemDirection:re,renderOptionLabel:ie,renderMultiOptions:ce,menuScrollDuration:ue,filterIgnoreAccents:de,hideSelectedOptions:fe,getIsOptionDisabled:me,getFilterOptionString:he,isSearchable:ye=!0,lazyLoadMenu:ve=!1,openMenuOnClick:we=!0,filterIgnoreCase:Oe=!0,tabSelectsOption:xe=!0,closeMenuOnSelect:Ce=!0,scrollMenuIntoView:Se=!0,backspaceClearsValue:Ee=!0,filterMatchFrom:Me=y,menuPosition:ze=b,options:Le=k,loadingMsg:Ne="Loading..",placeholder:Pe="Select option..",noOptionsMsg:Te="No options",menuItemSize:Fe=35,menuMaxHeight:Ve=300},Ae)=>{const Be=t.useRef(!1),$e=t.useRef(),qe=t.useRef(!1),We=t.useRef(),Ke=t.useRef(),He=t.useRef(null),Ue=t.useRef(null),Ye=t.useRef(null),_e=t.useRef(null),[Xe,Ge]=t.useState(""),[Je,Qe]=t.useState(!1),[Ze,et]=t.useState(!1),[tt,nt]=t.useState(null),[ot,rt]=t.useState(M),it=t.useMemo((()=>(e=>e&&L(e)?F(K,e):K)(A)),[A]),at=t.useMemo((()=>X||(e=>e.label)),[X]),lt=t.useMemo((()=>G||(e=>e.value)),[G]),st=t.useMemo((()=>ie||at),[ie,at]),ct=((e,n=0)=>{const[o,r]=t.useState(e);return t.useEffect((()=>{if(n<=0)return;const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),n<=0?e:o})(Xe,I),[ut,dt]=t.useState((()=>T($,lt,at))),pt=ae(Le,ct,Me,ut,lt,at,me,he,Oe,de,o,fe,e),[ft,mt]=se(Ue,_e,Je,ze,Fe,Ve,pt.length,!!ee,ue,Se,D,R),gt=()=>{var e;return null===(e=Ye.current)||void 0===e?void 0:e.blur()},ht=()=>{var e;return null===(e=Ye.current)||void 0===e?void 0:e.focus()},bt=e=>{var t;return null===(t=He.current)||void 0===t?void 0:t.scrollToItem(e)},yt=t.useCallback((e=>{if(!z(pt))return void(!Be.current&&Qe(!0));const t=o?-1:pt.findIndex((e=>e.isSelected)),n=t>-1?t:e===S?0:pt.length-1;!Be.current&&Qe(!0),rt(ke({index:n},pt[n])),bt(n)}),[o,pt]),vt=t.useCallback((e=>{dt((t=>t.filter((t=>t.value!==e))))}),[]),wt=t.useCallback(((e,t)=>{t?o&&vt(e.value):dt((t=>o?[...t,e]:[e]));(j(oe)?oe:H)?gt():Ce&&(Qe(!1),Ge(""))}),[o,Ce,vt,oe]);t.useImperativeHandle(Ae,(()=>({empty:!z(ut),menuOpen:Je,blur:gt,focus:ht,clearValue:()=>{wt.length&&dt(k),ot.data&&rt(M)},setValue:e=>{const t=T(e,lt,at);dt(t)},toggleMenu:e=>{!0===e||void 0===e&&!Je?(!Ze&&ht(),yt(S)):gt()}}))),t.useEffect((()=>{c&&ht()}),[]),t.useEffect((()=>{Be.current=Je}),[Je]),t.useEffect((()=>{Ke.current=Y,We.current=_}),[Y,_]),t.useEffect((()=>{Ze&&Z&&yt(S)}),[Ze,Z,yt]),t.useEffect((()=>{const{current:e}=We;e&&qe.current&&(qe.current=!1,e(ct))}),[ct]),le((()=>{const{current:e}=Ke;if(e){e(o?ut.map((e=>e.data)):z(ut)?ut[0].data:null)}}),[o,ut]),le((()=>{const{length:t}=pt,n=t>0&&(e||t!==Le.length||0===$e.current);0===t?rt(M):(1===t||n)&&(rt(ke({index:0},pt[0])),bt(0)),$e.current=t}),[e,Le,pt]);const Ot=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=ot;e&&!r&&wt({data:e,value:t,label:n},o)},xt=e=>{const t="ArrowDown"===e,n=t?S:C;Je?(e=>{if(!z(pt))return;const t=e===x?(ot.index+1)%pt.length:ot.index>0?ot.index-1:pt.length-1;tt&&nt(null),rt(ke({index:t},pt[t])),bt(t)})(t?x:O):yt(n)},Ct=e=>{if(E)return;Ze||ht();const t="INPUT"!==e.currentTarget.tagName;Je?t&&(Je&&Qe(!1),Xe&&Ge("")):we&&yt(S),t&&e.preventDefault()},St=t.useCallback((e=>{null==P||P(e),et(!1),Qe(!1),Ge("")}),[P]),Et=t.useCallback((e=>{null==q||q(e),et(!0)}),[q]),It=t.useCallback((e=>{const t=e.currentTarget.value||"";qe.current=!0,null==W||W(t),!Be.current&&Qe(!0),Ge(t)}),[W]),Mt=t.useCallback((e=>{dt(k),N(e),ht()}),[]),kt=t.useCallback((e=>{ht(),Be.current?Qe(!1):yt(S),N(e)}),[yt]),Dt=!ve||ve&&Je,Rt=E||!ye||!!tt,jt=!(!V||E||!z(ut)),zt=E||we?void 0:kt;return a.default.createElement(n.ThemeProvider,{theme:it},a.default.createElement(De,{id:i,"aria-controls":r,"aria-expanded":Je,onKeyDown:e=>{if(E)return;if(d&&(d(e,Xe,ot),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":xt(t);break;case"ArrowLeft":case"ArrowRight":if(!o||Xe||ce)return;(e=>{if(!z(ut))return;let t=-1;const n=ut.length-1,o=tt?ut.findIndex((e=>e.value===tt)):-1;t=e===v?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const r=t>=0?ut[t].value:null;ot.data&&rt(M),r!==tt&&nt(r)})("ArrowLeft"===t?w:v);break;case" ":if(Xe)return;if(Je){if(!ot.data)return;Ot()}else yt(S);break;case"Enter":Je&&229!==e.keyCode&&Ot();break;case"Escape":Je&&(Qe(!1),Ge(""));break;case"Tab":if(!Je||!xe||!ot.data||e.shiftKey)return;Ot();break;case"Delete":case"Backspace":if(Xe)return;if(tt){const e=ut.findIndex((e=>e.value===tt)),t=e>-1&&e<ut.length-1?ut[e+1].value:null;vt(tt),nt(t)}else{if(!Ee)return;if(!z(ut))break;if(o&&!ce){const{value:e}=ut[ut.length-1];vt(e)}else V&&dt(k)}break;default:return}e.preventDefault()}},a.default.createElement(je,{ref:_e,isInvalid:m,isFocused:Ze,isDisabled:E,className:"rfs-control-container",onTouchEnd:Ct,onMouseDown:Ct,"data-testid":undefined},a.default.createElement(Re,null,a.default.createElement(pe,{isMulti:o,inputValue:Xe,placeholder:Pe,selectedOption:ut,focusedMultiValue:tt,renderOptionLabel:st,renderMultiOptions:ce,removeSelectedOption:vt}),a.default.createElement(ge,{id:r,ref:Ye,required:l,ariaLabel:g,inputValue:Xe,readOnly:Rt,onBlur:St,onFocus:Et,onChange:It,ariaLabelledBy:U,selectedOption:ut})),a.default.createElement(Ie,{menuOpen:Je,clearIcon:p,caretIcon:f,isInvalid:m,isLoading:u,showClear:jt,isDisabled:E,loadingNode:B,onClearMouseDown:Mt,onCaretMouseDown:zt})),Dt&&a.default.createElement(Q,{menuRef:Ue,menuOpen:Je,isLoading:u,menuTop:ft,height:mt,itemSize:Fe,loadingMsg:Ne,menuOptions:pt,fixedSizeListRef:He,noOptionsMsg:Te,selectOption:wt,direction:re,itemKeySelector:J,overscanCount:ne,menuPortalTarget:ee,width:h||it.menu.width,onMenuMouseDown:e=>{N(e),ht()},renderOptionLabel:st,focusedOptionIndex:ot.index}),te&&a.default.createElement(be,{ariaLive:s,menuOpen:Je,isFocused:Ze,ariaLabel:g,inputValue:Xe,isSearchable:ye,focusedOption:ot,selectedOption:ut,optionCount:pt.length})))}));ze.displayName="Select",e.Select=ze,Object.defineProperty(e,"__esModule",{value:!0})}));
import React, { useRef, useMemo, useState, useEffect, forwardRef, useCallback, useImperativeHandle } from 'react';
import { mergeDeep, isBoolean, isPlainObject, normalizeValue, IS_TOUCH_DEVICE, isArrayWithLength, suppressMouseOrTouchEvent } from './utils';
import { isBoolean, mergeThemes, normalizeValue, IS_TOUCH_DEVICE, isArrayWithLength, suppressMouseOrTouchEvent } from './utils';
import { ValueIndexEnum, FilterMatchEnum, OptionIndexEnum, MenuPositionEnum, EMPTY_ARRAY, SELECT_WRAPPER_ATTRS, PLACEHOLDER_DEFAULT, LOADING_MSG_DEFAULT, CONTROL_CONTAINER_CLS, FOCUSED_OPTION_DEFAULT, NO_OPTIONS_MSG_DEFAULT, MENU_ITEM_SIZE_DEFAULT, MENU_MAX_HEIGHT_DEFAULT, CONTROL_CONTAINER_TESTID } from './constants';
import { DEFAULT_THEME } from './theme';
import styled, { css, ThemeProvider } from 'styled-components';

@@ -62,3 +61,3 @@ import { Menu, Value, AriaLiveRegion, AutosizeInput, IndicatorIcons } from './components';

const Select = forwardRef(({ async, isMulti, inputId, selectId, required, ariaLive, autoFocus, isLoading, onKeyDown, clearIcon, caretIcon, isInvalid, ariaLabel, menuWidth, isDisabled, inputDelay, onMenuOpen, onMenuClose, onInputBlur, isClearable, themeConfig, loadingNode, initialValue, onInputFocus, onInputChange, ariaLabelledBy, onOptionChange, onSearchChange, getOptionLabel, getOptionValue, itemKeySelector, openMenuOnFocus, menuPortalTarget, isAriaLiveEnabled, menuOverscanCount, blurInputOnSelect, menuItemDirection, renderOptionLabel, renderMultiOptions, menuScrollDuration, filterIgnoreAccents, hideSelectedOptions, getIsOptionDisabled, getFilterOptionString, isSearchable = true, lazyLoadMenu = false, openMenuOnClick = true, filterIgnoreCase = true, tabSelectsOption = true, closeMenuOnSelect = true, scrollMenuIntoView = true, backspaceClearsValue = true, filterMatchFrom = FilterMatchEnum.ANY, menuPosition = MenuPositionEnum.BOTTOM, options = EMPTY_ARRAY, loadingMsg = LOADING_MSG_DEFAULT, placeholder = PLACEHOLDER_DEFAULT, noOptionsMsg = NO_OPTIONS_MSG_DEFAULT, menuItemSize = MENU_ITEM_SIZE_DEFAULT, menuMaxHeight = MENU_MAX_HEIGHT_DEFAULT }, ref) => {
// Instance prop & DOM node refs
// Instance prop refs (primitive/function type)
const menuOpenRef = useRef(false);

@@ -69,2 +68,3 @@ const prevMenuOptionsLength = useRef();

const onOptionChangeRef = useRef();
// DOM element refs
const listRef = useRef(null);

@@ -81,7 +81,3 @@ const menuRef = useRef(null);

// Memoized DefaultTheme object for styled-components ThemeProvider
const theme = useMemo(() => {
return isPlainObject(themeConfig)
? mergeDeep(DEFAULT_THEME, themeConfig)
: DEFAULT_THEME;
}, [themeConfig]);
const theme = useMemo(() => mergeThemes(themeConfig), [themeConfig]);
// Memoized callback functions referencing optional function properties on Select.tsx

@@ -217,10 +213,10 @@ const getOptionLabelFn = useMemo(() => getOptionLabel || ((data) => data.label), [getOptionLabel]);

const { current: onChangeFn } = onOptionChangeRef;
if (!onChangeFn)
return;
const normalizedOptionValue = isMulti
? selectedOption.map((x) => x.data)
: isArrayWithLength(selectedOption)
? selectedOption[0].data
: null;
onChangeFn(normalizedOptionValue);
if (onChangeFn) {
const normalizedOptionValue = isMulti
? selectedOption.map((x) => x.data)
: isArrayWithLength(selectedOption)
? selectedOption[0].data
: null;
onChangeFn(normalizedOptionValue);
}
}, [isMulti, selectedOption]);

@@ -423,10 +419,10 @@ /**

const handleOnClearMouseDown = useCallback((e) => {
setSelectedOption(EMPTY_ARRAY);
suppressMouseOrTouchEvent(e);
setSelectedOption(EMPTY_ARRAY);
focusInput();
}, []);
const handleOnCaretMouseDown = useCallback((e) => {
suppressMouseOrTouchEvent(e, e.type === 'mousedown');
focusInput();
menuOpenRef.current ? setMenuOpen(false) : openMenuAndFocusOption(OptionIndexEnum.FIRST);
suppressMouseOrTouchEvent(e);
}, [openMenuAndFocusOption]);

@@ -433,0 +429,0 @@ const renderMenu = !lazyLoadMenu || (lazyLoadMenu && menuOpen);

export * from './misc';
export * from './menu';
export * from './theme';
export * from './device';
export * from './misc';
export * from './menu';
export * from './theme';
export * from './device';

@@ -5,2 +5,3 @@ import { OPTION_CLS, EMPTY_ARRAY, OPTION_FOCUSED_CLS, OPTION_SELECTED_CLS, OPTION_DISABLED_CLS, } from '../constants';

* @private
*
* Strips all diacritics from a string.

@@ -97,3 +98,3 @@ * May not be supported by all legacy browsers (IE11 >=).

(key !== 'animation' && isPlainObject(sourceProp))
? !!target[key]
? target[key]
? mergeDeep(target[key], sourceProp)

@@ -100,0 +101,0 @@ : sourceProp

{
"name": "react-functional-select",
"version": "3.2.2",
"version": "3.3.0",
"description": "Micro-sized and micro-optimized select component for React.js",

@@ -41,7 +41,7 @@ "main": "./dist/index.cjs.js",

"@babel/cli": "^7.13.14",
"@babel/core": "^7.13.14",
"@babel/core": "^7.13.15",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/preset-env": "^7.13.12",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.13.15",
"@babel/preset-react": "^7.13.13",

@@ -53,9 +53,9 @@ "@babel/preset-typescript": "^7.13.0",

"@rollup/plugin-typescript": "^8.2.1",
"@storybook/addon-storysource": "^6.2.3",
"@storybook/addons": "^6.2.3",
"@storybook/addon-storysource": "^6.2.7",
"@storybook/addons": "^6.2.7",
"@storybook/preset-create-react-app": "^3.1.7",
"@storybook/react": "^6.2.3",
"@storybook/react": "^6.2.7",
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^13.1.1",
"@testing-library/user-event": "^13.1.2",
"@types/jest": "^26.0.22",

@@ -75,3 +75,3 @@ "@types/node": "^14.14.37",

"enzyme": "^3.11.0",
"eslint": "^7.23.0",
"eslint": "^7.24.0",
"eslint-config-poetez": "^1.0.0",

@@ -92,6 +92,6 @@ "eslint-config-prettier": "^8.1.0",

"rimraf": "^3.0.2",
"rollup": "^2.44.0",
"rollup": "^2.45.1",
"rollup-plugin-terser": "^7.0.2",
"styled-components": "^5.2.3",
"typescript": "^4.2.3"
"typescript": "^4.2.4"
},

@@ -98,0 +98,0 @@ "peerDependencies": {

@@ -1,5 +0,1 @@

# react-functional-select
> Micro-sized & micro-optimized select component for React.js
[![Latest Stable Version](https://img.shields.io/npm/v/react-functional-select.svg?style=for-the-badge)](https://www.npmjs.com/package/react-functional-select)

@@ -10,10 +6,16 @@ [![Issues](https://img.shields.io/github/issues/based-ghost/react-functional-select.svg?style=for-the-badge)](https://github.com/based-ghost/react-functional-select/issues)

# react-functional-select
> Micro-sized & micro-optimized select component for React.js
See the accompanying [Interactive Storybook UI Site](https://based-ghost.github.io/react-functional-select/) for live demos and detailed docs.
<strong>Key features:</strong>
- Fully-featured <strong><em>AND</em></strong> lightweight: ~7 kB (gzipped)!
- Offers nearly all customization features found in [`react-select`](https://github.com/JedWatson/react-select), in a modern, functional design (inspired by react-select, you will find much of the API similar)
- Extremely lightweight: ~6 kB (gzipped)!
- Advanced features like async mode, portal support, animations, and option virtualization
- Fully-featured & customizable: API comparable to [`react-select`](https://github.com/JedWatson/react-select)
- Engineered for ultimate performance: effortlessly scroll, filter, and key through datasets numbering in the tens of thousands using [`react-window`](https://github.com/bvaughn/react-window) + performance-first code. [Demo of handling 50,000 options here!](https://based-ghost.github.io/react-functional-select/?path=/story/react-functional-select--windowing)
- Extensible styling API with [`styled-components`](https://github.com/styled-components/styled-components)
- Opt-in properties to make the component fully accessible
- Effortlessly scroll, filter, and key through datasets numbering in the tens of thousands via [`react-window`](https://github.com/bvaughn/react-window) + performance-first code. [See in memory load tests from 100 to 50,000 options here!](https://based-ghost.github.io/react-functional-select/?path=/story/react-functional-select--windowing)
- Async mode for fetching dynamic options from a remote server using the search input value (starting in `v2.1.0`)
- Accessible

@@ -27,3 +29,3 @@ <strong>Peer dependencies:</strong>

Essentially, this is a focused subset of [`react-select`](https://github.com/JedWatson/react-select)'s API that is engineered for ultimate performance and minimal bundle size. It is built entirely using `React Hooks` and `FunctionComponents`. The primary design principal revolves around weighing the cost/benefits of adding a feature against the impact to performance & # of lines of code its addition would have.
Essentially, this is a focused subset of [`react-select`](https://github.com/JedWatson/react-select)'s API that is engineered for ultimate performance and minimal bundle size. It is built entirely with the `React Hooks` API (no legacy class components). The primary design principal revolves around weighing the cost/benefits of adding a feature against the impact to performance and/or number of lines of code its addition would have.

@@ -48,5 +50,7 @@ Any expected features not in the current API is likely due to the reason that such features would have added significant overhead to the package. In addition, if we expose the right public methods and/or callback properties, this feature should be trivial to add to wrapping components - proper decoupling and abstraction of code is key to keeping such channels open for similar customizations that can be kept out of this package. Please, feel free to offer enhancement ideas with/without technical solutions.

import { Select } from 'react-functional-select';
import { useState, useEffect, useCallback, FunctionComponent } from 'react';
import { Card, CardHeader, CardBody, Container, SelectContainer } from './helpers/styled';
import { useState, useEffect, useCallback } from 'react';
import { Card, CardHeader, CardBody, Container, SelectContainer } from '../shared/components';
import type { FunctionComponent } from 'react';
type Option = Readonly<{

@@ -58,2 +62,6 @@ id: number;

type SingleSelectDemoProps = Readonly<{
isDisabled: boolean;
}>;
const _cityOptions: Option[] = [

@@ -67,6 +75,4 @@ { id: 1, city: 'Austin', state: 'TX' },

const SingleSelectDemo: FunctionComponent = () => {
const SingleSelectDemo: FunctionComponent<SingleSelectDemoProps> = ({ isDisabled }) => {
const [isInvalid, setIsInvalid] = useState<boolean>(false);
const [isDisabled, setIsDisabled] = useState<boolean>(false);
const [isClearable, setIsClearable] = useState<boolean>(true);
const [selectedOption, setSelectedOption] = useState<Option | null>(null);

@@ -91,6 +97,6 @@

<Select
isClearable
isInvalid={isInvalid}
options={_cityOptions}
isDisabled={isDisabled}
isClearable={isClearable}
onOptionChange={onOptionChange}

@@ -106,2 +112,4 @@ getOptionValue={getOptionValue}

};
export default SingleSelectDemo;
```

@@ -111,3 +119,3 @@

All properties are technically optional (with a few having default values). Very similar with [`react-select`](https://github.com/JedWatson/react-select)'s API.
All properties are technically optional (with a few having default values). Very similar to [`react-select`](https://github.com/JedWatson/react-select)'s API.

@@ -114,0 +122,0 @@ > <strong><em>Note that the following non-primitive properties should be properly memoized if defined:</em></strong><br>`clearIcon`, `caretIcon`, `options`, `renderOptionLabel`, `renderMultiOptions`, `onMenuOpen`, `onOptionChange`, `onKeyDown`, `getOptionLabel`, `getOptionLabel`, `getOptionValue`, `onInputBlur`, `onInputFocus`, `onInputChange`, `onSearchChange`, `getIsOptionDisabled`, `getFilterOptionString`, `themeConfig`

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