"use strict";const w=require("react"),Fe=require("./index-tXqxYME3.js");function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function le(e,n){if(e==null)return{};var o={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.indexOf(i)!==-1)continue;o[i]=e[i]}return o}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var i in o)({}).hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},L.apply(null,arguments)}function it(e,n){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},it(e,n)}function Cr(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,it(e,n)}var Pe={exports:{}},Me={exports:{}},J={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Qt;function Or(){if(Qt)return J;Qt=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,b=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,D=e?Symbol.for("react.suspense_list"):60120,R=e?Symbol.for("react.memo"):60115,B=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,j=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function p(l){if(typeof l=="object"&&l!==null){var k=l.$$typeof;switch(k){case n:switch(l=l.type,l){case a:case h:case i:case t:case r:case x:return l;default:switch(l=l&&l.$$typeof,l){case s:case b:case B:case R:case u:return l;default:return k}}case o:return k}}}function f(l){return p(l)===h}return J.AsyncMode=a,J.ConcurrentMode=h,J.ContextConsumer=s,J.ContextProvider=u,J.Element=n,J.ForwardRef=b,J.Fragment=i,J.Lazy=B,J.Memo=R,J.Portal=o,J.Profiler=t,J.StrictMode=r,J.Suspense=x,J.isAsyncMode=function(l){return f(l)||p(l)===a},J.isConcurrentMode=f,J.isContextConsumer=function(l){return p(l)===s},J.isContextProvider=function(l){return p(l)===u},J.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===n},J.isForwardRef=function(l){return p(l)===b},J.isFragment=function(l){return p(l)===i},J.isLazy=function(l){return p(l)===B},J.isMemo=function(l){return p(l)===R},J.isPortal=function(l){return p(l)===o},J.isProfiler=function(l){return p(l)===t},J.isStrictMode=function(l){return p(l)===r},J.isSuspense=function(l){return p(l)===x},J.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===i||l===h||l===t||l===r||l===x||l===D||typeof l=="object"&&l!==null&&(l.$$typeof===B||l.$$typeof===R||l.$$typeof===u||l.$$typeof===s||l.$$typeof===b||l.$$typeof===g||l.$$typeof===j||l.$$typeof===d||l.$$typeof===T)},J.typeOf=p,J}var Z={};/** @license React v16.13.1
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var en;function Sr(){return en||(en=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,b=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,D=e?Symbol.for("react.suspense_list"):60120,R=e?Symbol.for("react.memo"):60115,B=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,j=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function p(E){return typeof E=="string"||typeof E=="function"||E===i||E===h||E===t||E===r||E===x||E===D||typeof E=="object"&&E!==null&&(E.$$typeof===B||E.$$typeof===R||E.$$typeof===u||E.$$typeof===s||E.$$typeof===b||E.$$typeof===g||E.$$typeof===j||E.$$typeof===d||E.$$typeof===T)}function f(E){if(typeof E=="object"&&E!==null){var ne=E.$$typeof;switch(ne){case n:var S=E.type;switch(S){case a:case h:case i:case t:case r:case x:return S;default:var se=S&&S.$$typeof;switch(se){case s:case b:case B:case R:case u:return se;default:return ne}}case o:return ne}}}var l=a,k=h,W=s,K=u,N=n,V=b,A=i,Y=B,G=R,H=o,re=t,te=r,ie=x,F=!1;function U(E){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),c(E)||f(E)===a}function c(E){return f(E)===h}function _(E){return f(E)===s}function I(E){return f(E)===u}function m(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function v(E){return f(E)===b}function C(E){return f(E)===i}function O(E){return f(E)===B}function P(E){return f(E)===R}function M(E){return f(E)===o}function q(E){return f(E)===t}function $(E){return f(E)===r}function z(E){return f(E)===x}Z.AsyncMode=l,Z.ConcurrentMode=k,Z.ContextConsumer=W,Z.ContextProvider=K,Z.Element=N,Z.ForwardRef=V,Z.Fragment=A,Z.Lazy=Y,Z.Memo=G,Z.Portal=H,Z.Profiler=re,Z.StrictMode=te,Z.Suspense=ie,Z.isAsyncMode=U,Z.isConcurrentMode=c,Z.isContextConsumer=_,Z.isContextProvider=I,Z.isElement=m,Z.isForwardRef=v,Z.isFragment=C,Z.isLazy=O,Z.isMemo=P,Z.isPortal=M,Z.isProfiler=q,Z.isStrictMode=$,Z.isSuspense=z,Z.isValidElementType=p,Z.typeOf=f})()),Z}var tn;function xn(){return tn||(tn=1,process.env.NODE_ENV==="production"?Me.exports=Or():Me.exports=Sr()),Me.exports}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var Qe,nn;function Rr(){if(nn)return Qe;nn=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var u={},s=0;s<10;s++)u["_"+String.fromCharCode(s)]=s;var a=Object.getOwnPropertyNames(u).map(function(b){return u[b]});if(a.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(b){h[b]=b}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qe=r()?Object.assign:function(t,u){for(var s,a=i(t),h,b=1;b<arguments.length;b++){s=Object(arguments[b]);for(var x in s)n.call(s,x)&&(a[x]=s[x]);if(e){h=e(s);for(var D=0;D<h.length;D++)o.call(s,h[D])&&(a[h[D]]=s[h[D]])}}return a},Qe}var et,rn;function at(){if(rn)return et;rn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return et=e,et}var tt,on;function Dn(){return on||(on=1,tt=Function.call.bind(Object.prototype.hasOwnProperty)),tt}var nt,un;function Tr(){if(un)return nt;un=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=at(),o={},i=Dn();e=function(t){var u="Warning: "+t;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function r(t,u,s,a,h){if(process.env.NODE_ENV!=="production"){for(var b in t)if(i(t,b)){var x;try{if(typeof t[b]!="function"){var D=Error((a||"React class")+": "+s+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}x=t[b](u,b,a,s,null,n)}catch(B){x=B}if(x&&!(x instanceof Error)&&e((a||"React class")+": type specification of "+s+" `"+b+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof x+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),x instanceof Error&&!(x.message in o)){o[x.message]=!0;var R=h?h():"";e("Failed "+s+" type: "+x.message+(R??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(o={})},nt=r,nt}var rt,sn;function Pr(){if(sn)return rt;sn=1;var e=xn(),n=Rr(),o=at(),i=Dn(),r=Tr(),t=function(){};process.env.NODE_ENV!=="production"&&(t=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}});function u(){return null}return rt=function(s,a){var h=typeof Symbol=="function"&&Symbol.iterator,b="@@iterator";function x(c){var _=c&&(h&&c[h]||c[b]);if(typeof _=="function")return _}var D="<<anonymous>>",R={array:j("array"),bigint:j("bigint"),bool:j("boolean"),func:j("function"),number:j("number"),object:j("object"),string:j("string"),symbol:j("symbol"),any:d(),arrayOf:p,element:f(),elementType:l(),instanceOf:k,node:V(),objectOf:K,oneOf:W,oneOfType:N,shape:Y,exact:G};function B(c,_){return c===_?c!==0||1/c===1/_:c!==c&&_!==_}function T(c,_){this.message=c,this.data=_&&typeof _=="object"?_:{},this.stack=""}T.prototype=Error.prototype;function g(c){if(process.env.NODE_ENV!=="production")var _={},I=0;function m(C,O,P,M,q,$,z){if(M=M||D,$=$||P,z!==o){if(a){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=M+":"+P;!_[ne]&&I<3&&(t("You are manually calling a React.PropTypes validation function for the `"+$+"` prop on `"+M+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),_[ne]=!0,I++)}}return O[P]==null?C?O[P]===null?new T("The "+q+" `"+$+"` is marked as required "+("in `"+M+"`, but its value is `null`.")):new T("The "+q+" `"+$+"` is marked as required in "+("`"+M+"`, but its value is `undefined`.")):null:c(O,P,M,q,$)}var v=m.bind(null,!1);return v.isRequired=m.bind(null,!0),v}function j(c){function _(I,m,v,C,O,P){var M=I[m],q=te(M);if(q!==c){var $=ie(M);return new T("Invalid "+C+" `"+O+"` of type "+("`"+$+"` supplied to `"+v+"`, expected ")+("`"+c+"`."),{expectedType:c})}return null}return g(_)}function d(){return g(u)}function p(c){function _(I,m,v,C,O){if(typeof c!="function")return new T("Property `"+O+"` of component `"+v+"` has invalid PropType notation inside arrayOf.");var P=I[m];if(!Array.isArray(P)){var M=te(P);return new T("Invalid "+C+" `"+O+"` of type "+("`"+M+"` supplied to `"+v+"`, expected an array."))}for(var q=0;q<P.length;q++){var $=c(P,q,v,C,O+"["+q+"]",o);if($ instanceof Error)return $}return null}return g(_)}function f(){function c(_,I,m,v,C){var O=_[I];if(!s(O)){var P=te(O);return new T("Invalid "+v+" `"+C+"` of type "+("`"+P+"` supplied to `"+m+"`, expected a single ReactElement."))}return null}return g(c)}function l(){function c(_,I,m,v,C){var O=_[I];if(!e.isValidElementType(O)){var P=te(O);return new T("Invalid "+v+" `"+C+"` of type "+("`"+P+"` supplied to `"+m+"`, expected a single ReactElement type."))}return null}return g(c)}function k(c){function _(I,m,v,C,O){if(!(I[m]instanceof c)){var P=c.name||D,M=U(I[m]);return new T("Invalid "+C+" `"+O+"` of type "+("`"+M+"` supplied to `"+v+"`, expected ")+("instance of `"+P+"`."))}return null}return g(_)}function W(c){if(!Array.isArray(c))return process.env.NODE_ENV!=="production"&&(arguments.length>1?t("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):t("Invalid argument supplied to oneOf, expected an array.")),u;function _(I,m,v,C,O){for(var P=I[m],M=0;M<c.length;M++)if(B(P,c[M]))return null;var q=JSON.stringify(c,function(z,E){var ne=ie(E);return ne==="symbol"?String(E):E});return new T("Invalid "+C+" `"+O+"` of value `"+String(P)+"` "+("supplied to `"+v+"`, expected one of "+q+"."))}return g(_)}function K(c){function _(I,m,v,C,O){if(typeof c!="function")return new T("Property `"+O+"` of component `"+v+"` has invalid PropType notation inside objectOf.");var P=I[m],M=te(P);if(M!=="object")return new T("Invalid "+C+" `"+O+"` of type "+("`"+M+"` supplied to `"+v+"`, expected an object."));for(var q in P)if(i(P,q)){var $=c(P,q,v,C,O+"."+q,o);if($ instanceof Error)return $}return null}return g(_)}function N(c){if(!Array.isArray(c))return process.env.NODE_ENV!=="production"&&t("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var _=0;_<c.length;_++){var I=c[_];if(typeof I!="function")return t("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(I)+" at index "+_+"."),u}function m(v,C,O,P,M){for(var q=[],$=0;$<c.length;$++){var z=c[$],E=z(v,C,O,P,M,o);if(E==null)return null;E.data&&i(E.data,"expectedType")&&q.push(E.data.expectedType)}var ne=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new T("Invalid "+P+" `"+M+"` supplied to "+("`"+O+"`"+ne+"."))}return g(m)}function V(){function c(_,I,m,v,C){return H(_[I])?null:new T("Invalid "+v+" `"+C+"` supplied to "+("`"+m+"`, expected a ReactNode."))}return g(c)}function A(c,_,I,m,v){return new T((c||"React class")+": "+_+" type `"+I+"."+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+v+"`.")}function Y(c){function _(I,m,v,C,O){var P=I[m],M=te(P);if(M!=="object")return new T("Invalid "+C+" `"+O+"` of type `"+M+"` "+("supplied to `"+v+"`, expected `object`."));for(var q in c){var $=c[q];if(typeof $!="function")return A(v,C,O,q,ie($));var z=$(P,q,v,C,O+"."+q,o);if(z)return z}return null}return g(_)}function G(c){function _(I,m,v,C,O){var P=I[m],M=te(P);if(M!=="object")return new T("Invalid "+C+" `"+O+"` of type `"+M+"` "+("supplied to `"+v+"`, expected `object`."));var q=n({},I[m],c);for(var $ in q){var z=c[$];if(i(c,$)&&typeof z!="function")return A(v,C,O,$,ie(z));if(!z)return new T("Invalid "+C+" `"+O+"` key `"+$+"` supplied to `"+v+"`.\nBad object: "+JSON.stringify(I[m],null,"  ")+`
Valid keys: `+JSON.stringify(Object.keys(c),null,"  "));var E=z(P,$,v,C,O+"."+$,o);if(E)return E}return null}return g(_)}function H(c){switch(typeof c){case"number":case"string":case"undefined":return!0;case"boolean":return!c;case"object":if(Array.isArray(c))return c.every(H);if(c===null||s(c))return!0;var _=x(c);if(_){var I=_.call(c),m;if(_!==c.entries){for(;!(m=I.next()).done;)if(!H(m.value))return!1}else for(;!(m=I.next()).done;){var v=m.value;if(v&&!H(v[1]))return!1}}else return!1;return!0;default:return!1}}function re(c,_){return c==="symbol"?!0:_?_["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&_ instanceof Symbol:!1}function te(c){var _=typeof c;return Array.isArray(c)?"array":c instanceof RegExp?"object":re(_,c)?"symbol":_}function ie(c){if(typeof c>"u"||c===null)return""+c;var _=te(c);if(_==="object"){if(c instanceof Date)return"date";if(c instanceof RegExp)return"regexp"}return _}function F(c){var _=ie(c);switch(_){case"array":case"object":return"an "+_;case"boolean":case"date":case"regexp":return"a "+_;default:return _}}function U(c){return!c.constructor||!c.constructor.name?D:c.constructor.name}return R.checkPropTypes=r,R.resetWarningCache=r.resetWarningCache,R.PropTypes=R,R},rt}var ot,an;function Mr(){if(an)return ot;an=1;var e=at();function n(){}function o(){}return o.resetWarningCache=n,ot=function(){function i(u,s,a,h,b,x){if(x!==e){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}}i.isRequired=i;function r(){return i}var t={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:n};return t.PropTypes=t,t},ot}var ln;function kr(){if(ln)return Pe.exports;if(ln=1,process.env.NODE_ENV!=="production"){var e=xn(),n=!0;Pe.exports=Pr()(e.isElement,n)}else Pe.exports=Mr()();return Pe.exports}var Nr=kr();const y=Dr(Nr);var ke={exports:{}},Q={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var cn;function Vr(){if(cn)return Q;cn=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),s=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),B;B=Symbol.for("react.module.reference");function T(g){if(typeof g=="object"&&g!==null){var j=g.$$typeof;switch(j){case e:switch(g=g.type,g){case o:case r:case i:case h:case b:return g;default:switch(g=g&&g.$$typeof,g){case s:case u:case a:case D:case x:case t:return g;default:return j}}case n:return j}}}return Q.ContextConsumer=u,Q.ContextProvider=t,Q.Element=e,Q.ForwardRef=a,Q.Fragment=o,Q.Lazy=D,Q.Memo=x,Q.Portal=n,Q.Profiler=r,Q.StrictMode=i,Q.Suspense=h,Q.SuspenseList=b,Q.isAsyncMode=function(){return!1},Q.isConcurrentMode=function(){return!1},Q.isContextConsumer=function(g){return T(g)===u},Q.isContextProvider=function(g){return T(g)===t},Q.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Q.isForwardRef=function(g){return T(g)===a},Q.isFragment=function(g){return T(g)===o},Q.isLazy=function(g){return T(g)===D},Q.isMemo=function(g){return T(g)===x},Q.isPortal=function(g){return T(g)===n},Q.isProfiler=function(g){return T(g)===r},Q.isStrictMode=function(g){return T(g)===i},Q.isSuspense=function(g){return T(g)===h},Q.isSuspenseList=function(g){return T(g)===b},Q.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===o||g===r||g===i||g===h||g===b||g===R||typeof g=="object"&&g!==null&&(g.$$typeof===D||g.$$typeof===x||g.$$typeof===t||g.$$typeof===u||g.$$typeof===a||g.$$typeof===B||g.getModuleId!==void 0)},Q.typeOf=T,Q}var ee={};/**
 * @license React
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var dn;function Kr(){return dn||(dn=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),s=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),B=!1,T=!1,g=!1,j=!1,d=!1,p;p=Symbol.for("react.module.reference");function f(S){return!!(typeof S=="string"||typeof S=="function"||S===o||S===r||d||S===i||S===h||S===b||j||S===R||B||T||g||typeof S=="object"&&S!==null&&(S.$$typeof===D||S.$$typeof===x||S.$$typeof===t||S.$$typeof===u||S.$$typeof===a||S.$$typeof===p||S.getModuleId!==void 0))}function l(S){if(typeof S=="object"&&S!==null){var se=S.$$typeof;switch(se){case e:var oe=S.type;switch(oe){case o:case r:case i:case h:case b:return oe;default:var ue=oe&&oe.$$typeof;switch(ue){case s:case u:case a:case D:case x:case t:return ue;default:return se}}case n:return se}}}var k=u,W=t,K=e,N=a,V=o,A=D,Y=x,G=n,H=r,re=i,te=h,ie=b,F=!1,U=!1;function c(S){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function _(S){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function I(S){return l(S)===u}function m(S){return l(S)===t}function v(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function C(S){return l(S)===a}function O(S){return l(S)===o}function P(S){return l(S)===D}function M(S){return l(S)===x}function q(S){return l(S)===n}function $(S){return l(S)===r}function z(S){return l(S)===i}function E(S){return l(S)===h}function ne(S){return l(S)===b}ee.ContextConsumer=k,ee.ContextProvider=W,ee.Element=K,ee.ForwardRef=N,ee.Fragment=V,ee.Lazy=A,ee.Memo=Y,ee.Portal=G,ee.Profiler=H,ee.StrictMode=re,ee.Suspense=te,ee.SuspenseList=ie,ee.isAsyncMode=c,ee.isConcurrentMode=_,ee.isContextConsumer=I,ee.isContextProvider=m,ee.isElement=v,ee.isForwardRef=C,ee.isFragment=O,ee.isLazy=P,ee.isMemo=M,ee.isPortal=q,ee.isProfiler=$,ee.isStrictMode=z,ee.isSuspense=E,ee.isSuspenseList=ne,ee.isValidElementType=f,ee.typeOf=l})()),ee}var fn;function Ar(){return fn||(fn=1,process.env.NODE_ENV==="production"?ke.exports=Vr():ke.exports=Kr()),ke.exports}var pn=Ar();const gn=e=>typeof e=="object"&&e!=null&&e.nodeType===1,vn=(e,n)=>(!n||e!=="hidden")&&e!=="visible"&&e!=="clip",Ne=(e,n)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const o=getComputedStyle(e,null);return vn(o.overflowY,n)||vn(o.overflowX,n)||(i=>{const r=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeight<i.scrollHeight||r.clientWidth<i.scrollWidth)})(e)}return!1},Ve=(e,n,o,i,r,t,u,s)=>t<e&&u>n||t>e&&u<n?0:t<=e&&s<=o||u>=n&&s>=o?t-e-i:u>n&&s<o||t<e&&s>o?u-n+r:0,Hr=e=>{const n=e.parentElement;return n??(e.getRootNode().host||null)},$r=(e,n)=>{var o,i,r,t;if(typeof document>"u")return[];const{inline:u,boundary:s,skipOverflowHiddenElements:a}=n,h=typeof s=="function"?s:G=>G!==s;if(!gn(e))throw new TypeError("Invalid target");const b=document.scrollingElement||document.documentElement,x=[];let D=e;for(;gn(D)&&h(D);){if(D=Hr(D),D===b){x.push(D);break}D!=null&&D===document.body&&Ne(D)&&!Ne(document.documentElement)||D!=null&&Ne(D,a)&&x.push(D)}const R=(i=(o=window.visualViewport)==null?void 0:o.width)!=null?i:innerWidth,B=(t=(r=window.visualViewport)==null?void 0:r.height)!=null?t:innerHeight,{scrollX:T,scrollY:g}=window,{height:j,width:d,top:p,right:f,bottom:l,left:k}=e.getBoundingClientRect(),{top:W,right:K,left:N}=(G=>{const H=window.getComputedStyle(G);return{top:parseFloat(H.scrollMarginTop)||0,right:parseFloat(H.scrollMarginRight)||0,bottom:parseFloat(H.scrollMarginBottom)||0,left:parseFloat(H.scrollMarginLeft)||0}})(e);let V=p-W,A=u==="center"?k+d/2-N+K:u==="end"?f+K:k-N;const Y=[];for(let G=0;G<x.length;G++){const H=x[G],{height:re,width:te,top:ie,right:F,bottom:U,left:c}=H.getBoundingClientRect();if(p>=0&&k>=0&&l<=B&&f<=R&&(H===b&&!Ne(H)||p>=ie&&l<=U&&k>=c&&f<=F))return Y;const _=getComputedStyle(H),I=parseInt(_.borderLeftWidth,10),m=parseInt(_.borderTopWidth,10),v=parseInt(_.borderRightWidth,10),C=parseInt(_.borderBottomWidth,10);let O=0,P=0;const M="offsetWidth"in H?H.offsetWidth-H.clientWidth-I-v:0,q="offsetHeight"in H?H.offsetHeight-H.clientHeight-m-C:0,$="offsetWidth"in H?H.offsetWidth===0?0:te/H.offsetWidth:0,z="offsetHeight"in H?H.offsetHeight===0?0:re/H.offsetHeight:0;if(b===H)O=Ve(g,g+B,B,m,C,g+V,g+V+j,j),P=u==="start"?A:u==="center"?A-R/2:u==="end"?A-R:Ve(T,T+R,R,I,v,T+A,T+A+d,d),O=Math.max(0,O+g),P=Math.max(0,P+T);else{O=Ve(ie,U,re,m,C+q,V,V+j,j),P=u==="start"?A-c-I:u==="center"?A-(c+te/2)+M/2:u==="end"?A-F+v+M:Ve(c,F,te,I,v+M,A,A+d,d);const{scrollLeft:E,scrollTop:ne}=H;O=z===0?0:Math.max(0,Math.min(ne+O/z,H.scrollHeight-re/z+q)),P=$===0?0:Math.max(0,Math.min(E+P/$,H.scrollWidth-te/$+M)),V+=ne-O,A+=E-P}Y.push({el:H,top:O,left:P})}return Y};var Br=0;function hn(e){return typeof e=="function"?e:ae}function ae(){}function Cn(e,n){if(e){var o=$r(e,{boundary:n});o.forEach(function(i){var r=i.el,t=i.top,u=i.left;r.scrollTop=t,r.scrollLeft=u})}}function mn(e,n,o){var i=e===n||n instanceof o.Node&&e.contains&&e.contains(n);return i}function Ge(e,n){var o;function i(){o&&clearTimeout(o)}function r(){for(var t=arguments.length,u=new Array(t),s=0;s<t;s++)u[s]=arguments[s];i(),o=setTimeout(function(){o=null,e.apply(void 0,u)},n)}return r.cancel=i,r}function X(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return function(i){for(var r=arguments.length,t=new Array(r>1?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];return n.some(function(s){return s&&s.apply(void 0,[i].concat(t)),i.preventDownshiftDefault||i.hasOwnProperty("nativeEvent")&&i.nativeEvent.preventDownshiftDefault})}}function ve(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return function(i){n.forEach(function(r){typeof r=="function"?r(i):r&&(r.current=i)})}}function On(){return String(Br++)}function Fr(e){var n=e.isOpen,o=e.resultCount,i=e.previousResultCount;return n?o?o!==i?o+" result"+(o===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function In(e,n){return e=Array.isArray(e)?e[0]:e,!e&&n?n:e}function Sn(e){return typeof e.type=="string"}function Rn(e){return e.props}function Lr(e,n){console.error('The property "'+n+'" is required in "'+e+'"')}var jr=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ke(e){e===void 0&&(e={});var n={};return jr.forEach(function(o){e.hasOwnProperty(o)&&(n[o]=e[o])}),n}function Se(e,n){return!e||!n?e:Object.keys(e).reduce(function(o,i){return o[i]=Le(n,i)?n[i]:e[i],o},{})}function Le(e,n){return e[n]!==void 0}function xe(e){var n=e.key,o=e.keyCode;return o>=37&&o<=40&&n.indexOf("Arrow")!==0?"Arrow"+n:n}function Ur(e){return Object.prototype.toString.call(e)==="[object Object]"}function he(e,n,o,i,r){r===void 0&&(r=!1);var t=o.length;if(t===0)return-1;var u=t-1;(typeof e!="number"||e<0||e>u)&&(e=n>0?-1:u+1);var s=e+n;s<0?s=r?u:0:s>u&&(s=r?0:u);var a=_e(s,n<0,o,i,r);return a===-1?e>=t?-1:e:a}function _e(e,n,o,i,r){r===void 0&&(r=!1);var t=o.length;if(n){for(var u=e;u>=0;u--)if(!i(o[u],u))return u}else for(var s=e;s<t;s++)if(!i(o[s],s))return s;return r?_e(n?t-1:0,n,o,i):-1}function je(e,n,o,i){return i===void 0&&(i=!0),o&&n.some(function(r){return r&&(mn(r,e,o)||i&&mn(r,o.document.activeElement,o))})}var lt=ae;process.env.NODE_ENV!=="production"&&(lt=function(n,o,i){var r="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(n).forEach(function(t){o[t]!==void 0&&i[t]===void 0?console.error('downshift: A component has changed the controlled prop "'+t+'" to be uncontrolled. '+r):o[t]===void 0&&i[t]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+t+'" to be controlled. '+r)})});var qr=Ge(function(e){Tn(e).textContent=""},500);function Tn(e){var n=e.getElementById("a11y-status-message");return n||(n=e.createElement("div"),n.setAttribute("id","a11y-status-message"),n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-relevant","additions text"),Object.assign(n.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(n),n)}function Pn(e,n){if(!(!e||!n)){var o=Tn(n);o.textContent=e,qr(n)}}function Yr(e){var n=e?.getElementById("a11y-status-message");n&&n.remove()}var Mn=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,kn=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Nn=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Ae=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,He=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Vn=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Kn=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,An=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Hn=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,$n=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Bn=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Fn=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Ln=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,ut=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,jn=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Un=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,qn=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,Wr=Object.freeze({__proto__:null,blurButton:jn,blurInput:Bn,changeInput:Fn,clickButton:ut,clickItem:$n,controlledPropUpdatedSelectedItem:Un,itemMouseEnter:Nn,keyDownArrowDown:He,keyDownArrowUp:Ae,keyDownEnd:Hn,keyDownEnter:Kn,keyDownEscape:Vn,keyDownHome:An,keyDownSpaceButton:Ln,mouseUp:kn,touchEnd:qn,unknown:Mn}),zr=["refKey","ref"],Gr=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],Xr=["onKeyDown","onBlur","onChange","onInput","onChangeText"],Jr=["refKey","ref"],Zr=["onMouseMove","onMouseDown","onClick","onPress","index","item"],Qr=(function(){var e=(function(n){function o(r){var t;t=n.call(this,r)||this,t.id=t.props.id||"downshift-"+On(),t.menuId=t.props.menuId||t.id+"-menu",t.labelId=t.props.labelId||t.id+"-label",t.inputId=t.props.inputId||t.id+"-input",t.getItemId=t.props.getItemId||function(d){return t.id+"-item-"+d},t.items=[],t.itemCount=null,t.previousResultCount=0,t.timeoutIds=[],t.internalSetTimeout=function(d,p){var f=setTimeout(function(){t.timeoutIds=t.timeoutIds.filter(function(l){return l!==f}),d()},p);t.timeoutIds.push(f)},t.setItemCount=function(d){t.itemCount=d},t.unsetItemCount=function(){t.itemCount=null},t.isItemDisabled=function(d,p){var f=t.getItemNodeFromIndex(p);return f&&f.hasAttribute("disabled")},t.setHighlightedIndex=function(d,p){d===void 0&&(d=t.props.defaultHighlightedIndex),p===void 0&&(p={}),p=Ke(p),t.internalSetState(L({highlightedIndex:d},p))},t.clearSelection=function(d){t.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:t.props.defaultHighlightedIndex,isOpen:t.props.defaultIsOpen},d)},t.selectItem=function(d,p,f){p=Ke(p),t.internalSetState(L({isOpen:t.props.defaultIsOpen,highlightedIndex:t.props.defaultHighlightedIndex,selectedItem:d,inputValue:t.props.itemToString(d)},p),f)},t.selectItemAtIndex=function(d,p,f){var l=t.items[d];l!=null&&t.selectItem(l,p,f)},t.selectHighlightedItem=function(d,p){return t.selectItemAtIndex(t.getState().highlightedIndex,d,p)},t.internalSetState=function(d,p){var f,l,k={},W=typeof d=="function";return!W&&d.hasOwnProperty("inputValue")&&t.props.onInputValueChange(d.inputValue,L({},t.getStateAndHelpers(),d)),t.setState(function(K){var N;K=t.getState(K);var V=W?d(K):d;V=t.props.stateReducer(K,V),f=V.hasOwnProperty("selectedItem");var A={};return f&&V.selectedItem!==K.selectedItem&&(l=V.selectedItem),(N=V).type||(N.type=Mn),Object.keys(V).forEach(function(Y){K[Y]!==V[Y]&&(k[Y]=V[Y]),Y!=="type"&&(V[Y],Le(t.props,Y)||(A[Y]=V[Y]))}),W&&V.hasOwnProperty("inputValue")&&t.props.onInputValueChange(V.inputValue,L({},t.getStateAndHelpers(),V)),A},function(){hn(p)();var K=Object.keys(k).length>1;K&&t.props.onStateChange(k,t.getStateAndHelpers()),f&&t.props.onSelect(d.selectedItem,t.getStateAndHelpers()),l!==void 0&&t.props.onChange(l,t.getStateAndHelpers()),t.props.onUserAction(k,t.getStateAndHelpers())})},t.rootRef=function(d){return t._rootNode=d},t.getRootProps=function(d,p){var f,l=d===void 0?{}:d,k=l.refKey,W=k===void 0?"ref":k,K=l.ref,N=le(l,zr),V=p===void 0?{}:p,A=V.suppressRefError,Y=A===void 0?!1:A;t.getRootProps.called=!0,t.getRootProps.refKey=W,t.getRootProps.suppressRefError=Y;var G=t.getState(),H=G.isOpen;return L((f={},f[W]=ve(K,t.rootRef),f.role="combobox",f["aria-expanded"]=H,f["aria-haspopup"]="listbox",f["aria-owns"]=H?t.menuId:void 0,f["aria-labelledby"]=t.labelId,f),N)},t.keyDownHandlers={ArrowDown:function(p){var f=this;if(p.preventDefault(),this.getState().isOpen){var l=p.shiftKey?5:1;this.moveHighlightedIndex(l,{type:He})}else this.internalSetState({isOpen:!0,type:He},function(){var k=f.getItemCount();if(k>0){var W=f.getState(),K=W.highlightedIndex,N=he(K,1,{length:k},f.isItemDisabled,!0);f.setHighlightedIndex(N,{type:He})}})},ArrowUp:function(p){var f=this;if(p.preventDefault(),this.getState().isOpen){var l=p.shiftKey?-5:-1;this.moveHighlightedIndex(l,{type:Ae})}else this.internalSetState({isOpen:!0,type:Ae},function(){var k=f.getItemCount();if(k>0){var W=f.getState(),K=W.highlightedIndex,N=he(K,-1,{length:k},f.isItemDisabled,!0);f.setHighlightedIndex(N,{type:Ae})}})},Enter:function(p){if(p.which!==229){var f=this.getState(),l=f.isOpen,k=f.highlightedIndex;if(l&&k!=null){p.preventDefault();var W=this.items[k],K=this.getItemNodeFromIndex(k);if(W==null||K&&K.hasAttribute("disabled"))return;this.selectHighlightedItem({type:Kn})}}},Escape:function(p){p.preventDefault(),this.reset(L({type:Vn},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},t.buttonKeyDownHandlers=L({},t.keyDownHandlers,{" ":function(p){p.preventDefault(),this.toggleMenu({type:Ln})}}),t.inputKeyDownHandlers=L({},t.keyDownHandlers,{Home:function(p){var f=this.getState(),l=f.isOpen;if(l){p.preventDefault();var k=this.getItemCount();if(!(k<=0||!l)){var W=_e(0,!1,{length:k},this.isItemDisabled);this.setHighlightedIndex(W,{type:An})}}},End:function(p){var f=this.getState(),l=f.isOpen;if(l){p.preventDefault();var k=this.getItemCount();if(!(k<=0||!l)){var W=_e(k-1,!0,{length:k},this.isItemDisabled);this.setHighlightedIndex(W,{type:Hn})}}}}),t.getToggleButtonProps=function(d){var p=d===void 0?{}:d,f=p.onClick;p.onPress;var l=p.onKeyDown,k=p.onKeyUp,W=p.onBlur,K=le(p,Gr),N=t.getState(),V=N.isOpen,A={onClick:X(f,t.buttonHandleClick),onKeyDown:X(l,t.buttonHandleKeyDown),onKeyUp:X(k,t.buttonHandleKeyUp),onBlur:X(W,t.buttonHandleBlur)},Y=K.disabled?{}:A;return L({type:"button",role:"button","aria-label":V?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},Y,K)},t.buttonHandleKeyUp=function(d){d.preventDefault()},t.buttonHandleKeyDown=function(d){var p=xe(d);t.buttonKeyDownHandlers[p]&&t.buttonKeyDownHandlers[p].call(t,d)},t.buttonHandleClick=function(d){if(d.preventDefault(),t.props.environment){var p=t.props.environment.document,f=p.body,l=p.activeElement;f&&f===l&&d.target.focus()}process.env.NODE_ENV==="test"?t.toggleMenu({type:ut}):t.internalSetTimeout(function(){return t.toggleMenu({type:ut})})},t.buttonHandleBlur=function(d){var p=d.target;t.internalSetTimeout(function(){if(!(t.isMouseDown||!t.props.environment)){var f=t.props.environment.document.activeElement;(f==null||f.id!==t.inputId)&&f!==p&&t.reset({type:jn})}})},t.getLabelProps=function(d){return L({htmlFor:t.inputId,id:t.labelId},d)},t.getInputProps=function(d){var p=d===void 0?{}:d,f=p.onKeyDown,l=p.onBlur,k=p.onChange,W=p.onInput;p.onChangeText;var K=le(p,Xr),N,V={};N="onChange";var A=t.getState(),Y=A.inputValue,G=A.isOpen,H=A.highlightedIndex;if(!K.disabled){var re;V=(re={},re[N]=X(k,W,t.inputHandleChange),re.onKeyDown=X(f,t.inputHandleKeyDown),re.onBlur=X(l,t.inputHandleBlur),re)}return L({"aria-autocomplete":"list","aria-activedescendant":G&&typeof H=="number"&&H>=0?t.getItemId(H):void 0,"aria-controls":G?t.menuId:void 0,"aria-labelledby":K&&K["aria-label"]?void 0:t.labelId,autoComplete:"off",value:Y,id:t.inputId},V,K)},t.inputHandleKeyDown=function(d){var p=xe(d);p&&t.inputKeyDownHandlers[p]&&t.inputKeyDownHandlers[p].call(t,d)},t.inputHandleChange=function(d){t.internalSetState({type:Fn,isOpen:!0,inputValue:d.target.value,highlightedIndex:t.props.defaultHighlightedIndex})},t.inputHandleBlur=function(){t.internalSetTimeout(function(){var d;if(!(t.isMouseDown||!t.props.environment)){var p=t.props.environment.document.activeElement,f=(p==null||(d=p.dataset)==null?void 0:d.toggle)&&t._rootNode&&t._rootNode.contains(p);f||t.reset({type:Bn})}})},t.menuRef=function(d){t._menuNode=d},t.getMenuProps=function(d,p){var f,l=d===void 0?{}:d,k=l.refKey,W=k===void 0?"ref":k,K=l.ref,N=le(l,Jr),V=p===void 0?{}:p,A=V.suppressRefError,Y=A===void 0?!1:A;return t.getMenuProps.called=!0,t.getMenuProps.refKey=W,t.getMenuProps.suppressRefError=Y,L((f={},f[W]=ve(K,t.menuRef),f.role="listbox",f["aria-labelledby"]=N&&N["aria-label"]?void 0:t.labelId,f.id=t.menuId,f),N)},t.getItemProps=function(d){var p,f=d===void 0?{}:d,l=f.onMouseMove,k=f.onMouseDown,W=f.onClick;f.onPress;var K=f.index,N=f.item,V=N===void 0?process.env.NODE_ENV==="production"?void 0:Lr("getItemProps","item"):N,A=le(f,Zr);K===void 0?(t.items.push(V),K=t.items.indexOf(V)):t.items[K]=V;var Y="onClick",G=W,H=(p={onMouseMove:X(l,function(){K!==t.getState().highlightedIndex&&(t.setHighlightedIndex(K,{type:Nn}),t.avoidScrolling=!0,t.internalSetTimeout(function(){return t.avoidScrolling=!1},250))}),onMouseDown:X(k,function(te){te.preventDefault()})},p[Y]=X(G,function(){t.selectItemAtIndex(K,{type:$n})}),p),re=A.disabled?{onMouseDown:H.onMouseDown}:H;return L({id:t.getItemId(K),role:"option","aria-selected":t.getState().highlightedIndex===K},re,A)},t.clearItems=function(){t.items=[]},t.reset=function(d,p){d===void 0&&(d={}),d=Ke(d),t.internalSetState(function(f){var l=f.selectedItem;return L({isOpen:t.props.defaultIsOpen,highlightedIndex:t.props.defaultHighlightedIndex,inputValue:t.props.itemToString(l)},d)},p)},t.toggleMenu=function(d,p){d===void 0&&(d={}),d=Ke(d),t.internalSetState(function(f){var l=f.isOpen;return L({isOpen:!l},l&&{highlightedIndex:t.props.defaultHighlightedIndex},d)},function(){var f=t.getState(),l=f.isOpen,k=f.highlightedIndex;l&&t.getItemCount()>0&&typeof k=="number"&&t.setHighlightedIndex(k,d),hn(p)()})},t.openMenu=function(d){t.internalSetState({isOpen:!0},d)},t.closeMenu=function(d){t.internalSetState({isOpen:!1},d)},t.updateStatus=Ge(function(){var d;if((d=t.props)!=null&&(d=d.environment)!=null&&d.document){var p=t.getState(),f=t.items[p.highlightedIndex],l=t.getItemCount(),k=t.props.getA11yStatusMessage(L({itemToString:t.props.itemToString,previousResultCount:t.previousResultCount,resultCount:l,highlightedItem:f},p));t.previousResultCount=l,Pn(k,t.props.environment.document)}},200);var u=t.props,s=u.defaultHighlightedIndex,a=u.initialHighlightedIndex,h=a===void 0?s:a,b=u.defaultIsOpen,x=u.initialIsOpen,D=x===void 0?b:x,R=u.initialInputValue,B=R===void 0?"":R,T=u.initialSelectedItem,g=T===void 0?null:T,j=t.getState({highlightedIndex:h,isOpen:D,inputValue:B,selectedItem:g});return j.selectedItem!=null&&t.props.initialInputValue===void 0&&(j.inputValue=t.props.itemToString(j.selectedItem)),t.state=j,t}Cr(o,n);var i=o.prototype;return i.internalClearTimeouts=function(){this.timeoutIds.forEach(function(t){clearTimeout(t)}),this.timeoutIds=[]},i.getState=function(t){return t===void 0&&(t=this.state),Se(t,this.props)},i.getItemCount=function(){var t=this.items.length;return this.itemCount!=null?t=this.itemCount:this.props.itemCount!==void 0&&(t=this.props.itemCount),t},i.getItemNodeFromIndex=function(t){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(t)):null},i.scrollHighlightedItemIntoView=function(){{var t=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(t,this._menuNode)}},i.moveHighlightedIndex=function(t,u){var s=this.getItemCount(),a=this.getState(),h=a.highlightedIndex;if(s>0){var b=he(h,t,{length:s},this.isItemDisabled,!0);this.setHighlightedIndex(b,u)}},i.getStateAndHelpers=function(){var t=this.getState(),u=t.highlightedIndex,s=t.inputValue,a=t.selectedItem,h=t.isOpen,b=this.props.itemToString,x=this.id,D=this.getRootProps,R=this.getToggleButtonProps,B=this.getLabelProps,T=this.getMenuProps,g=this.getInputProps,j=this.getItemProps,d=this.openMenu,p=this.closeMenu,f=this.toggleMenu,l=this.selectItem,k=this.selectItemAtIndex,W=this.selectHighlightedItem,K=this.setHighlightedIndex,N=this.clearSelection,V=this.clearItems,A=this.reset,Y=this.setItemCount,G=this.unsetItemCount,H=this.internalSetState;return{getRootProps:D,getToggleButtonProps:R,getLabelProps:B,getMenuProps:T,getInputProps:g,getItemProps:j,reset:A,openMenu:d,closeMenu:p,toggleMenu:f,selectItem:l,selectItemAtIndex:k,selectHighlightedItem:W,setHighlightedIndex:K,clearSelection:N,clearItems:V,setItemCount:Y,unsetItemCount:G,setState:H,itemToString:b,id:x,highlightedIndex:u,inputValue:s,isOpen:h,selectedItem:a}},i.componentDidMount=function(){var t=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&yn(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){t.internalClearTimeouts()};else{var u=function(){t.isMouseDown=!0},s=function(R){t.isMouseDown=!1;var B=je(R.target,[t._rootNode,t._menuNode],t.props.environment);!B&&t.getState().isOpen&&t.reset({type:kn},function(){return t.props.onOuterClick(t.getStateAndHelpers())})},a=function(){t.isTouchMove=!1},h=function(){t.isTouchMove=!0},b=function(R){var B=je(R.target,[t._rootNode,t._menuNode],t.props.environment,!1);!t.isTouchMove&&!B&&t.getState().isOpen&&t.reset({type:qn},function(){return t.props.onOuterClick(t.getStateAndHelpers())})},x=this.props.environment;x.addEventListener("mousedown",u),x.addEventListener("mouseup",s),x.addEventListener("touchstart",a),x.addEventListener("touchmove",h),x.addEventListener("touchend",b),this.cleanup=function(){t.internalClearTimeouts(),t.updateStatus.cancel(),x.removeEventListener("mousedown",u),x.removeEventListener("mouseup",s),x.removeEventListener("touchstart",a),x.removeEventListener("touchmove",h),x.removeEventListener("touchend",b)}}},i.shouldScroll=function(t,u){var s=this.props.highlightedIndex===void 0?this.getState():this.props,a=s.highlightedIndex,h=u.highlightedIndex===void 0?t:u,b=h.highlightedIndex,x=a&&this.getState().isOpen&&!t.isOpen,D=a!==b;return x||D},i.componentDidUpdate=function(t,u){process.env.NODE_ENV!=="production"&&(lt(this.state,t,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&yn(this._menuNode,this.getMenuProps)),Le(this.props,"selectedItem")&&this.props.selectedItemChanged(t.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Un,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(u,t)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},i.componentWillUnmount=function(){this.cleanup()},i.render=function(){var t=In(this.props.children,ae);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var u=In(t(this.getStateAndHelpers()));if(!u)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&eo(u,this.getRootProps),u;if(Sn(u))return w.cloneElement(u,this.getRootProps(Rn(u)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},o})(w.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Fr,itemToString:function(o){return o==null?"":(process.env.NODE_ENV!=="production"&&Ur(o)&&!o.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",o),String(o))},onStateChange:ae,onInputValueChange:ae,onUserAction:ae,onChange:ae,onSelect:ae,onOuterClick:ae,selectedItemChanged:function(o,i){return o!==i},environment:typeof window>"u"?void 0:window,stateReducer:function(o,i){return i},suppressRefError:!1,scrollIntoView:Cn},e.stateChangeTypes=Wr,e})();process.env.NODE_ENV!=="production"&&(Qr.propTypes={children:y.func,defaultHighlightedIndex:y.number,defaultIsOpen:y.bool,initialHighlightedIndex:y.number,initialSelectedItem:y.any,initialInputValue:y.string,initialIsOpen:y.bool,getA11yStatusMessage:y.func,itemToString:y.func,onChange:y.func,onSelect:y.func,onStateChange:y.func,onInputValueChange:y.func,onUserAction:y.func,onOuterClick:y.func,selectedItemChanged:y.func,stateReducer:y.func,itemCount:y.number,id:y.string,environment:y.shape({addEventListener:y.func.isRequired,removeEventListener:y.func.isRequired,document:y.shape({createElement:y.func.isRequired,getElementById:y.func.isRequired,activeElement:y.any.isRequired,body:y.any.isRequired}).isRequired,Node:y.func.isRequired}),suppressRefError:y.bool,scrollIntoView:y.func,selectedItem:y.any,isOpen:y.bool,inputValue:y.string,highlightedIndex:y.number,labelId:y.string,inputId:y.string,menuId:y.string,getItemId:y.func});function yn(e,n){var o=n.refKey;e||console.error('downshift: The ref prop "'+o+'" from getMenuProps was not applied correctly on your menu element.')}function eo(e,n){var o=n.refKey,i=o!=="ref",r=!Sn(e);r&&!i&&!pn.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!r&&i&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+o+'"'),!pn.isForwardRef(e)&&!Rn(e)[o]&&console.error('downshift: You must apply the ref prop "'+o+'" from getRootProps onto your root element.')}var Yn={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function to(e,n,o){var i=e.props,r=e.type,t={};Object.keys(n).forEach(function(u){no(u,e,n,o),o[u]!==n[u]&&(t[u]=o[u])}),i.onStateChange&&Object.keys(t).length&&i.onStateChange(L({type:r},t))}function no(e,n,o,i){var r=n.props,t=n.type,u="on"+dt(e)+"Change";r[u]&&i[e]!==void 0&&i[e]!==o[e]&&r[u](L({type:t},i))}function ro(e,n){return n.changes}var _n=Ge(function(e,n){Pn(e,n)},200),oo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect,Wn="useId"in w?function(n){var o=n.id,i=n.labelId,r=n.menuId,t=n.getItemId,u=n.toggleButtonId,s=n.inputId,a="downshift-"+w.useId();o||(o=a);var h=w.useRef({labelId:i||o+"-label",menuId:r||o+"-menu",getItemId:t||function(b){return o+"-item-"+b},toggleButtonId:u||o+"-toggle-button",inputId:s||o+"-input"});return h.current}:function(n){var o=n.id,i=o===void 0?"downshift-"+On():o,r=n.labelId,t=n.menuId,u=n.getItemId,s=n.toggleButtonId,a=n.inputId,h=w.useRef({labelId:r||i+"-label",menuId:t||i+"-menu",getItemId:u||function(b){return i+"-item-"+b},toggleButtonId:s||i+"-toggle-button",inputId:a||i+"-input"});return h.current};function ct(e,n,o,i){var r,t;if(e===void 0){if(n===void 0)throw new Error(i);r=o[n],t=n}else t=n===void 0?o.indexOf(e):n,r=e;return[r,t]}function io(e){return/^\S{1}$/.test(e)}function dt(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Xe(e){var n=w.useRef(e);return n.current=e,n}function zn(e,n,o,i){var r=w.useRef(),t=w.useRef(),u=w.useCallback(function(R,B){t.current=B,R=Se(R,B.props);var T=e(R,B),g=B.props.stateReducer(R,L({},B,{changes:T}));return g},[e]),s=w.useReducer(u,n,o),a=s[0],h=s[1],b=Xe(n),x=w.useCallback(function(R){return h(L({props:b.current},R))},[b]),D=t.current;return w.useEffect(function(){var R=Se(r.current,D?.props),B=D&&r.current&&!i(R,a);B&&to(D,R,a),r.current=a},[a,D,i]),[a,x]}function Gn(e,n,o,i){var r=zn(e,n,o,i),t=r[0],u=r[1];return[Se(t,n),u]}var Oe={itemToString:function(n){return n?String(n):""},itemToKey:function(n){return n},stateReducer:ro,scrollIntoView:Cn,environment:typeof window>"u"?void 0:window};function me(e,n,o){o===void 0&&(o=Yn);var i=e["default"+dt(n)];return i!==void 0?i:o[n]}function be(e,n,o){o===void 0&&(o=Yn);var i=e[n];if(i!==void 0)return i;var r=e["initial"+dt(n)];return r!==void 0?r:me(e,n,o)}function Xn(e){var n=be(e,"selectedItem"),o=be(e,"isOpen"),i=uo(e),r=be(e,"inputValue");return{highlightedIndex:i<0&&n&&o?e.items.findIndex(function(t){return e.itemToKey(t)===e.itemToKey(n)}):i,isOpen:o,selectedItem:n,inputValue:r}}function we(e,n,o){var i=e.items,r=e.initialHighlightedIndex,t=e.defaultHighlightedIndex,u=e.isItemDisabled,s=e.itemToKey,a=n.selectedItem,h=n.highlightedIndex;return i.length===0?-1:r!==void 0&&h===r&&!u(i[r],r)?r:t!==void 0&&!u(i[t],t)?t:a?i.findIndex(function(b){return s(a)===s(b)}):o<0&&!u(i[i.length-1],i.length-1)?i.length-1:o>0&&!u(i[0],0)?0:-1}function Jn(e,n,o){var i=w.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1});return w.useEffect(function(){if(!e)return ae;var r=o.map(function(b){return b.current});function t(){i.current.isTouchEnd=!1,i.current.isMouseDown=!0}function u(b){i.current.isMouseDown=!1,je(b.target,r,e)||n()}function s(){i.current.isTouchEnd=!1,i.current.isTouchMove=!1}function a(){i.current.isTouchMove=!0}function h(b){i.current.isTouchEnd=!0,!i.current.isTouchMove&&!je(b.target,r,e,!1)&&n()}return e.addEventListener("mousedown",t),e.addEventListener("mouseup",u),e.addEventListener("touchstart",s),e.addEventListener("touchmove",a),e.addEventListener("touchend",h),function(){e.removeEventListener("mousedown",t),e.removeEventListener("mouseup",u),e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",a),e.removeEventListener("touchend",h)}},[o,e,n]),i.current}var Je=function(){return ae};process.env.NODE_ENV!=="production"&&(Je=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var r=w.useRef(o.reduce(function(u,s){return u[s]={},u},{}));w.useEffect(function(){Object.keys(r.current).forEach(function(u){var s=r.current[u];if(!Object.keys(s).length){console.error("downshift: You forgot to call the "+u+" getter function on your component / element.");return}var a=s.suppressRefError,h=s.refKey,b=s.elementRef;a||b!=null&&b.current||console.error('downshift: The ref prop "'+h+'" from '+u+" was not applied correctly on your element.")})},[]);var t=w.useCallback(function(u,s,a,h){r.current[u]={suppressRefError:s,refKey:a,elementRef:h}},[]);return t});function ft(e,n,o,i){i===void 0&&(i={});var r=i.document,t=Re();w.useEffect(function(){if(!(!e||t||!r)){var u=e(n);_n(u,r)}},o),w.useEffect(function(){return function(){_n.cancel(),Yr(r)}},[r])}function Zn(e){var n=e.highlightedIndex,o=e.isOpen,i=e.itemRefs,r=e.getItemNodeFromIndex,t=e.menuElement,u=e.scrollIntoView,s=w.useRef(!0);return oo(function(){n<0||!o||!Object.keys(i.current).length||(s.current===!1?s.current=!0:u(r(n),t))},[n]),s}var Ze=ae;process.env.NODE_ENV!=="production"&&(Ze=function(n){var o=n.props,i=n.state,r=w.useRef(o),t=Re();w.useEffect(function(){t||(lt(i,r.current,o),r.current=o)},[i,o,t])});function Ue(e,n,o){var i;o===void 0&&(o=!0);var r=((i=e.items)==null?void 0:i.length)&&n>=0;return L({isOpen:!1,highlightedIndex:-1},r&&L({selectedItem:e.items[n],isOpen:me(e,"isOpen"),highlightedIndex:me(e,"highlightedIndex")},o&&{inputValue:e.itemToString(e.items[n])}))}function Qn(e,n){return e.isOpen===n.isOpen&&e.inputValue===n.inputValue&&e.highlightedIndex===n.highlightedIndex&&e.selectedItem===n.selectedItem}function Re(){var e=w.useRef(!0);return w.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function qe(e){var n=me(e,"highlightedIndex");return n>-1&&e.isItemDisabled(e.items[n],n)?-1:n}function uo(e){var n=be(e,"highlightedIndex");return n>-1&&e.isItemDisabled(e.items[n],n)?-1:n}var $e={environment:y.shape({addEventListener:y.func.isRequired,removeEventListener:y.func.isRequired,document:y.shape({createElement:y.func.isRequired,getElementById:y.func.isRequired,activeElement:y.any.isRequired,body:y.any.isRequired}).isRequired,Node:y.func.isRequired}),itemToString:y.func,itemToKey:y.func,stateReducer:y.func},er=L({},$e,{getA11yStatusMessage:y.func,highlightedIndex:y.number,defaultHighlightedIndex:y.number,initialHighlightedIndex:y.number,isOpen:y.bool,defaultIsOpen:y.bool,initialIsOpen:y.bool,selectedItem:y.any,initialSelectedItem:y.any,defaultSelectedItem:y.any,id:y.string,labelId:y.string,menuId:y.string,getItemId:y.func,toggleButtonId:y.string,onSelectedItemChange:y.func,onHighlightedIndexChange:y.func,onStateChange:y.func,onIsOpenChange:y.func,scrollIntoView:y.func});function tr(e,n,o){var i=n.type,r=n.props,t;switch(i){case o.ItemMouseMove:t={highlightedIndex:n.disabled?-1:n.index};break;case o.MenuMouseLeave:t={highlightedIndex:-1};break;case o.ToggleButtonClick:case o.FunctionToggleMenu:t={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:we(r,e,0)};break;case o.FunctionOpenMenu:t={isOpen:!0,highlightedIndex:we(r,e,0)};break;case o.FunctionCloseMenu:t={isOpen:!1};break;case o.FunctionSetHighlightedIndex:t={highlightedIndex:r.isItemDisabled(r.items[n.highlightedIndex],n.highlightedIndex)?-1:n.highlightedIndex};break;case o.FunctionSetInputValue:t={inputValue:n.inputValue};break;case o.FunctionReset:t={highlightedIndex:qe(r),isOpen:me(r,"isOpen"),selectedItem:me(r,"selectedItem"),inputValue:me(r,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return L({},e,t)}function so(e){for(var n=e.keysSoFar,o=e.highlightedIndex,i=e.items,r=e.itemToString,t=e.isItemDisabled,u=n.toLowerCase(),s=0;s<i.length;s++){var a=(s+o+(n.length<2?1:0))%i.length,h=i[a];if(h!==void 0&&r(h).toLowerCase().startsWith(u)&&!t(h,a))return a}return o}var ao=Fe.__assign(Fe.__assign({},er),{items:y.array.isRequired,isItemDisabled:y.func}),lo=Fe.__assign(Fe.__assign({},Oe),{isItemDisabled:function(){return!1}}),nr=ae;process.env.NODE_ENV!=="production"&&(nr=function(e,n){y.checkPropTypes(ao,e,"prop",n.name)});var Be=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,pt=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,gt=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Ye=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,vt=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,ht=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,mt=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,It=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,yt=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,_t=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,Et=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,We=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,rr=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,or=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,bt=process.env.NODE_ENV!=="production"?"__item_click__":14,ir=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,ur=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,sr=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,ar=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,wt=process.env.NODE_ENV!=="production"?"__function_select_item__":19,st=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,lr=process.env.NODE_ENV!=="production"?"__function_reset__":21,cr=Object.freeze({__proto__:null,FunctionCloseMenu:sr,FunctionOpenMenu:ur,FunctionReset:lr,FunctionSelectItem:wt,FunctionSetHighlightedIndex:ar,FunctionSetInputValue:st,FunctionToggleMenu:ir,ItemClick:bt,ItemMouseMove:or,MenuMouseLeave:rr,ToggleButtonBlur:We,ToggleButtonClick:Be,ToggleButtonKeyDownArrowDown:pt,ToggleButtonKeyDownArrowUp:gt,ToggleButtonKeyDownCharacter:Ye,ToggleButtonKeyDownEnd:mt,ToggleButtonKeyDownEnter:It,ToggleButtonKeyDownEscape:vt,ToggleButtonKeyDownHome:ht,ToggleButtonKeyDownPageDown:Et,ToggleButtonKeyDownPageUp:_t,ToggleButtonKeyDownSpaceButton:yt});function co(e,n){var o,i=n.type,r=n.props,t=n.altKey,u;switch(i){case bt:u={isOpen:me(r,"isOpen"),highlightedIndex:qe(r),selectedItem:r.items[n.index]};break;case Ye:{var s=n.key,a=""+e.inputValue+s,h=!e.isOpen&&e.selectedItem?r.items.findIndex(function(R){return r.itemToKey(R)===r.itemToKey(e.selectedItem)}):e.highlightedIndex,b=so({keysSoFar:a,highlightedIndex:h,items:r.items,itemToString:r.itemToString,isItemDisabled:r.isItemDisabled});u={inputValue:a,highlightedIndex:b,isOpen:!0}}break;case pt:{var x=e.isOpen?he(e.highlightedIndex,1,r.items,r.isItemDisabled):t&&e.selectedItem==null?-1:we(r,e,1);u={highlightedIndex:x,isOpen:!0}}break;case gt:if(e.isOpen&&t)u=Ue(r,e.highlightedIndex,!1);else{var D=e.isOpen?he(e.highlightedIndex,-1,r.items,r.isItemDisabled):we(r,e,-1);u={highlightedIndex:D,isOpen:!0}}break;case It:case yt:u=Ue(r,e.highlightedIndex,!1);break;case ht:u={highlightedIndex:_e(0,!1,r.items,r.isItemDisabled),isOpen:!0};break;case mt:u={highlightedIndex:_e(r.items.length-1,!0,r.items,r.isItemDisabled),isOpen:!0};break;case _t:u={highlightedIndex:he(e.highlightedIndex,-10,r.items,r.isItemDisabled)};break;case Et:u={highlightedIndex:he(e.highlightedIndex,10,r.items,r.isItemDisabled)};break;case vt:u={isOpen:!1,highlightedIndex:-1};break;case We:u=L({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((o=r.items)==null?void 0:o.length)&&{selectedItem:r.items[e.highlightedIndex]});break;case wt:u={selectedItem:n.selectedItem};break;default:return tr(e,n,cr)}return L({},e,u)}var fo=["onClick"],po=["onMouseLeave","refKey","ref"],go=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],vo=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];xt.stateChangeTypes=cr;function xt(e){e===void 0&&(e={}),nr(e,xt);var n=L({},lo,e),o=n.scrollIntoView,i=n.environment,r=n.getA11yStatusMessage,t=Gn(co,n,Xn,Qn),u=t[0],s=t[1],a=u.isOpen,h=u.highlightedIndex,b=u.selectedItem,x=u.inputValue,D=w.useRef(null),R=w.useRef(null),B=w.useRef({}),T=w.useRef(null),g=Wn(n),j=Xe({state:u,props:n}),d=w.useCallback(function(F){return B.current[g.getItemId(F)]},[g]);ft(r,u,[a,h,b,x],i);var p=Zn({menuElement:R.current,highlightedIndex:h,isOpen:a,itemRefs:B,scrollIntoView:o,getItemNodeFromIndex:d});w.useEffect(function(){return T.current=Ge(function(F){F({type:st,inputValue:""})},500),function(){T.current.cancel()}},[]),w.useEffect(function(){x&&T.current(s)},[s,x]),Ze({props:n,state:u}),w.useEffect(function(){var F=be(n,"isOpen");F&&D.current&&D.current.focus()},[]);var f=Jn(i,w.useCallback(function(){j.current.state.isOpen&&s({type:We})},[s,j]),w.useMemo(function(){return[R,D]},[R.current,D.current])),l=Je("getMenuProps","getToggleButtonProps");w.useEffect(function(){a||(B.current={})},[a]);var k=w.useMemo(function(){return{ArrowDown:function(U){U.preventDefault(),s({type:pt,altKey:U.altKey})},ArrowUp:function(U){U.preventDefault(),s({type:gt,altKey:U.altKey})},Home:function(U){U.preventDefault(),s({type:ht})},End:function(U){U.preventDefault(),s({type:mt})},Escape:function(){j.current.state.isOpen&&s({type:vt})},Enter:function(U){U.preventDefault(),s({type:j.current.state.isOpen?It:Be})},PageUp:function(U){j.current.state.isOpen&&(U.preventDefault(),s({type:_t}))},PageDown:function(U){j.current.state.isOpen&&(U.preventDefault(),s({type:Et}))}," ":function(U){U.preventDefault();var c=j.current.state;if(!c.isOpen){s({type:Be});return}c.inputValue?s({type:Ye,key:" "}):s({type:yt})}}},[s,j]),W=w.useCallback(function(){s({type:ir})},[s]),K=w.useCallback(function(){s({type:sr})},[s]),N=w.useCallback(function(){s({type:ur})},[s]),V=w.useCallback(function(F){s({type:ar,highlightedIndex:F})},[s]),A=w.useCallback(function(F){s({type:wt,selectedItem:F})},[s]),Y=w.useCallback(function(){s({type:lr})},[s]),G=w.useCallback(function(F){s({type:st,inputValue:F})},[s]),H=w.useCallback(function(F){var U=F===void 0?{}:F,c=U.onClick,_=le(U,fo),I=function(){var v;(v=D.current)==null||v.focus()};return L({id:g.labelId,htmlFor:g.toggleButtonId,onClick:X(c,I)},_)},[g]),re=w.useCallback(function(F,U){var c,_=F===void 0?{}:F,I=_.onMouseLeave,m=_.refKey,v=m===void 0?"ref":m,C=_.ref,O=le(_,po),P=U===void 0?{}:U,M=P.suppressRefError,q=M===void 0?!1:M,$=function(){s({type:rr})};return l("getMenuProps",q,v,R),L((c={},c[v]=ve(C,function(z){R.current=z}),c.id=g.menuId,c.role="listbox",c["aria-labelledby"]=O&&O["aria-label"]?void 0:""+g.labelId,c.onMouseLeave=X(I,$),c),O)},[s,l,g]),te=w.useCallback(function(F,U){var c,_=F===void 0?{}:F,I=_.onBlur,m=_.onClick;_.onPress;var v=_.onKeyDown,C=_.refKey,O=C===void 0?"ref":C,P=_.ref,M=le(_,go),q=U===void 0?{}:U,$=q.suppressRefError,z=$===void 0?!1:$,E=j.current.state,ne=function(){s({type:Be})},S=function(){E.isOpen&&!f.isMouseDown&&s({type:We})},se=function(ce){var fe=xe(ce);fe&&k[fe]?k[fe](ce):io(fe)&&s({type:Ye,key:fe})},oe=L((c={},c[O]=ve(P,function(ue){D.current=ue}),c["aria-activedescendant"]=E.isOpen&&E.highlightedIndex>-1?g.getItemId(E.highlightedIndex):"",c["aria-controls"]=g.menuId,c["aria-expanded"]=j.current.state.isOpen,c["aria-haspopup"]="listbox",c["aria-labelledby"]=M&&M["aria-label"]?void 0:""+g.labelId,c.id=g.toggleButtonId,c.role="combobox",c.tabIndex=0,c.onBlur=X(I,S),c),M);return M.disabled||(oe.onClick=X(m,ne),oe.onKeyDown=X(v,se)),l("getToggleButtonProps",z,O,D),oe},[s,g,j,f,l,k]),ie=w.useCallback(function(F){var U,c=F===void 0?{}:F,_=c.item,I=c.index,m=c.onMouseMove,v=c.onClick,C=c.onMouseDown;c.onPress;var O=c.refKey,P=O===void 0?"ref":O,M=c.disabled,q=c.ref,$=le(c,vo);M!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var z=j.current,E=z.state,ne=z.props,S=ct(_,I,ne.items,"Pass either item or index to getItemProps!"),se=S[0],oe=S[1],ue=ne.isItemDisabled(se,oe),ce=function(){f.isTouchEnd||oe===E.highlightedIndex||(p.current=!1,s({type:or,index:oe,disabled:ue}))},fe=function(){s({type:bt,index:oe})},De=function(Ce){return Ce.preventDefault()},de=L((U={},U[P]=ve(q,function(pe){pe&&(B.current[g.getItemId(oe)]=pe)}),U["aria-disabled"]=ue,U["aria-selected"]=se===E.selectedItem,U.id=g.getItemId(oe),U.role="option",U),$);return ue||(de.onClick=X(v,fe)),de.onMouseMove=X(m,ce),de.onMouseDown=X(C,De),de},[j,g,f,p,s]);return{getToggleButtonProps:te,getLabelProps:H,getMenuProps:re,getItemProps:ie,toggleMenu:W,openMenu:N,closeMenu:K,setHighlightedIndex:V,selectItem:A,reset:Y,setInputValue:G,highlightedIndex:h,isOpen:a,selectedItem:b,inputValue:x}}var Dt=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Ct=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Ot=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,St=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Rt=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Tt=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Pt=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Mt=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,kt=process.env.NODE_ENV!=="production"?"__input_change__":8,ze=process.env.NODE_ENV!=="production"?"__input_blur__":9,Nt=process.env.NODE_ENV!=="production"?"__input_click__":10,dr=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,fr=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Vt=process.env.NODE_ENV!=="production"?"__item_click__":13,pr=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,gr=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,vr=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,hr=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,mr=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Kt=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Ir=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,yr=process.env.NODE_ENV!=="production"?"__function_reset__":21,At=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,_r=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:At,FunctionCloseMenu:hr,FunctionOpenMenu:vr,FunctionReset:yr,FunctionSelectItem:Kt,FunctionSetHighlightedIndex:mr,FunctionSetInputValue:Ir,FunctionToggleMenu:gr,InputBlur:ze,InputChange:kt,InputClick:Nt,InputKeyDownArrowDown:Dt,InputKeyDownArrowUp:Ct,InputKeyDownEnd:Rt,InputKeyDownEnter:Mt,InputKeyDownEscape:Ot,InputKeyDownHome:St,InputKeyDownPageDown:Pt,InputKeyDownPageUp:Tt,ItemClick:Vt,ItemMouseMove:fr,MenuMouseLeave:dr,ToggleButtonClick:pr});function ho(e){var n=Xn(e),o=n.selectedItem,i=n.inputValue;return i===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(i=e.itemToString(o)),L({},n,{inputValue:i})}var mo=L({},er,{items:y.array.isRequired,isItemDisabled:y.func,inputValue:y.string,defaultInputValue:y.string,initialInputValue:y.string,inputId:y.string,onInputValueChange:y.func});function Io(e,n,o,i){var r=w.useRef(),t=zn(e,n,o,i),u=t[0],s=t[1],a=Re();return w.useEffect(function(){if(Le(n,"selectedItem")){if(!a){var h=n.itemToKey(n.selectedItem)!==n.itemToKey(r.current);h&&s({type:At,inputValue:n.itemToString(n.selectedItem)})}r.current=u.selectedItem===r.current?n.selectedItem:u.selectedItem}},[u.selectedItem,n.selectedItem]),[Se(u,n),s]}var Er=ae;process.env.NODE_ENV!=="production"&&(Er=function(n,o){y.checkPropTypes(mo,n,"prop",o.name)});var yo=L({},Oe,{isItemDisabled:function(){return!1}});function _o(e,n){var o,i=n.type,r=n.props,t=n.altKey,u;switch(i){case Vt:u={isOpen:me(r,"isOpen"),highlightedIndex:qe(r),selectedItem:r.items[n.index],inputValue:r.itemToString(r.items[n.index])};break;case Dt:e.isOpen?u={highlightedIndex:he(e.highlightedIndex,1,r.items,r.isItemDisabled,!0)}:u={highlightedIndex:t&&e.selectedItem==null?-1:we(r,e,1),isOpen:r.items.length>=0};break;case Ct:e.isOpen?t?u=Ue(r,e.highlightedIndex):u={highlightedIndex:he(e.highlightedIndex,-1,r.items,r.isItemDisabled,!0)}:u={highlightedIndex:we(r,e,-1),isOpen:r.items.length>=0};break;case Mt:u=Ue(r,e.highlightedIndex);break;case Ot:u=L({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Tt:u={highlightedIndex:he(e.highlightedIndex,-10,r.items,r.isItemDisabled,!0)};break;case Pt:u={highlightedIndex:he(e.highlightedIndex,10,r.items,r.isItemDisabled,!0)};break;case St:u={highlightedIndex:_e(0,!1,r.items,r.isItemDisabled)};break;case Rt:u={highlightedIndex:_e(r.items.length-1,!0,r.items,r.isItemDisabled)};break;case ze:u=L({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((o=r.items)==null?void 0:o.length)&&n.selectItem&&{selectedItem:r.items[e.highlightedIndex],inputValue:r.itemToString(r.items[e.highlightedIndex])});break;case kt:u={isOpen:!0,highlightedIndex:qe(r),inputValue:n.inputValue};break;case Nt:u={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:we(r,e,0)};break;case Kt:u={selectedItem:n.selectedItem,inputValue:r.itemToString(n.selectedItem)};break;case At:u={inputValue:n.inputValue};break;default:return tr(e,n,_r)}return L({},e,u)}var Eo=["onMouseLeave","refKey","ref"],bo=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],wo=["onClick","onPress","refKey","ref"],xo=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];Ht.stateChangeTypes=_r;function Ht(e){e===void 0&&(e={}),Er(e,Ht);var n=L({},yo,e),o=n.items,i=n.scrollIntoView,r=n.environment,t=n.getA11yStatusMessage,u=Io(_o,n,ho,Qn),s=u[0],a=u[1],h=s.isOpen,b=s.highlightedIndex,x=s.selectedItem,D=s.inputValue,R=w.useRef(null),B=w.useRef({}),T=w.useRef(null),g=w.useRef(null),j=Re(),d=Wn(n),p=w.useRef(),f=Xe({state:s,props:n}),l=w.useCallback(function(I){return B.current[d.getItemId(I)]},[d]);ft(t,s,[h,b,x,D],r);var k=Zn({menuElement:R.current,highlightedIndex:b,isOpen:h,itemRefs:B,scrollIntoView:i,getItemNodeFromIndex:l});Ze({props:n,state:s}),w.useEffect(function(){var I=be(n,"isOpen");I&&T.current&&T.current.focus()},[]),w.useEffect(function(){j||(p.current=o.length)});var W=Jn(r,w.useCallback(function(){f.current.state.isOpen&&a({type:ze,selectItem:!1})},[a,f]),w.useMemo(function(){return[R,g,T]},[R.current,g.current,T.current])),K=Je("getInputProps","getMenuProps");w.useEffect(function(){h||(B.current={})},[h]),w.useEffect(function(){var I;!h||!(r!=null&&r.document)||!(T!=null&&(I=T.current)!=null&&I.focus)||r.document.activeElement!==T.current&&T.current.focus()},[h,r]);var N=w.useMemo(function(){return{ArrowDown:function(m){m.preventDefault(),a({type:Dt,altKey:m.altKey})},ArrowUp:function(m){m.preventDefault(),a({type:Ct,altKey:m.altKey})},Home:function(m){f.current.state.isOpen&&(m.preventDefault(),a({type:St}))},End:function(m){f.current.state.isOpen&&(m.preventDefault(),a({type:Rt}))},Escape:function(m){var v=f.current.state;(v.isOpen||v.inputValue||v.selectedItem||v.highlightedIndex>-1)&&(m.preventDefault(),a({type:Ot}))},Enter:function(m){var v=f.current.state;!v.isOpen||m.which===229||(m.preventDefault(),a({type:Mt}))},PageUp:function(m){f.current.state.isOpen&&(m.preventDefault(),a({type:Tt}))},PageDown:function(m){f.current.state.isOpen&&(m.preventDefault(),a({type:Pt}))}}},[a,f]),V=w.useCallback(function(I){return L({id:d.labelId,htmlFor:d.inputId},I)},[d]),A=w.useCallback(function(I,m){var v,C=I===void 0?{}:I,O=C.onMouseLeave,P=C.refKey,M=P===void 0?"ref":P,q=C.ref,$=le(C,Eo),z=m===void 0?{}:m,E=z.suppressRefError,ne=E===void 0?!1:E;return K("getMenuProps",ne,M,R),L((v={},v[M]=ve(q,function(S){R.current=S}),v.id=d.menuId,v.role="listbox",v["aria-labelledby"]=$&&$["aria-label"]?void 0:""+d.labelId,v.onMouseLeave=X(O,function(){a({type:dr})}),v),$)},[a,K,d]),Y=w.useCallback(function(I){var m,v,C=I===void 0?{}:I,O=C.item,P=C.index,M=C.refKey,q=M===void 0?"ref":M,$=C.ref,z=C.onMouseMove,E=C.onMouseDown,ne=C.onClick;C.onPress;var S=C.disabled,se=le(C,bo);S!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var oe=f.current,ue=oe.props,ce=oe.state,fe=ct(O,P,ue.items,"Pass either item or index to getItemProps!"),De=fe[0],de=fe[1],pe=ue.isItemDisabled(De,de),Ce="onClick",Te=ne,Ie=function(){W.isTouchEnd||de===ce.highlightedIndex||(k.current=!1,a({type:fr,index:de,disabled:pe}))},Ee=function(){a({type:Vt,index:de})},ye=function(xr){return xr.preventDefault()};return L((m={},m[q]=ve($,function(ge){ge&&(B.current[d.getItemId(de)]=ge)}),m["aria-disabled"]=pe,m["aria-selected"]=de===ce.highlightedIndex,m.id=d.getItemId(de),m.role="option",m),!pe&&(v={},v[Ce]=X(Te,Ee),v),{onMouseMove:X(z,Ie),onMouseDown:X(E,ye)},se)},[a,d,f,W,k]),G=w.useCallback(function(I){var m,v=I===void 0?{}:I,C=v.onClick;v.onPress;var O=v.refKey,P=O===void 0?"ref":O,M=v.ref,q=le(v,wo),$=f.current.state,z=function(){a({type:pr})};return L((m={},m[P]=ve(M,function(E){g.current=E}),m["aria-controls"]=d.menuId,m["aria-expanded"]=$.isOpen,m.id=d.toggleButtonId,m.tabIndex=-1,m),!q.disabled&&L({},{onClick:X(C,z)}),q)},[a,f,d]),H=w.useCallback(function(I,m){var v,C=I===void 0?{}:I,O=C.onKeyDown,P=C.onChange,M=C.onInput,q=C.onBlur;C.onChangeText;var $=C.onClick,z=C.refKey,E=z===void 0?"ref":z,ne=C.ref,S=le(C,xo),se=m===void 0?{}:m,oe=se.suppressRefError,ue=oe===void 0?!1:oe;K("getInputProps",ue,E,T);var ce=f.current.state,fe=function(ye){var ge=xe(ye);ge&&N[ge]&&N[ge](ye)},De=function(ye){a({type:kt,inputValue:ye.target.value})},de=function(ye){if(r!=null&&r.document&&ce.isOpen&&!W.isMouseDown){var ge=ye.relatedTarget===null&&r.document.activeElement!==r.document.body;a({type:ze,selectItem:!ge})}},pe=function(){a({type:Nt})},Ce="onChange",Te={};if(!S.disabled){var Ie;Te=(Ie={},Ie[Ce]=X(P,M,De),Ie.onKeyDown=X(O,fe),Ie.onBlur=X(q,de),Ie.onClick=X($,pe),Ie)}return L((v={},v[E]=ve(ne,function(Ee){T.current=Ee}),v["aria-activedescendant"]=ce.isOpen&&ce.highlightedIndex>-1?d.getItemId(ce.highlightedIndex):"",v["aria-autocomplete"]="list",v["aria-controls"]=d.menuId,v["aria-expanded"]=ce.isOpen,v["aria-labelledby"]=S&&S["aria-label"]?void 0:d.labelId,v.autoComplete="off",v.id=d.inputId,v.role="combobox",v.value=ce.inputValue,v),Te,S)},[a,d,r,N,f,W,K]),re=w.useCallback(function(){a({type:gr})},[a]),te=w.useCallback(function(){a({type:hr})},[a]),ie=w.useCallback(function(){a({type:vr})},[a]),F=w.useCallback(function(I){a({type:mr,highlightedIndex:I})},[a]),U=w.useCallback(function(I){a({type:Kt,selectedItem:I})},[a]),c=w.useCallback(function(I){a({type:Ir,inputValue:I})},[a]),_=w.useCallback(function(){a({type:yr})},[a]);return{getItemProps:Y,getLabelProps:V,getMenuProps:A,getInputProps:H,getToggleButtonProps:G,toggleMenu:re,openMenu:ie,closeMenu:te,setHighlightedIndex:F,setInputValue:c,selectItem:U,reset:_,highlightedIndex:b,isOpen:h,selectedItem:x,inputValue:D}}var br={activeIndex:-1,selectedItems:[]};function En(e,n){return be(e,n,br)}function bn(e,n){return me(e,n,br)}function Do(e){var n=En(e,"activeIndex"),o=En(e,"selectedItems");return{activeIndex:n,selectedItems:o}}function wn(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var n=e.target;return!(n instanceof HTMLInputElement&&n.value!==""&&(n.selectionStart!==0||n.selectionEnd!==0))}function Co(e,n){return e.selectedItems===n.selectedItems&&e.activeIndex===n.activeIndex}var Oo={stateReducer:$e.stateReducer,itemToKey:$e.itemToKey,environment:$e.environment,selectedItems:y.array,initialSelectedItems:y.array,defaultSelectedItems:y.array,getA11yStatusMessage:y.func,activeIndex:y.number,initialActiveIndex:y.number,defaultActiveIndex:y.number,onActiveIndexChange:y.func,onSelectedItemsChange:y.func,keyNavigationNext:y.string,keyNavigationPrevious:y.string},So={itemToKey:Oe.itemToKey,stateReducer:Oe.stateReducer,environment:Oe.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},wr=ae;process.env.NODE_ENV!=="production"&&(wr=function(n,o){y.checkPropTypes(Oo,n,"prop",o.name)});var $t=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Bt=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Ft=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Lt=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,jt=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Ut=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,qt=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Yt=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Wt=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,zt=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Gt=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Xt=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Jt=process.env.NODE_ENV!=="production"?"__function_reset__":12,Ro=Object.freeze({__proto__:null,DropdownClick:Yt,DropdownKeyDownBackspace:qt,DropdownKeyDownNavigationPrevious:Ut,FunctionAddSelectedItem:Wt,FunctionRemoveSelectedItem:zt,FunctionReset:Jt,FunctionSetActiveIndex:Xt,FunctionSetSelectedItems:Gt,SelectedItemClick:$t,SelectedItemKeyDownBackspace:Ft,SelectedItemKeyDownDelete:Bt,SelectedItemKeyDownNavigationNext:Lt,SelectedItemKeyDownNavigationPrevious:jt});function To(e,n){var o=n.type,i=n.index,r=n.props,t=n.selectedItem,u=e.activeIndex,s=e.selectedItems,a;switch(o){case $t:a={activeIndex:i};break;case jt:a={activeIndex:u-1<0?0:u-1};break;case Lt:a={activeIndex:u+1>=s.length?-1:u+1};break;case Ft:case Bt:{if(u<0)break;var h=u;s.length===1?h=-1:u===s.length-1&&(h=s.length-2),a=L({selectedItems:[].concat(s.slice(0,u),s.slice(u+1))},{activeIndex:h});break}case Ut:a={activeIndex:s.length-1};break;case qt:a={selectedItems:s.slice(0,s.length-1)};break;case Wt:a={selectedItems:[].concat(s,[t])};break;case Yt:a={activeIndex:-1};break;case zt:{var b=u,x=s.findIndex(function(B){return r.itemToKey(B)===r.itemToKey(t)});if(x<0)break;s.length===1?b=-1:x===s.length-1&&(b=s.length-2),a={selectedItems:[].concat(s.slice(0,x),s.slice(x+1)),activeIndex:b};break}case Gt:{var D=n.selectedItems;a={selectedItems:D};break}case Xt:{var R=n.activeIndex;a={activeIndex:R};break}case Jt:a={activeIndex:bn(r,"activeIndex"),selectedItems:bn(r,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return L({},e,a)}var Po=["refKey","ref","onClick","onKeyDown","selectedItem","index"],Mo=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Zt.stateChangeTypes=Ro;function Zt(e){e===void 0&&(e={}),wr(e,Zt);var n=L({},So,e),o=n.getA11yStatusMessage,i=n.environment,r=n.keyNavigationNext,t=n.keyNavigationPrevious,u=Gn(To,n,Do,Co),s=u[0],a=u[1],h=s.activeIndex,b=s.selectedItems,x=Re(),D=w.useRef(null),R=w.useRef();R.current=[];var B=Xe({state:s,props:n});ft(o,s,[h,b],i),w.useEffect(function(){x||(h===-1&&D.current?D.current.focus():R.current[h]&&R.current[h].focus())},[h]),Ze({props:n,state:s});var T=Je("getDropdownProps"),g=w.useMemo(function(){var N;return N={},N[t]=function(){a({type:jt})},N[r]=function(){a({type:Lt})},N.Delete=function(){a({type:Bt})},N.Backspace=function(){a({type:Ft})},N},[a,r,t]),j=w.useMemo(function(){var N;return N={},N[t]=function(V){wn(V)&&a({type:Ut})},N.Backspace=function(A){wn(A)&&a({type:qt})},N},[a,t]),d=w.useCallback(function(N){var V,A=N===void 0?{}:N,Y=A.refKey,G=Y===void 0?"ref":Y,H=A.ref,re=A.onClick,te=A.onKeyDown,ie=A.selectedItem,F=A.index,U=le(A,Po),c=B.current.state,_=ct(ie,F,c.selectedItems,"Pass either item or index to getSelectedItemProps!"),I=_[1],m=I>-1&&I===c.activeIndex,v=function(){a({type:$t,index:I})},C=function(P){var M=xe(P);M&&g[M]&&g[M](P)};return L((V={},V[G]=ve(H,function(O){O&&R.current.push(O)}),V.tabIndex=m?0:-1,V.onClick=X(re,v),V.onKeyDown=X(te,C),V),U)},[a,B,g]),p=w.useCallback(function(N,V){var A,Y=N===void 0?{}:N,G=Y.refKey,H=G===void 0?"ref":G,re=Y.ref,te=Y.onKeyDown,ie=Y.onClick,F=Y.preventKeyAction,U=F===void 0?!1:F,c=le(Y,Mo),_=V===void 0?{}:V,I=_.suppressRefError,m=I===void 0?!1:I;T("getDropdownProps",m,H,D);var v=function(P){var M=xe(P);M&&j[M]&&j[M](P)},C=function(){a({type:Yt})};return L((A={},A[H]=ve(re,function(O){O&&(D.current=O)}),A),!U&&{onKeyDown:X(te,v),onClick:X(ie,C)},c)},[a,j,T]),f=w.useCallback(function(N){a({type:Wt,selectedItem:N})},[a]),l=w.useCallback(function(N){a({type:zt,selectedItem:N})},[a]),k=w.useCallback(function(N){a({type:Gt,selectedItems:N})},[a]),W=w.useCallback(function(N){a({type:Xt,activeIndex:N})},[a]),K=w.useCallback(function(){a({type:Jt})},[a]);return{getSelectedItemProps:d,getDropdownProps:p,addSelectedItem:f,removeSelectedItem:l,setSelectedItems:k,setActiveIndex:W,reset:K,selectedItems:b,activeIndex:h}}exports.useCombobox=Ht;exports.useMultipleSelection=Zt;exports.useSelect=xt;
//# sourceMappingURL=downshift.esm-PfCOUbxq.js.map
