"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3355],{66977:function(e,n,t){t.d(n,{h:function(){return s}});var o=t(67294),r=t(55118),a=t(17504),l=t(47187),i=["a11yTitle","onAlign","disabled","dropAlign","dropProps","dropContent","dropTarget","id","open","onClick","onClose","onOpen"];function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}var u={top:"top",left:"left"},s=(0,o.forwardRef)(function(e,n){var t=e.a11yTitle,s=e.onAlign,d=e.disabled,f=e.dropAlign,p=e.dropProps,m=e.dropContent,v=e.dropTarget,h=e.id,g=e.open,y=e.onClick,b=e.onClose,O=e.onOpen,C=function(e,n){if(null==e)return{};var t={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(n.includes(o))continue;t[o]=e[o]}return t}(e,i),w=(0,l.t)(n),E=(0,o.useState)(),k=E[0],x=E[1];(0,o.useEffect)(function(){void 0!==g&&g!==k&&x(g)},[g,k]);var S=(0,o.useCallback)(function(e){for(var n=e.composed&&e.composedPath()[0]||e.target;n&&n!==document&&!(n instanceof ShadowRoot)&&n!==w.current;)n=n.parentNode;n!==w.current&&(void 0===g&&x(!1),b&&b(e))},[w,b,g]),T=(0,o.useCallback)(function(e){k?(x(!1),b&&b(e)):(x(!0),O&&O(e)),y&&y(e)},[y,b,O,k]);return o.createElement(o.Fragment,null,o.createElement(r.z,c({id:h,ref:w,a11yTitle:void 0===t?"Open Drop":t,disabled:d},C,{onClick:T})),k&&w.current&&o.createElement(a.U,c({id:h?h+"__drop":void 0,onAlign:s,restrictFocus:!0,align:void 0===f?u:f,target:v||w,onClickOutside:S,onEsc:S},p),m))});s.displayName="DropButton",s.propTypes={}},21891:function(e,n,t){t.d(n,{p:function(){return T}});var o=t(67294),r=t(50066),a=t(45697),l=t.n(a),i=t(45543);r.ThemeContext.Extend=function(e){var n=e.children,t=e.value;return o.createElement(r.ThemeContext.Consumer,null,function(e){return o.createElement(r.ThemeContext.Provider,{value:(0,i.RH)(e,t)},n)})},r.ThemeContext.Extend.propTypes={children:l().node.isRequired,value:l().shape({}).isRequired},r.ThemeContext.propTypes={};var c=o.createContext(void 0);c.propTypes={};var u=t(88866),s=t(11862),d=t(46808),f=t(26093),p=t(47187),m=t(65502),v=t(80363),h=r.default.div.withConfig(v.VX).withConfig({displayName:"StyledGrommet",componentId:"sc-19lkkz7-0"})([""," "," "," "," ",""],function(e){return!e.plain&&v.Oh},function(e){return e.full&&("min"===e.full?(0,r.css)(["min-height:100vh;"]):(0,r.css)(["width:100vw;height:100vh;overflow:auto;"]))},function(e){return e.theme.global.font.face},function(e){return e.theme.grommet.extend},function(e){return e.cssVars&&Object.keys(e.theme.global.colors).filter(function(n){return"string"==typeof e.theme.global.colors[n]}).map(function(n){return"--"+n+": "+e.theme.global.colors[n]+";"}).join("\n")}),g=t(88601),y=t(11210),b=t(27598),O=t(7412),C=t(57921),w=["children","full","containerTarget","theme","options","messages","onAnalytics"];function E(){return(E=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}var k=(0,r.createGlobalStyle)(["body{margin:0;}"]),x=function(e,n){if(e)return/(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i.test(e)?(0,s.Nf)("tablet",n):/Mobile|iPhone|Android/.test(e)?(0,s.Nf)("phone",n):(0,s.Nf)("computer",n)},S={},T=(0,o.forwardRef)(function(e,n){var t=e.children,a=e.full,l=e.containerTarget,v=void 0===l?"object"==typeof document?document.body:void 0:l,T=e.theme,M=e.options,j=e.messages,P=e.onAnalytics,A=function(e,n){if(null==e)return{};var t={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(n.includes(o))continue;t[o]=e[o]}return t}(e,w),I=e.background,_=e.dir,K=e.themeMode,z=e.userAgent,N=(0,o.useState)(),R=N[0],D=N[1],F=(0,o.useState)([]),H=F[0],V=F[1],B=(0,o.useMemo)(function(){var e=(0,i.RH)(m.u,T||{});T&&T.menu&&T.menu.drop&&T.menu.drop.align&&(delete e.menu.drop.align,e.menu.drop.align=T.menu.drop.align);var n=e.global.colors.background;e.dark="dark"===(K||e.defaultMode),"auto"===K&&"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(e.dark=!0);var t=(0,d.ut)(I||n,e);return e.dark=(0,f.im)(t,e),e.baseBackground=I||n,e.background=e.baseBackground,_&&(e.dir=_),e},[I,_,K,T]),L=(0,o.useMemo)(function(){var e=(0,i.RH)(O,(null==j?void 0:j.messages)||{});return{messages:e,format:function(n){var t=(null==j?void 0:j.format)&&j.format(n);return void 0!==t?t:(0,b.W)(n,e)}}},[j]);(0,o.useEffect)(function(){var e=function(){D((0,s.iu)(document.body.clientWidth,B))};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}},[B]);var q=R||x(z,B)||B.global.deviceBreakpoints.tablet,G=(0,p.t)(n);return(0,o.useEffect)(function(){G.current&&V([G.current])},[G]),o.createElement(r.ThemeContext.Provider,{value:B},o.createElement(c.Provider,{value:q},o.createElement(g.Y.Provider,{value:H},o.createElement(u.c.Provider,{value:v},o.createElement(y.j.Provider,{value:void 0===M?S:M},o.createElement(b.E.Provider,{value:L},o.createElement(C.ng,{onAnalytics:P},o.createElement(h,E({full:a},A,{ref:G}),t),a&&o.createElement(k,null))))))))});T.displayName="Grommet",T.propTypes={}},5217:function(e,n,t){t.d(n,{P:function(){return Y}});var o=t(67294),r=t(28320),a=t(9719),l=t(39170),i=t(40131),c=t(50066),u=t(26093),s=t(31205),d=t(55118),f=t(85017),p=t(23902),m=t(59459),v=t(66977),h=t(80363),g=(0,c.default)(a.x).withConfig({displayName:"StyledSelect__StyledContainer",componentId:"sc-znp66n-0"})(["@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}",";",";"],function(e){return e.dropHeight?(0,h.Tq)("max-height",e.dropHeight,e.theme):"max-height: inherit;"},function(e){return e.theme.select.container&&e.theme.select.container.extend}),y=c.default.div.withConfig(h.VX).withConfig({displayName:"StyledSelect__OptionsContainer",componentId:"sc-znp66n-1"})(["position:relative;scroll-behavior:smooth;overflow:auto;outline:none;"]),b=c.default.input.withConfig(h.VX).withConfig({displayName:"StyledSelect__HiddenInput",componentId:"sc-znp66n-2"})(["display:none;"]),O=(0,c.default)(d.z).withConfig({displayName:"StyledSelect__SelectOption",componentId:"sc-znp66n-3"})([""," "," &:focus{","}display:block;width:100%;",";"],function(e){return e.selected&&e.textComponent&&u.G0},function(e){return e.active&&(0,u.AM)(e.children||e.theme.select.options?"background":void 0,e.theme)},function(e){return e.active&&(0,u.AM)(e.children||e.theme.select.options?"background":void 0,e.theme)},function(e){return e["aria-disabled"]&&"cursor: default"}),C=(0,c.default)(m.o).withConfig({displayName:"StyledSelect__SelectTextInput",componentId:"sc-znp66n-4"})(["cursor:",";"],function(e){return e.defaultCursor?"default":"pointer"}),w=(0,c.default)(v.h).withConfig({displayName:"StyledSelect__StyledSelectDropButton",componentId:"sc-znp66n-5"})(["",";",";",";"],function(e){return!e.plainSelect&&h.Lw},function(e){var n;return null==(n=e.theme.select)||null==(n=n.control)?void 0:n.extend},function(e){var n;return e.open&&(null==(n=e.theme.select)||null==(n=n.control)?void 0:n.open)}),E=t(46808),k=function(e,n){if(null!=e)return"object"==typeof n?k(e,n.key):"function"==typeof n?n(e):void 0!==n&&"object"==typeof e?e[n]:"object"==typeof e&&Object.keys(e)?e[Object.keys(e)[0]]:e},x=function(e,n,t){return k(n[e],t)},S=function(e,n,t){return k(n[e],t)},T=function(e,n,t){if(e)return"object"==typeof n?e.findIndex(function(e){return k(e,t)===k(n,t)}):e.indexOf(n)},M=function(e,n){Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set.call(e.current,n);var t=new Event("input",{bubbles:!0});e.current.dispatchEvent(t)},j=function(e,n,t){var o;switch(e){case!1:break;case!0:case void 0:o=t&&n.select.icons.up?n.select.icons.up:n.select.icons.down;break;default:o=e}return o},P=function(e,n,t,o){var r=k(n[t[0]],e);if(!o&&1===t.length&&"object"==typeof r)return r};function A(){return(A=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}var I=function(e){var n,t,r,l=e.emptySearchMessage,i=e.selectOptionsStyle,c=e.theme;return o.createElement(a.x,(null==c||null==(n=c.select)||null==(n=n.emptySearchMessage)?void 0:n.container)||i,o.createElement(p.x,A({"aria-live":"polite",role:"alert"},(null==c||null==(t=c.select)||null==(t=t.emptySearchMessage)?void 0:t.text)||(null==(r=c.select)||null==(r=r.options)?void 0:r.text)),l))},_=t(56866),K=["clear","onClear","name","theme"];function z(){return(z=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}var N=(0,c.default)(d.z).withConfig({displayName:"SelectContainer__StyledButton",componentId:"sc-1wi0ul8-0"})(["&:focus{","}"],function(e){return(0,u.AM)("background",e.theme)}),R=(0,o.forwardRef)(function(e,n){var t=e.clear,r=e.onClear,l=e.name,i=e.theme,c=function(e,n){if(null==e)return{};var t={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(n.includes(o))continue;t[o]=e[o]}return t}(e,K),u=t.label,s=t.position,d=u||"Clear "+(l||"selection"),f=(0,_.C)().passThemeFlag;return o.createElement(N,z({a11yTitle:d+". Or, press "+("bottom"===s?"shift tab":"down arrow")+" to move to select options",fill:"horizontal",ref:n,onClick:r,focusIndicator:!1},f,c),o.createElement(a.x,z({},i.select.clear.container,{align:"bottom"!==s?"start":"center"}),o.createElement(p.x,i.select.clear.text,d)))}),D=(0,o.forwardRef)(function(e,n){var t,r=e.clear,i=e.children,c=void 0===i?null:i,u=e.disabled,d=e.disabledKey,v=e.dropHeight,h=e.emptySearchMessage,b=e.id,C=e.labelKey,w=e.multiple,E=e.name,M=e.onChange,j=e.onKeyDown,P=e.onMore,A=e.onSearch,K=e.optionIndexesInValue,N=e.options,D=e.allOptions,F=e.searchPlaceholder,H=e.search,V=e.setSearch,B=e.selected,L=e.usingKeyboard,q=e.value,G=void 0===q?"":q,U=e.valueKey,W=e.replace,X=(0,_.C)(),Y=X.theme,$=X.passThemeFlag,J=(0,o.useCallback)(function(e){var n=!!(w&&G?G.length:G),t="bottom"===e?(null==r?void 0:r.position)==="bottom":(null==r?void 0:r.position)!=="bottom";return r&&n&&t},[r,w,G]),Q=(t=U||C,(0,o.useCallback)(function(e){var n,o=N[e];if(d)n=k(o,d);else if(Array.isArray(u)){if("number"==typeof u[0])n=-1!==u.indexOf(e);else{var r=S(e,N,t);n=-1!==T(u,N[e],t)||-1!==T(u,r,t)}}return n},[u,d,N,t])),Z=(0,o.useState)(!L||J("top")||A?-1:0),ee=Z[0],en=Z[1],et=(0,o.useState)(L),eo=et[0],er=et[1],ea=(0,o.useRef)(),el=(0,o.useRef)(),ei=(0,o.useRef)(),ec=(0,o.useRef)();(0,o.useEffect)(function(){var e;ee>=0&&(null==(e=ec.current)||e.focus())},[ee]),(0,o.useEffect)(function(){var e=setTimeout(function(){var e=el.current,n=ei.current;if(A){var t=ea.current;t&&t.focus&&!ec.current&&(0,s.Mv)(t)}else r&&n&&n.focus&&"bottom"!==r.position?(0,s.Mv)(n):L&&ec.current?(0,s.Mv)(ec.current):e&&(0,s.Mv)(e)},100);return function(){return clearTimeout(e)}},[A,L,r]);var eu=(0,o.useCallback)(function(e){var n;if(B)n=-1!==B.indexOf(e);else{var t=S(e,N,U);Array.isArray(G)?0===G.length?n=!1:"object"!=typeof G[0]?n=-1!==G.indexOf(t):U&&(n=G.some(function(e){return("function"==typeof U?U(e):e[U]||e[U.key])===t})):n=U&&null!==G&&"object"==typeof G?("function"==typeof U?U(G):G[U])===t:G===t}return n},[B,G,U,N]),es=(0,o.useCallback)(function(e){return function(n){if(M){if(w){var t,o,r=K.slice(0),a=D.indexOf(N[e]),l=K.indexOf(a);-1===l?r.push(a):r.splice(l,1),t=r.map(function(e){return U&&U.reduce?k(D[e],U):D[e]}),o=r}else t=U&&U.reduce?k(N[e],U):N[e],o=e;M(n,{option:N[e],value:t,selected:o})}}},[w,M,K,N,D,U]),ed=(0,o.useCallback)(function(e){M(e,{option:void 0,value:"",selected:""})},[M]),ef=(0,o.useCallback)(function(e){e.preventDefault();for(var n=ee+1;n<N.length&&Q(n);)n+=1;n!==N.length&&(en(n),er(!0))},[ee,N,Q]),ep=(0,o.useCallback)(function(e){e.preventDefault();var n=ee-1;if(-1===n){var t=ea.current,o=ei.current;o&&o.focus&&J("top")?(en(n),(0,s.Mv)(o)):t&&t.focus&&(en(n),(0,s.Mv)(t))}for(;n>=0&&Q(n);)n-=1;n>=0&&(en(n),er(!0))},[ee,Q,J]),em=(0,o.useCallback)(function(e){if(!A){var n=N.findIndex(function(n,t){var o;return"string"==typeof(o="object"==typeof n?n.label||k(n,C):n)&&o.charAt(0).toLowerCase()===e.key.toLowerCase()&&!Q(t)});n>=0&&(e.preventDefault(),en(n),er(!0))}j&&j(e)},[Q,C,j,N,A]),ev=(0,o.useCallback)(function(e){return function(){eo||en(e)}},[eo]),eh=(0,o.useCallback)(function(e){(J("bottom")||J("top"))&&(0,s.sT)(ei.current)?M(e,{option:void 0,value:"",selected:""}):ee>=0&&ee<N.length&&(e.preventDefault(),es(ee)(e))},[ee,es,N,M,J]),eg=Y.select.searchInput,ey=eg||m.o,eb=Y.select.options?z({},Y.select.options.box,Y.select.options.container):{};return o.createElement(l.N,{onEnter:eh,onSpace:eh,onUp:ep,onDown:ef,onKeyDown:em},o.createElement(g,z({ref:n,id:b?b+"__select-drop":void 0,dropHeight:v},$),A&&o.createElement(a.x,{pad:eg?void 0:"xsmall",flex:!1},o.createElement(ey,{focusIndicator:!eg,size:"small",ref:ea,type:"search",value:H||"",placeholder:F,onChange:function(e){var n=e.target.value;V(n),en(-1),A(n)}})),J("top")&&o.createElement(R,{ref:ei,clear:r,name:E,onClear:ed,onFocus:function(){return en(-1)},onMouseOver:function(){return en(-1)},theme:Y}),N.length>0?o.createElement(y,{role:"listbox",tabIndex:"-1",ref:el,"aria-multiselectable":w,onMouseMove:function(){return er(!1)}},o.createElement(f.v,{items:N,step:Y.select.step,onMore:P,replace:void 0===W||W,show:-1!==ee?ee:void 0},function(e,n,t){var r,l=Q(n),i=eu(n),u=ee===n,s=!1;return c?("string"==typeof(r=c(e,n,N,{active:u,disabled:l,selected:i}))||r.props&&r.props.children&&"string"==typeof r.props.children)&&(s=!0):Y.select.options&&(r=o.createElement(a.x,eb,o.createElement(p.x,Y.select.options.text,x(n,N,C))),s=!0),o.createElement(O,z({key:n,ref:function(e){t&&(t.current=e),u&&(ec.current=e)},tabIndex:i?"0":"-1",role:"option","aria-setsize":N.length,"aria-posinset":n+1,"aria-selected":i,focusIndicator:!1,"aria-disabled":l||void 0,plain:!!r||void 0,align:"start",kind:r?void 0:"option",label:r?void 0:x(n,N,C||U),disabled:l||void 0,active:u,selected:i,onFocus:function(){return en(n)},onMouseOver:l?void 0:ev(n),onClick:l?void 0:es(n),textComponent:s},$),r)})):o.createElement(I,{emptySearchMessage:void 0===h?"No matches found":h,selectOptionsStyle:eb,theme:Y}),J("bottom")&&o.createElement(R,{ref:ei,clear:r,name:E,onClear:ed,onFocus:function(){return en(-1)},onMouseOver:function(){return en(-1)},theme:Y})))}),F=["disabled","id"];function H(){return(H=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}var V=(0,o.forwardRef)(function(e,n){var t=e.disabled,r=e.id,a=function(e,n){if(null==e)return{};var t={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(n.includes(o))continue;t[o]=e[o]}return t}(e,F);return o.createElement(C,H({defaultCursor:!0===t||void 0,focusIndicator:!1,id:r?r+"__input":void 0,ref:n},a,{tabIndex:"-1",type:"text",plain:!0,readOnly:!0}))}),B=t(27598),L=t(45697),q=t.n(L);function G(){return(G=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}G({},t(13195).Y$,{children:q().func,disabled:q().oneOfType([q().bool,q().arrayOf(q().oneOfType([q().number,q().string,q().object]))]),disabledKey:q().oneOfType([q().string,q().func]),dropAlign:q().shape({top:q().oneOf(["top","bottom"]),bottom:q().oneOf(["top","bottom"]),right:q().oneOf(["left","right"]),left:q().oneOf(["left","right"])}),dropHeight:q().oneOfType([q().oneOf(["xsmall","small","medium","large","xlarge"]),q().string]),dropTarget:q().object,dropProps:q().object,emptySearchMessage:q().oneOfType([q().string,q().node]),focusIndicator:q().bool,icon:q().oneOfType([q().bool,q().func,q().node,q().elementType]),labelKey:q().oneOfType([q().string,q().func]),messages:q().shape({multiple:q().string}),name:q().string,onChange:q().func,onClose:q().func,onOpen:q().func,onSearch:q().func,onMore:q().func,options:q().arrayOf(q().oneOfType([q().string,q().number,q().bool,q().element,q().object])).isRequired,open:q().bool,placeholder:q().oneOfType([q().string,q().element,q().node]),plain:q().bool,replace:q().bool,searchPlaceholder:q().oneOfType([q().string,q().element,q().node]),size:q().oneOfType([q().oneOf(["small","medium","large","xlarge"]),q().string]),valueLabel:q().oneOfType([q().node,q().func]),valueKey:q().oneOfType([q().string,q().func,q().shape({key:q().string,reduce:q().bool})])});var U=["a11yTitle","aria-label","alignSelf","children","clear","closeOnChange","defaultValue","disabled","disabledKey","dropAlign","dropHeight","dropProps","dropTarget","emptySearchMessage","focusIndicator","gridArea","id","icon","labelKey","margin","messages","multiple","name","onBlur","onChange","onClick","onClose","onFocus","onKeyDown","onMore","onOpen","onSearch","open","options","placeholder","plain","replace","searchPlaceholder","selected","size","value","valueKey","valueLabel"];function W(){return(W=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}var X={top:"bottom",left:"left"},Y=(0,o.forwardRef)(function(e,n){var t=e.a11yTitle,c=e["aria-label"],u=e.alignSelf,s=e.children,d=e.clear,f=e.closeOnChange,p=void 0===f||f,m=e.defaultValue,v=e.disabled,h=e.disabledKey,g=e.dropAlign,y=e.dropHeight,O=e.dropProps,C=e.dropTarget,x=e.emptySearchMessage,S=e.focusIndicator,T=e.gridArea,A=e.id,I=e.icon,K=e.labelKey,z=e.margin,N=e.messages,R=e.multiple,F=e.name,H=e.onBlur,L=e.onChange,q=e.onClick,G=e.onClose,Y=e.onFocus,$=e.onKeyDown,J=e.onMore,Q=e.onOpen,Z=e.onSearch,ee=e.open,en=e.options,et=e.placeholder,eo=e.plain,er=e.replace,ea=e.searchPlaceholder,el=e.selected,ei=e.size,ec=e.value,eu=e.valueKey,es=e.valueLabel,ed=function(e,n){if(null==e)return{};var t={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(n.includes(o))continue;t[o]=e[o]}return t}(e,U),ef=(0,_.C)().theme,ep=(0,o.useRef)(),em=(0,o.useContext)(i.q),ev=(0,o.useContext)(B.E).format,eh=eu||K,eg=K||eu,ey=(0,r.v)(),eb=em.useFormInput({name:F,value:ec,initialValue:m||""}),eO=eb[0],eC=eb[1],ew=(0,o.useMemo)(function(){return Array.isArray(eO)?eO.map(function(e){return eh&&eh.reduce?e:k(e,eh)}):eh&&eh.reduce?eO:k(eO,eh)},[eO,eh]),eE=(0,o.useState)(),ek=eE[0],ex=eE[1],eS=(0,o.useState)(en),eT=eS[0],eM=eS[1];(0,o.useEffect)(function(){ek||eM(en)},[en,ek]);var ej=(0,o.useMemo)(function(){var e=[];return eT.forEach(function(n,t){void 0!==el?Array.isArray(el)?-1!==el.indexOf(t)&&e.push(t):t===el&&e.push(t):Array.isArray(ew)?ew.some(function(e){return e===k(n,eh)})&&e.push(t):ew===k(n,eh)&&e.push(t)}),e},[eT,el,eh,ew]),eP=(0,o.useState)(ee),eA=eP[0],eI=eP[1];(0,o.useEffect)(function(){return eI(ee)},[ee]);var e_=(0,o.useCallback)(function(){!eA&&(eI(!0),Q&&Q())},[Q,eA]),eK=(0,o.useCallback)(function(){eI(!1),G&&G(),ex()},[G]),ez=(0,o.useCallback)(function(e){return M(ep,e)},[]),eN=(0,o.useCallback)(function(e,n){var t,o=n.option,r=n.value,a=n.selected;p&&eK(),("object"!=typeof r||R)&&r!==e.target.value&&ep.current&&ez(r),eC(r),L&&(e.persist(),e instanceof Event?Object.defineProperties(t=new e.constructor(e.type,e),{target:{value:ep.current},value:{value:r},option:{value:o},selected:{value:a}}):((t=e).target=ep.current,t.value=r,t.option=o,t.selected=a),L(t))},[p,R,L,eK,eC,ez]),eR=j(I,ef,eA),eD=(0,o.useMemo)(function(){if(es instanceof Function){if(eO||0===eO||!1===eO)return es(eO)}else if(es)return es;else if(o.isValidElement(eO))return eO},[eO,es]),eF=(0,o.useMemo)(function(){return P(eg,eT,ej,eD)},[eg,eT,ej,eD]),eH=(0,o.useMemo)(function(){if(!eD)return 0===ej.length?"":1===ej.length?k(eT[ej[0]],eg):ev({id:"select.multiple",messages:N})},[eg,N,ev,ej,eT,eD]),eV=(0,E.ut)(ef.select.icons.color||"control",ef);return o.createElement(l.N,{onDown:e_,onUp:e_},o.createElement(w,{ref:n,a11yTitle:""+(c||t||et||"Open Drop")+(eO?ev({id:"select.selected",messages:N,values:{currentSelectedValue:eO}}):""),"aria-expanded":!!eA,"aria-haspopup":"listbox",id:A,disabled:!0===v||void 0,dropAlign:void 0===g?X:g,dropTarget:C,open:eA,alignSelf:u,focusIndicator:S,onFocus:Y,onBlur:H,gridArea:T,margin:z,onOpen:e_,onClose:eK,onClick:q,dropContent:o.createElement(D,{clear:void 0!==d&&d,disabled:v,disabledKey:h,dropHeight:y,emptySearchMessage:x,id:A,labelKey:eg,multiple:R,name:F,onChange:eN,onKeyDown:$,onMore:J,onSearch:Z,options:en,allOptions:eT,optionIndexesInValue:ej,replace:er,searchPlaceholder:ea,search:ek,setSearch:ex,selected:el,usingKeyboard:ey,value:eO,valueKey:eh},s),plainSelect:eo,plain:!0,dropProps:O,theme:ef},o.createElement(a.x,{align:"center",direction:"row",justify:"between",background:ef.select.background},o.createElement(a.x,{direction:"row",flex:!0,basis:"auto"},eD||eF?o.createElement(o.Fragment,null,eD||eF,o.createElement(b,{type:"text",name:F,id:A?A+"__input":void 0,value:eH,ref:ep,readOnly:!0})):o.createElement(V,W({a11yTitle:(c||t)&&""+(c||t)+(eO&&"string"==typeof eO?", "+eO:""),disabled:v,id:A,name:F,ref:ep,placeholder:et,value:eH,size:ei,theme:ef},ed))),eR&&o.createElement(a.x,{margin:ef.select.icons.margin,flex:!1,style:{minWidth:"auto"}},(0,o.isValidElement)(eR)?eR:o.createElement(eR,{color:eV,size:ei})))))});Y.displayName="Select",Y.propTypes={}}}]);