Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0 to 3.2.1

25

dist/components/aria/AriaLiveRegion.js
import React from 'react';
import styled from 'styled-components';
import { isArrayWithLength } from '../../utils';
import { ARIA_LIVE_SELECTION_ID, ARIA_LIVE_CONTEXT_ID } from '../../constants';

@@ -16,22 +15,22 @@ const A11yText = styled.span `

`;
const AriaLiveRegion = ({ menuOpen, isFocused, ariaLabel, inputValue, optionCount, isSearchable, focusedOption, selectedOption, ariaLive = 'polite' }) => {
const AriaLiveRegion = ({ menuOpen, isFocused, inputValue, optionCount, isSearchable, focusedOption, selectedOption, ariaLive = 'polite', ariaLabel = 'Select' }) => {
if (!isFocused) {
return null;
}
const optionsMsg = `${optionCount} result(s) available${inputValue ? (' for search input ' + inputValue) : ''}.`;
const focusedMsg = focusedOption.value
? `Focused option: ${focusedOption.label}${focusedOption.isDisabled ? ' - disabled' : ''}, ${focusedOption.index + 1} of ${optionCount}.`
: '';
// Message text for "aria-selection" SPAN
const optionsMsg = ` ${optionCount} result(s) available${inputValue ? (' for search input ' + inputValue) : ''}.`;
const menuMsg = menuOpen
? '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.'
: `${ariaLabel || 'Select'} is focused${isSearchable ? ', type to filter options' : ''}, press Down arrow key to open the menu.`;
const selectedOptionLabel = isArrayWithLength(selectedOption)
? selectedOption.map(({ label }) => label).join(' ')
: 'N/A';
const selectedOptionMsg = 'Selected option: ' + selectedOptionLabel;
const extendedFeedbackMsg = focusedMsg + optionsMsg + menuMsg;
: `${ariaLabel} is focused${isSearchable ? ', type to filter options' : ''}, press Down arrow key to open the menu.`;
const { index, value, label, isDisabled } = focusedOption;
const focusedMsg = value
? `Focused option: ${label}${isDisabled ? ' - disabled' : ''}, ${index + 1} of ${optionCount}.`
: '';
// Message text for "aria-context" SPAN
const labels = selectedOption.length ? selectedOption.map((x) => x.label).join(' ') : 'N/A';
const selectedOptionMsg = 'Selected option: ' + labels;
return (React.createElement(A11yText, { "aria-atomic": 'false', "aria-live": ariaLive, "aria-relevant": 'additions text' },
React.createElement("span", { id: ARIA_LIVE_SELECTION_ID }, selectedOptionMsg),
React.createElement("span", { id: ARIA_LIVE_CONTEXT_ID }, extendedFeedbackMsg)));
React.createElement("span", { id: ARIA_LIVE_CONTEXT_ID }, focusedMsg + optionsMsg + menuMsg)));
};
export default AriaLiveRegion;

@@ -48,8 +48,5 @@ import React, { memo } from 'react';

