(()=>{"use strict";var e={146:(e,t,n)=>{var r=n(363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var i=c(n);p&&(i=i.concat(p(n)));for(var s=u(t),m=u(n),v=0;v<i.length;++v){var g=i[v];if(!(a[g]||r&&r[g]||m&&m[g]||s&&s[g])){var b=d(n,g);try{l(t,g,b)}catch(e){}}}}return t}},363:(e,t,n)=>{e.exports=n(799)},799:(e,t)=>{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case p:case a:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case l:case d:case v:case m:case u:return e;default:return t}}case o:return t}}}function C(e){return O(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return C(e)||O(e)===c},t.isConcurrentMode=C,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return O(e)===d},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===v},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===o},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===i},t.isSuspense=function(e){return O(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===s||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===g)},t.typeOf=O}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=window.React,o=window.wp.element,a=window.wp.i18n,i=window.wp.components;class s extends o.Component{getHeader(){}getBody(){}render(){return(0,r.createElement)(o.Fragment,null,(0,r.createElement)(i.CardHeader,null,(0,r.createElement)("h1",null,this.getHeader())),(0,r.createElement)(i.CardBody,null,this.getBody()))}}class u extends s{getHeader(){return(0,a.sprintf)(
// translators: %s: Virtual Instructors.
// translators: %s: Virtual Instructors.
(0,a.__)("Set Up %s","learndash"),LearnDashData.labels.virtual_instructors)}getBody(){return(0,r.createElement)("p",null,(0,a.sprintf)(
// translators: %s: virtual instructors.
// translators: %s: virtual instructors.
(0,a.__)("Let’s configure %1$s. In no time at all your %1$s will be helping your students with their coursework and understanding complex subjects.","learndash"),LearnDashData.labels.virtual_instructors))}}class l extends s{getHeader(){return(0,a.__)("Settings","learndash")}getBody(){return(0,r.createElement)("div",{className:"setup-wizard-step__form-wrapper"},(0,r.createElement)(i.TextControl,{id:"openAiApiKey",className:"setup-wizard-step__field-wrapper",label:(0,a.__)("OpenAI API Key"),help:learndashVirtualInstructorSetupWizard.field_values.openai_api_key.length>0?(0,a.__)("You already have set up your OpenAI API key. If you want to change it, please delete the current key and paste in the new one.","learndash"):(0,a.sprintf)(
// translators: %s: Virtual Instructors.
// translators: %s: Virtual Instructors.
(0,a.__)("Paste in your OpenAI API key to make use of %s.","learndash"),LearnDashData.labels.virtual_instructors),value:this.props.formData.openAiApiKey||learndashVirtualInstructorSetupWizard.field_values.openai_api_key,onChange:e=>{this.props.setFormData({openAiApiKey:e})},required:!0}),(0,r.createElement)(i.Card,null,(0,r.createElement)(i.CardMedia,null,(0,r.createElement)("div",{style:{padding:"56.15% 0 0 0",position:"relative"}},(0,r.createElement)("iframe",{title:(0,a.sprintf)(
// translators: %s: Virtual Instructor.
// translators: %s: Virtual Instructor.
(0,a.__)("%s OpenAI API Key Tutorial Video","learndash"),LearnDashData.labels.virtual_instructor),src:"https://player.vimeo.com/video/943260224?h=4da33de967&title=0&byline=0&portrait=0",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0})),(0,r.createElement)("script",{src:"https://player.vimeo.com/api/player.js"}))))}}class c extends s{getHeader(){return(0,a.__)("Global Configuration","learndash")}getBody(){return(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,(0,a.sprintf)(
// translators: %1$s: virtual instructors, %2$s: virtual instructor.
// translators: %1$s: virtual instructors, %2$s: virtual instructor.
(0,a.__)("Here you can configure how %1$s works globally. You can override these settings on a per %2$s level later on.","learndash"),LearnDashData.labels.virtual_instructors,LearnDashData.labels.virtual_instructor)),(0,r.createElement)("div",{className:"setup-wizard-step__form-wrapper"},(0,r.createElement)(i.TextareaControl,{id:"bannedWords",className:"setup-wizard-step__field-wrapper",label:(0,a.__)("Banned Words","learndash"),help:(0,a.sprintf)(
// translators: %s: virtual instructor.
// translators: %s: virtual instructor.
(0,a.__)("Pre-configured list of banned words that the student can’t ask the %1$s without the %1$s returning an error, separated by comma.","learndash"),LearnDashData.labels.virtual_instructor),value:this.props.formData.bannedWords,onChange:e=>{this.props.setFormData({bannedWords:e})}}),(0,r.createElement)(i.TextareaControl,{id:"errorMessage",className:"setup-wizard-step__field-wrapper",label:(0,a.__)("Error Message","learndash"),help:(0,a.__)("Enter in custom error message when the student asks a banned word. Leave blank to use the default error message.","learndash"),value:this.props.formData.errorMessage,onChange:e=>{this.props.setFormData({errorMessage:e})}})))}}const p=window.wp.compose;class d extends o.Component{constructor(e){super(e),this.state={id:e.id||e.instanceId}}render(){return(0,r.createElement)(i.BaseControl,{id:this.state.id,className:this.props.className,help:this.props.help},(0,r.createElement)(i.BaseControl.VisualLabel,null,this.props.label),(0,r.createElement)(i.Flex,{justify:"space-between"},(0,r.createElement)(i.FlexItem,{isBlock:!0},(0,r.createElement)(i.TextControl,{disabled:!0,value:this.props.file.name||""})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(i.FormFileUpload,{accept:this.props.accept,onClick:this.props.onClick,onChange:this.props.onChange,render:({openFileDialog:e})=>(0,r.createElement)(i.Button,{variant:"secondary",onClick:e,size:"compact"},this.props.children)}))))}}const f=(0,p.withInstanceId)(d);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function g(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function E(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),M=Math.abs,k=String.fromCharCode,V=Object.assign;function P(e){return e.trim()}function _(e,t,n){return e.replace(t,n)}function F(e,t){return e.indexOf(t)}function L(e,t){return 0|e.charCodeAt(t)}function A(e,t,n){return e.slice(t,n)}function R(e){return e.length}function T(e){return e.length}function z(e,t){return t.push(e),e}var H=1,N=1,j=0,$=0,B=0,U="";function W(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:H,column:N,length:i,return:""}}function G(e,t){return V(W("",null,null,"",null,null,0),e,{length:-e.length},t)}function Y(){return B=$>0?L(U,--$):0,N--,10===B&&(N=1,H--),B}function q(){return B=$<j?L(U,$++):0,N++,10===B&&(N=1,H++),B}function K(){return L(U,$)}function X(){return $}function J(e,t){return A(U,e,t)}function Z(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Q(e){return H=N=1,j=R(U=e),$=0,[]}function ee(e){return U="",e}function te(e){return P(J($-1,oe(91===e?e+2:40===e?e+1:e)))}function ne(e){for(;(B=K())&&B<33;)q();return Z(e)>2||Z(B)>3?"":" "}function re(e,t){for(;--t&&q()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return J(e,X()+(t<6&&32==K()&&32==q()))}function oe(e){for(;q();)switch(B){case e:return $;case 34:case 39:34!==e&&39!==e&&oe(B);break;case 40:41===e&&oe(e);break;case 92:q()}return $}function ae(e,t){for(;q()&&e+B!==57&&(e+B!==84||47!==K()););return"/*"+J(t,$-1)+"*"+k(47===e?e:q())}function ie(e){for(;!Z(K());)q();return J(e,$)}var se="-ms-",ue="-moz-",le="-webkit-",ce="comm",pe="rule",de="decl",fe="@keyframes";function he(e,t){for(var n="",r=T(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function me(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case de:return e.return=e.return||e.value;case ce:return"";case fe:return e.return=e.value+"{"+he(e.children,r)+"}";case pe:e.value=e.props.join(",")}return R(n=he(e.children,r))?e.return=e.value+"{"+n+"}":""}function ve(e){return ee(ge("",null,null,null,[""],e=Q(e),0,[0],e))}function ge(e,t,n,r,o,a,i,s,u){for(var l=0,c=0,p=i,d=0,f=0,h=0,m=1,v=1,g=1,b=0,y="",w=o,O=a,C=r,S=y;v;)switch(h=b,b=q()){case 40:if(108!=h&&58==L(S,p-1)){-1!=F(S+=_(te(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=te(b);break;case 9:case 10:case 13:case 32:S+=ne(h);break;case 92:S+=re(X()-1,7);continue;case 47:switch(K()){case 42:case 47:z(ye(ae(q(),X()),t,n),u);break;default:S+="/"}break;case 123*m:s[l++]=R(S)*g;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==g&&(S=_(S,/\f/g,"")),f>0&&R(S)-p&&z(f>32?we(S+";",r,n,p-1):we(_(S," ","")+";",r,n,p-2),u);break;case 59:S+=";";default:if(z(C=be(S,t,n,l,c,o,s,y,w=[],O=[],p),a),123===b)if(0===c)ge(S,t,C,C,w,a,p,s,O);else switch(99===d&&110===L(S,3)?100:d){case 100:case 108:case 109:case 115:ge(e,C,C,r&&z(be(e,C,C,0,0,o,s,y,o,w=[],p),O),o,O,p,s,r?w:O);break;default:ge(S,C,C,C,[""],O,0,s,O)}}l=c=f=0,m=g=1,y=S="",p=i;break;case 58:p=1+R(S),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Y())continue;switch(S+=k(b),b*m){case 38:g=c>0?1:(S+="\f",-1);break;case 44:s[l++]=(R(S)-1)*g,g=1;break;case 64:45===K()&&(S+=te(q())),d=K(),c=p=R(y=S+=ie(X())),b++;break;case 45:45===h&&2==R(S)&&(m=0)}}return a}function be(e,t,n,r,o,a,i,s,u,l,c){for(var p=o-1,d=0===o?a:[""],f=T(d),h=0,m=0,v=0;h<r;++h)for(var g=0,b=A(e,p+1,p=M(m=i[h])),y=e;g<f;++g)(y=P(m>0?d[g]+" "+b:_(b,/&\f/g,d[g])))&&(u[v++]=y);return W(e,t,n,0===o?pe:s,u,l,c)}function ye(e,t,n){return W(e,t,n,ce,k(B),A(e,2,-2),0)}function we(e,t,n,r){return W(e,t,n,de,A(e,0,r),A(e,r+1,-1),r)}var Oe=function(e,t,n){for(var r=0,o=0;r=o,o=K(),38===r&&12===o&&(t[n]=1),!Z(o);)q();return J(e,$)},Ce=new WeakMap,Se=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ce.get(n))&&!r){Ce.set(e,!0);for(var o=[],a=function(e,t){return ee(function(e,t){var n=-1,r=44;do{switch(Z(r)){case 0:38===r&&12===K()&&(t[n]=1),e[n]+=Oe($-1,t,n);break;case 2:e[n]+=te(r);break;case 4:if(44===r){e[++n]=58===K()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=k(r)}}while(r=q());return e}(Q(e),t))}(t,o),i=n.props,s=0,u=0;s<a.length;s++)for(var l=0;l<i.length;l++,u++)e.props[u]=o[s]?a[s].replace(/&\f/g,i[l]):i[l]+" "+a[s]}}},xe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ie(e,t){switch(function(e,t){return 45^L(e,0)?(((t<<2^L(e,0))<<2^L(e,1))<<2^L(e,2))<<2^L(e,3):0}(e,t)){case 5103:return le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return le+e+ue+e+se+e+e;case 6828:case 4268:return le+e+se+e+e;case 6165:return le+e+se+"flex-"+e+e;case 5187:return le+e+_(e,/(\w+).+(:[^]+)/,le+"box-$1$2"+se+"flex-$1$2")+e;case 5443:return le+e+se+"flex-item-"+_(e,/flex-|-self/,"")+e;case 4675:return le+e+se+"flex-line-pack"+_(e,/align-content|flex-|-self/,"")+e;case 5548:return le+e+se+_(e,"shrink","negative")+e;case 5292:return le+e+se+_(e,"basis","preferred-size")+e;case 6060:return le+"box-"+_(e,"-grow","")+le+e+se+_(e,"grow","positive")+e;case 4554:return le+_(e,/([^-])(transform)/g,"$1"+le+"$2")+e;case 6187:return _(_(_(e,/(zoom-|grab)/,le+"$1"),/(image-set)/,le+"$1"),e,"")+e;case 5495:case 3959:return _(e,/(image-set\([^]*)/,le+"$1$`$1");case 4968:return _(_(e,/(.+:)(flex-)?(.*)/,le+"box-pack:$3"+se+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+le+e+e;case 4095:case 3583:case 4068:case 2532:return _(e,/(.+)-inline(.+)/,le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(R(e)-1-t>6)switch(L(e,t+1)){case 109:if(45!==L(e,t+4))break;case 102:return _(e,/(.+:)(.+)-([^]+)/,"$1"+le+"$2-$3$1"+ue+(108==L(e,t+3)?"$3":"$2-$3"))+e;case 115:return~F(e,"stretch")?Ie(_(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==L(e,t+1))break;case 6444:switch(L(e,R(e)-3-(~F(e,"!important")&&10))){case 107:return _(e,":",":"+le)+e;case 101:return _(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+le+(45===L(e,14)?"inline-":"")+"box$3$1"+le+"$2$3$1"+se+"$2box$3")+e}break;case 5936:switch(L(e,t+11)){case 114:return le+e+se+_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return le+e+se+_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return le+e+se+_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return le+e+se+e+e}return e}var Ee=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case de:e.return=Ie(e.value,e.length);break;case fe:return he([G(e,{value:_(e.value,"@","@"+le)})],r);case pe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return he([G(e,{props:[_(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return he([G(e,{props:[_(t,/:(plac\w+)/,":"+le+"input-$1")]}),G(e,{props:[_(t,/:(plac\w+)/,":-moz-$1")]}),G(e,{props:[_(t,/:(plac\w+)/,se+"input-$1")]})],r)}return""})}}],De=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,a=e.stylisPlugins||Ee,i={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)});var u,l,c,p,d=[me,(p=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(l=[Se,xe].concat(a,d),c=T(l),function(e,t,n,r){for(var o="",a=0;a<c;a++)o+=l[a](e,t,n,r)||"";return o});o=function(e,t,n,r){u=n,he(ve(e?e+"{"+t.styles+"}":t.styles),f),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new D({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return h.sheet.hydrate(s),h},Me=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ke={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ve(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Pe=/[A-Z]|^ms/g,_e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fe=function(e){return 45===e.charCodeAt(1)},Le=function(e){return null!=e&&"boolean"!=typeof e},Ae=Ve(function(e){return Fe(e)?e:e.replace(Pe,"-$&").toLowerCase()}),Re=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_e,function(e,t,n){return ze={name:t,styles:n,next:ze},t})}return 1===ke[e]||Fe(e)||"number"!=typeof t||0===t?t:t+"px"};function Te(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return ze={name:o.name,styles:o.styles,next:ze},o.name;var a=n;if(void 0!==a.styles){var i=a.next;if(void 0!==i)for(;void 0!==i;)ze={name:i.name,styles:i.styles,next:ze},i=i.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Te(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i){var s=i;null!=t&&void 0!==t[s]?r+=a+"{"+t[s]+"}":Le(s)&&(r+=Ae(a)+":"+Re(a,s)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var u=Te(e,t,i);switch(a){case"animation":case"animationName":r+=Ae(a)+":"+u+";";break;default:r+=a+"{"+u+"}"}}else for(var l=0;l<i.length;l++)Le(i[l])&&(r+=Ae(a)+":"+Re(a,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=ze,u=n(e);return ze=s,Te(e,t,u)}}var l=n;if(null==t)return l;var c=t[l];return void 0!==c?c:l}var ze,He=/label:\s*([^\s;{]+)\s*(;|$)/g;function Ne(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ze=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=Te(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=Te(n,t,e[i]),r&&(o+=a[i]);He.lastIndex=0;for(var s,u="";null!==(s=He.exec(o));)u+="-"+s[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+u;return{name:l,styles:o,next:ze}}var je,$e,Be=!!r.useInsertionEffect&&r.useInsertionEffect,Ue=Be||function(e){return e()},We=(Be||r.useLayoutEffect,r.createContext("undefined"!=typeof HTMLElement?De({key:"css"}):null)),Ge=(We.Provider,function(e){return(0,r.forwardRef)(function(t,n){var o=(0,r.useContext)(We);return e(t,o,n)})}),Ye=r.createContext({}),qe={}.hasOwnProperty,Ke="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Xe=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Me(t,n,r),Ue(function(){return function(e,t,n){Me(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},Je=Ge(function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var a=e[Ke],i=[o],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,i,e.className):null!=e.className&&(s=e.className+" ");var u=Ne(i,void 0,r.useContext(Ye));s+=t.key+"-"+u.name;var l={};for(var c in e)qe.call(e,c)&&"css"!==c&&c!==Ke&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),r.createElement(r.Fragment,null,r.createElement(Xe,{cache:t,serialized:u,isStringTag:"string"==typeof a}),r.createElement(a,l))}),Ze=Je,Qe=(n(146),function(e,t){var n=arguments;if(null==t||!qe.call(t,"css"))return r.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=Ze,a[1]=function(e,t){var n={};for(var r in t)qe.call(t,r)&&(n[r]=t[r]);return n[Ke]=e,n}(e,t);for(var i=2;i<o;i++)a[i]=n[i];return r.createElement.apply(null,a)});function et(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ne(t)}function tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}je=Qe||(Qe={}),$e||($e=je.JSX||(je.JSX={}));const rt=window.ReactDOM,ot=Math.min,at=Math.max,it=Math.round,st=Math.floor,ut=e=>({x:e,y:e});function lt(){return"undefined"!=typeof window}function ct(e){return ft(e)?(e.nodeName||"").toLowerCase():"#document"}function pt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dt(e){var t;return null==(t=(ft(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ft(e){return!!lt()&&(e instanceof Node||e instanceof pt(e).Node)}function ht(e){return!!lt()&&(e instanceof Element||e instanceof pt(e).Element)}function mt(e){return!!lt()&&(e instanceof HTMLElement||e instanceof pt(e).HTMLElement)}function vt(e){return!(!lt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof pt(e).ShadowRoot)}const gt=new Set(["inline","contents"]);function bt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!gt.has(o)}const yt=new Set(["html","body","#document"]);function wt(e){return pt(e).getComputedStyle(e)}function Ot(e){const t=function(e){if("html"===ct(e))return e;const t=e.assignedSlot||e.parentNode||vt(e)&&e.host||dt(e);return vt(t)?t.host:t}(e);return function(e){return yt.has(ct(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:mt(t)&&bt(t)?t:Ot(t)}function Ct(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Ot(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=pt(o);if(a){const e=St(i);return t.concat(i,i.visualViewport||[],bt(o)?o:[],e&&n?Ct(e):[])}return t.concat(o,Ct(o,[],n))}function St(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xt(e){return ht(e)?e:e.contextElement}function It(e){const t=xt(e);if(!mt(t))return ut(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=function(e){const t=wt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=it(n)!==a||it(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}(t);let i=(a?it(n.width):n.width)/r,s=(a?it(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Et=ut(0);function Dt(e){const t=pt(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Et}function Mt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=xt(e);let i=ut(1);t&&(r?ht(r)&&(i=It(r)):i=It(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==pt(e))&&t}(a,n,r)?Dt(a):ut(0);let u=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,c=o.width/i.x,p=o.height/i.y;if(a){const e=pt(a),t=r&&ht(r)?pt(r):r;let n=e,o=St(n);for(;o&&r&&t!==n;){const e=It(o),t=o.getBoundingClientRect(),r=wt(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,l*=e.y,c*=e.x,p*=e.y,u+=a,l+=i,n=pt(o),o=St(n)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:p,x:u,y:l})}function kt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var Vt=r.useLayoutEffect,Pt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],_t=function(){};function Ft(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Lt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&a.push("".concat(Ft(e,i)));return a.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var At=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===m(e)&&null!==e?[e]:[];var t},Rt=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,y({},nt(e,Pt))},Tt=function(e,t,n){var r=e.cx,o=e.getStyles,a=e.getClassNames,i=e.className;return{css:o(t,e),className:r(null!=n?n:{},a(t,e),i)}};function zt(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ht(e){return zt(e)?window.pageYOffset:e.scrollTop}function Nt(e,t){zt(e)?window.scrollTo(0,t):e.scrollTop=t}function jt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_t,o=Ht(e),a=t-o,i=0;!function t(){var s,u=a*((s=(s=i+=10)/n-1)*s*s+1)+o;Nt(e,u),i<n?window.requestAnimationFrame(t):r(e)}()}function $t(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Nt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Nt(e,Math.max(t.offsetTop-o,0))}function Bt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Ut=!1,Wt={get passive(){return Ut=!0}},Gt="undefined"!=typeof window?window:{};Gt.addEventListener&&Gt.removeEventListener&&(Gt.addEventListener("p",_t,Wt),Gt.removeEventListener("p",_t,!1));var Yt=Ut;function qt(e){return null!=e}function Kt(e,t,n){return e?t:n}var Xt=["children","innerProps"],Jt=["children","innerProps"];var Zt,Qt,en,tn=function(e){return"auto"===e?"bottom":e},nn=(0,r.createContext)(null),rn=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,i=e.menuPosition,s=e.menuShouldScrollIntoView,u=e.theme,l=((0,r.useContext)(nn)||{}).setPortalPlacement,c=(0,r.useRef)(null),p=tt((0,r.useState)(o),2),d=p[0],f=p[1],h=tt((0,r.useState)(null),2),m=h[0],v=h[1],g=u.spacing.controlHeight;return Vt(function(){var e=c.current;if(e){var t="fixed"===i,r=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=e.isFixedPosition,s=e.controlHeight,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var c,p=u.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,h=d.height,m=d.top,v=n.offsetParent.getBoundingClientRect().top,g=i||zt(c=u)?window.innerHeight:c.clientHeight,b=Ht(u),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),O=v-w,C=g-m,S=O+b,x=p-b-m,I=f-g+b+y,E=b+m-w,D=160;switch(o){case"auto":case"bottom":if(C>=h)return{placement:"bottom",maxHeight:t};if(x>=h&&!i)return a&&jt(u,I,D),{placement:"bottom",maxHeight:t};if(!i&&x>=r||i&&C>=r)return a&&jt(u,I,D),{placement:"bottom",maxHeight:i?C-y:x-y};if("auto"===o||i){var M=t,k=i?O:S;return k>=r&&(M=Math.min(k-y-s,t)),{placement:"top",maxHeight:M}}if("bottom"===o)return a&&Nt(u,I),{placement:"bottom",maxHeight:t};break;case"top":if(O>=h)return{placement:"top",maxHeight:t};if(S>=h&&!i)return a&&jt(u,E,D),{placement:"top",maxHeight:t};if(!i&&S>=r||i&&O>=r){var V=t;return(!i&&S>=r||i&&O>=r)&&(V=i?O-w:S-w),a&&jt(u,E,D),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:g});f(r.maxHeight),v(r.placement),null==l||l(r.placement)}},[o,a,i,s,n,l,g]),t({ref:c,placerProps:y(y({},e),{},{placement:m||tn(a),maxHeight:d})})},on=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return y({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},an=on,sn=on,un=["size"],ln=["innerProps","isRtl","size"],cn={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},pn=function(e){var t=e.size,n=nt(e,un);return Qe("svg",h({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:cn},n))},dn=function(e){return Qe(pn,h({size:20},e),Qe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},fn=function(e){return Qe(pn,h({size:20},e),Qe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},hn=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return y({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*o,":hover":{color:n?a.neutral80:a.neutral40}})},mn=hn,vn=hn,gn=function(){var e=et.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Zt||(Qt=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],en||(en=Qt.slice(0)),Zt=Object.freeze(Object.defineProperties(Qt,{raw:{value:Object.freeze(en)}})))),bn=function(e){var t=e.delay,n=e.offset;return Qe("span",{css:et({animation:"".concat(gn," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},yn=["data"],wn=["innerRef","isDisabled","isHidden","inputClassName"],On={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Cn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":y({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},On)},Sn=function(e){return y({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},On)},xn=function(e){var t=e.children,n=e.innerProps;return Qe("div",n,t)},In={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Qe("div",h({},Tt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Qe(dn,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,a=e.innerProps,i=e.menuIsOpen;return Qe("div",h({ref:o},Tt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),a,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Qe("div",h({},Tt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Qe(fn,null))},DownChevron:fn,CrossIcon:dn,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,a=e.Heading,i=e.headingProps,s=e.innerProps,u=e.label,l=e.theme,c=e.selectProps;return Qe("div",h({},Tt(e,"group",{group:!0}),s),Qe(a,h({},i,{selectProps:c,theme:l,getStyles:r,getClassNames:o,cx:n}),u),Qe("div",null,t))},GroupHeading:function(e){var t=Rt(e);t.data;var n=nt(t,yn);return Qe("div",h({},Tt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Qe("div",h({},Tt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Qe("span",h({},t,Tt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Rt(e),o=r.innerRef,a=r.isDisabled,i=r.isHidden,s=r.inputClassName,u=nt(r,wn);return Qe("div",h({},Tt(e,"input",{"input-container":!0}),{"data-value":n||""}),Qe("input",h({className:t({input:!0},s),ref:o,style:Sn(i),disabled:a},u)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,a=nt(e,ln);return Qe("div",h({},Tt(y(y({},a),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Qe(bn,{delay:0,offset:n}),Qe(bn,{delay:160,offset:!0}),Qe(bn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Qe("div",h({},Tt(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Qe("div",h({},Tt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,a=e.innerProps,i=e.menuPlacement,s=e.menuPosition,u=(0,r.useRef)(null),l=(0,r.useRef)(null),c=tt((0,r.useState)(tn(i)),2),p=c[0],d=c[1],f=(0,r.useMemo)(function(){return{setPortalPlacement:d}},[]),m=tt((0,r.useState)(null),2),v=m[0],g=m[1],b=(0,r.useCallback)(function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===s?0:window.pageYOffset,n=e[p]+t;n===(null==v?void 0:v.offset)&&e.left===(null==v?void 0:v.rect.left)&&e.width===(null==v?void 0:v.rect.width)||g({offset:n,rect:e})}},[o,s,p,null==v?void 0:v.offset,null==v?void 0:v.rect.left,null==v?void 0:v.rect.width]);Vt(function(){b()},[b]);var w=(0,r.useCallback)(function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&u.current&&(l.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,l=xt(e),c=o||a?[...l?Ct(l):[],...Ct(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const p=l&&s?function(e,t){let n,r=null;const o=dt(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),a();const l=e.getBoundingClientRect(),{left:c,top:p,width:d,height:f}=l;if(s||t(),!d||!f)return;const h={rootMargin:-st(p)+"px "+-st(o.clientWidth-(c+d))+"px "+-st(o.clientHeight-(p+f))+"px "+-st(c)+"px",threshold:at(0,ot(1,u))||1};let m=!0;function v(t){const r=t[0].intersectionRatio;if(r!==u){if(!m)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||kt(l,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(v,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,h)}r.observe(e)}(!0),a}(l,n):null;let d,f=-1,h=null;i&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let m=u?Mt(e):null;return u&&function t(){const r=Mt(e);m&&!kt(m,r)&&n(),m=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==p||p(),null==(e=h)||e.disconnect(),h=null,u&&cancelAnimationFrame(d)}}(o,u.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);Vt(function(){w()},[w]);var O=(0,r.useCallback)(function(e){u.current=e,w()},[w]);if(!t&&"fixed"!==s||!v)return null;var C=Qe("div",h({ref:O},Tt(y(y({},e),{},{offset:v.offset,position:s,rect:v.rect}),"menuPortal",{"menu-portal":!0}),a),n);return Qe(nn.Provider,{value:f},t?(0,rt.createPortal)(C,t):C)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=nt(e,Jt);return Qe("div",h({},Tt(y(y({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=nt(e,Xt);return Qe("div",h({},Tt(y(y({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,a=e.isDisabled,i=e.removeProps,s=e.selectProps,u=n.Container,l=n.Label,c=n.Remove;return Qe(u,{data:r,innerProps:y(y({},Tt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},Qe(l,{data:r,innerProps:y({},Tt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Qe(c,{data:r,innerProps:y(y({},Tt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:s}))},MultiValueContainer:xn,MultiValueLabel:xn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Qe("div",h({role:"button"},n),t||Qe(dn,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.innerRef,i=e.innerProps;return Qe("div",h({},Tt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:a,"aria-disabled":n},i),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Qe("div",h({},Tt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Qe("div",h({},Tt(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Qe("div",h({},Tt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Qe("div",h({},Tt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},En=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Dn(e,t){return e===t||!(!En(e)||!En(t))}function Mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}for(var kn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Vn=function(e){return Qe("span",h({css:kn},e))},Pn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,a=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,s=e.isDisabled,u=e.isSelected,l=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(a," focused, ").concat(c(i,n),".");if("menu"===t&&l){var p=s?" disabled":"",d="".concat(u?" selected":"").concat(p);return"".concat(a).concat(d,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Fn=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,a=e.focusableOptions,i=e.isFocused,s=e.selectValue,u=e.selectProps,l=e.id,c=e.isAppleDevice,p=u.ariaLiveMessages,d=u.getOptionLabel,f=u.inputValue,h=u.isMulti,m=u.isOptionDisabled,v=u.isSearchable,g=u.menuIsOpen,b=u.options,w=u.screenReaderStatus,O=u.tabSelectsValue,C=u.isLoading,S=u["aria-label"],x=u["aria-live"],I=(0,r.useMemo)(function(){return y(y({},Pn),p||{})},[p]),E=(0,r.useMemo)(function(){var e,n="";if(t&&I.onChange){var r=t.option,o=t.options,a=t.removedValue,i=t.removedValues,u=t.value,l=a||r||(e=u,Array.isArray(e)?null:e),c=l?d(l):"",p=o||i||void 0,f=p?p.map(d):[],h=y({isDisabled:l&&m(l,s),label:c,labels:f},t);n=I.onChange(h)}return n},[t,I,m,s,d]),D=(0,r.useMemo)(function(){var e="",t=n||o,r=!!(n&&s&&s.includes(n));if(t&&I.onFocus){var i={focused:t,label:d(t),isDisabled:m(t,s),isSelected:r,options:a,context:t===n?"menu":"value",selectValue:s,isAppleDevice:c};e=I.onFocus(i)}return e},[n,o,d,m,I,a,s,c]),M=(0,r.useMemo)(function(){var e="";if(g&&b.length&&!C&&I.onFilter){var t=w({count:a.length});e=I.onFilter({inputValue:f,resultsMessage:t})}return e},[a,f,g,I,b,w,C]),k="initial-input-focus"===(null==t?void 0:t.action),V=(0,r.useMemo)(function(){var e="";if(I.guidance){var t=o?"value":g?"menu":"input";e=I.guidance({"aria-label":S,context:t,isDisabled:n&&m(n,s),isMulti:h,isSearchable:v,tabSelectsValue:O,isInitialFocus:k})}return e},[S,n,o,h,m,v,g,I,s,O,k]),P=Qe(r.Fragment,null,Qe("span",{id:"aria-selection"},E),Qe("span",{id:"aria-focused"},D),Qe("span",{id:"aria-results"},M),Qe("span",{id:"aria-guidance"},V));return Qe(r.Fragment,null,Qe(Vn,{id:l},k&&P),Qe(Vn,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&P))},Ln=[{base:"A",letters:"AⒶＡÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷＢḂḄḆɃƂƁ"},{base:"C",letters:"CⒸＣĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹＤḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"ǱǄ"},{base:"Dz",letters:"ǲǅ"},{base:"E",letters:"EⒺＥÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻＦḞƑꝻ"},{base:"G",letters:"GⒼＧǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽＨĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾＩÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿＪĴɈ"},{base:"K",letters:"KⓀＫḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁＬĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"Ǉ"},{base:"Lj",letters:"ǈ"},{base:"M",letters:"MⓂＭḾṀṂⱮƜ"},{base:"N",letters:"NⓃＮǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"Ǌ"},{base:"Nj",letters:"ǋ"},{base:"O",letters:"OⓄＯÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅＰṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆＱꝖꝘɊ"},{base:"R",letters:"RⓇＲŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈＳẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉＴṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊＵÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋＶṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌＷẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍＸẊẌ"},{base:"Y",letters:"YⓎＹỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏＺŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐａẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑｂḃḅḇƀƃɓ"},{base:"c",letters:"cⓒｃćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓｄḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"ǳǆ"},{base:"e",letters:"eⓔｅèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕｆḟƒꝼ"},{base:"g",letters:"gⓖｇǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗｈĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘｉìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙｊĵǰɉ"},{base:"k",letters:"kⓚｋḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛｌŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"ǉ"},{base:"m",letters:"mⓜｍḿṁṃɱɯ"},{base:"n",letters:"nⓝｎǹńñṅňṇņṋṉƞɲŉꞑꞥ"},{base:"nj",letters:"ǌ"},{base:"o",letters:"oⓞｏòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟｐṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠｑɋꝗꝙ"},{base:"r",letters:"rⓡｒŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢｓßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣｔṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤｕùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥｖṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦｗẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧｘẋẍ"},{base:"y",letters:"yⓨｙỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩｚźẑżžẓẕƶȥɀⱬꝣ"}],An=new RegExp("["+Ln.map(function(e){return e.letters}).join("")+"]","g"),Rn={},Tn=0;Tn<Ln.length;Tn++)for(var zn=Ln[Tn],Hn=0;Hn<zn.letters.length;Hn++)Rn[zn.letters[Hn]]=zn.base;var Nn=function(e){return e.replace(An,function(e){return Rn[e]})},jn=function(e,t){void 0===t&&(t=Mn);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}(Nn),$n=function(e){return e.replace(/^\s+|\s+$/g,"")},Bn=function(e){return"".concat(e.label," ").concat(e.value)},Un=["innerRef"];function Wn(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=tt(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=tt(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(nt(e,Un),"onExited","in","enter","exit","appear");return Qe("input",h({ref:t},n,{css:et({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Gn=["boxSizing","height","overflow","paddingRight","position"],Yn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function qn(e){e.cancelable&&e.preventDefault()}function Kn(e){e.stopPropagation()}function Xn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Jn(){return"ontouchstart"in window||navigator.maxTouchPoints}var Zn=!("undefined"==typeof window||!window.document||!window.document.createElement),Qn=0,er={capture:!1,passive:!1},tr=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},nr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function rr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,a=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,a=e.onTopArrive,i=e.onTopLeave,s=(0,r.useRef)(!1),u=(0,r.useRef)(!1),l=(0,r.useRef)(0),c=(0,r.useRef)(null),p=(0,r.useCallback)(function(e,t){if(null!==c.current){var r=c.current,l=r.scrollTop,p=r.scrollHeight,d=r.clientHeight,f=c.current,h=t>0,m=p-d-l,v=!1;m>t&&s.current&&(o&&o(e),s.current=!1),h&&u.current&&(i&&i(e),u.current=!1),h&&t>m?(n&&!s.current&&n(e),f.scrollTop=p,v=!0,s.current=!0):!h&&-t>l&&(a&&!u.current&&a(e),f.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,a,i]),d=(0,r.useCallback)(function(e){p(e,e.deltaY)},[p]),f=(0,r.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),h=(0,r.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;p(e,t)},[p]),m=(0,r.useCallback)(function(e){if(e){var t=!!Yt&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}},[h,f,d]),v=(0,r.useCallback)(function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))},[h,f,d]);return(0,r.useEffect)(function(){if(t){var e=c.current;return m(e),function(){v(e)}}},[t,m,v]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,a=(0,r.useRef)({}),i=(0,r.useRef)(null),s=(0,r.useCallback)(function(e){if(Zn){var t=document.body,n=t&&t.style;if(o&&Gn.forEach(function(e){var t=n&&n[e];a.current[e]=t}),o&&Qn<1){var r=parseInt(a.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,s=window.innerWidth-i+r||0;Object.keys(Yn).forEach(function(e){var t=Yn[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Jn()&&(t.addEventListener("touchmove",qn,er),e&&(e.addEventListener("touchstart",Xn,er),e.addEventListener("touchmove",Kn,er))),Qn+=1}},[o]),u=(0,r.useCallback)(function(e){if(Zn){var t=document.body,n=t&&t.style;Qn=Math.max(Qn-1,0),o&&Qn<1&&Gn.forEach(function(e){var t=a.current[e];n&&(n[e]=t)}),t&&Jn()&&(t.removeEventListener("touchmove",qn,er),e&&(e.removeEventListener("touchstart",Xn,er),e.removeEventListener("touchmove",Kn,er)))}},[o]);return(0,r.useEffect)(function(){if(t){var e=i.current;return s(e),function(){u(e)}}},[t,s,u]),function(e){i.current=e}}({isEnabled:n});return Qe(r.Fragment,null,n&&Qe("div",{onClick:tr,css:nr}),t(function(e){a(e),i(e)}))}var or={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ar=function(e){var t=e.name,n=e.onFocus;return Qe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:or,value:"",onChange:function(){}})};function ir(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function sr(){return ir(/^Mac/i)}var ur={clearIndicator:vn,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,a=o.colors,i=o.borderRadius;return y({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},dropdownIndicator:mn,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return y({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return y({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,a=o.spacing,i=o.colors;return y(y({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Cn),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,a=o.colors,i=o.spacing.baseUnit;return y({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*i})},loadingMessage:sn,menu:function(e,t){var n,r=e.placement,o=e.theme,a=o.borderRadius,i=o.spacing,s=o.colors;return y((g(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),g(n,"position","absolute"),g(n,"width","100%"),g(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return y({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,a=n.colors;return y({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,a=e.cropWithEllipsis;return y({overflow:"hidden",textOverflow:a||void 0===a?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,a=n.colors,i=e.isFocused;return y({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},noOptionsMessage:an,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.theme,i=a.spacing,s=a.colors;return y({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return y({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,a=r.colors;return y({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,a=e.selectProps.controlShouldRenderValue;return y({alignItems:"center",display:r&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},lr={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},cr={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Bt(),captureMenuScroll:!Bt(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=y({ignoreCase:!0,ignoreAccents:!0,stringify:Bn,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,s=n.matchFrom,u=i?$n(t):t,l=i?$n(a(e)):a(e);return r&&(u=u.toLowerCase(),l=l.toLowerCase()),o&&(u=jn(u),l=Nn(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function pr(e,t,n,r){return{type:"option",data:t,isDisabled:yr(e,t,n),isSelected:wr(e,t,n),label:gr(e,t),value:br(e,t),index:r}}function dr(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return pr(e,n,t,r)}).filter(function(t){return mr(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=pr(e,n,t,r);return mr(e,a)?a:void 0}).filter(qt)}function fr(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,E(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function hr(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,E(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function mr(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,s=t.value;return(!Cr(e)||!a)&&Or(e,{label:i,value:s,data:o},r)}var vr=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},gr=function(e,t){return e.getOptionLabel(t)},br=function(e,t){return e.getOptionValue(t)};function yr(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function wr(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=br(e,t);return n.some(function(t){return br(e,t)===r})}function Or(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Cr=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Sr=1,xr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(n,e);var t=function(e){var t=S();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,a=o.closeMenuOnSelect,i=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),a&&(r.setState({inputIsHiddenAfterUpdate:!i}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,a=t.name,i=r.state.selectValue,s=o&&r.isOptionSelected(e,i),u=r.isOptionDisabled(e,i);if(s){var l=r.getOptionValue(e);r.setValue(i.filter(function(e){return r.getOptionValue(e)!==l}),"deselect-option",e)}else{if(u)return void r.ariaOnChange(e,{action:"select-option",option:e,name:a});o?r.setValue([].concat(E(i),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),a=n.filter(function(e){return r.getOptionValue(e)!==o}),i=Kt(t,a,a[0]||null);r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Kt(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),a=Kt(e,o,o[0]||null);n&&r.onChange(a,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return vr(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return hr(dr(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Lt.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return gr(r.props,e)},r.getOptionValue=function(e){return br(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=ur[e](t,n);o.boxSizing="border-box";var a=r.props.styles[e];return a?a(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,y(y({},In),e.components);var e},r.buildCategorizedOptions=function(){return dr(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return fr(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:y({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&zt(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),a=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Cr(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!p||!h||d&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(i)return;if(!l){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Sr),r.state.selectValue=At(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),i=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=a[i],r.state.focusedOptionId=vr(o,a[i])}return r}return function(e,t,n){t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&$t(this.menuListRef,this.focusedOptionRef),(sr()||ir(/^iPhone/i)||ir(/^iPad/i)||sr()&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&($t(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-1&&(i=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i],focusedOptionId:this.getFocusedOptionId(a[i])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o<a&&(i=o+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(lr):y(y({},lr),this.props.theme):lr}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,a=this.selectOption,i=this.setValue,s=this.props,u=s.isMulti,l=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:u,isRtl:l,options:c,selectOption:a,selectProps:s,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return yr(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return wr(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Or(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,a=e.inputValue,i=e.tabIndex,s=e.form,u=e.menuIsOpen,l=e.required,c=this.getComponents().Input,p=this.state,d=p.inputIsHidden,f=p.ariaSelection,m=this.commonProps,v=o||this.getElementId("input"),g=y(y(y({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(c,h({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:s,type:"text",value:a},g)):r.createElement(Wn,h({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_t,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,a=t.MultiValueLabel,i=t.MultiValueRemove,s=t.SingleValue,u=t.Placeholder,l=this.commonProps,c=this.props,p=c.controlShouldRenderValue,d=c.isDisabled,f=c.isMulti,m=c.inputValue,v=c.placeholder,g=this.state,b=g.selectValue,y=g.focusedValue,w=g.isFocused;if(!this.hasValue()||!p)return m?null:r.createElement(u,h({},l,{key:"placeholder",isDisabled:d,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(f)return b.map(function(t,s){var u=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,h({},l,{components:{Container:o,Label:a,Remove:i},isFocused:u,isDisabled:d,key:c,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(m)return null;var O=b[0];return r.createElement(s,h({},l,{data:O,isDisabled:d}),this.formatOptionLabel(O,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,a=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||a)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,h({},t,{innerProps:s,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,a=n.isLoading,i=this.state.isFocused;return e&&a?r.createElement(e,h({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,a=this.props.isDisabled,i=this.state.isFocused;return r.createElement(n,h({},o,{isDisabled:a,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,h({},t,{innerProps:a,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,a=t.Menu,i=t.MenuList,s=t.MenuPortal,u=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,p=this.commonProps,d=this.state.focusedOption,f=this.props,m=f.captureMenuScroll,v=f.inputValue,g=f.isLoading,b=f.loadingMessage,y=f.minMenuHeight,w=f.maxMenuHeight,O=f.menuIsOpen,C=f.menuPlacement,S=f.menuPosition,x=f.menuPortalTarget,I=f.menuShouldBlockScroll,E=f.menuShouldScrollIntoView,D=f.noOptionsMessage,M=f.onMenuScrollToTop,k=f.onMenuScrollToBottom;if(!O)return null;var V,P=function(t,n){var o=t.type,a=t.data,i=t.isDisabled,s=t.isSelected,u=t.label,l=t.value,f=d===a,m=i?void 0:function(){return e.onOptionHover(a)},v=i?void 0:function(){return e.selectOption(a)},g="".concat(e.getElementId("option"),"-").concat(n),b={id:g,onClick:v,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:s};return r.createElement(c,h({},p,{innerProps:b,data:a,isDisabled:i,isSelected:s,key:g,label:u,type:o,value:l,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())V=this.getCategorizedOptions().map(function(t){if("group"===t.type){var a=t.data,i=t.options,s=t.index,u="".concat(e.getElementId("group"),"-").concat(s),l="".concat(u,"-heading");return r.createElement(n,h({},p,{key:u,data:a,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return P(e,"".concat(s,"-").concat(e.index))}))}if("option"===t.type)return P(t,"".concat(t.index))});else if(g){var _=b({inputValue:v});if(null===_)return null;V=r.createElement(u,p,_)}else{var F=D({inputValue:v});if(null===F)return null;V=r.createElement(l,p,F)}var L={minMenuHeight:y,maxMenuHeight:w,menuPlacement:C,menuPosition:S,menuShouldScrollIntoView:E},A=r.createElement(rn,h({},p,L),function(t){var n=t.ref,o=t.placerProps,s=o.placement,u=o.maxHeight;return r.createElement(a,h({},p,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:s}),r.createElement(rr,{captureEnabled:m,onTopArrive:M,onBottomArrive:k,lockEnabled:I},function(t){return r.createElement(i,h({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:u,focusedOption:d}),V)}))});return x||"fixed"===S?r.createElement(s,h({},p,{appendTo:x,controlElement:this.controlRef,menuPlacement:C,menuPosition:S}),A):A}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,a=t.isMulti,i=t.name,s=t.required,u=this.state.selectValue;if(s&&!this.hasValue()&&!o)return r.createElement(ar,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(a){if(n){var l=u.map(function(t){return e.getOptionValue(t)}).join(n);return r.createElement("input",{name:i,type:"hidden",value:l})}var c=u.length>0?u.map(function(t,n){return r.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):r.createElement("input",{name:i,type:"hidden",value:""});return r.createElement("div",null,c)}var p=u[0]?this.getOptionValue(u[0]):"";return r.createElement("input",{name:i,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,a=t.focusedValue,i=t.isFocused,s=t.selectValue,u=this.getFocusableOptions();return r.createElement(Fn,h({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:a,isFocused:i,selectValue:s,focusableOptions:u,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,a=e.ValueContainer,i=this.props,s=i.className,u=i.id,l=i.isDisabled,c=i.menuIsOpen,p=this.state.isFocused,d=this.commonProps=this.getCommonProps();return r.createElement(o,h({},d,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),r.createElement(t,h({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:c}),r.createElement(a,h({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,h({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,i=t.isFocused,s=t.prevWasFocused,u=t.instancePrefix,l=e.options,c=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=At(c),m={};if(n&&(c!==n.value||l!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var v=p?function(e,t){return fr(dr(e,t))}(e,h):[],g=p?hr(dr(e,h),"".concat(u,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,w=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:h,focusedOption:w,focusedOptionId:vr(g,w),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var O=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},C=a,S=i&&s;return i&&!S&&(C={value:Kt(f,h,h[0]||null),options:h,action:"initial-input-focus"},S=!s),"initial-input-focus"===(null==a?void 0:a.action)&&(C=null),y(y(y({},m),O),{},{prevProps:e,ariaSelection:C,prevWasFocused:S})}}]),n}(r.Component);xr.defaultProps=cr;var Ir=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],Er=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],Dr=(0,r.forwardRef)(function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,o=e.cacheOptions,a=void 0!==o&&o,i=e.loadOptions;e.options;var s=e.isLoading,u=void 0!==s&&s,l=e.onInputChange,c=e.filterOption,p=void 0===c?null:c,d=nt(e,Er),f=d.inputValue,h=(0,r.useRef)(void 0),m=(0,r.useRef)(!1),v=tt((0,r.useState)(Array.isArray(n)?n:void 0),2),b=v[0],w=v[1],O=tt((0,r.useState)(void 0!==f?f:""),2),C=O[0],S=O[1],x=tt((0,r.useState)(!0===n),2),I=x[0],E=x[1],D=tt((0,r.useState)(void 0),2),M=D[0],k=D[1],V=tt((0,r.useState)([]),2),P=V[0],_=V[1],F=tt((0,r.useState)(!1),2),L=F[0],A=F[1],R=tt((0,r.useState)({}),2),T=R[0],z=R[1],H=tt((0,r.useState)(void 0),2),N=H[0],j=H[1],$=tt((0,r.useState)(void 0),2),B=$[0],U=$[1];a!==B&&(z({}),U(a)),n!==N&&(w(Array.isArray(n)?n:void 0),j(n)),(0,r.useEffect)(function(){return m.current=!0,function(){m.current=!1}},[]);var W=(0,r.useCallback)(function(e,t){if(!i)return t();var n=i(e,t);n&&"function"==typeof n.then&&n.then(t,function(){return t()})},[i]);(0,r.useEffect)(function(){!0===n&&W(C,function(e){m.current&&(w(e||[]),E(!!h.current))})},[]);var G=(0,r.useCallback)(function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,l);if(!n)return h.current=void 0,S(""),k(""),_([]),E(!1),void A(!1);if(a&&T[n])S(n),k(n),_(T[n]),E(!1),A(!1);else{var r=h.current={};S(n),E(!0),A(!M),W(n,function(e){m&&r===h.current&&(h.current=void 0,E(!1),k(n),_(e||[]),A(!1),z(e?y(y({},T),{},g({},n,e)):T))})}},[a,W,M,T,l]),Y=L?[]:C&&M?P:b||[];return y(y({},d),{},{options:Y,isLoading:I||u,onInputChange:G,filterOption:p})}(e),o=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,a=void 0!==o&&o,i=e.defaultValue,s=void 0===i?null:i,u=e.inputValue,l=e.menuIsOpen,c=e.onChange,p=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,m=nt(e,Ir),v=tt((0,r.useState)(void 0!==u?u:n),2),g=v[0],b=v[1],w=tt((0,r.useState)(void 0!==l?l:a),2),O=w[0],C=w[1],S=tt((0,r.useState)(void 0!==h?h:s),2),x=S[0],I=S[1],E=(0,r.useCallback)(function(e,t){"function"==typeof c&&c(e,t),I(e)},[c]),D=(0,r.useCallback)(function(e,t){var n;"function"==typeof p&&(n=p(e,t)),b(void 0!==n?n:e)},[p]),M=(0,r.useCallback)(function(){"function"==typeof f&&f(),C(!0)},[f]),k=(0,r.useCallback)(function(){"function"==typeof d&&d(),C(!1)},[d]),V=void 0!==u?u:g,P=void 0!==l?l:O,_=void 0!==h?h:x;return y(y({},m),{},{inputValue:V,menuIsOpen:P,onChange:E,onInputChange:D,onMenuClose:k,onMenuOpen:M,value:_})}(n);return r.createElement(xr,h({ref:t},o))}),Mr=Dr;class kr extends o.Component{constructor(e){super(e),this.state={id:e.id||e.instanceId}}render(){return(0,r.createElement)(i.BaseControl,{id:this.state.id,className:this.props.className,help:this.props.help},(0,r.createElement)(i.BaseControl.VisualLabel,null,this.props.label),(0,r.createElement)(Mr,{isMulti:!0,cacheOptions:!0,defaultOptions:!0,value:this.props.value,loadOptions:e=>new Promise(t=>{setTimeout(()=>{t(this.props.filterData(e))},1e3)}),onChange:this.props.onChange}))}}const Vr=(0,p.withInstanceId)(kr),Pr=window.wp.apiFetch;var _r=n.n(Pr);const Fr=window.wp.url;class Lr extends s{getHeader(){return LearnDashData.labels.virtual_instructor}getBody(){return(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,(0,a.sprintf)(
// translators: %s: virtual instructor.
// translators: %s: virtual instructor.
(0,a.__)("Create your first %s.","learndash"),LearnDashData.labels.virtual_instructor)),(0,r.createElement)("div",{className:"setup-wizard-step__form-wrapper"},(0,r.createElement)(i.TextControl,{id:"name",className:"setup-wizard-step__field-wrapper",label:(0,a.__)("Name","learndash"),help:(0,a.sprintf)(
// translators: %s: virtual instructor.
// translators: %s: virtual instructor.
(0,a.__)("Name of your %s persona.","learndash"),LearnDashData.labels.virtual_instructor),value:this.props.formData.name,onChange:e=>{this.props.setFormData({name:e})},required:!0}),(0,r.createElement)(f,{id:"avatar",className:"setup-wizard-step__field-wrapper",label:(0,a.__)("Avatar","learndash"),help:(0,a.sprintf)(
// translators: %s: virtual instructor.
// translators: %s: virtual instructor.
(0,a.__)("Upload an avatar image for your %s persona.","learndash"),LearnDashData.labels.virtual_instructor),accept:"image/*",onClick:e=>e.target.value="",onChange:e=>{this.props.setFormData({avatar:e.currentTarget.files[0]})},file:this.props.formData.avatar},(0,a.__)("Upload Image","learndash")),(0,r.createElement)(i.TextareaControl,{id:"customInstruction",className:"setup-wizard-step__field-wrapper",label:(0,a.__)("Custom Instructions","learndash"),help:(0,a.sprintf)(
// translators: %s: virtual instructors.
// translators: %s: virtual instructors.
(0,a.__)("Enter in your custom instructors of how your %s should interact with students. For example you can provide instructions like “Don’t tell the student the specific answer. Instead just help them understand the subject”.","learndash"),LearnDashData.labels.virtual_instructors),value:this.props.formData.customInstruction,onChange:e=>{this.props.setFormData({customInstruction:e})}}),(0,r.createElement)(i.ToggleControl,{id:"applyToAllCourses",className:"setup-wizard-step__field-wrapper",label:(0,a.sprintf)(
// translators: %s: courses.
// translators: %s: courses.
(0,a.__)("Apply to all %s","learndash"),LearnDashData.labels.courses),checked:this.props.formData.applyToAllCourses,onChange:e=>{this.props.setFormData({applyToAllCourses:e})}}),!this.props.formData.applyToAllCourses&&(0,r.createElement)(Vr,{id:"courses",className:"setup-wizard-step__field-wrapper",label:(0,a.sprintf)(
// translators: %s: courses.
// translators: %s: courses.
(0,a.__)("Associated %s","learndash"),LearnDashData.labels.courses),help:(0,a.sprintf)(
// translators: %1$s: courses, %2$s: virtual instructor.
// translators: %1$s: courses, %2$s: virtual instructor.
(0,a.__)("Associated %1$s for the %2$s.","learndash"),LearnDashData.labels.courses,LearnDashData.labels.virtual_instructor),value:this.props.formData.courses,onChange:e=>{this.props.setFormData({courses:e})},filterData:e=>{const t={action:learndashVirtualInstructorSetupWizard.actions.search_posts,nonce:learndashVirtualInstructorSetupWizard.nonce.search_posts,keyword:e,per_page:-1,post_type:learndashVirtualInstructorSetupWizard.post_types.course};return _r()({url:(0,Fr.addQueryArgs)(learndashVirtualInstructorSetupWizard.ajaxurl,t)}).then(e=>e.data.results.map(e=>({label:e.text,value:e.id})))}}),(0,r.createElement)(i.ToggleControl,{id:"applyToAllGroups",className:"setup-wizard-step__field-wrapper",label:(0,a.sprintf)(
// translators: %s: groups.
// translators: %s: groups.
(0,a.__)("Apply to all %s","learndash"),LearnDashData.labels.groups),checked:this.props.formData.applyToAllGroups,onChange:e=>{this.props.setFormData({applyToAllGroups:e})}}),!this.props.formData.applyToAllGroups&&(0,r.createElement)(Vr,{id:"groups",className:"setup-wizard-step__field-wrapper",label:(0,a.sprintf)(
// translators: %s: groups.
// translators: %s: groups.
(0,a.__)("Associated %s","learndash"),LearnDashData.labels.groups),help:(0,a.sprintf)(
// translators: %1$s: groups, %2$s: virtual instructor.
// translators: %1$s: groups, %2$s: virtual instructor.
(0,a.__)("Associated %1$s for the %2$s.","learndash"),LearnDashData.labels.groups,LearnDashData.labels.virtual_instructor),value:this.props.formData.groups,onChange:e=>{this.props.setFormData({groups:e})},filterData:e=>{const t={action:learndashVirtualInstructorSetupWizard.actions.search_posts,nonce:learndashVirtualInstructorSetupWizard.nonce.search_posts,keyword:e,per_page:-1,post_type:learndashVirtualInstructorSetupWizard.post_types.group};return _r()({url:(0,Fr.addQueryArgs)(learndashVirtualInstructorSetupWizard.ajaxurl,t)}).then(e=>e.data.results.map(e=>({label:e.text,value:e.id})))}})))}}class Ar extends s{getHeader(){return this.props.setupWizardState.statusMessage.length<1?"":this.props.setupWizardState.success?(0,a.__)("Finished","learndash"):(0,a.__)("Error","learndash")}getBody(){return(0,r.createElement)("p",null,this.props.setupWizardState.statusMessage||"")}}class Rr extends o.Component{constructor(e){super(e),this.state={step:1},this.maxSteps=5}getStepScreen(){switch(this.state.step){case 1:return(0,r.createElement)(u,{...this.props});case 2:return(0,r.createElement)(l,{...this.props});case 3:return(0,r.createElement)(c,{...this.props});case 4:return(0,r.createElement)(Lr,{...this.props});case 5:return(0,r.createElement)(Ar,{...this.props})}}validateFields(){const e=[];switch(this.state.step){case 2:e.push("openAiApiKey");break;case 4:e.push("name")}e.forEach(e=>{if(this.props.formData[e].length<1)throw document.getElementById(e).reportValidity(),new Error})}goToNextStep(){let e=this.state.step+1;2===e&&learndashVirtualInstructorSetupWizard.field_values.openai_api_key.length>0&&e++,this.setState({step:e<=this.maxSteps?e:this.maxSteps}),window.scrollTo(0,0)}goToPreviousStep(){let e=this.state.step-1;2===e&&learndashVirtualInstructorSetupWizard.field_values.openai_api_key.length>0&&e--,this.setState({step:e||1}),window.scrollTo(0,0)}onNextButtonClick(){try{this.validateFields()}catch{return}this.state.step===this.maxSteps-1?(this.props.processFormData().then(e=>{this.props.setState({success:e.success,statusMessage:e.data.message})}).catch(e=>{this.props.setState({success:!1,statusMessage:e.data.message})}),setTimeout(()=>{this.goToNextStep()},1e3)):this.goToNextStep()}render(){const e=this.state.step===this.maxSteps-1?(0,a.__)("Set up","learndash"):(0,a.__)("Next","learndash");return(0,r.createElement)(i.Card,{className:"setup-wizard-step"},this.getStepScreen(),this.state.step<this.maxSteps&&(0,r.createElement)(i.CardFooter,null,(0,r.createElement)(i.Flex,{className:"setup-wizard-actions",justify:"space-evenly"},this.state.step>1&&(0,r.createElement)(i.Button,{variant:"secondary",className:"setup-wizard-button setup-wizard-button--back",onClick:()=>{this.goToPreviousStep()}},(0,a.__)("Back","learndash")),(0,r.createElement)(i.Button,{variant:"primary",className:"setup-wizard-button setup-wizard-button--next",onClick:()=>{this.onNextButtonClick()}},e))))}}const Tr=Rr;class zr extends o.Component{constructor(e){super(e),this.state={formData:{openAiApiKey:learndashVirtualInstructorSetupWizard.field_values.openai_api_key||"",bannedWords:learndashVirtualInstructorSetupWizard.field_values.banned_words||"",errorMessage:learndashVirtualInstructorSetupWizard.field_values.error_message||"",name:"",avatar:{},customInstruction:"",applyToAllCourses:!1,courses:[],applyToAllGroups:!1,groups:[]},success:!0,statusMessage:""},this.getChildProps=this.getChildProps.bind(this),this.setFormData=this.setFormData.bind(this),this.processFormData=this.processFormData.bind(this),this.setState=this.setState.bind(this)}getChildProps(){return{...this.props,formData:this.state.formData,setFormData:this.setFormData,processFormData:this.processFormData,setState:this.setState,setupWizardState:this.state}}setFormData(e){this.setState({formData:{...this.state.formData,...e}})}processFormData(){const e=new FormData;e.append("action",learndashVirtualInstructorSetupWizard.actions.setup),e.append("nonce",learndashVirtualInstructorSetupWizard.nonce.setup);for(const t in this.state.formData)if("avatar"===t)this.state.formData.avatar&&e.append("avatar",this.state.formData.avatar);else if("courses"===t)for(const t of this.state.formData.courses)e.append("courseIds[]",t.value);else if("groups"===t)for(const t of this.state.formData.groups)e.append("groupIds[]",t.value);else e.append(t,this.state.formData[t]);return _r()({url:learndashVirtualInstructorSetupWizard.ajaxurl,method:"POST",body:e})}render(){return(0,r.createElement)("div",{className:"setup-wizard"},(0,r.createElement)(Tr,{...this.getChildProps()}))}}const Hr=zr,Nr=document.getElementById("learndash-virtual-instructor-setup-wizard");Nr&&(0,o.createRoot)(Nr).render((0,r.createElement)(Hr,null))})();