const IndicatorIcons = memo(({ menuOpen, clearIcon, caretIcon, isInvalid, showClear, isLoading, isDisabled, loadingNode, onCaretMouseDown, onClearMouseDown }) => {
const customIconContext = isFunction(caretIcon) || isFunction(clearIcon)
? { menuOpen, isLoading: !!isLoading, isInvalid: !!isInvalid, isDisabled: !!isDisabled }
: undefined;
const renderIconFn = (renderer) => {
return isFunction(renderer)
? renderer(customIconContext)
? renderer({ menuOpen, isLoading, isInvalid, isDisabled })
: renderer;

@@ -56,0 +53,0 @@ };

import React, { memo, useRef, useState, Fragment, forwardRef } from 'react';
import styled from 'styled-components';
import { useUpdateEffect } from '../../hooks';
import { AUTOSIZE_INPUT_ATTRIBUTES } from '../../constants';
import { AUTOSIZE_INPUT_ATTRS } from '../../constants';
import { isArrayWithLength, IS_MICROSOFT_BROWSER } from '../../utils';

@@ -20,3 +20,3 @@ const _inputMinWidthPx = 2;

`;
const Input = styled.input `
const Input = styled.input.attrs(AUTOSIZE_INPUT_ATTRS) `
border: 0;

@@ -48,3 +48,3 @@ outline: 0;

const [inputWidth, setInputWidth] = useState(_inputMinWidthPx);
const isInvalid = required && !isArrayWithLength(selectedOption);
const isInvalid = !!required && !isArrayWithLength(selectedOption);
useUpdateEffect(() => {

@@ -56,3 +56,3 @@ if (sizerRef.current) {

return (React.createElement(Fragment, null,
React.createElement(Input, Object.assign({ id: id, ref: ref, isInvalid: true, onBlur: onBlur, onFocus: onFocus, value: inputValue, readOnly: readOnly, required: isInvalid, "aria-label": ariaLabel, style: { width: inputWidth } }, AUTOSIZE_INPUT_ATTRIBUTES, { "aria-labelledby": ariaLabelledBy, onChange: !readOnly ? onChange : undefined })),
React.createElement(Input, { id: id, ref: ref, isInvalid: true, onBlur: onBlur, onFocus: onFocus, value: inputValue, readOnly: readOnly, required: isInvalid, "aria-label": ariaLabel, style: { width: inputWidth }, "aria-labelledby": ariaLabelledBy, onChange: !readOnly ? onChange : undefined }),
React.createElement(SizerDiv, { ref: sizerRef }, inputValue)));

@@ -59,0 +59,0 @@ }));

import type { HTMLAttributes, InputHTMLAttributes } from 'react';
export declare const ARIA_LIVE_CONTEXT_ID = "aria-selection";
export declare const ARIA_LIVE_SELECTION_ID = "aria-context";
export declare const ARIA_LIVE_CONTEXT_ID = "aria-context";
export declare const ARIA_LIVE_SELECTION_ID = "aria-selection";
export declare const OPTION_CLS = "rfs-option";

@@ -25,3 +25,3 @@ export declare const OPTION_FOCUSED_CLS: string;

*/
export declare const SELECT_WRAPPER_ATTRIBUTES: HTMLAttributes<HTMLDivElement> & {
export declare const SELECT_WRAPPER_ATTRS: HTMLAttributes<HTMLDivElement> & {
'data-testid'?: string;

@@ -32,4 +32,4 @@ };

*/
export declare const AUTOSIZE_INPUT_ATTRIBUTES: InputHTMLAttributes<HTMLInputElement> & {
export declare const AUTOSIZE_INPUT_ATTRS: InputHTMLAttributes<HTMLInputElement> & {
'data-testid'?: string;
};
// id attributes for AriaLiveRegion.tsx innerHTML content
export const ARIA_LIVE_CONTEXT_ID = 'aria-selection';
export const ARIA_LIVE_SELECTION_ID = 'aria-context';
export const ARIA_LIVE_CONTEXT_ID = 'aria-context';
export const ARIA_LIVE_SELECTION_ID = 'aria-selection';
// classNames (menu options)

@@ -29,3 +29,3 @@ export const OPTION_CLS = 'rfs-option';

*/
export const SELECT_WRAPPER_ATTRIBUTES = {
export const SELECT_WRAPPER_ATTRS = {
role: 'combobox',

@@ -39,3 +39,3 @@ 'aria-haspopup': 'listbox',

*/
export const AUTOSIZE_INPUT_ATTRIBUTES = {
export const AUTOSIZE_INPUT_ATTRS = {
tabIndex: 0,

@@ -42,0 +42,0 @@ type: 'text',

@@ -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={index:-1},C=[],O={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"},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"}}},S=/[\u0300-\u036f]/g;function I(e){return"boolean"==typeof e}function E(e){return"function"==typeof e}function M(e){return Array.isArray(e)&&!!e.length}function k(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const z=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function L(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(S,"")}(o):o}const N=(e,t,n)=>{const o=Array.isArray(e)?e:k(e)?[e]:C;return M(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},D=(e,t)=>{const n={...e};return Object.keys(t).forEach((o=>{const i=t[o];n[o]="animation"!==o&&k(i)?e[o]?D(e[o],i):i:i||""})),n};function R(e){return T(e)?window.pageYOffset:e.scrollTop}function T(e){return e===document.documentElement||e===document.body||e===window}const V=/(auto|scroll)/;function A({overflow:e,overflowX:t,overflowY:n}){return V.test(`${e}${t}${n}`)}function F(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)&&A(t))return n}return n}function B(e,t,n=300,o){let i=0;const a=R(e),r=t-a;requestAnimationFrame((function t(){var l;i+=5,function(e,t){T(e)?window.scrollTo(0,t):e.scrollTop=t}(e,r*((l=(l=i)/n-1)*l*l+1)+a),i<n?requestAnimationFrame(t):null==o||o()}))}const $="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,q="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),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),!M(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)&&!M(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:z,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||M(i)&&!s)?M(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(C),b=m?"":n,v=I(f)?f:!!c;return e.useEffect((()=>{const e=L(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=L(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(!1),h=e.useRef(!s),[b,v]=e.useState(r),[w,y]=e.useState(!1);e.useEffect((()=>{h.current=!w&&!s}),[w,s]),e.useEffect((()=>{const e=i===d||i===u&&!(e=>{if(!e)return!0;const t=F(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-R(t)-n>=o})(t.current);y(e)}),[t,i]),ne((()=>{if(o){const e=e=>{null==f||f(),e&&(g.current=!0,v(e))};h.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=F(e),d=R(s),u=s.getBoundingClientRect().height-d-i,c=u<a;if(c||!n)return void o(c?u:void 0);B(s,r-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(t.current,c,p,e):e()}else null==m||m(),g.current&&(g.current=!1,v(r))}),[t,o,m,f,r,p,c]);const x=Math.min(b,l*a);return[w?((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)"})(x,t.current,n.current):void 0,x]},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.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),q&&"::-ms-clear{display:none;}"),re=e.memo(e.forwardRef((({id:t,onBlur:n,onFocus:o,readOnly:i,required:r,onChange:l,ariaLabel:d,inputValue:u,ariaLabelledBy:c,selectedOption:p},f)=>{const m=e.useRef(null),[g,h]=e.useState(2),b=r&&!M(p);return ne((()=>{m.current&&h(m.current.scrollWidth+2)}),[u]),a.default.createElement(e.Fragment,null,a.default.createElement(ae,Object.assign({id:t,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:i,required:b,"aria-label":d,style:{width:g}},s,{"aria-labelledby":c,onChange:i?void 0:l})),a.default.createElement(ie,{ref:m},u))})));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,ariaLabel:n,inputValue:o,optionCount:i,isSearchable:r,focusedOption:l,selectedOption:s,ariaLive:d="polite"})=>{if(!t)return null;const u=`${i} result(s) available${o?" for search input "+o:""}.`,c=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${i}.`:"",p=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.":`${n||"Select"} is focused${r?", type to filter options":""}, press Down arrow key to open the menu.`,f=M(s)?s.map((({label:e})=>e)).join(" "):"N/A",m=c+u+p;return a.default.createElement(le,{"aria-atomic":"false","aria-live":d,"aria-relevant":"additions text"},a.default.createElement("span",{id:"aria-context"},"Selected option: "+f),a.default.createElement("span",{id:"aria-selection"},m))},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=E(n)||E(t)?{menuOpen:e,isLoading:!!r,isInvalid:!!o,isDisabled:!!l}:void 0,p=e=>E(e)?e(c):e;return a.default.createElement(fe,null,i&&!r&&a.default.createElement(me,{onTouchEnd:u,onMouseDown:u},p(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},p(n)||a.default.createElement(ge,{"aria-hidden":!0,menuOpen:e,isInvalid:o,className:"rfs-caret-icon"})))}));be.displayName="IndicatorIcons";const ve=r.default.div.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:s,ariaLive:d,autoFocus:u,isLoading:w,onKeyDown:y,clearIcon:S,caretIcon:E,isInvalid:L,ariaLabel:R,menuWidth:T,isDisabled:V,inputDelay:A,onMenuOpen:F,onMenuClose:B,onInputBlur:q,isClearable:P,themeConfig:W,loadingNode:j,initialValue:K,onInputFocus:U,onInputChange:Y,ariaLabelledBy:_,onOptionChange:X,onSearchChange:G,getOptionLabel:J,getOptionValue:Q,itemKeySelector:Z,openMenuOnFocus:ie,menuPortalTarget:ae,isAriaLiveEnabled:le,menuOverscanCount:de,blurInputOnSelect:ue,menuItemDirection:ce,renderOptionLabel:pe,renderMultiOptions:fe,menuScrollDuration:me,filterIgnoreAccents:ge,hideSelectedOptions:he,getIsOptionDisabled:xe,getFilterOptionString:Ce,isSearchable:Oe=!0,lazyLoadMenu:Se=!1,openMenuOnClick:Ie=!0,filterIgnoreCase:Ee=!0,tabSelectsOption:Me=!0,closeMenuOnSelect:ke=!0,scrollMenuIntoView:ze=!0,backspaceClearsValue:Le=!0,filterMatchFrom:Ne=p,menuPosition:De=c,options:Re=C,loadingMsg:Te="Loading..",placeholder:Ve="Select option..",noOptionsMsg:Ae="No options",menuItemSize:Fe=35,menuMaxHeight:Be=300},$e)=>{const qe=e.useRef(!1),Pe=e.useRef(),We=e.useRef(!1),je=e.useRef(null),Ke=e.useRef(null),He=e.useRef(null),Ue=e.useRef(null),[Ye,_e]=e.useState(""),[Xe,Ge]=e.useState(!1),[Je,Qe]=e.useState(!1),[Ze,et]=e.useState(null),[tt,nt]=e.useState(x),ot=e.useMemo((()=>k(W)?D(O,W):O),[W]),it=e.useMemo((()=>J||(e=>e.label)),[J]),at=e.useMemo((()=>Q||(e=>e.value)),[Q]),rt=e.useMemo((()=>pe||it),[pe,it]),lt=((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})(Ye,A),[st,dt]=e.useState((()=>N(K,at,it))),ut=te(Re,lt,Ne,st,at,it,xe,Ce,Ee,ge,o,he,n),[ct,pt]=oe(Ke,Ue,Xe,De,Fe,Be,ut.length,!!ae,me,ze,F,B),ft=()=>{var e;return null===(e=He.current)||void 0===e?void 0:e.blur()},mt=()=>{var e;return null===(e=He.current)||void 0===e?void 0:e.focus()},gt=e=>{var t;return null===(t=je.current)||void 0===t?void 0:t.scrollToItem(e)},ht=e.useCallback((e=>{if(!M(ut))return void(!qe.current&&Ge(!0));const t=o?-1:ut.findIndex((e=>e.isSelected)),n=t>-1?t:e===v?0:ut.length-1;!qe.current&&Ge(!0),nt({index:n,...ut[n]}),gt(n)}),[o,ut]),bt=e.useCallback((e=>{dt((t=>t.filter((({value:t})=>t!==e))))}),[]),vt=e.useCallback(((e,t)=>{t?o&&bt(e.value):dt((t=>o?[...t,e]:[e]));(I(ue)?ue:$)?ft():ke&&(Ge(!1),_e(""))}),[o,ke,bt,ue]);e.useImperativeHandle($e,(()=>({empty:!M(st),menuOpen:Xe,blur:ft,focus:mt,clearValue:()=>{vt.length&&dt(C),tt.data&&nt(x)},setValue:e=>{const t=N(e,at,it);dt(t)},toggleMenu:e=>{!0===e||void 0===e&&!Xe?(!Je&&mt(),ht(v)):ft()}}))),e.useEffect((()=>{u&&mt()}),[]),e.useEffect((()=>{qe.current=Xe}),[Xe]),e.useEffect((()=>{Je&&ie&&ht(v)}),[Je,ie,ht]),e.useEffect((()=>{G&&We.current&&(We.current=!1,G(lt))}),[G,lt]),ne((()=>{if(!X)return;const e=o?st.map((e=>e.data)):M(st)?st[0].data:null;X(e)}),[o,st,X]),ne((()=>{const e=ut.length>0&&(n||ut.length!==Re.length||0===Pe.current);0===ut.length?nt(x):(1===ut.length||e)&&(nt({index:0,...ut[0]}),gt(0)),Pe.current=ut.length}),[n,Re,ut]);const wt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=tt;e&&!i&&vt({data:e,value:t,label:n},o)},yt=e=>{const t="ArrowDown"===e,n=t?v:b;Xe?(e=>{if(!M(ut))return;const t=e===h?(tt.index+1)%ut.length:tt.index>0?tt.index-1:ut.length-1;Ze&&et(null),nt({index:t,...ut[t]}),gt(t)})(t?h:g):ht(n)},xt=e=>{if(V)return;Je||mt();const t="INPUT"!==e.currentTarget.tagName;Xe?t&&(Xe&&Ge(!1),Ye&&_e("")):Ie&&ht(v),t&&e.preventDefault()},Ct=e.useCallback((e=>{null==q||q(e),Qe(!1),Ge(!1),_e("")}),[q]),Ot=e.useCallback((e=>{null==U||U(e),Qe(!0)}),[U]),St=e.useCallback((e=>{const t=e.currentTarget.value||"";We.current=!0,null==Y||Y(t),!qe.current&&Ge(!0),_e(t)}),[Y]),It=e.useCallback((e=>{z(e),dt(C),mt()}),[]),Et=e.useCallback((e=>{z(e,"mousedown"===e.type),mt(),qe.current?Ge(!1):ht(v)}),[ht]),Mt=!Se||Se&&Xe,kt=V||!Oe||!!Ze,zt=!(!P||V||!M(st)),Lt=V||Ie?void 0:Et;return a.default.createElement(t.ThemeProvider,{theme:ot},a.default.createElement(ve,Object.assign({id:r,"aria-controls":i,"aria-expanded":Xe,onKeyDown:e=>{if(!(V||y&&(y(e,Ye,tt),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":yt(e.key);break;case"ArrowLeft":case"ArrowRight":if(!o||Ye||fe)return;(e=>{if(!M(st))return;let t=-1;const n=st.length-1,o=Ze?st.findIndex((e=>e.value===Ze)):-1;t=e===f?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const i=t>=0?st[t].value:null;tt.data&&nt(x),i!==Ze&&et(i)})("ArrowLeft"===e.key?m:f);break;case" ":if(Ye)return;if(Xe){if(!tt.data)return;wt()}else ht(v);break;case"Enter":Xe&&229!==e.keyCode&&wt();break;case"Escape":Xe&&(Ge(!1),_e(""));break;case"Tab":if(!Xe||!Me||!tt.data||e.shiftKey)return;wt();break;case"Delete":case"Backspace":if(Ye)return;if(Ze){const e=st.findIndex((e=>e.value===Ze)),t=e>-1&&e<st.length-1?st[e+1].value:null;bt(Ze),et(t)}else{if(!Le)return;if(!M(st))break;if(o&&!fe){const{value:e}=st[st.length-1];bt(e)}else P&&dt(C)}break;default:return}e.preventDefault()}}},l),a.default.createElement(ye,{ref:Ue,isInvalid:L,isFocused:Je,isDisabled:V,className:"rfs-control-container",onTouchEnd:xt,onMouseDown:xt},a.default.createElement(we,null,a.default.createElement(ee,{isMulti:o,inputValue:Ye,placeholder:Ve,selectedOption:st,focusedMultiValue:Ze,renderOptionLabel:rt,renderMultiOptions:fe,removeSelectedOption:bt}),a.default.createElement(re,{id:i,ref:He,required:s,ariaLabel:R,inputValue:Ye,readOnly:kt,onBlur:Ct,onFocus:Ot,onChange:St,ariaLabelledBy:_,selectedOption:st})),a.default.createElement(be,{menuOpen:Xe,clearIcon:S,caretIcon:E,isInvalid:L,isLoading:w,showClear:zt,isDisabled:V,loadingNode:j,onClearMouseDown:It,onCaretMouseDown:Lt})),Mt&&a.default.createElement(H,{menuRef:Ke,menuOpen:Xe,isLoading:w,menuTop:ct,height:pt,itemSize:Fe,loadingMsg:Te,menuOptions:ut,fixedSizeListRef:je,noOptionsMsg:Ae,selectOption:vt,direction:ce,itemKeySelector:Z,overscanCount:de,menuPortalTarget:ae,width:T||ot.menu.width,onMenuMouseDown:e=>{z(e),mt()},renderOptionLabel:rt,focusedOptionIndex:tt.index}),le&&a.default.createElement(se,{ariaLive:d,menuOpen:Xe,isFocused:Je,ariaLabel:R,inputValue:Ye,isSearchable:Oe,focusedOption:tt,selectedOption:st,optionCount:ut.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.2s ease-out both"],t.keyframes(["from{opacity:0;}to{opacity:1;}"])),x={index:-1},C=[],O={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"},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"}}},S=/[\u0300-\u036f]/g;function I(e){return"boolean"==typeof e}function E(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]:C;return E(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=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:k,onClick:()=>i(t),onTouchEnd:()=>i(t)},"✖"))));X.displayName="MultiValue";const G=t.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),J=r.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],G),Q=r.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],G,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:n})=>n&&t.css(["animation:",";"],e.multiValue.animation))),Z=({isMulti:t,inputValue:n,placeholder:o,selectedOption:i,focusedMultiValue:r,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!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(J,null,l(i[0].data)):a.default.createElement(Q,{isMulti:t},o):null,ee=(t,n,o,i,a,r,l,s,d,u,c,f,m)=>{const[g,h]=e.useState(C),b=m?"":n,v=I(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},te=(t,n)=>{const o=e.useRef(!0);e.useEffect((()=>{if(!o.current)return t();o.current=!1}),n)},ne=(t,n,o,i,a,r,l,s,c,p,f,m)=>{const g=e.useRef(!1),h=e.useRef(!s),[b,v]=e.useState(r),[w,y]=e.useState(!1);e.useEffect((()=>{h.current=!w&&!s}),[w,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);y(e)}),[t,i]),te((()=>{if(o){const e=e=>{null==f||f(),e&&(g.current=!0,v(e))};h.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 null==m||m(),g.current&&(g.current=!1,v(r))}),[t,o,m,f,r,p,c]);const x=Math.min(b,l*a);return[w?((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)"})(x,t.current,n.current):void 0,x]},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 te((()=>{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:S,isInvalid:z,ariaLabel:D,menuWidth:R,isDisabled:T,inputDelay:V,onMenuOpen:A,onMenuClose:F,onInputBlur:$,isClearable:q,themeConfig:P,loadingNode:W,initialValue:j,onInputFocus:H,onInputChange:U,ariaLabelledBy:Y,onOptionChange:_,onSearchChange:X,getOptionLabel:G,getOptionValue:J,itemKeySelector:Q,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:Ie=!0,tabSelectsOption:Ee=!0,closeMenuOnSelect:Me=!0,scrollMenuIntoView:ke=!0,backspaceClearsValue:ze=!0,filterMatchFrom:Le=p,menuPosition:Ne=c,options:De=C,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(null),je=e.useRef(null),Ke=e.useRef(null),He=e.useRef(null),[Ue,Ye]=e.useState(""),[_e,Xe]=e.useState(!1),[Ge,Je]=e.useState(!1),[Qe,Ze]=e.useState(null),[et,tt]=e.useState(x),nt=e.useMemo((()=>M(P)?N(O,P):O),[P]),ot=e.useMemo((()=>G||(e=>e.label)),[G]),it=e.useMemo((()=>J||(e=>e.value)),[J]),at=e.useMemo((()=>ce||ot),[ce,ot]),rt=((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})(Ue,V),[lt,st]=e.useState((()=>L(j,it,ot))),dt=ee(De,rt,Le,lt,it,ot,ye,xe,Ie,me,o,ge,n),[ut,ct]=ne(je,He,_e,Ne,Ae,Fe,dt.length,!!ie,fe,ke,A,F),pt=()=>{var e;return null===(e=Ke.current)||void 0===e?void 0:e.blur()},ft=()=>{var e;return null===(e=Ke.current)||void 0===e?void 0:e.focus()},mt=e=>{var t;return null===(t=We.current)||void 0===t?void 0:t.scrollToItem(e)},gt=e.useCallback((e=>{if(!E(dt))return void(!$e.current&&Xe(!0));const t=o?-1:dt.findIndex((e=>e.isSelected)),n=t>-1?t:e===v?0:dt.length-1;!$e.current&&Xe(!0),tt({index:n,...dt[n]}),mt(n)}),[o,dt]),ht=e.useCallback((e=>{st((t=>t.filter((({value:t})=>t!==e))))}),[]),bt=e.useCallback(((e,t)=>{t?o&&ht(e.value):st((t=>o?[...t,e]:[e]));(I(de)?de:B)?pt():Me&&(Xe(!1),Ye(""))}),[o,Me,ht,de]);e.useImperativeHandle(Be,(()=>({empty:!E(lt),menuOpen:_e,blur:pt,focus:ft,clearValue:()=>{bt.length&&st(C),et.data&&tt(x)},setValue:e=>{const t=L(e,it,ot);st(t)},toggleMenu:e=>{!0===e||void 0===e&&!_e?(!Ge&&ft(),gt(v)):pt()}}))),e.useEffect((()=>{d&&ft()}),[]),e.useEffect((()=>{$e.current=_e}),[_e]),e.useEffect((()=>{Ge&&oe&&gt(v)}),[Ge,oe,gt]),e.useEffect((()=>{X&&Pe.current&&(Pe.current=!1,X(rt))}),[X,rt]),te((()=>{if(!_)return;const e=o?lt.map((e=>e.data)):E(lt)?lt[0].data:null;_(e)}),[o,lt,_]),te((()=>{const e=dt.length>0&&(n||dt.length!==De.length||0===qe.current);0===dt.length?tt(x):(1===dt.length||e)&&(tt({index:0,...dt[0]}),mt(0)),qe.current=dt.length}),[n,De,dt]);const vt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=et;e&&!i&&bt({data:e,value:t,label:n},o)},wt=e=>{const t="ArrowDown"===e,n=t?v:b;_e?(e=>{if(!E(dt))return;const t=e===h?(et.index+1)%dt.length:et.index>0?et.index-1:dt.length-1;Qe&&Ze(null),tt({index:t,...dt[t]}),mt(t)})(t?h:g):gt(n)},yt=e=>{if(T)return;Ge||ft();const t="INPUT"!==e.currentTarget.tagName;_e?t&&(_e&&Xe(!1),Ue&&Ye("")):Se&&gt(v),t&&e.preventDefault()},xt=e.useCallback((e=>{null==$||$(e),Je(!1),Xe(!1),Ye("")}),[$]),Ct=e.useCallback((e=>{null==H||H(e),Je(!0)}),[H]),Ot=e.useCallback((e=>{const t=e.currentTarget.value||"";Pe.current=!0,null==U||U(t),!$e.current&&Xe(!0),Ye(t)}),[U]),St=e.useCallback((e=>{k(e),st(C),ft()}),[]),It=e.useCallback((e=>{k(e,"mousedown"===e.type),ft(),$e.current?Xe(!1):gt(v)}),[gt]),Et=!Oe||Oe&&_e,Mt=T||!Ce||!!Qe,kt=!(!q||T||!E(lt)),zt=T||Se?void 0:It;return a.default.createElement(t.ThemeProvider,{theme:nt},a.default.createElement(be,{id:r,"aria-controls":i,"aria-expanded":_e,onKeyDown:e=>{if(T)return;if(w&&(w(e,Ue,et),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":wt(t);break;case"ArrowLeft":case"ArrowRight":if(!o||Ue||pe)return;(e=>{if(!E(lt))return;let t=-1;const n=lt.length-1,o=Qe?lt.findIndex((e=>e.value===Qe)):-1;t=e===f?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const i=t>=0?lt[t].value:null;et.data&&tt(x),i!==Qe&&Ze(i)})("ArrowLeft"===t?m:f);break;case" ":if(Ue)return;if(_e){if(!et.data)return;vt()}else gt(v);break;case"Enter":_e&&229!==e.keyCode&&vt();break;case"Escape":_e&&(Xe(!1),Ye(""));break;case"Tab":if(!_e||!Ee||!et.data||e.shiftKey)return;vt();break;case"Delete":case"Backspace":if(Ue)return;if(Qe){const e=lt.findIndex((e=>e.value===Qe)),t=e>-1&&e<lt.length-1?lt[e+1].value:null;ht(Qe),Ze(t)}else{if(!ze)return;if(!E(lt))break;if(o&&!pe){const{value:e}=lt[lt.length-1];ht(e)}else q&&st(C)}break;default:return}e.preventDefault()}},a.default.createElement(we,{ref:He,isInvalid:z,isFocused:Ge,isDisabled:T,className:"rfs-control-container",onTouchEnd:yt,onMouseDown:yt},a.default.createElement(ve,null,a.default.createElement(Z,{isMulti:o,inputValue:Ue,placeholder:Te,selectedOption:lt,focusedMultiValue:Qe,renderOptionLabel:at,renderMultiOptions:pe,removeSelectedOption:ht}),a.default.createElement(ae,{id:i,ref:Ke,required:l,ariaLabel:D,inputValue:Ue,readOnly:Mt,onBlur:xt,onFocus:Ct,onChange:Ot,ariaLabelledBy:Y,selectedOption:lt})),a.default.createElement(he,{menuOpen:_e,clearIcon:y,caretIcon:S,isInvalid:z,isLoading:u,showClear:kt,isDisabled:T,loadingNode:W,onClearMouseDown:St,onCaretMouseDown:zt})),Et&&a.default.createElement(K,{menuRef:je,menuOpen:_e,isLoading:u,menuTop:ut,height:ct,itemSize:Ae,loadingMsg:Re,menuOptions:dt,fixedSizeListRef:We,noOptionsMsg:Ve,selectOption:bt,direction:ue,itemKeySelector:Q,overscanCount:se,menuPortalTarget:ie,width:R||nt.menu.width,onMenuMouseDown:e=>{k(e),ft()},renderOptionLabel:at,focusedOptionIndex:et.index}),re&&a.default.createElement(le,{ariaLive:s,menuOpen:_e,isFocused:Ge,ariaLabel:D,inputValue:Ue,isSearchable:Ce,focusedOption:et,selectedOption:lt,optionCount:dt.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 i,useState as r,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 y}from"react-dom";const v={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={index:-1},P=[],T={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"],L),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"}}};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"function"==typeof e}function F(e){return Array.isArray(e)&&!!e.length}function $(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const W=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function q(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(A,"")}(o):o}const K=(e,t,n)=>{const o=Array.isArray(e)?e:$(e)?[e]:P;return F(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},H=(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 i=n[e];o[e]="animation"!==e&&$(i)?t[e]?H(t[e],i):i:i||""})),o};function U(e){return Y(e)?window.pageYOffset:e.scrollTop}function Y(e){return e===document.documentElement||e===document.body||e===window}const X=/(auto|scroll)/;function G({overflow:e,overflowX:t,overflowY:n}){return X.test(`${e}${t}${n}`)}function J(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)&&G(t))return n}return n}function Q(e,t,n=300,o){let i=0;const r=U(e),a=t-r;requestAnimationFrame((function t(){var l;i+=5,function(e,t){Y(e)?window.scrollTo(0,t):e.scrollTop=t}(e,a*((l=(l=i)/n-1)*l*l+1)+r),i<n?requestAnimationFrame(t):null==o||o()}))}const Z="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,_="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),ee=n((({index:e,style:n,data:{menuOptions:o,selectOption:i,renderOptionLabel:r,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:()=>i({data:l,value:s,label:c},u),className:p},r(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:r,direction:a,isLoading:l,loadingMsg:s,menuOptions:c,selectOption:d,noOptionsMsg:u,overscanCount:p,itemKeySelector:m,fixedSizeListRef:f,renderOptionLabel:g,focusedOptionIndex:h})=>{const y=o((()=>({menuOptions:c,selectOption:d,renderOptionLabel:g,focusedOptionIndex:h})),[c,h,d,g]);if(l)return t.createElement(te,null,s);return t.createElement(i,null,t.createElement(b,{width:e,height:n,itemKey:m?(e,t)=>t.menuOptions[e][m]:void 0,itemSize:r,itemData:y,direction:a,ref:f,overscanCount:p,itemCount:c.length},ee),!F(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"))),ie=e=>{let{menuRef:n,menuTop:o,menuOpen:i,onMenuMouseDown:r,menuPortalTarget:a}=e,l=g(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:s,noOptionsMsg:c}=l,d=i&&!Boolean(c)&&!F(s),u=t.createElement(oe,{ref:n,menuTop:o,menuOpen:i,onMouseDown:r,className:"rfs-menu-container",hideNoOptionsMsg:d},t.createElement(ne,Object.assign({},l)));return a?y(u,a):u},re=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,re)),(({isFocused:e})=>e&&re)),ce=n((({data:e,value:n,isFocused:o,renderOptionLabel:i,removeSelectedOption:r})=>t.createElement(ae,null,t.createElement(le,null,i(e)),t.createElement(se,{isFocused:o,onMouseDown:W,onClick:()=>r(n),onTouchEnd:()=>r(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:r,focusedMultiValue:a,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:c})=>!n||e&&(!e||F(r)&&!s)?F(r)?e?t.createElement(i,null,s?s({renderOptionLabel:l,selected:r}):r.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(r[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,i,l,s,c,d,u,p,m,f)=>{const[g,h]=r(P),b=f?"":t,y=B(m)?m:!!p;return a((()=>{const t=q(b,d,u),r=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=i(e),s=ge(ge({data:e,value:o,label:l(e)},a(e)&&{isDisabled:!0}),(null==r?void 0:r.has(o))&&{isSelected:!0});if(!(t&&!(e=>{const o=q(p(e),d,u);return n===I?o.indexOf(t)>-1:o.substr(0,t.length)===t})(s)||y&&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,y,n,d,u,c,s,i,l]),g},be=(e,t)=>{const n=l(!0);a((()=>{if(!n.current)return e();n.current=!1}),t)},ye=(e,t,n,o,i,s,c,d,u,p,m,f)=>{const g=l(!1),h=l(!d),[b,y]=r(s),[v,w]=r(!1);a((()=>{h.current=!v&&!d}),[v,d]),a((()=>{const t=o===O||o===x&&!(e=>{if(!e)return!0;const t=J(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-U(t)-n>=o})(e.current);w(t)}),[e,o]),be((()=>{if(n){const t=e=>{null==m||m(),e&&(g.current=!0,y(e))};h.current?((e,t,n,o)=>{if(!e)return void o();const{top:i,height:r,bottom:a}=e.getBoundingClientRect(),l=window.innerHeight;if(l-i>=r)return void o();const s=J(e),c=U(s),d=s.getBoundingClientRect().height-c-i,u=d<r;if(u||!n)return void o(u?d:void 0);Q(s,a-l+c+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,u,p,t):t()}else null==f||f(),g.current&&(g.current=!1,y(s))}),[e,n,f,m,s,p,u]);const C=Math.min(b,c*i);return[v?((e,t,n)=>{const o=e>0||!t?e:t.getBoundingClientRect().height,i=n?n.getBoundingClientRect().height:0,r=t&&getComputedStyle(t),a=r?parseInt(r.marginBottom,10):0,l=r?parseInt(r.marginTop,10):0;return"calc("+-Math.abs(o+i)+"px + "+(a+l)+"px)"})(C,e.current,t.current):void 0,C]},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)),we=u.input.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;}"),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]=r(2),y=s&&!F(m);return be((()=>{g.current&&b(g.current.scrollWidth+2)}),[u]),t.createElement(i,null,t.createElement(we,Object.assign({id:e,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:a,required:y,"aria-label":d,style:{width:h}},w,{"aria-labelledby":p,onChange:a?void 0:c})),t.createElement(ve,{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,ariaLabel:o,inputValue:i,optionCount:r,isSearchable:a,focusedOption:l,selectedOption:s,ariaLive:c="polite"})=>{if(!n)return null;const d=`${r} result(s) available${i?" for search input "+i:""}.`,u=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${r}.`:"",p=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.":`${o||"Select"} is focused${a?", type to filter options":""}, press Down arrow key to open the menu.`,m=F(s)?s.map((({label:e})=>e)).join(" "):"N/A",f=u+d+p;return t.createElement(xe,{"aria-atomic":"false","aria-live":c,"aria-relevant":"additions text"},t.createElement("span",{id:"aria-context"},"Selected option: "+m),t.createElement("span",{id:"aria-selection"},f))},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:i,showClear:r,isLoading:a,isDisabled:l,loadingNode:s,onCaretMouseDown:c,onClearMouseDown:d})=>{const u=R(o)||R(n)?{menuOpen:e,isLoading:!!a,isInvalid:!!i,isDisabled:!!l}:void 0,p=e=>R(e)?e(u):e;return t.createElement(Me,null,r&&!a&&t.createElement(ke,{onTouchEnd:d,onMouseDown:d},p(n)||t.createElement(De,null)),a&&(s||t.createElement(Se,null)),t.createElement(Le,null),t.createElement(ke,{onTouchEnd:c,onMouseDown:c},p(o)||t.createElement(ze,{"aria-hidden":!0,menuOpen:e,isInvalid:i,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.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:i}})=>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?i.danger:t?o.focusedBorderColor:i.border,o.height?`height: ${o.height};`:"",e?"pointer-events:none;user-select:none;":"",o.backgroundColor||e?`background-color: ${e?i.disabled:o.backgroundColor};`:"",t?`box-shadow: ${o.boxShadow} ${n?i.dangerLight:o.boxShadowColor};`:"")),(({theme:e})=>e.control.css),(({isFocused:e,theme:t})=>e&&t.control.focusedCss)),Be=s((({async:e,isMulti:n,inputId:i,selectId:s,required:u,ariaLive:p,autoFocus:m,isLoading:g,onKeyDown:h,clearIcon:b,caretIcon:y,isInvalid:w,ariaLabel:O,menuWidth:x,isDisabled:L,inputDelay:N,onMenuOpen:V,onMenuClose:A,onInputBlur:R,isClearable:q,themeConfig:U,loadingNode:Y,initialValue:X,onInputFocus:G,onInputChange:J,ariaLabelledBy:Q,onOptionChange:_,onSearchChange:ee,getOptionLabel:te,getOptionValue:ne,itemKeySelector:oe,openMenuOnFocus:re,menuPortalTarget:ae,isAriaLiveEnabled:le,menuOverscanCount:se,blurInputOnSelect:ce,menuItemDirection:de,renderOptionLabel:ue,renderMultiOptions:pe,menuScrollDuration:fe,filterIgnoreAccents:ge,hideSelectedOptions:ve,getIsOptionDisabled:we,getFilterOptionString:xe,isSearchable:Ie=!0,lazyLoadMenu:Se=!1,openMenuOnClick:Ee=!0,filterIgnoreCase:De=!0,tabSelectsOption:Me=!0,closeMenuOnSelect:ke=!0,scrollMenuIntoView:ze=!0,backspaceClearsValue:Le=!0,filterMatchFrom:je=I,menuPosition:Be=C,options:Re=P,loadingMsg:Fe="Loading..",placeholder:$e="Select option..",noOptionsMsg:We="No options",menuItemSize:qe=35,menuMaxHeight:Ke=300},He)=>{const Ue=l(!1),Ye=l(),Xe=l(!1),Ge=l(null),Je=l(null),Qe=l(null),Ze=l(null),[_e,et]=r(""),[tt,nt]=r(!1),[ot,it]=r(!1),[rt,at]=r(null),[lt,st]=r(j),ct=o((()=>$(U)?H(T,U):T),[U]),dt=o((()=>te||(e=>e.label)),[te]),ut=o((()=>ne||(e=>e.value)),[ne]),pt=o((()=>ue||dt),[ue,dt]),mt=((e,t=0)=>{const[n,o]=r(e);return a((()=>{if(t<=0)return;const n=setTimeout((()=>{o(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),t<=0?e:n})(_e,N),[ft,gt]=r((()=>K(X,ut,dt))),ht=he(Re,mt,je,ft,ut,dt,we,xe,De,ge,n,ve,e),[bt,yt]=ye(Je,Ze,tt,Be,qe,Ke,ht.length,!!ae,fe,ze,V,A),vt=()=>{var e;return null===(e=Qe.current)||void 0===e?void 0:e.blur()},wt=()=>{var e;return null===(e=Qe.current)||void 0===e?void 0:e.focus()},Ot=e=>{var t;return null===(t=Ge.current)||void 0===t?void 0:t.scrollToItem(e)},xt=c((e=>{if(!F(ht))return void(!Ue.current&&nt(!0));const t=n?-1:ht.findIndex((e=>e.isSelected)),o=t>-1?t:e===z?0:ht.length-1;!Ue.current&&nt(!0),st(Pe({index:o},ht[o])),Ot(o)}),[n,ht]),Ct=c((e=>{gt((t=>t.filter((({value:t})=>t!==e))))}),[]),It=c(((e,t)=>{t?n&&Ct(e.value):gt((t=>n?[...t,e]:[e]));(B(ce)?ce:Z)?vt():ke&&(nt(!1),et(""))}),[n,ke,Ct,ce]);d(He,(()=>({empty:!F(ft),menuOpen:tt,blur:vt,focus:wt,clearValue:()=>{It.length&&gt(P),lt.data&&st(j)},setValue:e=>{const t=K(e,ut,dt);gt(t)},toggleMenu:e=>{!0===e||void 0===e&&!tt?(!ot&&wt(),xt(z)):vt()}}))),a((()=>{m&&wt()}),[]),a((()=>{Ue.current=tt}),[tt]),a((()=>{ot&&re&&xt(z)}),[ot,re,xt]),a((()=>{ee&&Xe.current&&(Xe.current=!1,ee(mt))}),[ee,mt]),be((()=>{if(!_)return;const e=n?ft.map((e=>e.data)):F(ft)?ft[0].data:null;_(e)}),[n,ft,_]),be((()=>{const t=ht.length>0&&(e||ht.length!==Re.length||0===Ye.current);0===ht.length?st(j):(1===ht.length||t)&&(st(Pe({index:0},ht[0])),Ot(0)),Ye.current=ht.length}),[e,Re,ht]);const St=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:i}=lt;e&&!i&&It({data:e,value:t,label:n},o)},Et=e=>{const t="ArrowDown"===e,n=t?z:k;tt?(e=>{if(!F(ht))return;const t=e===M?(lt.index+1)%ht.length:lt.index>0?lt.index-1:ht.length-1;rt&&at(null),st(Pe({index:t},ht[t])),Ot(t)})(t?M:D):xt(n)},Dt=e=>{if(L)return;ot||wt();const t="INPUT"!==e.currentTarget.tagName;tt?t&&(tt&&nt(!1),_e&&et("")):Ee&&xt(z),t&&e.preventDefault()},Mt=c((e=>{null==R||R(e),it(!1),nt(!1),et("")}),[R]),kt=c((e=>{null==G||G(e),it(!0)}),[G]),zt=c((e=>{const t=e.currentTarget.value||"";Xe.current=!0,null==J||J(t),!Ue.current&&nt(!0),et(t)}),[J]),Lt=c((e=>{W(e),gt(P),wt()}),[]),Nt=c((e=>{W(e,"mousedown"===e.type),wt(),Ue.current?nt(!1):xt(z)}),[xt]),jt=!Se||Se&&tt,Pt=L||!Ie||!!rt,Tt=!(!q||L||!F(ft)),Vt=L||Ee?void 0:Nt;return t.createElement(f,{theme:ct},t.createElement(Te,Object.assign({id:s,"aria-controls":i,"aria-expanded":tt,onKeyDown:e=>{if(!(L||h&&(h(e,_e,lt),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":Et(e.key);break;case"ArrowLeft":case"ArrowRight":if(!n||_e||pe)return;(e=>{if(!F(ft))return;let t=-1;const n=ft.length-1,o=rt?ft.findIndex((e=>e.value===rt)):-1;t=e===S?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const i=t>=0?ft[t].value:null;lt.data&&st(j),i!==rt&&at(i)})("ArrowLeft"===e.key?E:S);break;case" ":if(_e)return;if(tt){if(!lt.data)return;St()}else xt(z);break;case"Enter":tt&&229!==e.keyCode&&St();break;case"Escape":tt&&(nt(!1),et(""));break;case"Tab":if(!tt||!Me||!lt.data||e.shiftKey)return;St();break;case"Delete":case"Backspace":if(_e)return;if(rt){const e=ft.findIndex((e=>e.value===rt)),t=e>-1&&e<ft.length-1?ft[e+1].value:null;Ct(rt),at(t)}else{if(!Le)return;if(!F(ft))break;if(n&&!pe){const{value:e}=ft[ft.length-1];Ct(e)}else q&&gt(P)}break;default:return}e.preventDefault()}}},v),t.createElement(Ae,{ref:Ze,isInvalid:w,isFocused:ot,isDisabled:L,className:"rfs-control-container",onTouchEnd:Dt,onMouseDown:Dt},t.createElement(Ve,null,t.createElement(me,{isMulti:n,inputValue:_e,placeholder:$e,selectedOption:ft,focusedMultiValue:rt,renderOptionLabel:pt,renderMultiOptions:pe,removeSelectedOption:Ct}),t.createElement(Oe,{id:i,ref:Qe,required:u,ariaLabel:O,inputValue:_e,readOnly:Pt,onBlur:Mt,onFocus:kt,onChange:zt,ariaLabelledBy:Q,selectedOption:ft})),t.createElement(Ne,{menuOpen:tt,clearIcon:b,caretIcon:y,isInvalid:w,isLoading:g,showClear:Tt,isDisabled:L,loadingNode:Y,onClearMouseDown:Lt,onCaretMouseDown:Vt})),jt&&t.createElement(ie,{menuRef:Je,menuOpen:tt,isLoading:g,menuTop:bt,height:yt,itemSize:qe,loadingMsg:Fe,menuOptions:ht,fixedSizeListRef:Ge,noOptionsMsg:We,selectOption:It,direction:de,itemKeySelector:oe,overscanCount:se,menuPortalTarget:ae,width:x||ct.menu.width,onMenuMouseDown:e=>{W(e),wt()},renderOptionLabel:pt,focusedOptionIndex:lt.index}),le&&t.createElement(Ce,{ariaLive:p,menuOpen:tt,isFocused:ot,ariaLabel:O,inputValue:_e,isSearchable:Ie,focusedOption:lt,selectedOption:ft,optionCount:ht.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 y}from"react-dom";const v={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={index:-1},P=[],T={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"],L),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"}}};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]:P;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),_=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 y=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:y,direction:a,ref:f,overscanCount:p,itemCount:c.length},_),!R(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)&&!R(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?y(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:$,onClick:()=>i(n),onTouchEnd:()=>i(n)},"✖"))));se.displayName="MultiValue";const ce=p(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),de=u.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],ce),ue=u.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],ce,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&p(["animation:",";"],e.multiValue.animation))),pe=({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(se,{key:n,data:e,value:n,renderOptionLabel:l,isFocused:n===a,removeSelectedOption:c})))):t.createElement(de,null,l(i[0].data)):t.createElement(ue,{isMulti:e},o):null;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 fe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?me(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):me(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}const ge=(e,t,n,o,r,l,s,c,d,u,p,m,f)=>{const[g,h]=i(P),b=f?"":t,y=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=fe(fe({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)||y&&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,y,n,d,u,c,s,r,l]),g},he=(e,t)=>{const n=l(!0);a((()=>{if(!n.current)return e();n.current=!1}),t)},be=(e,t,n,o,r,s,c,d,u,p,m,f)=>{const g=l(!1),h=l(!d),[b,y]=i(s),[v,w]=i(!1);a((()=>{h.current=!v&&!d}),[v,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);w(t)}),[e,o]),he((()=>{if(n){const t=e=>{null==m||m(),e&&(g.current=!0,y(e))};h.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 null==f||f(),g.current&&(g.current=!1,y(s))}),[e,n,f,m,s,p,u]);const C=Math.min(b,c*r);return[v?((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,t.current):void 0,C]},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)),ve=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),y=!!s&&!R(m);return he((()=>{g.current&&b(g.current.scrollWidth+2)}),[u]),t.createElement(r,null,t.createElement(ve,{id:e,ref:f,isInvalid:!0,onBlur:n,onFocus:o,value:u,readOnly:a,required:y,"aria-label":d,style:{width:h},"aria-labelledby":p,onChange:a?void 0:c}),t.createElement(ye,{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)),Le=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 Ne(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?Ne(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ne(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}Le.displayName="IndicatorIcons";const Pe=u.div.attrs(v).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:y,isInvalid:v,ariaLabel:w,menuWidth:O,isDisabled:x,inputDelay:L,onMenuOpen:N,onMenuClose:V,onInputBlur:A,isClearable:W,themeConfig:H,loadingNode:U,initialValue:Y,onInputFocus:X,onInputChange:G,ariaLabelledBy:J,onOptionChange:Z,onSearchChange:_,getOptionLabel:ee,getOptionValue:te,itemKeySelector:ne,openMenuOnFocus:re,menuPortalTarget:ie,isAriaLiveEnabled:ae,menuOverscanCount:le,blurInputOnSelect:se,menuItemDirection:ce,renderOptionLabel:de,renderMultiOptions:ue,menuScrollDuration:me,filterIgnoreAccents:fe,hideSelectedOptions:ye,getIsOptionDisabled:ve,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:Ne=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(null),Ge=l(null),Je=l(null),Qe=l(null),[Ze,_e]=i(""),[et,tt]=i(!1),[nt,ot]=i(!1),[rt,it]=i(null),[at,lt]=i(j),st=o((()=>F(H)?K(T,H):T),[H]),ct=o((()=>ee||(e=>e.label)),[ee]),dt=o((()=>te||(e=>e.value)),[te]),ut=o((()=>de||ct),[de,ct]),pt=((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})(Ze,L),[mt,ft]=i((()=>q(Y,dt,ct))),gt=ge(Be,pt,Ne,mt,dt,ct,ve,Oe,Ee,fe,n,ye,e),[ht,bt]=be(Ge,Qe,et,Ae,We,qe,gt.length,!!ie,me,ke,N,V),yt=()=>{var e;return null===(e=Je.current)||void 0===e?void 0:e.blur()},vt=()=>{var e;return null===(e=Je.current)||void 0===e?void 0:e.focus()},wt=e=>{var t;return null===(t=Xe.current)||void 0===t?void 0:t.scrollToItem(e)},Ot=c((e=>{if(!R(gt))return void(!He.current&&tt(!0));const t=n?-1:gt.findIndex((e=>e.isSelected)),o=t>-1?t:e===z?0:gt.length-1;!He.current&&tt(!0),lt(je({index:o},gt[o])),wt(o)}),[n,gt]),xt=c((e=>{ft((t=>t.filter((({value:t})=>t!==e))))}),[]),Ct=c(((e,t)=>{t?n&&xt(e.value):ft((t=>n?[...t,e]:[e]));(B(se)?se:Q)?yt():Me&&(tt(!1),_e(""))}),[n,Me,xt,se]);d(Ke,(()=>({empty:!R(mt),menuOpen:et,blur:yt,focus:vt,clearValue:()=>{Ct.length&&ft(P),at.data&&lt(j)},setValue:e=>{const t=q(e,dt,ct);ft(t)},toggleMenu:e=>{!0===e||void 0===e&&!et?(!nt&&vt(),Ot(z)):yt()}}))),a((()=>{m&&vt()}),[]),a((()=>{He.current=et}),[et]),a((()=>{nt&&re&&Ot(z)}),[nt,re,Ot]),a((()=>{_&&Ye.current&&(Ye.current=!1,_(pt))}),[_,pt]),he((()=>{if(!Z)return;const e=n?mt.map((e=>e.data)):R(mt)?mt[0].data:null;Z(e)}),[n,mt,Z]),he((()=>{const t=gt.length>0&&(e||gt.length!==Be.length||0===Ue.current);0===gt.length?lt(j):(1===gt.length||t)&&(lt(je({index:0},gt[0])),wt(0)),Ue.current=gt.length}),[e,Be,gt]);const It=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=at;e&&!r&&Ct({data:e,value:t,label:n},o)},St=e=>{const t="ArrowDown"===e,n=t?z:k;et?(e=>{if(!R(gt))return;const t=e===M?(at.index+1)%gt.length:at.index>0?at.index-1:gt.length-1;rt&&it(null),lt(je({index:t},gt[t])),wt(t)})(t?M:D):Ot(n)},Et=e=>{if(x)return;nt||vt();const t="INPUT"!==e.currentTarget.tagName;et?t&&(et&&tt(!1),Ze&&_e("")):Se&&Ot(z),t&&e.preventDefault()},Dt=c((e=>{null==A||A(e),ot(!1),tt(!1),_e("")}),[A]),Mt=c((e=>{null==X||X(e),ot(!0)}),[X]),kt=c((e=>{const t=e.currentTarget.value||"";Ye.current=!0,null==G||G(t),!He.current&&tt(!0),_e(t)}),[G]),zt=c((e=>{$(e),ft(P),vt()}),[]),Lt=c((e=>{$(e,"mousedown"===e.type),vt(),He.current?tt(!1):Ot(z)}),[Ot]),Nt=!Ie||Ie&&et,jt=x||!Ce||!!rt,Pt=!(!W||x||!R(mt)),Tt=x||Se?void 0:Lt;return t.createElement(f,{theme:st},t.createElement(Pe,{id:s,"aria-controls":r,"aria-expanded":et,onKeyDown:e=>{if(x)return;if(h&&(h(e,Ze,at),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":St(t);break;case"ArrowLeft":case"ArrowRight":if(!n||Ze||ue)return;(e=>{if(!R(mt))return;let t=-1;const n=mt.length-1,o=rt?mt.findIndex((e=>e.value===rt)):-1;t=e===S?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const r=t>=0?mt[t].value:null;at.data&&lt(j),r!==rt&&it(r)})("ArrowLeft"===t?E:S);break;case" ":if(Ze)return;if(et){if(!at.data)return;It()}else Ot(z);break;case"Enter":et&&229!==e.keyCode&&It();break;case"Escape":et&&(tt(!1),_e(""));break;case"Tab":if(!et||!De||!at.data||e.shiftKey)return;It();break;case"Delete":case"Backspace":if(Ze)return;if(rt){const e=mt.findIndex((e=>e.value===rt)),t=e>-1&&e<mt.length-1?mt[e+1].value:null;xt(rt),it(t)}else{if(!ze)return;if(!R(mt))break;if(n&&!ue){const{value:e}=mt[mt.length-1];xt(e)}else W&&ft(P)}break;default:return}e.preventDefault()}},t.createElement(Ve,{ref:Qe,isInvalid:v,isFocused:nt,isDisabled:x,className:"rfs-control-container",onTouchEnd:Et,onMouseDown:Et},t.createElement(Te,null,t.createElement(pe,{isMulti:n,inputValue:Ze,placeholder:Fe,selectedOption:mt,focusedMultiValue:rt,renderOptionLabel:ut,renderMultiOptions:ue,removeSelectedOption:xt}),t.createElement(we,{id:r,ref:Je,required:u,ariaLabel:w,inputValue:Ze,readOnly:jt,onBlur:Dt,onFocus:Mt,onChange:kt,ariaLabelledBy:J,selectedOption:mt})),t.createElement(Le,{menuOpen:et,clearIcon:b,caretIcon:y,isInvalid:v,isLoading:g,showClear:Pt,isDisabled:x,loadingNode:U,onClearMouseDown:zt,onCaretMouseDown:Tt})),Nt&&t.createElement(oe,{menuRef:Ge,menuOpen:et,isLoading:g,menuTop:ht,height:bt,itemSize:We,loadingMsg:Re,menuOptions:gt,fixedSizeListRef:Xe,noOptionsMsg:$e,selectOption:Ct,direction:ce,itemKeySelector:ne,overscanCount:le,menuPortalTarget:ie,width:O||st.menu.width,onMenuMouseDown:e=>{$(e),vt()},renderOptionLabel:ut,focusedOptionIndex:at.index}),ae&&t.createElement(xe,{ariaLive:p,menuOpen:et,isFocused:nt,ariaLabel:w,inputValue:Ze,isSearchable:Ce,focusedOption:at,selectedOption:mt,optionCount:gt.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 d="rfs-option",c="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,O=1,w=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={index:-1},k=[],D={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"},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 j(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}function z(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 L=/[\u0300-\u036f]/g;function N(e){return"boolean"==typeof e}function P(e){return"function"==typeof e}function R(e){return Array.isArray(e)&&!!e.length}function T(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const V=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function A(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(L,"")}(o):o}const F=(e,t,n)=>{const o=Array.isArray(e)?e:T(e)?[e]:k;return R(o)?o.map((e=>({data:e,value:t(e),label:n(e)}))):o},B=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(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&&T(r)?e[o]?B(e[o],r):r:r||""})),n};function $(e){return q(e)?window.pageYOffset:e.scrollTop}function q(e){return e===document.documentElement||e===document.body||e===window}const W=/(auto|scroll)/;function K({overflow:e,overflowX:t,overflowY:n}){return W.test(`${e}${t}${n}`)}function H(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)&&K(t))return n}return n}function U(e,t,n=300,o){let r=0;const i=$(e),a=t-i;requestAnimationFrame((function t(){var l;r+=5,function(e,t){q(e)?window.scrollTo(0,t):e.scrollTop=t}(e,a*((l=(l=r)/n-1)*l*l+1)+i),r<n?requestAnimationFrame(t):null==o||o()}))}const Y="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,_="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),X=t.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:r,focusedOptionIndex:i}})=>{const{data:l,value:s,label:c,isDisabled:u,isSelected:p}=n[e],f=function(e,t,n){let o=d;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:c},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:d,selectOption:c,noOptionsMsg:u,overscanCount:p,itemKeySelector:f,fixedSizeListRef:m,renderOptionLabel:g,focusedOptionIndex:h})=>{const b=t.useMemo((()=>({menuOptions:d,selectOption:c,renderOptionLabel:g,focusedOptionIndex:h})),[d,h,c,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:d.length},X),!R(d)&&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),d,(({theme:{menu:{option:e}}})=>n.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,c,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=j(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:d,noOptionsMsg:c}=s,u=o&&!Boolean(c)&&!R(d),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:V,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:d})=>!n||e&&(!e||R(r)&&!s)?R(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:d})))):a.default.createElement(ae,null,l(r[0].data)):a.default.createElement(le,{isMulti:e},o):null;function de(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 ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(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,d,c,u,p,f)=>{const[m,g]=t.useState(k),h=f?"":n,b=N(p)?p:!!u;return t.useEffect((()=>{const t=A(h,d,c),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=ce(ce({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=A(p(e),d,c);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,d,c,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,d,c,u,p)=>{const f=t.useRef(!1),m=t.useRef(!s),[b,y]=t.useState(a),[v,O]=t.useState(!1);t.useEffect((()=>{m.current=!v&&!s}),[v,s]),t.useEffect((()=>{const t=r===g||r===h&&!(e=>{if(!e)return!0;const t=H(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-$(t)-n>=o})(e.current);O(t)}),[e,r]),pe((()=>{if(o){const t=e=>{null==u||u(),e&&(f.current=!0,y(e))};m.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=H(e),d=$(s),c=s.getBoundingClientRect().height-d-r,u=c<i;if(u||!n)return void o(u?c:void 0);U(s,a-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,d,c,t):t()}else null==p||p(),f.current&&(f.current=!1,y(a))}),[e,o,p,u,a,c,d]);const w=Math.min(b,l*i);return[v?((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)"})(w,e.current,n.current):void 0,w]},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.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;}"),he=t.memo(t.forwardRef((({id:e,onBlur:n,onFocus:o,readOnly:r,required:i,onChange:l,ariaLabel:s,inputValue:d,ariaLabelledBy:c,selectedOption:u},p)=>{const f=t.useRef(null),[g,h]=t.useState(2),b=i&&!R(u);return pe((()=>{f.current&&h(f.current.scrollWidth+2)}),[d]),a.default.createElement(t.Fragment,null,a.default.createElement(ge,Object.assign({id:e,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:d,readOnly:r,required:b,"aria-label":s,style:{width:g}},m,{"aria-labelledby":c,onChange:r?void 0:l})),a.default.createElement(me,{ref:f},d))})));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,ariaLabel:n,inputValue:o,optionCount:r,isSearchable:i,focusedOption:l,selectedOption:s,ariaLive:d="polite"})=>{if(!t)return null;const c=`${r} result(s) available${o?" for search input "+o:""}.`,u=l.value?`Focused option: ${l.label}${l.isDisabled?" - disabled":""}, ${l.index+1} of ${r}.`:"",p=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.":`${n||"Select"} is focused${i?", type to filter options":""}, press Down arrow key to open the menu.`,f=R(s)?s.map((({label:e})=>e)).join(" "):"N/A",m=u+c+p;return a.default.createElement(be,{"aria-atomic":"false","aria-live":d,"aria-relevant":"additions text"},a.default.createElement("span",{id:"aria-context"},"Selected option: "+f),a.default.createElement("span",{id:"aria-selection"},m))},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))),Oe=()=>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)),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))),xe=()=>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"})),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:d,onClearMouseDown:c})=>{const u=P(n)||P(t)?{menuOpen:e,isLoading:!!i,isInvalid:!!o,isDisabled:!!l}:void 0,p=e=>P(e)?e(u):e;return a.default.createElement(Ce,null,r&&!i&&a.default.createElement(Se,{onTouchEnd:c,onMouseDown:c,"data-testid":undefined},p(t)||a.default.createElement(xe,null)),i&&(s||a.default.createElement(Oe,null)),a.default.createElement(Ie,null),a.default.createElement(Se,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},p(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.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:d,isLoading:c,onKeyDown:u,clearIcon:p,caretIcon:m,isInvalid:g,ariaLabel:h,menuWidth:E,isDisabled:I,inputDelay:j,onMenuOpen:z,onMenuClose:L,onInputBlur:P,isClearable:A,themeConfig:$,loadingNode:q,initialValue:W,onInputFocus:K,onInputChange:H,ariaLabelledBy:U,onOptionChange:_,onSearchChange:X,getOptionLabel:G,getOptionValue:J,itemKeySelector:Q,openMenuOnFocus:ee,menuPortalTarget:te,isAriaLiveEnabled:ne,menuOverscanCount:oe,blurInputOnSelect:re,menuItemDirection:ie,renderOptionLabel:ae,renderMultiOptions:le,menuScrollDuration:de,filterIgnoreAccents:ce,hideSelectedOptions:me,getIsOptionDisabled:ge,getFilterOptionString:be,isSearchable:ve=!0,lazyLoadMenu:Oe=!1,openMenuOnClick:we=!0,filterIgnoreCase:xe=!0,tabSelectsOption:Ce=!0,closeMenuOnSelect:Se=!0,scrollMenuIntoView:Ee=!0,backspaceClearsValue:Ie=!0,filterMatchFrom:ke=y,menuPosition:Ne=b,options:Pe=k,loadingMsg:Re="Loading..",placeholder:Te="Select option..",noOptionsMsg:Ve="No options",menuItemSize:Ae=35,menuMaxHeight:Fe=300},Be)=>{const $e=t.useRef(!1),qe=t.useRef(),We=t.useRef(!1),Ke=t.useRef(null),He=t.useRef(null),Ue=t.useRef(null),Ye=t.useRef(null),[_e,Xe]=t.useState(""),[Ge,Je]=t.useState(!1),[Qe,Ze]=t.useState(!1),[et,tt]=t.useState(null),[nt,ot]=t.useState(M),rt=t.useMemo((()=>T($)?B(D,$):D),[$]),it=t.useMemo((()=>G||(e=>e.label)),[G]),at=t.useMemo((()=>J||(e=>e.value)),[J]),lt=t.useMemo((()=>ae||it),[ae,it]),st=((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})(_e,j),[dt,ct]=t.useState((()=>F(W,at,it))),ut=ue(Pe,st,ke,dt,at,it,ge,be,xe,ce,o,me,e),[pt,ft]=fe(He,Ye,Ge,Ne,Ae,Fe,ut.length,!!te,de,Ee,z,L),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=t.useCallback((e=>{if(!R(ut))return void(!$e.current&&Je(!0));const t=o?-1:ut.findIndex((e=>e.isSelected)),n=t>-1?t:e===S?0:ut.length-1;!$e.current&&Je(!0),ot(De({index:n},ut[n])),ht(n)}),[o,ut]),yt=t.useCallback((e=>{ct((t=>t.filter((({value:t})=>t!==e))))}),[]),vt=t.useCallback(((e,t)=>{t?o&&yt(e.value):ct((t=>o?[...t,e]:[e]));(N(re)?re:Y)?mt():Se&&(Je(!1),Xe(""))}),[o,Se,yt,re]);t.useImperativeHandle(Be,(()=>({empty:!R(dt),menuOpen:Ge,blur:mt,focus:gt,clearValue:()=>{vt.length&&ct(k),nt.data&&ot(M)},setValue:e=>{const t=F(e,at,it);ct(t)},toggleMenu:e=>{!0===e||void 0===e&&!Ge?(!Qe&&gt(),bt(S)):mt()}}))),t.useEffect((()=>{d&&gt()}),[]),t.useEffect((()=>{$e.current=Ge}),[Ge]),t.useEffect((()=>{Qe&&ee&&bt(S)}),[Qe,ee,bt]),t.useEffect((()=>{X&&We.current&&(We.current=!1,X(st))}),[X,st]),pe((()=>{if(!_)return;const e=o?dt.map((e=>e.data)):R(dt)?dt[0].data:null;_(e)}),[o,dt,_]),pe((()=>{const t=ut.length>0&&(e||ut.length!==Pe.length||0===qe.current);0===ut.length?ot(M):(1===ut.length||t)&&(ot(De({index:0},ut[0])),ht(0)),qe.current=ut.length}),[e,Pe,ut]);const Ot=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=nt;e&&!r&&vt({data:e,value:t,label:n},o)},wt=e=>{const t="ArrowDown"===e,n=t?S:C;Ge?(e=>{if(!R(ut))return;const t=e===x?(nt.index+1)%ut.length:nt.index>0?nt.index-1:ut.length-1;et&&tt(null),ot(De({index:t},ut[t])),ht(t)})(t?x:w):bt(n)},xt=e=>{if(I)return;Qe||gt();const t="INPUT"!==e.currentTarget.tagName;Ge?t&&(Ge&&Je(!1),_e&&Xe("")):we&&bt(S),t&&e.preventDefault()},Ct=t.useCallback((e=>{null==P||P(e),Ze(!1),Je(!1),Xe("")}),[P]),St=t.useCallback((e=>{null==K||K(e),Ze(!0)}),[K]),Et=t.useCallback((e=>{const t=e.currentTarget.value||"";We.current=!0,null==H||H(t),!$e.current&&Je(!0),Xe(t)}),[H]),It=t.useCallback((e=>{V(e),ct(k),gt()}),[]),Mt=t.useCallback((e=>{V(e,"mousedown"===e.type),gt(),$e.current?Je(!1):bt(S)}),[bt]),kt=!Oe||Oe&&Ge,Dt=I||!ve||!!et,jt=!(!A||I||!R(dt)),zt=I||we?void 0:Mt;return a.default.createElement(n.ThemeProvider,{theme:rt},a.default.createElement(je,Object.assign({id:i,"aria-controls":r,"aria-expanded":Ge,onKeyDown:e=>{if(!(I||u&&(u(e,_e,nt),e.defaultPrevented))){switch(e.key){case"ArrowDown":case"ArrowUp":wt(e.key);break;case"ArrowLeft":case"ArrowRight":if(!o||_e||le)return;(e=>{if(!R(dt))return;let t=-1;const n=dt.length-1,o=et?dt.findIndex((e=>e.value===et)):-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;nt.data&&ot(M),r!==et&&tt(r)})("ArrowLeft"===e.key?O:v);break;case" ":if(_e)return;if(Ge){if(!nt.data)return;Ot()}else bt(S);break;case"Enter":Ge&&229!==e.keyCode&&Ot();break;case"Escape":Ge&&(Je(!1),Xe(""));break;case"Tab":if(!Ge||!Ce||!nt.data||e.shiftKey)return;Ot();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;yt(et),tt(t)}else{if(!Ie)return;if(!R(dt))break;if(o&&!le){const{value:e}=dt[dt.length-1];yt(e)}else A&&ct(k)}break;default:return}e.preventDefault()}}},f),a.default.createElement(Le,{ref:Ye,isInvalid:g,isFocused:Qe,isDisabled:I,className:"rfs-control-container",onTouchEnd:xt,onMouseDown:xt,"data-testid":undefined},a.default.createElement(ze,null,a.default.createElement(se,{isMulti:o,inputValue:_e,placeholder:Te,selectedOption:dt,focusedMultiValue:et,renderOptionLabel:lt,renderMultiOptions:le,removeSelectedOption:yt}),a.default.createElement(he,{id:r,ref:Ue,required:l,ariaLabel:h,inputValue:_e,readOnly:Dt,onBlur:Ct,onFocus:St,onChange:Et,ariaLabelledBy:U,selectedOption:dt})),a.default.createElement(Me,{menuOpen:Ge,clearIcon:p,caretIcon:m,isInvalid:g,isLoading:c,showClear:jt,isDisabled:I,loadingNode:q,onClearMouseDown:It,onCaretMouseDown:zt})),kt&&a.default.createElement(Z,{menuRef:He,menuOpen:Ge,isLoading:c,menuTop:pt,height:ft,itemSize:Ae,loadingMsg:Re,menuOptions:ut,fixedSizeListRef:Ke,noOptionsMsg:Ve,selectOption:vt,direction:ie,itemKeySelector:Q,overscanCount:oe,menuPortalTarget:te,width:E||rt.menu.width,onMenuMouseDown:e=>{V(e),gt()},renderOptionLabel:lt,focusedOptionIndex:nt.index}),ne&&a.default.createElement(ye,{ariaLive:s,menuOpen:Ge,isFocused:Qe,ariaLabel:h,inputValue:_e,isSearchable:ve,focusedOption:nt,selectedOption:dt,optionCount:ut.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 d="rfs-option",c="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={index:-1},k=[],D={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"},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 j(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}function z(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 L=/[\u0300-\u036f]/g;function N(e){return"boolean"==typeof e}function P(e){return Array.isArray(e)&&!!e.length}function R(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}const T=(e,t=!0)=>{t&&e.preventDefault(),e.stopPropagation()};function V(e,t,n){let o=e.trim();return t&&(o=o.toLowerCase()),n?function(e){return e.normalize("NFD").replace(L,"")}(o):o}const A=(e,t,n)=>{const o=Array.isArray(e)?e:R(e)?[e]:k;return P(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?z(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(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]?F(e[o],r):r:r||""})),n};function B(e){return $(e)?window.pageYOffset:e.scrollTop}function $(e){return e===document.documentElement||e===document.body||e===window}const q=/(auto|scroll)/;function W({overflow:e,overflowX:t,overflowY:n}){return q.test(`${e}${t}${n}`)}function K(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)&&W(t))return n}return n}function H(e,t,n=300,o){let r=0;const i=B(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){$(e)?window.scrollTo(0,t):e.scrollTop=t}(e,l),r<n?requestAnimationFrame(t):null==o||o()}))}const U="undefined"!=typeof window&&"ontouchstart"in window||"undefined"!=typeof navigator&&!!navigator.maxTouchPoints,Y="undefined"!=typeof navigator&&/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent),_=t.memo((({index:e,style:t,data:{menuOptions:n,selectOption:o,renderOptionLabel:r,focusedOptionIndex:i}})=>{const{data:l,value:s,label:c,isDisabled:u,isSelected:p}=n[e],f=function(e,t,n){let o=d;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:c},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:d,selectOption:c,noOptionsMsg:u,overscanCount:p,itemKeySelector:f,fixedSizeListRef:m,renderOptionLabel:g,focusedOptionIndex:h})=>{const b=t.useMemo((()=>({menuOptions:d,selectOption:c,renderOptionLabel:g,focusedOptionIndex:h})),[d,h,c,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:d.length},_),!P(d)&&u&&a.default.createElement(X,null,u))},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),d,(({theme:{menu:{option:e}}})=>n.css(["padding:",";text-align:",";&.",",&:hover:not(.","):not(.","){background-color:",";}&.","{color:",";background-color:",";}&.","{opacity:0.35;}"],e.padding,e.textAlign,c,p,u,e.focusedBgColor,u,e.selectedColor,e.selectedBgColor,p))),Q=e=>{let{menuRef:t,menuTop:n,menuOpen:o,onMenuMouseDown:i,menuPortalTarget:l}=e,s=j(e,["menuRef","menuTop","menuOpen","onMenuMouseDown","menuPortalTarget"]);const{menuOptions:d,noOptionsMsg:c}=s,u=o&&!Boolean(c)&&!P(d),p=a.default.createElement(J,{ref:t,menuTop:n,menuOpen:o,onMouseDown:i,className:"rfs-menu-container","data-testid":undefined,hideNoOptionsMsg:u},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:T,onClick:()=>r(t),onTouchEnd:()=>r(t)},"✖"))));oe.displayName="MultiValue";const re=n.css(["top:50%;overflow:hidden;position:absolute;white-space:nowrap;box-sizing:border-box;text-overflow:ellipsis;transform:translateY(-50%);"]),ie=l.default.div.withConfig({displayName:"SingleValue",componentId:"sc-153h0ct-0"})([""," max-width:calc(100% - 0.5rem);"],re),ae=l.default.div.withConfig({displayName:"Placeholder",componentId:"sc-153h0ct-1"})([""," color:",";",""],re,(({theme:e})=>e.color.placeholder),(({theme:e,isMulti:t})=>t&&n.css(["animation:",";"],e.multiValue.animation))),le=({isMulti:e,inputValue:n,placeholder:o,selectedOption:r,focusedMultiValue:i,renderOptionLabel:l,renderMultiOptions:s,removeSelectedOption:d})=>!n||e&&(!e||P(r)&&!s)?P(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:d})))):a.default.createElement(ie,null,l(r[0].data)):a.default.createElement(ae,{isMulti:e},o):null;function se(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?se(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ce=(e,n,o,r,i,a,l,s,d,c,u,p,f)=>{const[m,g]=t.useState(k),h=f?"":n,b=N(p)?p:!!u;return t.useEffect((()=>{const t=V(h,d,c),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=V(p(e),d,c);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,d,c,s,l,i,a]),m},ue=(e,n)=>{const o=t.useRef(!0);t.useEffect((()=>{if(!o.current)return e();o.current=!1}),n)},pe=(e,n,o,r,i,a,l,s,d,c,u,p)=>{const f=t.useRef(!1),m=t.useRef(!s),[b,y]=t.useState(a),[v,w]=t.useState(!1);t.useEffect((()=>{m.current=!v&&!s}),[v,s]),t.useEffect((()=>{const t=r===g||r===h&&!(e=>{if(!e)return!0;const t=K(e),{top:n,height:o}=e.getBoundingClientRect();return t.getBoundingClientRect().height-B(t)-n>=o})(e.current);w(t)}),[e,r]),ue((()=>{if(o){const t=e=>{null==u||u(),e&&(f.current=!0,y(e))};m.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=K(e),d=B(s),c=s.getBoundingClientRect().height-d-r,u=c<i;if(u||!n)return void o(u?c:void 0);H(s,a-l+d+parseInt(getComputedStyle(e).marginBottom,10),t,o)})(e.current,d,c,t):t()}else null==p||p(),f.current&&(f.current=!1,y(a))}),[e,o,p,u,a,c,d]);const O=Math.min(b,l*i);return[v?((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)"})(O,e.current,n.current):void 0,O]},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),Y&&"::-ms-clear{display:none;}"),ge=t.memo(t.forwardRef((({id:e,onBlur:n,onFocus:o,readOnly:r,required:i,onChange:l,ariaLabel:s,inputValue:d,ariaLabelledBy:c,selectedOption:u},p)=>{const f=t.useRef(null),[m,g]=t.useState(2),h=!!i&&!P(u);return ue((()=>{f.current&&g(f.current.scrollWidth+2)}),[d]),a.default.createElement(t.Fragment,null,a.default.createElement(me,{id:e,ref:p,isInvalid:!0,onBlur:n,onFocus:o,value:d,readOnly:r,required:h,"aria-label":s,style:{width:m},"aria-labelledby":c,onChange:r?void 0:l}),a.default.createElement(fe,{ref:f},d))})));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:d="Select"})=>{if(!t)return null;const c=` ${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.":`${d} 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+c+u))},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:d,onClearMouseDown:c})=>{const u=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:c,onMouseDown:c,"data-testid":undefined},u(t)||a.default.createElement(Oe,null)),i&&(s||a.default.createElement(ve,null)),a.default.createElement(Ee,null),a.default.createElement(Ce,{onTouchEnd:d,onMouseDown:d,"data-testid":undefined},u(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)),je=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)),ze=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)),Le=t.forwardRef((({async:e,isMulti:o,inputId:r,selectId:i,required:l,ariaLive:s,autoFocus:d,isLoading:c,onKeyDown:u,clearIcon:p,caretIcon:f,isInvalid:m,ariaLabel:g,menuWidth:h,isDisabled:E,inputDelay:I,onMenuOpen:j,onMenuClose:z,onInputBlur:L,isClearable:V,themeConfig:B,loadingNode:$,initialValue:q,onInputFocus:W,onInputChange:K,ariaLabelledBy:H,onOptionChange:Y,onSearchChange:_,getOptionLabel:X,getOptionValue:G,itemKeySelector:J,openMenuOnFocus:Z,menuPortalTarget:ee,isAriaLiveEnabled:te,menuOverscanCount:ne,blurInputOnSelect:oe,menuItemDirection:re,renderOptionLabel:ie,renderMultiOptions:ae,menuScrollDuration:se,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:Le=b,options:Ne=k,loadingMsg:Pe="Loading..",placeholder:Re="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(null),Ke=t.useRef(null),He=t.useRef(null),Ue=t.useRef(null),[Ye,_e]=t.useState(""),[Xe,Ge]=t.useState(!1),[Je,Qe]=t.useState(!1),[Ze,et]=t.useState(null),[tt,nt]=t.useState(M),ot=t.useMemo((()=>R(B)?F(D,B):D),[B]),rt=t.useMemo((()=>X||(e=>e.label)),[X]),it=t.useMemo((()=>G||(e=>e.value)),[G]),at=t.useMemo((()=>ie||rt),[ie,rt]),lt=((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})(Ye,I),[st,dt]=t.useState((()=>A(q,it,rt))),ct=ce(Ne,lt,Me,st,it,rt,me,he,Oe,de,o,fe,e),[ut,pt]=pe(Ke,Ue,Xe,Le,Ve,Ae,ct.length,!!ee,se,Se,j,z),ft=()=>{var e;return null===(e=He.current)||void 0===e?void 0:e.blur()},mt=()=>{var e;return null===(e=He.current)||void 0===e?void 0:e.focus()},gt=e=>{var t;return null===(t=We.current)||void 0===t?void 0:t.scrollToItem(e)},ht=t.useCallback((e=>{if(!P(ct))return void(!Be.current&&Ge(!0));const t=o?-1:ct.findIndex((e=>e.isSelected)),n=t>-1?t:e===S?0:ct.length-1;!Be.current&&Ge(!0),nt(ke({index:n},ct[n])),gt(n)}),[o,ct]),bt=t.useCallback((e=>{dt((t=>t.filter((({value:t})=>t!==e))))}),[]),yt=t.useCallback(((e,t)=>{t?o&&bt(e.value):dt((t=>o?[...t,e]:[e]));(N(oe)?oe:U)?ft():Ce&&(Ge(!1),_e(""))}),[o,Ce,bt,oe]);t.useImperativeHandle(Fe,(()=>({empty:!P(st),menuOpen:Xe,blur:ft,focus:mt,clearValue:()=>{yt.length&&dt(k),tt.data&&nt(M)},setValue:e=>{const t=A(e,it,rt);dt(t)},toggleMenu:e=>{!0===e||void 0===e&&!Xe?(!Je&&mt(),ht(S)):ft()}}))),t.useEffect((()=>{d&&mt()}),[]),t.useEffect((()=>{Be.current=Xe}),[Xe]),t.useEffect((()=>{Je&&Z&&ht(S)}),[Je,Z,ht]),t.useEffect((()=>{_&&qe.current&&(qe.current=!1,_(lt))}),[_,lt]),ue((()=>{if(!Y)return;const e=o?st.map((e=>e.data)):P(st)?st[0].data:null;Y(e)}),[o,st,Y]),ue((()=>{const t=ct.length>0&&(e||ct.length!==Ne.length||0===$e.current);0===ct.length?nt(M):(1===ct.length||t)&&(nt(ke({index:0},ct[0])),gt(0)),$e.current=ct.length}),[e,Ne,ct]);const vt=()=>{const{data:e,value:t,label:n,isSelected:o,isDisabled:r}=tt;e&&!r&&yt({data:e,value:t,label:n},o)},wt=e=>{const t="ArrowDown"===e,n=t?S:C;Xe?(e=>{if(!P(ct))return;const t=e===x?(tt.index+1)%ct.length:tt.index>0?tt.index-1:ct.length-1;Ze&&et(null),nt(ke({index:t},ct[t])),gt(t)})(t?x:O):ht(n)},Ot=e=>{if(E)return;Je||mt();const t="INPUT"!==e.currentTarget.tagName;Xe?t&&(Xe&&Ge(!1),Ye&&_e("")):we&&ht(S),t&&e.preventDefault()},xt=t.useCallback((e=>{null==L||L(e),Qe(!1),Ge(!1),_e("")}),[L]),Ct=t.useCallback((e=>{null==W||W(e),Qe(!0)}),[W]),St=t.useCallback((e=>{const t=e.currentTarget.value||"";qe.current=!0,null==K||K(t),!Be.current&&Ge(!0),_e(t)}),[K]),Et=t.useCallback((e=>{T(e),dt(k),mt()}),[]),It=t.useCallback((e=>{T(e,"mousedown"===e.type),mt(),Be.current?Ge(!1):ht(S)}),[ht]),Mt=!ve||ve&&Xe,kt=E||!ye||!!Ze,Dt=!(!V||E||!P(st)),jt=E||we?void 0:It;return a.default.createElement(n.ThemeProvider,{theme:ot},a.default.createElement(De,{id:i,"aria-controls":r,"aria-expanded":Xe,onKeyDown:e=>{if(E)return;if(u&&(u(e,Ye,tt),e.defaultPrevented))return;const{key:t}=e;switch(t){case"ArrowDown":case"ArrowUp":wt(t);break;case"ArrowLeft":case"ArrowRight":if(!o||Ye||ae)return;(e=>{if(!P(st))return;let t=-1;const n=st.length-1,o=Ze?st.findIndex((e=>e.value===Ze)):-1;t=e===v?o>-1&&o<n?o+1:-1:0!==o?-1===o?n:o-1:0;const r=t>=0?st[t].value:null;tt.data&&nt(M),r!==Ze&&et(r)})("ArrowLeft"===t?w:v);break;case" ":if(Ye)return;if(Xe){if(!tt.data)return;vt()}else ht(S);break;case"Enter":Xe&&229!==e.keyCode&&vt();break;case"Escape":Xe&&(Ge(!1),_e(""));break;case"Tab":if(!Xe||!xe||!tt.data||e.shiftKey)return;vt();break;case"Delete":case"Backspace":if(Ye)return;if(Ze){const e=st.findIndex((e=>e.value===Ze)),t=e>-1&&e<st.length-1?st[e+1].value:null;bt(Ze),et(t)}else{if(!Ee)return;if(!P(st))break;if(o&&!ae){const{value:e}=st[st.length-1];bt(e)}else V&&dt(k)}break;default:return}e.preventDefault()}},a.default.createElement(ze,{ref:Ue,isInvalid:m,isFocused:Je,isDisabled:E,className:"rfs-control-container",onTouchEnd:Ot,onMouseDown:Ot,"data-testid":undefined},a.default.createElement(je,null,a.default.createElement(le,{isMulti:o,inputValue:Ye,placeholder:Re,selectedOption:st,focusedMultiValue:Ze,renderOptionLabel:at,renderMultiOptions:ae,removeSelectedOption:bt}),a.default.createElement(ge,{id:r,ref:He,required:l,ariaLabel:g,inputValue:Ye,readOnly:kt,onBlur:xt,onFocus:Ct,onChange:St,ariaLabelledBy:H,selectedOption:st})),a.default.createElement(Ie,{menuOpen:Xe,clearIcon:p,caretIcon:f,isInvalid:m,isLoading:c,showClear:Dt,isDisabled:E,loadingNode:$,onClearMouseDown:Et,onCaretMouseDown:jt})),Mt&&a.default.createElement(Q,{menuRef:Ke,menuOpen:Xe,isLoading:c,menuTop:ut,height:pt,itemSize:Ve,loadingMsg:Pe,menuOptions:ct,fixedSizeListRef:We,noOptionsMsg:Te,selectOption:yt,direction:re,itemKeySelector:J,overscanCount:ne,menuPortalTarget:ee,width:h||ot.menu.width,onMenuMouseDown:e=>{T(e),mt()},renderOptionLabel:at,focusedOptionIndex:tt.index}),te&&a.default.createElement(be,{ariaLive:s,menuOpen:Xe,isFocused:Je,ariaLabel:g,inputValue:Ye,isSearchable:ye,focusedOption:tt,selectedOption:st,optionCount:ct.length})))}));Le.displayName="Select",e.Select=Le,Object.defineProperty(e,"__esModule",{value:!0})}));
import React, { useRef, useMemo, useState, useEffect, forwardRef, useCallback, useImperativeHandle } from 'react';
import { ValueIndexEnum, FilterMatchEnum, OptionIndexEnum, MenuPositionEnum, EMPTY_ARRAY, 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, SELECT_WRAPPER_ATTRIBUTES } from './constants';
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';

@@ -8,3 +8,3 @@ import styled, { css, ThemeProvider } from 'styled-components';

import { mergeDeep, IS_TOUCH_DEVICE, suppressMouseOrTouchEvent, normalizeValue, isPlainObject, isBoolean, isArrayWithLength } from './utils';
const SelectWrapper = styled.div `
const SelectWrapper = styled.div.attrs(SELECT_WRAPPER_ATTRS) `
position: relative;

@@ -274,3 +274,3 @@ box-sizing: border-box;

};
const handleVerticalKeySubRoutine = (key) => {
const handleUpDownKeySubRoutine = (key) => {
const downKey = key === 'ArrowDown';

@@ -289,6 +289,7 @@ const downUpIndex = downKey ? OptionIndexEnum.DOWN : OptionIndexEnum.UP;

}
switch (e.key) {
const { key } = e;
switch (key) {
case 'ArrowDown':
case 'ArrowUp': {
handleVerticalKeySubRoutine(e.key);
handleUpDownKeySubRoutine(key);
break;

@@ -300,3 +301,3 @@ }

return;
const leftRightIndex = e.key === 'ArrowLeft' ? ValueIndexEnum.PREVIOUS : ValueIndexEnum.NEXT;
const leftRightIndex = key === 'ArrowLeft' ? ValueIndexEnum.PREVIOUS : ValueIndexEnum.NEXT;
focusValueOnArrowKey(leftRightIndex);

@@ -384,5 +385,4 @@ break;

}
if (targetIsNotInput) {
if (targetIsNotInput)
e.preventDefault();
}
};

@@ -425,3 +425,3 @@ const handleOnMenuMouseDown = (e) => {

return (React.createElement(ThemeProvider, { theme: theme },
React.createElement(SelectWrapper, Object.assign({ id: selectId, "aria-controls": inputId, "aria-expanded": menuOpen, onKeyDown: handleOnKeyDown }, SELECT_WRAPPER_ATTRIBUTES),
React.createElement(SelectWrapper, { id: selectId, "aria-controls": inputId, "aria-expanded": menuOpen, onKeyDown: handleOnKeyDown },
React.createElement(ControlWrapper, { ref: controlRef, isInvalid: isInvalid, isFocused: isFocused, isDisabled: isDisabled, className: CONTROL_CONTAINER_CLS, onTouchEnd: handleOnControlMouseDown, onMouseDown: handleOnControlMouseDown, "data-testid": CONTROL_CONTAINER_TESTID },

@@ -428,0 +428,0 @@ React.createElement(ValueWrapper, null,

@@ -60,9 +60,10 @@ /**

function smoothScrollTo(el, to, duration = 300, callback) {
let time = 0;
let curTime = 0;
const start = getScrollTop(el);
const change = to - start;
function scrollFn() {
time += 5;
scrollTo(el, easeOutCubic(change, duration, start, time));
(time < duration)
curTime += 5;
const calcScrollTop = easeOutCubic(change, duration, start, curTime);
scrollTo(el, calcScrollTop);
(curTime < duration)
? requestAnimationFrame(scrollFn)

@@ -69,0 +70,0 @@ : callback?.();

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

@@ -52,6 +52,6 @@ "main": "./dist/index.cjs.js",

"@rollup/plugin-typescript": "^8.2.1",
"@storybook/addon-storysource": "^6.2.0",
"@storybook/addons": "^6.2.0",
"@storybook/addon-storysource": "^6.2.1",
"@storybook/addons": "^6.2.1",
"@storybook/preset-create-react-app": "^3.1.7",
"@storybook/react": "^6.2.0",
"@storybook/react": "^6.2.1",
"@testing-library/jest-dom": "^5.11.10",

@@ -92,3 +92,3 @@ "@testing-library/react": "^11.2.6",

"rollup-plugin-terser": "^7.0.2",
"styled-components": "^5.2.2",
"styled-components": "^5.2.3",
"typescript": "^4.2.3"

@@ -95,0 +95,0 @@ },

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