OwlCyberSecurity - MANAGER
Edit File: donationFormBlock.js
(()=>{var e={4146:(e,t,n)=>{"use strict";var r=n(73404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(g){var o=p(n);o&&o!==g&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v<a.length;++v){var h=a[v];if(!(i[h]||r&&r[h]||m&&m[h]||s&&s[h])){var b=f(n,h);try{u(t,h,b)}catch(e){}}}}return t}},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,I=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case o:return t}}}function E(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||w(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===y||e.$$typeof===I||e.$$typeof===h)},t.typeOf=w},73404:(e,t,n)=>{"use strict";e.exports=n(3072)},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.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),(()=>{"use strict";const e=JSON.parse('{"$schema":"https://json.schemastore.org/block.json","apiVersion":2,"name":"givewp/donation-form","version":"1.0.0","title":"Donation Form","category":"give","icon":"superhero","description":"The GiveWP Donation Form block inserts an existing donation form into the page.","supports":{"html":false,"inserter":false},"attributes":{"formId":{"type":"string"},"blockId":{"type":"string"}},"textdomain":"give","editorStyle":"file:../../../../build/donationFormBlock.css","editorScript":"file:../../../../build/donationFormBlock.js"}'),t=window.wp.blocks,r=window.React;var o=n.n(r);const i=window.wp.blockEditor,a=window.wp.serverSideRender;var s=n.n(a);const l=window.wp.data,u=window.wp.i18n;function c(e){return c="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},c(e)}function d(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(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 v(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function h(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,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||v(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 b(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(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var y=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function I(){return I=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},I.apply(null,arguments)}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,d(r.key),r)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function T(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(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 L=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){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),S=Math.abs,N=String.fromCharCode,x=Object.assign;function O(e){return e.trim()}function A(e,t,n){return e.replace(t,n)}function P(e,t){return e.indexOf(t)}function D(e,t){return 0|e.charCodeAt(t)}function j(e,t,n){return e.slice(t,n)}function k(e){return e.length}function R(e){return e.length}function z(e,t){return t.push(e),e}var F=1,V=1,H=0,W=0,B=0,_="";function Y(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:F,column:V,length:a,return:""}}function Z(e,t){return x(Y("",null,null,"",null,null,0),e,{length:-e.length},t)}function U(){return B=W>0?D(_,--W):0,V--,10===B&&(V=1,F--),B}function G(){return B=W<H?D(_,W++):0,V++,10===B&&(V=1,F++),B}function K(){return D(_,W)}function Q(){return W}function X(e,t){return j(_,e,t)}function $(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 J(e){return F=V=1,H=k(_=e),W=0,[]}function q(e){return _="",e}function ee(e){return O(X(W-1,re(91===e?e+2:40===e?e+1:e)))}function te(e){for(;(B=K())&&B<33;)G();return $(e)>2||$(B)>3?"":" "}function ne(e,t){for(;--t&&G()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return X(e,Q()+(t<6&&32==K()&&32==G()))}function re(e){for(;G();)switch(B){case e:return W;case 34:case 39:34!==e&&39!==e&&re(B);break;case 40:41===e&&re(e);break;case 92:G()}return W}function oe(e,t){for(;G()&&e+B!==57&&(e+B!==84||47!==K()););return"/*"+X(t,W-1)+"*"+N(47===e?e:G())}function ie(e){for(;!$(K());)G();return X(e,W)}var ae="-ms-",se="-moz-",le="-webkit-",ue="comm",ce="rule",de="decl",fe="@keyframes";function pe(e,t){for(var n="",r=R(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ge(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 ue:return"";case fe:return e.return=e.value+"{"+pe(e.children,r)+"}";case ce:e.value=e.props.join(",")}return k(n=pe(e.children,r))?e.return=e.value+"{"+n+"}":""}function me(e){return q(ve("",null,null,null,[""],e=J(e),0,[0],e))}function ve(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,f=0,p=0,g=0,m=1,v=1,h=1,b=0,y="",I=o,w=i,E=r,M=y;v;)switch(g=b,b=G()){case 40:if(108!=g&&58==D(M,d-1)){-1!=P(M+=A(ee(b),"&","&\f"),"&\f")&&(h=-1);break}case 34:case 39:case 91:M+=ee(b);break;case 9:case 10:case 13:case 32:M+=te(g);break;case 92:M+=ne(Q()-1,7);continue;case 47:switch(K()){case 42:case 47:z(be(oe(G(),Q()),t,n),l);break;default:M+="/"}break;case 123*m:s[u++]=k(M)*h;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==h&&(M=A(M,/\f/g,"")),p>0&&k(M)-d&&z(p>32?ye(M+";",r,n,d-1):ye(A(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if(z(E=he(M,t,n,u,c,o,s,y,I=[],w=[],d),i),123===b)if(0===c)ve(M,t,E,E,I,i,d,s,w);else switch(99===f&&110===D(M,3)?100:f){case 100:case 108:case 109:case 115:ve(e,E,E,r&&z(he(e,E,E,0,0,o,s,y,o,I=[],d),w),o,w,d,s,r?I:w);break;default:ve(M,E,E,E,[""],w,0,s,w)}}u=c=p=0,m=h=1,y=M="",d=a;break;case 58:d=1+k(M),p=g;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==U())continue;switch(M+=N(b),b*m){case 38:h=c>0?1:(M+="\f",-1);break;case 44:s[u++]=(k(M)-1)*h,h=1;break;case 64:45===K()&&(M+=ee(G())),f=K(),c=d=k(y=M+=ie(Q())),b++;break;case 45:45===g&&2==k(M)&&(m=0)}}return i}function he(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,f=0===o?i:[""],p=R(f),g=0,m=0,v=0;g<r;++g)for(var h=0,b=j(e,d+1,d=S(m=a[g])),y=e;h<p;++h)(y=O(m>0?f[h]+" "+b:A(b,/&\f/g,f[h])))&&(l[v++]=y);return Y(e,t,n,0===o?ce:s,l,u,c)}function be(e,t,n){return Y(e,t,n,ue,N(B),j(e,2,-2),0)}function ye(e,t,n,r){return Y(e,t,n,de,j(e,0,r),j(e,r+1,-1),r)}var Ie=function(e,t,n){for(var r=0,o=0;r=o,o=K(),38===r&&12===o&&(t[n]=1),!$(o);)G();return X(e,W)},we=new WeakMap,Ee=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)||we.get(n))&&!r){we.set(e,!0);for(var o=[],i=function(e,t){return q(function(e,t){var n=-1,r=44;do{switch($(r)){case 0:38===r&&12===K()&&(t[n]=1),e[n]+=Ie(W-1,t,n);break;case 2:e[n]+=ee(r);break;case 4:if(44===r){e[++n]=58===K()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=N(r)}}while(r=G());return e}(J(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},Me=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ce(e,t){switch(function(e,t){return 45^D(e,0)?(((t<<2^D(e,0))<<2^D(e,1))<<2^D(e,2))<<2^D(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+se+e+ae+e+e;case 6828:case 4268:return le+e+ae+e+e;case 6165:return le+e+ae+"flex-"+e+e;case 5187:return le+e+A(e,/(\w+).+(:[^]+)/,le+"box-$1$2"+ae+"flex-$1$2")+e;case 5443:return le+e+ae+"flex-item-"+A(e,/flex-|-self/,"")+e;case 4675:return le+e+ae+"flex-line-pack"+A(e,/align-content|flex-|-self/,"")+e;case 5548:return le+e+ae+A(e,"shrink","negative")+e;case 5292:return le+e+ae+A(e,"basis","preferred-size")+e;case 6060:return le+"box-"+A(e,"-grow","")+le+e+ae+A(e,"grow","positive")+e;case 4554:return le+A(e,/([^-])(transform)/g,"$1"+le+"$2")+e;case 6187:return A(A(A(e,/(zoom-|grab)/,le+"$1"),/(image-set)/,le+"$1"),e,"")+e;case 5495:case 3959:return A(e,/(image-set\([^]*)/,le+"$1$`$1");case 4968:return A(A(e,/(.+:)(flex-)?(.*)/,le+"box-pack:$3"+ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+le+e+e;case 4095:case 3583:case 4068:case 2532:return A(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(k(e)-1-t>6)switch(D(e,t+1)){case 109:if(45!==D(e,t+4))break;case 102:return A(e,/(.+:)(.+)-([^]+)/,"$1"+le+"$2-$3$1"+se+(108==D(e,t+3)?"$3":"$2-$3"))+e;case 115:return~P(e,"stretch")?Ce(A(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==D(e,t+1))break;case 6444:switch(D(e,k(e)-3-(~P(e,"!important")&&10))){case 107:return A(e,":",":"+le)+e;case 101:return A(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+le+(45===D(e,14)?"inline-":"")+"box$3$1"+le+"$2$3$1"+ae+"$2box$3")+e}break;case 5936:switch(D(e,t+11)){case 114:return le+e+ae+A(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return le+e+ae+A(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return le+e+ae+A(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return le+e+ae+e+e}return e}var Te=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case de:e.return=Ce(e.value,e.length);break;case fe:return pe([Z(e,{value:A(e.value,"@","@"+le)})],r);case ce: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 pe([Z(e,{props:[A(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return pe([Z(e,{props:[A(t,/:(plac\w+)/,":"+le+"input-$1")]}),Z(e,{props:[A(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[A(t,/:(plac\w+)/,ae+"input-$1")]})],r)}return""}))}}],Le=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,i=e.stylisPlugins||Te,a={},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++)a[t[n]]=!0;s.push(e)}));var l,u,c,d,f=[ge,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(u=[Ee,Me].concat(i,f),c=R(u),function(e,t,n,r){for(var o="",i=0;i<c;i++)o+=u[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,pe(me(e?e+"{"+t.styles+"}":t.styles),p),r&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new L({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return g.sheet.hydrate(s),g},Se=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ne={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,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 xe(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Oe=/[A-Z]|^ms/g,Ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pe=function(e){return 45===e.charCodeAt(1)},De=function(e){return null!=e&&"boolean"!=typeof e},je=xe((function(e){return Pe(e)?e:e.replace(Oe,"-$&").toLowerCase()})),ke=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ae,(function(e,t,n){return ze={name:t,styles:n,next:ze},t}))}return 1===Ne[e]||Pe(e)||"number"!=typeof t||0===t?t:t+"px"};function Re(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ze={name:n.name,styles:n.styles,next:ze},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ze={name:r.name,styles:r.styles,next:ze},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Re(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":De(a)&&(r+=je(i)+":"+ke(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Re(e,t,a);switch(i){case"animation":case"animationName":r+=je(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)De(a[l])&&(r+=je(i)+":"+ke(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=ze,i=n(e);return ze=o,Re(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var ze,Fe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ve=function(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 i=e[0];null==i||void 0===i.raw?(r=!1,o+=Re(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Re(n,t,e[a]),r&&(o+=i[a]);Fe.lastIndex=0;for(var s,l="";null!==(s=Fe.exec(o));)l+="-"+s[1];var u=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)+l;return{name:u,styles:o,next:ze}},He={}.hasOwnProperty,We=(0,r.createContext)("undefined"!=typeof HTMLElement?Le({key:"css"}):null);We.Provider;var Be=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(We);return e(t,o,n)}))},_e=(0,r.createContext)({}),Ye=r.useInsertionEffect?r.useInsertionEffect:function(e){e()},Ze="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ue=function(e){var t,n=e.cache,r=e.serialized,o=e.isStringTag;return Se(n,r,o),t=function(){return function(e,t,n){Se(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)}}(n,r,o)},Ye(t),null},Ge=Be((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var i=e[Ze],a=[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]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=Ve(a,void 0,(0,r.useContext)(_e));s+=t.key+"-"+l.name;var u={};for(var c in e)He.call(e,c)&&"css"!==c&&c!==Ze&&(u[c]=e[c]);return u.ref=n,u.className=s,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Ue,{cache:t,serialized:l,isStringTag:"string"==typeof i}),(0,r.createElement)(i,u))}));n(4146);var Ke=function(e,t){var n=arguments;if(null==t||!He.call(t,"css"))return r.createElement.apply(void 0,n);var o=n.length,i=new Array(o);i[0]=Ge,i[1]=function(e,t){var n={};for(var r in t)He.call(t,r)&&(n[r]=t[r]);return n[Ze]=e,n}(e,t);for(var a=2;a<o;a++)i[a]=n[a];return r.createElement.apply(null,i)};function Qe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ve(t)}r.useInsertionEffect?r.useInsertionEffect:r.useLayoutEffect;const Xe=window.ReactDOM,$e=Math.min,Je=Math.max,qe=Math.round,et=Math.floor,tt=e=>({x:e,y:e});function nt(e){return it(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ot(e){var t;return null==(t=(it(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function it(e){return e instanceof Node||e instanceof rt(e).Node}function at(e){return e instanceof Element||e instanceof rt(e).Element}function st(e){return e instanceof HTMLElement||e instanceof rt(e).HTMLElement}function lt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot)}function ut(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ct(e){return rt(e).getComputedStyle(e)}function dt(e){const t=function(e){if("html"===nt(e))return e;const t=e.assignedSlot||e.parentNode||lt(e)&&e.host||ot(e);return lt(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(nt(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&ut(t)?t:dt(t)}function ft(e,t){var n;void 0===t&&(t=[]);const r=dt(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=rt(r);return o?t.concat(i,i.visualViewport||[],ut(r)?r:[]):t.concat(r,ft(r))}function pt(e){return at(e)?e:e.contextElement}function gt(e){const t=pt(e);if(!st(t))return tt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=qe(n)!==i||qe(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?qe(n.width):n.width)/r,s=(i?qe(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const mt=tt(0);function vt(e){const t=rt(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:mt}function ht(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=pt(e);let a=tt(1);t&&(r?at(r)&&(a=gt(r)):a=gt(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==rt(e))&&t}(i,n,r)?vt(i):tt(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=rt(i),t=r&&at(r)?rt(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=gt(n),t=n.getBoundingClientRect(),r=ct(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=i,n=rt(n).frameElement}}return f={width:c,height:d,x:l,y:u},{...f,top:f.y,left:f.x,right:f.x+f.width,bottom:f.y+f.height};var f}const bt=r.useLayoutEffect;var yt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],It=function(){};function wt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Et(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 i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(wt(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Mt=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===c(e)&&null!==e?[e]:[];var t},Ct=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,g({},b(e,yt))},Tt=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function Lt(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function St(e){return Lt(e)?window.pageYOffset:e.scrollTop}function Nt(e,t){Lt(e)?window.scrollTo(0,t):e.scrollTop=t}function xt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:It,o=St(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;Nt(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function Ot(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 At(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Pt=!1,Dt={get passive(){return Pt=!0}},jt="undefined"!=typeof window?window:{};jt.addEventListener&&jt.removeEventListener&&(jt.addEventListener("p",It,Dt),jt.removeEventListener("p",It,!1));var kt=Pt;function Rt(e){return null!=e}function zt(e,t,n){return e?t:n}var Ft=["children","innerProps"],Vt=["children","innerProps"];var Ht,Wt,Bt,_t=function(e){return"auto"===e?"bottom":e},Yt=(0,r.createContext)(null),Zt=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,u=((0,r.useContext)(Yt)||{}).setPortalPlacement,c=(0,r.useRef)(null),d=h((0,r.useState)(o),2),f=d[0],p=d[1],m=h((0,r.useState)(null),2),v=m[0],b=m[1],y=l.spacing.controlHeight;return bt((function(){var e=c.current;if(e){var t="fixed"===a,r=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=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),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,d=l.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,g=f.height,m=f.top,v=n.offsetParent.getBoundingClientRect().top,h=a||Lt(c=l)?window.innerHeight:c.clientHeight,b=St(l),y=parseInt(getComputedStyle(n).marginBottom,10),I=parseInt(getComputedStyle(n).marginTop,10),w=v-I,E=h-m,M=w+b,C=d-b-m,T=p-h+b+y,L=b+m-I,S=160;switch(o){case"auto":case"bottom":if(E>=g)return{placement:"bottom",maxHeight:t};if(C>=g&&!a)return i&&xt(l,T,S),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&E>=r)return i&&xt(l,T,S),{placement:"bottom",maxHeight:a?E-y:C-y};if("auto"===o||a){var N=t,x=a?w:M;return x>=r&&(N=Math.min(x-y-s,t)),{placement:"top",maxHeight:N}}if("bottom"===o)return i&&Nt(l,T),{placement:"bottom",maxHeight:t};break;case"top":if(w>=g)return{placement:"top",maxHeight:t};if(M>=g&&!a)return i&&xt(l,L,S),{placement:"top",maxHeight:t};if(!a&&M>=r||a&&w>=r){var O=t;return(!a&&M>=r||a&&w>=r)&&(O=a?w-I:M-I),i&&xt(l,L,S),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:y});p(r.maxHeight),b(r.placement),null==u||u(r.placement)}}),[o,i,a,s,n,u,y]),t({ref:c,placerProps:g(g({},e),{},{placement:v||_t(i),maxHeight:f})})},Ut=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return g({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Gt=Ut,Kt=Ut,Qt=["size"],Xt=["innerProps","isRtl","size"],$t={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Jt=function(e){var t=e.size,n=b(e,Qt);return Ke("svg",I({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:$t},n))},qt=function(e){return Ke(Jt,I({size:20},e),Ke("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"}))},en=function(e){return Ke(Jt,I({size:20},e),Ke("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"}))},tn=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return g({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},nn=tn,rn=tn,on=function(){var e=Qe.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_"}}}(Ht||(Wt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Bt||(Bt=Wt.slice(0)),Ht=Object.freeze(Object.defineProperties(Wt,{raw:{value:Object.freeze(Bt)}})))),an=function(e){var t=e.delay,n=e.offset;return Ke("span",{css:Qe({animation:"".concat(on," 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"},"","")})},sn=["data"],ln=["innerRef","isDisabled","isHidden","inputClassName"],un={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":g({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},un)},dn=function(e){return g({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},un)},fn=function(e){var t=e.children,n=e.innerProps;return Ke("div",n,t)},pn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ke("div",I({},Tt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ke(qt,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ke("div",I({ref:o},Tt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ke("div",I({},Tt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ke(en,null))},DownChevron:en,CrossIcon:qt,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Ke("div",I({},Tt(e,"group",{group:!0}),s),Ke(i,I({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),l),Ke("div",null,t))},GroupHeading:function(e){var t=Ct(e);t.data;var n=b(t,sn);return Ke("div",I({},Tt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ke("div",I({},Tt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ke("span",I({},t,Tt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Ct(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=b(r,ln);return Ke("div",I({},Tt(e,"input",{"input-container":!0}),{"data-value":n||""}),Ke("input",I({className:t({input:!0},s),ref:o,style:dn(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=b(e,Xt);return Ke("div",I({},Tt(g(g({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ke(an,{delay:0,offset:n}),Ke(an,{delay:160,offset:!0}),Ke(an,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ke("div",I({},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 Ke("div",I({},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,i=e.innerProps,a=e.menuPlacement,s=e.menuPosition,l=(0,r.useRef)(null),u=(0,r.useRef)(null),c=h((0,r.useState)(_t(a)),2),d=c[0],f=c[1],p=(0,r.useMemo)((function(){return{setPortalPlacement:f}}),[]),m=h((0,r.useState)(null),2),v=m[0],b=m[1],y=(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[d]+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)||b({offset:n,rect:e})}}),[o,s,d,null==v?void 0:v.offset,null==v?void 0:v.rect.left,null==v?void 0:v.rect.width]);bt((function(){y()}),[y]);var w=(0,r.useCallback)((function(){"function"==typeof u.current&&(u.current(),u.current=null),o&&l.current&&(u.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=pt(e),c=o||i?[...u?ft(u):[],...ft(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=ot(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-et(c)+"px "+-et(o.clientWidth-(u+d))+"px "+-et(o.clientHeight-(c+f))+"px "+-et(u)+"px",threshold:Je(0,$e(1,l))||1};let g=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!g)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}g=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,g=null;a&&(g=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{g&&g.observe(t)}))),n()})),u&&!l&&g.observe(u),g.observe(t));let m=l?ht(e):null;return l&&function t(){const r=ht(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),g&&g.disconnect(),g=null,l&&cancelAnimationFrame(f)}}(o,l.current,y,{elementResize:"ResizeObserver"in window}))}),[o,y]);bt((function(){w()}),[w]);var E=(0,r.useCallback)((function(e){l.current=e,w()}),[w]);if(!t&&"fixed"!==s||!v)return null;var M=Ke("div",I({ref:E},Tt(g(g({},e),{},{offset:v.offset,position:s,rect:v.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Ke(Yt.Provider,{value:p},t?(0,Xe.createPortal)(M,t):M)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=b(e,Vt);return Ke("div",I({},Tt(g(g({},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=b(e,Ft);return Ke("div",I({},Tt(g(g({},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,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Ke(l,{data:r,innerProps:g(g({},Tt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Ke(u,{data:r,innerProps:g({},Tt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Ke(c,{data:r,innerProps:g(g({},Tt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:fn,MultiValueLabel:fn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ke("div",I({role:"button"},n),t||Ke(qt,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Ke("div",I({},Tt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Ke("div",I({},Tt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ke("div",I({},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 Ke("div",I({},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 Ke("div",I({},Tt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},gn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||gn(r)&&gn(o)))return!1;var r,o;return!0}for(var vn={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"},hn=function(e){return Ke("span",I({css:vn},e))},bn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".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,i=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,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t){var c=s?" disabled":"",d="".concat(l?"selected":"focused").concat(c);return"option ".concat(i," ").concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},yn=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,l=e.selectProps,u=e.id,c=l.ariaLiveMessages,d=l.getOptionLabel,f=l.inputValue,p=l.isMulti,m=l.isOptionDisabled,v=l.isSearchable,h=l.menuIsOpen,b=l.options,y=l.screenReaderStatus,I=l.tabSelectsValue,w=l["aria-label"],E=l["aria-live"],M=(0,r.useMemo)((function(){return g(g({},bn),c||{})}),[c]),C=(0,r.useMemo)((function(){var e,n="";if(t&&M.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?d(u):"",f=o||a||void 0,p=f?f.map(d):[],v=g({isDisabled:u&&m(u,s),label:c,labels:p},t);n=M.onChange(v)}return n}),[t,M,m,s,d]),T=(0,r.useMemo)((function(){var e="",t=n||o,r=!!(n&&s&&s.includes(n));if(t&&M.onFocus){var a={focused:t,label:d(t),isDisabled:m(t,s),isSelected:r,options:i,context:t===n?"menu":"value",selectValue:s};e=M.onFocus(a)}return e}),[n,o,d,m,M,i,s]),L=(0,r.useMemo)((function(){var e="";if(h&&b.length&&M.onFilter){var t=y({count:i.length});e=M.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,h,M,b,y]),S=(0,r.useMemo)((function(){var e="";if(M.guidance){var t=o?"value":h?"menu":"input";e=M.guidance({"aria-label":w,context:t,isDisabled:n&&m(n,s),isMulti:p,isSearchable:v,tabSelectsValue:I})}return e}),[w,n,o,p,m,v,h,M,s,I]),N="".concat(T," ").concat(L," ").concat(S),x=Ke(r.Fragment,null,Ke("span",{id:"aria-selection"},C),Ke("span",{id:"aria-context"},N)),O="initial-input-focus"===(null==t?void 0:t.action);return Ke(r.Fragment,null,Ke(hn,{id:u},O&&x),Ke(hn,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text"},a&&!O&&x))},In=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],wn=new RegExp("["+In.map((function(e){return e.letters})).join("")+"]","g"),En={},Mn=0;Mn<In.length;Mn++)for(var Cn=In[Mn],Tn=0;Tn<Cn.letters.length;Tn++)En[Cn.letters[Tn]]=Cn.base;var Ln=function(e){return e.replace(wn,(function(e){return En[e]}))},Sn=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 i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(Ln),Nn=function(e){return e.replace(/^\s+|\s+$/g,"")},xn=function(e){return"".concat(e.label," ").concat(e.value)},On=["innerRef"];function An(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=h(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=h(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(b(e,On),"onExited","in","enter","exit","appear");return Ke("input",I({ref:t},n,{css:Qe({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 Pn=["boxSizing","height","overflow","paddingRight","position"],Dn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function jn(e){e.preventDefault()}function kn(e){e.stopPropagation()}function Rn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function zn(){return"ontouchstart"in window||navigator.maxTouchPoints}var Fn=!("undefined"==typeof window||!window.document||!window.document.createElement),Vn=0,Hn={capture:!1,passive:!1},Wn=function(){return document.activeElement&&document.activeElement.blur()},Bn={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Yn(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,s=(0,r.useRef)(!1),l=(0,r.useRef)(!1),u=(0,r.useRef)(0),c=(0,r.useRef)(null),d=(0,r.useCallback)((function(e,t){if(null!==c.current){var r=c.current,u=r.scrollTop,d=r.scrollHeight,f=r.clientHeight,p=c.current,g=t>0,m=d-f-u,v=!1;m>t&&s.current&&(o&&o(e),s.current=!1),g&&l.current&&(a&&a(e),l.current=!1),g&&t>m?(n&&!s.current&&n(e),p.scrollTop=d,v=!0,s.current=!0):!g&&-t>u&&(i&&!l.current&&i(e),p.scrollTop=0,v=!0,l.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,o,i,a]),f=(0,r.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,r.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),g=(0,r.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=(0,r.useCallback)((function(e){if(e){var t=!!kt&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",g,t)}}),[g,p,f]),v=(0,r.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",g,!1))}),[g,p,f]);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}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=(0,r.useRef)({}),a=(0,r.useRef)(null),s=(0,r.useCallback)((function(e){if(Fn){var t=document.body,n=t&&t.style;if(o&&Pn.forEach((function(e){var t=n&&n[e];i.current[e]=t})),o&&Vn<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(Dn).forEach((function(e){var t=Dn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&zn()&&(t.addEventListener("touchmove",jn,Hn),e&&(e.addEventListener("touchstart",Rn,Hn),e.addEventListener("touchmove",kn,Hn))),Vn+=1}}),[o]),l=(0,r.useCallback)((function(e){if(Fn){var t=document.body,n=t&&t.style;Vn=Math.max(Vn-1,0),o&&Vn<1&&Pn.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&zn()&&(t.removeEventListener("touchmove",jn,Hn),e&&(e.removeEventListener("touchstart",Rn,Hn),e.removeEventListener("touchmove",kn,Hn)))}}),[o]);return(0,r.useEffect)((function(){if(t){var e=a.current;return s(e),function(){l(e)}}}),[t,s,l]),function(e){a.current=e}}({isEnabled:n});return Ke(r.Fragment,null,n&&Ke("div",{onClick:Wn,css:Bn}),t((function(e){i(e),a(e)})))}var Zn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Un=function(e){var t=e.name,n=e.onFocus;return Ke("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Zn,value:"",onChange:function(){}})},Gn={clearIndicator:rn,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,i=o.colors,a=o.borderRadius;return g({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?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:nn,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 g({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,i=r.colors;return g({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return g(g({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},cn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return g({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Kt,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return g((f(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),f(n,"position","absolute"),f(n,"width","100%"),f(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return g({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,i=n.colors;return g({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return g({overflow:"hidden",textOverflow:i||void 0===i?"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,i=n.colors,a=e.isFocused;return g({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Gt,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return g({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*a.baseUnit,"px ").concat(3*a.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 g({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,i=r.colors;return g({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return g({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Kn={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}},Qn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:At(),captureMenuScroll:!At(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=g({ignoreCase:!0,ignoreAccents:!0,stringify:xn,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Nn(t):t,u=a?Nn(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Sn(l),u=Ln(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-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 Xn(e,t,n,r){return{type:"option",data:t,isDisabled:nr(e,t,n),isSelected:rr(e,t,n),label:er(e,t),value:tr(e,t),index:r}}function $n(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Xn(e,n,t,r)})).filter((function(t){return qn(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Xn(e,n,t,r);return qn(e,i)?i:void 0})).filter(Rt)}function Jn(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,T(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function qn(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!ir(e)||!i)&&or(e,{label:a,value:s,data:o},r)}var er=function(e,t){return e.getOptionLabel(t)},tr=function(e,t){return e.getOptionValue(t)};function nr(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function rr(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=tr(e,t);return n.some((function(t){return tr(e,t)===r}))}function or(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ir=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ar=1,sr=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&&E(e,t)}(n,e);var t=function(e){var t=C();return function(){var n,r=M(e);if(t){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==c(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,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",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,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),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,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(T(a),[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),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=zt(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(zt(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),i=zt(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},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 Et.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return er(r.props,e)},r.getOptionValue=function(e){return tr(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=Gn[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(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.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,g(g({},pn),e.components);var e},r.buildCategorizedOptions=function(){return $n(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Jn(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:g({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&&Lt(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),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>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){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return ir(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,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,g=p.focusedOption,m=p.focusedValue,v=p.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)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||!u||!d||!g||f&&r.isOptionSelected(g,v))return;r.selectOption(g);break;case"Enter":if(229===e.keyCode)break;if(u){if(!g)return;if(r.isComposing)return;r.selectOption(g);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!g)return;r.selectOption(g);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++ar),r.state.selectValue=Mt(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.buildFocusableOptions(),i=o.indexOf(r.state.selectValue[0]);r.state.focusedOption=o[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&&Ot(this.menuListRef,this.focusedOptionRef)}},{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&&(Ot(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,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(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 i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{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,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Kn):g(g({},Kn),this.props.theme):Kn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,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 nr(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return rr(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,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,u=e.required,c=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,m=this.commonProps,v=o||this.getElementId("input"),h=g(g(g({"aria-autocomplete":"list","aria-expanded":l,"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":u,role:"combobox"},l&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(c,I({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},h)):r.createElement(An,I({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:It,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,f=c.isDisabled,p=c.isMulti,g=c.inputValue,m=c.placeholder,v=this.state,h=v.selectValue,b=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return g?null:r.createElement(l,I({},u,{key:"placeholder",isDisabled:f,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return h.map((function(t,s){var l=t===b,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,I({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:f,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(g)return null;var w=h[0];return r.createElement(s,I({},u,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,I({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?r.createElement(e,I({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return r.createElement(n,I({},o,{isDisabled:i,isFocused:a}))}},{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,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,I({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,g=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,h=p.loadingMessage,b=p.minMenuHeight,y=p.maxMenuHeight,w=p.menuIsOpen,E=p.menuPlacement,M=p.menuPosition,C=p.menuPortalTarget,T=p.menuShouldBlockScroll,L=p.menuShouldScrollIntoView,S=p.noOptionsMessage,N=p.onMenuScrollToTop,x=p.onMenuScrollToBottom;if(!w)return null;var O,A=function(t,n){var o=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,u=t.value,p=f===i,g=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(n),h={id:v,onClick:m,onMouseMove:g,onMouseOver:g,tabIndex:-1};return r.createElement(c,I({},d,{innerProps:h,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:o,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return r.createElement(n,I({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return A(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return A(t,"".concat(t.index))}));else if(v){var P=h({inputValue:m});if(null===P)return null;O=r.createElement(l,d,P)}else{var D=S({inputValue:m});if(null===D)return null;O=r.createElement(u,d,D)}var j={minMenuHeight:b,maxMenuHeight:y,menuPlacement:E,menuPosition:M,menuShouldScrollIntoView:L},k=r.createElement(Zt,I({},d,j),(function(t){var n=t.ref,o=t.placerProps,s=o.placement,l=o.maxHeight;return r.createElement(i,I({},d,j,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:v,placement:s}),r.createElement(Yn,{captureEnabled:g,onTopArrive:N,onBottomArrive:x,lockEnabled:T},(function(t){return r.createElement(a,I({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:v,maxHeight:l,focusedOption:f}),O)})))}));return C||"fixed"===M?r.createElement(s,I({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:E,menuPosition:M}),k):k}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return r.createElement(Un,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(n){var u=l.map((function(t){return e.getOptionValue(t)})).join(n);return r.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map((function(t,n){return r.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):r.createElement("input",{name:a,type:"hidden",value:""});return r.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return r.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return r.createElement(yn,I({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return r.createElement(o,I({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),r.createElement(t,I({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),r.createElement(i,I({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,I({},f,{isDisabled:u}),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,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=e.options,u=e.value,c=e.menuIsOpen,d=e.inputValue,f=e.isMulti,p=Mt(u),m={};if(n&&(u!==n.value||l!==n.options||c!==n.menuIsOpen||d!==n.inputValue)){var v=c?function(e,t){return Jn($n(e,t))}(e,p):[],h=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,p):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:p,focusedOption:b,focusedValue:h,clearFocusValueOnUpdate:!1}}var y=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},I=i,w=a&&s;return a&&!w&&(I={value:zt(f,p,p[0]||null),options:p,action:"initial-input-focus"},w=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(I=null),g(g(g({},m),y),{},{prevProps:e,ariaSelection:I,prevWasFocused:w})}}]),n}(r.Component);sr.defaultProps=Qn;var lr=(0,r.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,i=void 0!==o&&o,a=e.defaultValue,s=void 0===a?null:a,l=e.inputValue,u=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,m=e.value,v=b(e,y),I=h((0,r.useState)(void 0!==l?l:n),2),w=I[0],E=I[1],M=h((0,r.useState)(void 0!==u?u:i),2),C=M[0],T=M[1],L=h((0,r.useState)(void 0!==m?m:s),2),S=L[0],N=L[1],x=(0,r.useCallback)((function(e,t){"function"==typeof c&&c(e,t),N(e)}),[c]),O=(0,r.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),E(void 0!==n?n:e)}),[d]),A=(0,r.useCallback)((function(){"function"==typeof p&&p(),T(!0)}),[p]),P=(0,r.useCallback)((function(){"function"==typeof f&&f(),T(!1)}),[f]),D=void 0!==l?l:w,j=void 0!==u?u:C,k=void 0!==m?m:S;return g(g({},v),{},{inputValue:D,menuIsOpen:j,onChange:x,onInputChange:O,onMenuClose:P,onMenuOpen:A,value:k})}(e);return r.createElement(sr,I({ref:t},n))})),ur=lr;const cr={input:(e,t)=>({...e,height:"3rem"}),option:(e,t)=>({...e,paddingTop:"0.8rem",paddingBottom:"0.8rem",fontSize:"1rem"}),control:(e,t)=>({...e,fontSize:"1rem"})},dr=e=>({...e,colors:{...e.colors,primary:"#27ae60"}});function fr({formOptions:e,isResolving:t,handleSelect:n}){const[o,i]=(0,r.useState)(null),a=e.find((e=>e.value===o)),{isSaving:s,isDisabled:c}={isSaving:(0,l.useSelect)((e=>e("core/editor").isSavingPost()),[]),isDisabled:(0,l.useSelect)((e=>!e("core/editor").isEditedPostSaveable()),[])};return(0,r.createElement)("div",{className:"givewp-donation-form-selector"},(0,r.createElement)("img",{className:"givewp-donation-form-selector__logo",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ4IiBoZWlnaHQ9IjQ5IiB2aWV3Qm94PSIwIDAgMTQ4IDQ5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNDAuOTQ3IDI0LjcyaC41NDNzNi40MDEuMTExIDYuNTEgOC40OThjMCA4LjA1Ny03LjkyMSAxNC45LTE3LjI1MiAxNC45LTEuNTE5IDAtMTQuMTA2LS40NDItMTUuMDgyLTE1Ljc4Mi0yLjQ5Ni0uMTEtNi43MjgtLjU1Mi0xMC4zMDgtMi4wOTctMy41ODEgOC45MzktOS4xMTUgMTYuMDAyLTEyLjQ3OCAxNi4wMDItMy4zNjQgMC02LjE4NS00LjQxNC04LjQ2NC0xMi45MTJsLS4yMTctLjg4M0M3OS44NiAzOS45NSA3My44OTEgNDYuMTMgNzAuOTYyIDQ2LjEzYy0zLjQ3MiAwLTcuNzA0LTQuMDg0LTcuNzA0LTcuOTQ2IDAtMy44NjMgMS4xOTQtMTMuMTMzIDEuMTk0LTEzLjEzM3MtMy4xNDcuNjYyLTcuNzA0IDEuMzI0QzU1Ljg4IDMwLjc5MSA1MS4xMDYgNDkgMzIuNDQzIDQ5IDEwLjE5OSA0OSAwIDI0LjUgMCAyNC41YzIuNDY4LTEuNTUgNS41MzItNC44MDUgOC45NjItOC40NTFDMTUuNzg3IDguNzk3IDI0LjA2NiAwIDMyLjAxIDBjMTEuOTM1IDAgMTYuMTY3IDE1LjAwOSAxNi4xNjcgMTUuMDA5bC0uOTc3IDEuNjU1cy0zLjkwNi01LjA3Ni0xMi45MTItNS4wNzZjLTYuODc5IDAtMTIuMDg5IDYuMjg3LTE1Ljg2NCAxMC44NDEtMS4yMjYgMS40OC0yLjMwMSAyLjc3Ny0zLjIzMiAzLjYxNiAwIDAgOS40NCAxNS4xMiAyMS43IDE1LjEyIDYuNTEgMCAxMy41NjQtNS43NCAxNy41NzgtMTQuNDU4LTYuOTQ0Ljk5NC0xNi4wNTggMS44NzYtMjIuNDYgMS4xMDQgMCAwLS4zMjYtLjMzMS0uNDM0LS42NjItLjIxNy0uNDQyLS4yMTctLjg4My0uMjE3LS44ODMgMjIuNjc3IDAgMzkuNzEyLTkuNjAyIDQxLjIzMS0xMC41OTUuMTA5LS4xMS4yMTctLjExLjMyNi0uMTEgMS40NjEuMzU5LjcgNS40My0uMTAxIDEwLjc2LS45MjMgNi4xNDYtMS44OTggMTIuNjM2LjQyNyAxMi42MzYgMi4zODcgMCA3LjE2LTcuNTA0IDkuODczLTEyLjAzLS45NC00Ljg1NS0xLjg4LTkuNDE2LTIuNDAzLTExLjk1YTk5Ljc5NCA5OS43OTQgMCAwIDEtLjQxOC0yLjA2NXYtLjMzbC4yMTctLjExMWMuMTA5LS4xMSA0Ljc3NC0xLjk4NyA3LjcwNC0xLjk4NyAyLjE3IDAgMy40NzIgMS4yMTQgMy40NzIgMy4zMTEgMCAxLjMyNC0uNjUgNC4wODMtMS44NDQgNy4zOTQuNzM4IDcuMDM4IDMuMjAxIDEzLjU5NiA0LjM5IDE2Ljc2LjIwOS41NTcuMzc5IDEuMDA5LjQ5MiAxLjM0bC4wMjgtLjAzNGMxLjIyMi0xLjQ2OCA0Ljg3MS01Ljg1NSA3LjAyNS0xMS4wMDMtMi40OTYtMS45ODYtMy42ODktNC43NDUtMy42ODktOC4wNTYgMC01LjUxOCAzLjAzOC04LjM4NyA1Ljk2OC04LjM4NyAyLjA2MSAwIDQuMjMxIDEuNDM0IDQuMjMxIDQuNjM1IDAgMi4zMTctLjMyNSA0Ljg1NS0uOTc2IDcuNjE1IDEuNzM2IDEuNjU1IDQuNTU3IDMuNDIgOC4zNTUgMy41MzEuNzU5LTcuOTQ2IDQuNTU3LTE5LjMxMyAxMi4wNDQtMTkuMzEzIDcuOTIgMCA5LjExNCA2LjczMiA5LjExNCAxMC44MTUgMCA1LjYyOS00Ljk5MSAxMC40ODUtMTIuNjk1IDEyLjM2LjIxNyA2LjQwMiAxLjk1MyAxMi4wMyA2LjYxOSAxMi4wMyAyLjkyOSAwIDUuMzE3LTEuMjE0IDcuMTYxLTMuNTMyIDMuMjU1LTMuOTczIDQuMDE1LTEwLjM3MyAzLjE0Ny0xNC42NzhsLS4xMDktLjU1MXptLTE2LjYwMSAxLjIxNWM1LjY0Mi0yLjUzOSA1Ljc1MS03LjUwNSA1Ljc1MS03LjYxNSAwLTMuMi0xLjMwMi01LjA3Ny0yLjQ5Ni01LjE4Ny0xLjA4NSAwLTIuNzEyIDYuMDctMy4yNTUgMTIuODAyeiIgZmlsbD0iIzY2QkI2QSIvPgogICAgPHBhdGggZD0iTTY0Ljk5NCAxMi4yNWMwIC4yMi4xMDguMzMxLjMyNS40NDEgNC40NDkuNjYzIDcuMzc5LS43NzIgNy4zNzktOC4wNTYgMC02Ljg0Mi02Ljk0NS0xLjQzNC04LjI0Ny0uNDQxLS4xMDguMTEtLjEwOC4yMi0uMTA4LjQ0MSAxLjE5MyAyLjY0OS44NjggNi41MTEuNjUgNy42MTV6IiBmaWxsPSIjNjZCQjZBIi8+CiAgICA8bWFzayBpZD0idnl2ZWp5cm4xYSIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMTE1IiB5PSIzMSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIj4KICAgICAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExOS44OTggMzIuMjI3Yy0yLjE3LjIyLTQuMjMyLjExLTQuMjMyLjExLjMyNiA0LjQxNSAxLjQ1OCA3LjM5MSAzLjA4NiA5LjcwOWw3LjkyLS42NjNjLTEuNjgxLTIuMjM0LTIuMzg1LTUuNTgtMi41NDMtOS45MyAwIDAtMi4xNy41NTMtNC4yMzEuNzc0eiIgZmlsbD0iI2ZmZiIvPgogICAgPC9tYXNrPgogICAgPGcgbWFzaz0idXJsKCN2eXZlanlybjFhKSI+CiAgICAgICAgPHBhdGggZD0ibTEyNy44MTggNDEuOTM3LTEuMzAyLTExLjgwOS0xMi4wNDQgMS40MzUgMS4zMDIgMTEuODA5IDEyLjA0NC0xLjQzNXoiIGZpbGw9InVybCgjZHJvcHkwdmMyYikiLz4KICAgIDwvZz4KICAgIDxtYXNrIGlkPSJuZ3FpN2JtNzNjIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIxMTUiIHk9IjE3IiB3aWR0aD0iMTEiIGhlaWdodD0iMTEiPgogICAgICAgIDxwYXRoIGQ9Ik0xMjQuMzQ3IDI1LjkzN2MtMS42NzkgMS4wNS02Ljg5MSAxLjc5Ni04LjY4MSAxLjY1My4yNjMtMi40NzYuNzg3LTUuODk2IDIuMTctOS42MDEgMS4wNTYtLjI1NCA1Ljg2LS4yNjIgNy4zMTYgMS44MzJhNTYuODgxIDU2Ljg4MSAwIDAgMC0uODA1IDYuMTE2eiIgZmlsbD0iI2ZmZiIvPgogICAgPC9tYXNrPgogICAgPGcgbWFzaz0idXJsKCNuZ3FpN2JtNzNjKSI+CiAgICAgICAgPHBhdGggZmlsbD0idXJsKCNveHA5dzBhbzVkKSIgZD0iTTExNS41NTggMTcuODczaDkuNTk0djkuNzM1aC05LjU5NHoiLz4KICAgIDwvZz4KICAgIDxtYXNrIGlkPSJueW9nNWZtbWllIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSI3NiIgeT0iMjYiIHdpZHRoPSI5IiBoZWlnaHQ9IjE1Ij4KICAgICAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTc2LjQ0MyAzNi42NDRjLjU0MyAxLjMyNCAxLjEzIDIuODYxIDEuNzggNC4xODYgMS4wNjktMS4yNTUgMi4yNDMtMi42NiAzLjYyOS00LjY5LjgxNy0xLjE5OCAxLjY2OC0yLjU3OCAyLjM0OC0zLjY5NGwtMS4wODEtNS41MjNjLTEuNzM4IDMuMDA0LTQuNjkyIDcuNTctNi42NzYgOS43MnoiIGZpbGw9IiNmZmYiLz4KICAgIDwvbWFzaz4KICAgIDxnIG1hc2s9InVybCgjbnlvZzVmbW1pZSkiPgogICAgICAgIDxwYXRoIGQ9Ik03Ny4xNDcgNDMuMjYxIDg4LjMyMyAzOS40bC00Ljg4My0xNC45LTExLjE3NiAzLjg2NCA0Ljg4MyAxNC44OTh6IiBmaWxsPSJ1cmwoI2RpanZpNDZ6aGYpIi8+CiAgICA8L2c+CiAgICA8bWFzayBpZD0iN21pY25seDg4ZyIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iOTYiIHk9IjI4IiB3aWR0aD0iMTAiIGhlaWdodD0iMTMiPgogICAgICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTYuNjc4IDM2Ljg1NWMuNzYgMS4xMDQgMi4xNyAyLjU0NCAzLjE0NiAzLjY0N2E0My44OTMgNDMuODkzIDAgMCAwIDIuNDY1LTMuODg4IDU5LjQxNCA1OS40MTQgMCAwIDAgMy4wNjktNi4zNzVzLTEuMDY4LS4zOC0xLjk0MS0uODkzYy0uODczLS41MTQtMS42MzYtMS4wOTEtMS42MzYtMS4wOTEtMS41MzQgMy41NzgtMy41MjcgNi41NC01LjEwMyA4LjZ6IiBmaWxsPSIjZmZmIi8+CiAgICA8L21hc2s+CiAgICA8ZyBtYXNrPSJ1cmwoIzdtaWNubHg4OGcpIj4KICAgICAgICA8cGF0aCBkPSJtMTAzLjI5NiA0NC4yNTUgNy4yNy0xMy4xMzMtMTEuNzE5LTYuNzMyLTcuMjcgMTMuMDIyIDExLjcxOSA2Ljg0M3oiIGZpbGw9InVybCgjcjNlMTJsd2NwaCkiLz4KICAgIDwvZz4KICAgIDxtYXNrIGlkPSIyemx4Mm1oaTVpIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSI4OCIgeT0iMTMiIHdpZHRoPSI0IiBoZWlnaHQ9IjkiPgogICAgICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODguODY1IDE0LjM0N3MuMTA5IDEuOTg2Ljk3NyA2Ljg0MmMxLjE5My0zLjQyMSAxLjgzNC02LjA0OCAxLjgzNC03LjM3MnYtLjMzMmwtMi44MS44NjJ6IiBmaWxsPSIjZmZmIi8+CiAgICA8L21hc2s+CiAgICA8ZyBtYXNrPSJ1cmwoIzJ6bHgybWhpNWkpIj4KICAgICAgICA8cGF0aCBkPSJtODkuNjI1IDEyLjE0LTQuMjMyIDYuODQyIDUuNTM0IDMuNDIxIDQuMjMxLTYuODQyLTUuNTMzLTMuNDIxeiIgZmlsbD0idXJsKCN6OWJobXhidjVqKSIvPgogICAgPC9nPgogICAgPG1hc2sgaWQ9Imdwdm5pNG5tMmsiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjEwNCIgeT0iMTciIHdpZHRoPSI1IiBoZWlnaHQ9IjgiPgogICAgICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTA0LjkyMiAxOC44NzNzLS43NiAyLjMxOCAyLjM4NyA1LjE4N2MuNTQyLTIuMzE3Ljg0Ni00LjUyMi45Ni02LjYxN2wtMy4zNDcgMS40M3oiIGZpbGw9IiNmZmYiLz4KICAgIDwvbWFzaz4KICAgIDxnIG1hc2s9InVybCgjZ3B2bmk0bm0yaykiPgogICAgICAgIDxwYXRoIGQ9Im0xMDQuNDg5IDE2LjIyMy0xLjg0NCA3LjI4NCA1LjQyNSAxLjQzNCAxLjk1My03LjE3My01LjUzNC0xLjU0NXoiIGZpbGw9InVybCgjYzU1emR6a3ZqbCkiLz4KICAgIDwvZz4KICAgIDxtYXNrIGlkPSJkMXRvZ2IwY3NtIiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSI0NiIgeT0iMjYiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxNCI+CiAgICAgICAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01NC40NjcgMjYuNzA3Yy0yLjAxNCA0LjM5Ny00LjYxNiA3LjgyLTcuNzYgMTAuNDI0bDQuNjE5IDIuMTNjMi40NDEtMy40ODQgMy42NzktNi43MTcgNC41NTQtOS40NjRsLjQ2NC0xLjY2Ny40MDctMS43Ni0yLjI4NC4zMzd6IiBmaWxsPSIjZmZmIi8+CiAgICA8L21hc2s+CiAgICA8ZyBtYXNrPSJ1cmwoI2QxdG9nYjBjc20pIj4KICAgICAgICA8cGF0aCBkPSJtNDcuNTggMjcuMDE4IDkuNjI5LS44NjMtLjQ3NSAxMy40MTYtMTAuMTg2LS4zOTMgMS4wMzEtMTIuMTZ6IiBmaWxsPSJ1cmwoI3RhcHl2eG5kc24pIi8+CiAgICA8L2c+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImRyb3B5MHZjMmIiIHgxPSIxMjUuNTQ1IiB5MT0iMzkuOTY1IiB4Mj0iMTI0LjY4NSIgeTI9IjMyLjA3NCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjNjZCQjZBIi8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzM3OEY0MyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJveHA5dzBhbzVkIiB4MT0iMTE2LjQxNSIgeTE9IjIzLjY3OSIgeDI9IjExNi40MTUiIHkyPSIzMS44MzQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzY2QkI2QSIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMzNzhGNDMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iZGlqdmk0NnpoZiIgeDE9Ijc4LjExMyIgeTE9IjM5LjIyMSIgeDI9Ijg1LjUzOSIgeTI9IjM3LjM3NiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjNjZCQjZBIi8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzM3OEY0MyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJyM2UxMmx3Y3BoIiB4MT0iMTAzLjE0OCIgeTE9IjM5LjIzNCIgeDI9IjEwNy42NTYiIHkyPSIzMS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzY2QkI2QSIvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMzNzhGNDMiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iejliaG14YnY1aiIgeDE9Ijg5LjcxMSIgeTE9IjE1Ljk5MiIgeDI9Ijg4LjQwNiIgeTI9IjE3LjkwNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjNjZCQjZBIi8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzM3OEY0MyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJjNTV6ZHprdmpsIiB4MT0iMTA1LjI0OCIgeTE9IjIwLjAzOCIgeDI9IjEwNC4zMiIgeTI9IjIyLjYwOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjNjZCQjZBIi8+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzM3OEY0MyIvPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJ0YXB5dnhuZHNuIiB4MT0iNTUuNTUxIiB5MT0iMzYuNjczIiB4Mj0iNTUuNTUxIiB5Mj0iMjYuODExIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM2NkJCNkEiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMzc4RjQzIi8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KPC9zdmc+Cg==",alt:"givewp-logo"}),(0,r.createElement)("div",{className:"givewp-donation-form-selector__select"},(0,r.createElement)("label",{htmlFor:"formId",className:"givewp-donation-form-selector__label"},(0,u.__)("Choose a donation form","give")),(0,r.createElement)(ur,{name:"formId",inputId:"formId",value:a,placeholder:t?(0,u.__)("Loading Donation Forms...","give"):(0,u.__)("Select...","give"),onChange:e=>{e&&i(e.value)},noOptionsMessage:()=>(0,r.createElement)("p",null,(0,u.__)("No forms were found using the GiveWP form builder.","give")),options:e,loadingMessage:()=>(0,r.createElement)(r.Fragment,null,(0,u.__)("Loading Donation Forms...","give")),isLoading:t,theme:dr,styles:cr})),(0,r.createElement)("button",{className:"givewp-donation-form-selector__submit",type:"button",disabled:s||c||!o,onClick:()=>{n(o),(0,l.dispatch)("core/editor").savePost()}},(0,u.__)("Confirm","give")))}const pr=window.wp.components;function gr({attributes:e,setAttributes:t,formOptions:n,isResolving:o,isLegacyTemplate:a,isLegacyForm:s}){const{id:l,displayStyle:c,continueButtonTitle:d,showTitle:f,contentDisplay:p,showGoal:g,showContent:m}=e,v=a||!s,h=v&&["newTab","modal","reveal","button"].includes(c);return(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(pr.PanelBody,{title:(0,u.__)("Form Settings","give"),initialOpen:!0},(0,r.createElement)(pr.PanelRow,null,!1===o&&0===n.length?(0,r.createElement)("p",null,(0,u.__)("No forms were found using the GiveWP form builder.","give")):(0,r.createElement)(pr.SelectControl,{label:(0,u.__)("Choose a donation form","give"),value:null!=l?l:"",options:[{value:"",label:(0,u.__)("Select...","give"),disabled:!0},...n.map((e=>({label:e.label,value:String(e.value)})))],onChange:e=>{t({id:Number(e)})}})),v&&(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.SelectControl,{label:(0,u.__)("Form Format","give"),value:c,options:((e,t,n)=>a?e.concat(t):e.concat(n))([{label:(0,u.__)("Full Form","give"),value:"onpage"},{label:(0,u.__)("Modal","give"),value:"modal"}],[{label:(0,u.__)("Reveal","give"),value:"reveal"},{value:"button",label:(0,u.__)("One Button Launch","give")}],[{label:(0,u.__)("New Tab","give"),value:"newTab"}]),onChange:e=>{t({displayStyle:e})}})),h&&(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.TextControl,{label:(0,u.__)("Open Form Button","give"),value:d,onChange:e=>{t({continueButtonTitle:e})}})),a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.ToggleControl,{label:(0,u.__)("Title","give"),name:"showTitle",checked:!!f,onChange:e=>{t({showTitle:e})}})),(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.ToggleControl,{label:(0,u.__)("Goal","give"),name:"showGoal",checked:!!g,onChange:e=>{t({showGoal:e})}})),(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.ToggleControl,{label:(0,u.__)("Content","give"),name:"contentDisplay",checked:!!p,onChange:e=>{t({contentDisplay:e})}})),p&&(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.SelectControl,{label:(0,u.__)("Content Position","give"),name:"showContent",value:m,options:[{value:"above",label:(0,u.__)("Above","give")},{value:"below",label:(0,u.__)("Below","give")}],onChange:e=>{t({showContent:e})}}))),l&&(0,r.createElement)(pr.PanelRow,null,(0,r.createElement)(pr.ExternalLink,{href:s?`/wp-admin/post.php?post=${l}&action=edit`:`/wp-admin/edit.php?post_type=give_forms&page=givewp-form-builder&donationFormID=${l}`},(0,u.__)("Edit donation form","give")))))}var mr=n(5556),vr=n.n(mr);function hr(){return hr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hr.apply(this,arguments)}function br(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var yr,Ir,wr=(yr=function(e){!function(t){if("undefined"!=typeof window){var n,r=0,o=!1,i=!1,a="[iFrameSizer]",s=null,l=window.requestAnimationFrame,u={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},c={},d=null,f={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){I("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},p={};window.jQuery&&((n=window.jQuery).fn?n.fn.iFrameResize||(n.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){j(n,e)})).end()}):y("","Unable to bind to jQuery, it is not fully loaded.")),e.exports=F(),window.iFrameResize=window.iFrameResize||F()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function m(e,t,n){e.addEventListener(t,n,!1)}function v(e,t,n){e.removeEventListener(t,n,!1)}function h(e){return c[e]?c[e].log:o}function b(e,t){w("log",e,t,h(e))}function y(e,t){w("info",e,t,h(e))}function I(e,t){w("warn",e,t,!0)}function w(e,t,n,r){!0===r&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}(t),n)}function E(e){function t(){n("Height"),n("Width"),A((function(){O(R),S(z),f("onResized",R)}),R,"init")}function n(e){var t=Number(c[z]["max"+e]),n=Number(c[z]["min"+e]),r=e.toLowerCase(),o=Number(R[r]);b(z,"Checking "+r+" is in range "+n+"-"+t),o<n&&(o=n,b(z,"Set "+r+" to min value")),o>t&&(o=t,b(z,"Set "+r+" to max value")),R[r]=""+o}function r(e){return k.substr(k.indexOf(":")+7+e)}function o(e,t){var n,r;n=function(){var n,r;P("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),r=R.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:r.height,iframeWidth:r.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(r.top-n.top,10),offsetLeft:parseInt(r.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},p[r=t]||(p[r]=setTimeout((function(){p[r]=null,n()}),32))}function i(e){var t=e.getBoundingClientRect();return L(z),{x:Math.floor(Number(t.left)+Number(s.x)),y:Math.floor(Number(t.top)+Number(s.y))}}function l(e){var t=e?i(R.iframe):{x:0,y:0},n={x:Number(R.width)+t.x,y:Number(R.height)+t.y};b(z,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):I(z,"Unable to scroll to requested position, window.parentIFrame not found"):(s=n,u(),b(z,"--"))}function u(){!1!==f("onScroll",s)?S(z):N()}function d(e){f(e,{iframe:R.iframe,screenX:R.width,screenY:R.height,type:R.type})}function f(e,t){return M(z,e,t)}var g,h,w,E,C,j,k=e.data,R={},z=null;"[iFrameResizerChild]Ready"===k?function(){for(var e in c)P("iFrame requested init",D(e),c[e].iframe,e)}():a===(""+k).substr(0,13)&&k.substr(13).split(":")[0]in c?(E=(w=k.substr(13).split(":"))[1]?parseInt(w[1],10):0,C=c[w[0]]&&c[w[0]].iframe,j=getComputedStyle(C),R={iframe:C,id:w[0],height:E+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(j)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(j),width:w[2],type:w[3]},z=R.id,c[z]&&(c[z].loaded=!0),(h=R.type in{true:1,false:1,undefined:1})&&b(z,"Ignoring init message from meta parent page"),!h&&function(e){var t=!0;return c[e]||(t=!1,I(R.type+" No settings for "+e+". Message was: "+k)),t}(z)&&(b(z,"Received: "+k),g=!0,null===R.iframe&&(I(z,"IFrame ("+R.id+") not found"),g=!1),g&&function(){var t,n=e.origin,r=c[z]&&c[z].checkOrigin;if(r&&""+n!="null"&&!(r.constructor===Array?function(){var e=0,t=!1;for(b(z,"Checking connection is from allowed list of origins: "+r);e<r.length;e++)if(r[e]===n){t=!0;break}return t}():(t=c[z]&&c[z].remoteHost,b(z,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+R.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(c[z]&&c[z].firstRun&&c[z]&&(c[z].firstRun=!1),R.type){case"close":T(R.iframe);break;case"message":h=r(6),b(z,"onMessage passed: {iframe: "+R.iframe.id+", message: "+h+"}"),f("onMessage",{iframe:R.iframe,message:JSON.parse(h)}),b(z,"--");break;case"mouseenter":d("onMouseEnter");break;case"mouseleave":d("onMouseLeave");break;case"autoResize":c[z].autoResize=JSON.parse(r(9));break;case"scrollTo":l(!1);break;case"scrollToOffset":l(!0);break;case"pageInfo":o(c[z]&&c[z].iframe,z),function(){function e(e,r){function i(){c[n]?o(c[n].iframe,n):t()}["scroll","resize"].forEach((function(t){b(n,e+t+" listener for sendPageInfo"),r(window,t,i)}))}function t(){e("Remove ",v)}var n=z;e("Add ",m),c[n]&&(c[n].stopPageInfo=t)}();break;case"pageInfoStop":c[z]&&c[z].stopPageInfo&&(c[z].stopPageInfo(),delete c[z].stopPageInfo);break;case"inPageLink":e=r(9),a=e.split("#")[1]||"",p=decodeURIComponent(a),(g=document.getElementById(p)||document.getElementsByName(p)[0])?(n=i(g),b(z,"Moving to in page link (#"+a+") at x: "+n.x+" y: "+n.y),s={x:n.x,y:n.y},u(),b(z,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(a):b(z,"In page link #"+a+" not found and window.parentIFrame not found"):b(z,"In page link #"+a+" not found");break;case"reset":x(R);break;case"init":t(),f("onInit",R.iframe);break;default:t()}var e,n,a,p,g,h}())):y(z,"Ignored: "+k)}function M(e,t,n){var r=null,o=null;if(c[e]){if("function"!=typeof(r=c[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");o=r(n)}return o}function C(e){var t=e.id;delete c[t]}function T(e){var t=e.id;if(!1!==M(t,"onClose",t)){b(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){I(e)}M(t,"onClosed",t),b(t,"--"),C(e)}else b(t,"Close iframe cancelled by onClose event")}function L(e){null===s&&b(e,"Get page position: "+(s={x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}).x+","+s.y)}function S(e){null!==s&&(window.scrollTo(s.x,s.y),b(e,"Set page position: "+s.x+","+s.y),N())}function N(){s=null}function x(e){b(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),L(e.id),A((function(){O(e),P("reset","reset",e.iframe,e.id)}),e,"reset")}function O(e){function t(t){i||"0"!==e[t]||(i=!0,b(r,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(c).forEach((function(e){!function(e){function t(t){return"0px"===(c[e]&&c[e].iframe.style[t])}c[e]&&null!==c[e].iframe.offsetParent&&(t("height")||t("width"))&&P("Visibility change","resize",c[e].iframe,e)}(e)}))}function t(t){b("window","Mutation observed: "+t[0].target+" "+t[0].type),k(e,16)}var n,r=g();r&&(n=document.querySelector("body"),new r(t).observe(n,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",b(e.id,"IFrame ("+r+") "+t+" set to "+e[t]+"px")):b("undefined","messageData id not set")}(n),t(n)}var r=e.iframe.id;c[r]&&(c[r].sizeHeight&&n("height"),c[r].sizeWidth&&n("width"))}function A(e,t,n){n!==t.type&&l&&!window.jasmine?(b(t.id,"Requesting animation frame"),l(e)):e()}function P(e,t,n,r,o){var i,s=!1;r=r||n.id,c[r]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(i=c[r]&&c[r].targetOrigin,b(r,"["+e+"] Sending msg to iframe["+r+"] ("+t+") targetOrigin: "+i),n.contentWindow.postMessage(a+t,i)):I(r,"["+e+"] IFrame("+r+") not found"),o&&c[r]&&c[r].warningTimeout&&(c[r].msgTimeout=setTimeout((function(){!c[r]||c[r].loaded||s||(s=!0,I(r,"IFrame has not responded within "+c[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),c[r].warningTimeout)))}function D(e){return e+":"+c[e].bodyMarginV1+":"+c[e].sizeWidth+":"+c[e].log+":"+c[e].interval+":"+c[e].enablePublicMethods+":"+c[e].autoResize+":"+c[e].bodyMargin+":"+c[e].heightCalculationMethod+":"+c[e].bodyBackground+":"+c[e].bodyPadding+":"+c[e].tolerance+":"+c[e].inPageLinks+":"+c[e].resizeFrom+":"+c[e].widthCalculationMethod}function j(e,n){function i(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],I(a,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a=function(t){var i;return""===t&&(e.id=(i=n&&n.id||f.id+r++,null!==document.getElementById(i)&&(i+=r++),t=i),o=(n||{}).log,b(t,"Added missing iframe ID: "+t+" ("+e.src+")")),t}(e.id);a in c&&"iFrameResizer"in e?I(a,"Ignored iFrame, already setup."):(function(t){var n;t=t||{},c[a]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(i,t),function(e){for(var t in f)Object.prototype.hasOwnProperty.call(f,t)&&(c[a][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:f[t])}(t),c[a]&&(c[a].targetOrigin=!0===c[a].checkOrigin?""===(n=c[a].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(n),function(){switch(b(a,"IFrame scrolling "+(c[a]&&c[a].scrolling?"enabled":"disabled")+" for "+a),e.style.overflow=!1===(c[a]&&c[a].scrolling)?"hidden":"auto",c[a]&&c[a].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=c[a]?c[a].scrolling:"no"}}(),function(){function t(t){1/0!==c[a][t]&&0!==c[a][t]&&(e.style[t]=c[a][t]+"px",b(a,"Set "+t+" = "+c[a][t]+"px"))}function n(e){if(c[a]["min"+e]>c[a]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(c[a]&&c[a].bodyMargin)&&"0"!==(c[a]&&c[a].bodyMargin)||(c[a].bodyMarginV1=c[a].bodyMargin,c[a].bodyMargin=c[a].bodyMargin+"px"),function(n){var r=g();r&&function(t){e.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===e&&T(e)}))}))})).observe(e.parentNode,{childList:!0})}(r),m(e,"load",(function(){var r,o;P("iFrame.onload",n,e,t,!0),r=c[a]&&c[a].firstRun,o=c[a]&&c[a].heightCalculationMethod in u,!r&&o&&x({iframe:e,height:0,width:0,type:"init"})})),P("init",n,e,t,!0)}(D(a)),c[a]&&(c[a].iframe.iFrameResizer={close:T.bind(null,c[a].iframe),removeListeners:C.bind(null,c[a].iframe),resize:P.bind(null,"Window resize","resize",c[a].iframe),moveToAnchor:function(e){P("Move to anchor","moveToAnchor:"+e,c[a].iframe,a)},sendMessage:function(e){P("Send Message","message:"+(e=JSON.stringify(e)),c[a].iframe,a)}}))}function k(e,t){null===d&&(d=setTimeout((function(){d=null,e()}),t))}function R(){"hidden"!==document.visibilityState&&(b("document","Trigger event: Visiblity change"),k((function(){z("Tab Visable","resize")}),16))}function z(e,t){Object.keys(c).forEach((function(n){(function(e){return c[e]&&"parent"===c[e].resizeFrom&&c[e].autoResize&&!c[e].firstRun})(n)&&P(e,t,c[n].iframe,n)}))}function F(){function e(e,t){t&&(function(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}(),j(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!l;e+=1)l=window[t[e]+"RequestAnimationFrame"];l?l=l.bind(window):b("setup","RequestAnimationFrame not supported")}(),m(window,"message",E),m(window,"resize",(function(){b("window","Trigger event: resize"),k((function(){z("Window resize","resize")}),16)})),m(document,"visibilitychange",R),m(document,"-webkit-visibilitychange",R),function(r,o){switch(n=[],function(e){e&&e.enablePublicMethods&&I("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(r),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),e.bind(t,r));break;case"object":e(r,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return n}}}()},yr(Ir={exports:{}}),Ir.exports),Er=function(){},Mr=function(e){var t=e.title,n=e.forwardRef,i=br(e,["title","forwardRef"]),a=function(e){return e.autoResize,e.bodyBackground,e.bodyMargin,e.bodyPadding,e.checkOrigin,e.inPageLinks,e.heightCalculationMethod,e.interval,e.log,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.resizeFrom,e.scrolling,e.sizeHeight,e.sizeWidth,e.warningTimeout,e.tolerance,e.widthCalculationMethod,e.onClosed,e.onInit,e.onMessage,e.onMouseEnter,e.onMouseLeave,e.onResized,br(e,["autoResize","bodyBackground","bodyMargin","bodyPadding","checkOrigin","inPageLinks","heightCalculationMethod","interval","log","maxHeight","maxWidth","minHeight","minWidth","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClosed","onInit","onMessage","onMouseEnter","onMouseLeave","onResized"])}(i),s=(0,r.useRef)(null),l=function(){return Er(!s.current,"[iframeSizerReact]["+(s&&s.current&&s.current.id)+"] Close event ignored, to remove the iframe update your React component"),!s.current};return(0,r.useEffect)((function(){var e=s.current;return wr(hr({},i,{onClose:l}),e),function(){return e.iFrameResizer&&e.iFrameResizer.removeListeners()}}),[]),(0,r.useImperativeHandle)(n,(function(){return{resize:function(){return s.current.iFrameResizer.resize()},moveToAnchor:function(e){return s.current.iFrameResizer.moveToAnchor(e)},sendMessage:function(e,t){s.current.iFrameResizer.sendMessage(e,t)}}})),o().createElement("iframe",hr({title:t},a,{ref:s}))};Mr.defaultProps={title:"iframe"},Mr.propTypes={title:vr().string};const Cr=Mr,Tr=window.wp.element;function Lr(e){const t=(0,r.useRef)(null);return(0,r.useMemo)((()=>({get current(){return t.current},set current(n){t.current=n,"function"==typeof e?e(n):e&&(e.current=n)}})),[e])}function Sr(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}}function Nr(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const xr="undefined"!=typeof document?r.useLayoutEffect:()=>{};function Or(e){const t=(0,r.useRef)(null);return xr((()=>{t.current=e}),[e]),(0,r.useCallback)(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}const Ar={prefix:String(Math.round(1e10*Math.random())),current:0},Pr=r.createContext(Ar),Dr=r.createContext(!1);let jr=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),kr=new WeakMap;const Rr="function"==typeof r.useId?function(e){let t=r.useId(),[n]=(0,r.useState)(Hr());return e||`${n?"react-aria":`react-aria${Ar.prefix}`}-${t}`}:function(e){let t=(0,r.useContext)(Pr);t!==Ar||jr||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=function(e=!1){let t=(0,r.useContext)(Pr),n=(0,r.useRef)(null);if(null===n.current&&!e){var o,i;let e=null===(i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===i||null===(o=i.ReactCurrentOwner)||void 0===o?void 0:o.current;if(e){let n=kr.get(e);null==n?kr.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,kr.delete(e))}n.current=++t.current}return n.current}(!!e),o=`react-aria${t.prefix}`;return e||`${o}-${n}`};function zr(){return!1}function Fr(){return!0}function Vr(e){return()=>{}}function Hr(){return"function"==typeof r.useSyncExternalStore?r.useSyncExternalStore(Vr,zr,Fr):(0,r.useContext)(Dr)}let Wr,Br=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),_r=new Map;function Yr(e){let[t,n]=(0,r.useState)(e),o=(0,r.useRef)(null),i=Rr(t),a=(0,r.useRef)(null);if(Wr&&Wr.register(a,i),Br){const e=_r.get(i);e&&!e.includes(o)?e.push(o):_r.set(i,[o])}return xr((()=>{let e=i;return()=>{Wr&&Wr.unregister(a),_r.delete(e)}}),[i]),(0,r.useEffect)((()=>{let e=o.current;return e&&n(e),()=>{e&&(o.current=null)}})),i}function Zr(e,t){if(e===t)return e;let n=_r.get(e);if(n)return n.forEach((e=>e.current=t)),t;let r=_r.get(t);return r?(r.forEach((t=>t.current=e)),e):t}function Ur(e=[]){let t=Yr(),[n,o]=function(e){let[t,n]=(0,r.useState)(e),o=(0,r.useRef)(null),i=Or((()=>{if(!o.current)return;let e=o.current.next();e.done?o.current=null:t===e.value?i():n(e.value)}));xr((()=>{o.current&&i()}));let a=Or((e=>{o.current=e(t),i()}));return[t,a]}(t),i=(0,r.useCallback)((()=>{o((function*(){yield t,yield document.getElementById(t)?t:void 0}))}),[t,o]);return xr(i,[t,i,...e]),n}function Gr(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Gr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}"undefined"!=typeof FinalizationRegistry&&(Wr=new FinalizationRegistry((e=>{_r.delete(e)})));const Kr=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Gr(e))&&(r&&(r+=" "),r+=t);return r};function Qr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],o=r[e];"function"==typeof n&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=Nr(n,o):"className"!==e&&"UNSAFE_className"!==e||"string"!=typeof n||"string"!=typeof o?"id"===e&&n&&o?t.id=Zr(n,o):t[e]=void 0!==o?o:n:t[e]=Kr(n,o)}}return t}const Xr=Symbol("default");function $r({values:e,children:t}){for(let[n,o]of e)t=r.createElement(n.Provider,{value:o},t);return t}function Jr(e){let{className:t,style:n,children:o,defaultClassName:i,defaultChildren:a,defaultStyle:s,values:l}=e;return(0,r.useMemo)((()=>{let e,r,u;return e="function"==typeof t?t({...l,defaultClassName:i}):t,r="function"==typeof n?n({...l,defaultStyle:s||{}}):n,u="function"==typeof o?o({...l,defaultChildren:a}):null==o?a:o,{className:null!=e?e:i,style:r||s?{...s,...r}:void 0,children:null!=u?u:a,"data-rac":""}}),[t,n,o,i,a,s,l])}function qr(e,t,n){let o=function(e,t){let n=(0,r.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||Xr;if(!n.slots[e]){let e=(new Intl.ListFormat).format(Object.keys(n.slots).map((e=>`"${e}"`)));throw new Error(`${t?`Invalid slot "${t}".`:"A slot prop is required."} Valid slot names are ${e}.`)}return n.slots[e]}return n}(n,e.slot)||{},{ref:i,...a}=o,s=Lr((0,r.useMemo)((()=>Sr(t,i)),[t,i])),l=Qr(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?l.style=t=>{let n="function"==typeof a.style?a.style(t):a.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:l.style={...a.style,...e.style}),[l,s]}const eo=(0,r.createContext)(null);let to=null;class no{isAttached(){var e;return null===(e=this.node)||void 0===e?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null===(r=this.assertiveLog)||void 0===r||r.appendChild(i):null===(o=this.politeLog)||void 0===o||o.appendChild(i),""!==e&&setTimeout((()=>{i.remove()}),n)}clear(e){this.node&&(e&&"assertive"!==e||!this.assertiveLog||(this.assertiveLog.innerHTML=""),e&&"polite"!==e||!this.politeLog||(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"undefined"!=typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}const ro=new Set(["id"]),oo=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),io=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ao=/^(data-.*)$/;function so(e,t={}){let{labelable:n,isLink:r,propNames:o}=t,i={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(ro.has(t)||n&&oo.has(t)||r&&io.has(t)||(null==o?void 0:o.has(t))||ao.test(t))&&(i[t]=e[t]);return i}function lo(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function uo(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 co(e){let t=null;return()=>(null==t&&(t=e()),t)}const fo=co((function(){return uo(/^Mac/i)})),po=co((function(){return uo(/^iPhone/i)})),go=co((function(){return uo(/^iPad/i)||fo()&&navigator.maxTouchPoints>1})),mo=co((function(){return po()||go()})),vo=(co((function(){return fo()||mo()})),co((function(){return lo(/AppleWebKit/i)&&!ho()}))),ho=co((function(){return lo(/Chrome/i)})),bo=co((function(){return lo(/Android/i)})),yo=co((function(){return lo(/Firefox/i)})),Io=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},wo=e=>e&&"window"in e&&e.window===e?e:Io(e).defaultView||window;let Eo=new Map,Mo=new Set;function Co(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=Eo.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),Eo.delete(n.target)),0===Eo.size)){for(let e of Mo)e();Mo.clear()}};document.body.addEventListener("transitionrun",(n=>{if(!e(n)||!n.target)return;let r=Eo.get(n.target);r||(r=new Set,Eo.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)})),document.body.addEventListener("transitionend",t)}function To(e){requestAnimationFrame((()=>{0===Eo.size?e():Mo.add(e)}))}"undefined"!=typeof document&&("loading"!==document.readyState?Co():document.addEventListener("DOMContentLoaded",Co));let Lo="default",So="",No=new WeakMap;function xo(e){if(mo()){if("default"===Lo){const t=Io(e);So=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Lo="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";No.set(e,e.style[t]),e.style[t]="none"}}function Oo(e){if(mo()){if("disabled"!==Lo)return;Lo="restoring",setTimeout((()=>{To((()=>{if("restoring"===Lo){const t=Io(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=So||""),So="",Lo="default"}}))}),300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&No.has(e)){let t=No.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),No.delete(e)}}const Ao=r.createContext({register:()=>{}});Ao.displayName="PressResponderContext";const Po=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Do=Po.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Po.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const jo=Po.join(':not([hidden]):not([tabindex="-1"]),');function ko(e){return e.matches(Do)}function Ro(e){return e.matches(jo)}function zo(e){if(function(){if(null==Fo){Fo=!1;try{document.createElement("div").focus({get preventScroll(){return Fo=!0,!0}})}catch{}}return Fo}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let Fo=null;class Vo{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function Ho(e){let t=(0,r.useRef)({isFocused:!1,observer:null});xr((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=Or((t=>{null==e||e(t)}));return(0,r.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{t.current.isFocused=!1,r.disabled&&n(new Vo("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}let Wo=!1;function Bo(e){for(;e&&!ko(e);)e=e.parentElement;let t=wo(e),n=t.document.activeElement;if(!n||n===e)return;Wo=!0;let r=!1,o=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},i=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,zo(n),l()))},a=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,zo(n),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),Wo=!1,r=!1},u=requestAnimationFrame(l);return l}function _o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Yo(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,_o(e,t,"set"),n),n}function Zo(e,t){xr((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}}))}function Uo(){let e=(0,r.useRef)(new Map),t=(0,r.useCallback)(((t,n,r,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)}),[]),n=(0,r.useCallback)(((t,n,r,o)=>{var i;let a=(null===(i=e.current.get(r))||void 0===i?void 0:i.fn)||r;t.removeEventListener(n,a,o),e.current.delete(r)}),[]),o=(0,r.useCallback)((()=>{e.current.forEach(((e,t)=>{n(e.eventTarget,e.type,t,e.options)}))}),[n]);return(0,r.useEffect)((()=>o),[o]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:o}}function Go(e,t){return!(!t||!e)&&e.contains(t)}const Ko=(e=document)=>e.activeElement;function Qo(e){return e.target}function Xo(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}=t;yo()&&(null===(o=window.event)||void 0===o||null===(r=o.type)||void 0===r?void 0:r.startsWith("key"))&&"_blank"===e.target&&(fo()?i=!0:a=!0);let u=vo()&&fo()&&!go()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});Xo.isOpening=n,zo(e),e.dispatchEvent(u),Xo.isOpening=!1}function $o(e){return!(0!==e.mozInputSource||!e.isTrusted)||(bo()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}Xo.isOpening=!1;var Jo=new WeakMap;class qo{continuePropagation(){Yo(this,Jo,!1)}get shouldStopPropagation(){return function(e,t){return t.get?t.get.call(e):t.value}(this,_o(this,Jo,"get"))}constructor(e,t,n,r){var o,i,a,s;s={writable:!0,value:void 0},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(i=this,a=Jo),a.set(i,s),Yo(this,Jo,!0);let l=null!==(o=null==r?void 0:r.target)&&void 0!==o?o:n.currentTarget;const u=null==l?void 0:l.getBoundingClientRect();let c,d,f=0,p=null;null!=n.clientX&&null!=n.clientY&&(d=n.clientX,p=n.clientY),u&&(null!=d&&null!=p?(c=d-u.left,f=p-u.top):(c=u.width/2,f=u.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=c,this.y=f}}const ei=Symbol("linkClicked");function ti(e){return"A"===e.tagName&&e.hasAttribute("href")}function ni(e,t){const{key:n,code:r}=e,o=t,i=o.getAttribute("role");return!("Enter"!==n&&" "!==n&&"Spacebar"!==n&&"Space"!==r||o instanceof wo(o).HTMLInputElement&&!ui(o,n)||o instanceof wo(o).HTMLTextAreaElement||o.isContentEditable||("link"===i||!i&&ti(o))&&"Enter"!==n)}function ri(e,t){const n=e.changedTouches;for(let e=0;e<n.length;e++){const r=n[e];if(r.identifier===t)return r}return null}function oi(e,t){let n=0,r=0;return t.targetTouches&&1===t.targetTouches.length&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function ii(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function ai(e,t){let n=t.getBoundingClientRect(),r=function(e){let t=0,n=0;return void 0!==e.width?t=e.width/2:void 0!==e.radiusX&&(t=e.radiusX),void 0!==e.height?n=e.height/2:void 0!==e.radiusY&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);return i=r,!((o=n).left>i.right||i.left>o.right||o.top>i.bottom||i.top>o.bottom);var o,i}function si(e,t){return e instanceof HTMLInputElement?!ui(e,t):function(e){return!(e instanceof HTMLInputElement||(e instanceof HTMLButtonElement?"submit"===e.type||"reset"===e.type:ti(e)))}(e)}const li=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ui(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:li.has(e.type)}let ci=null,di=new Set,fi=new Map,pi=!1,gi=!1;const mi={Tab:!0,Escape:!0};function vi(e,t){for(let n of di)n(e,t)}function hi(e){pi=!0,function(e){return!(e.metaKey||!fo()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(ci="keyboard",vi("keyboard",e))}function bi(e){ci="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(pi=!0,vi("pointer",e))}function yi(e){$o(e)&&(pi=!0,ci="virtual")}function Ii(e){e.target!==window&&e.target!==document&&!Wo&&e.isTrusted&&(pi||gi||(ci="virtual",vi("virtual",e)),pi=!1,gi=!1)}function wi(){Wo||(pi=!1,gi=!0)}function Ei(e){if("undefined"==typeof window||fi.get(wo(e)))return;const t=wo(e),n=Io(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){pi=!0,r.apply(this,arguments)},n.addEventListener("keydown",hi,!0),n.addEventListener("keyup",hi,!0),n.addEventListener("click",yi,!0),t.addEventListener("focus",Ii,!0),t.addEventListener("blur",wi,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",bi,!0),n.addEventListener("pointermove",bi,!0),n.addEventListener("pointerup",bi,!0)):(n.addEventListener("mousedown",bi,!0),n.addEventListener("mousemove",bi,!0),n.addEventListener("mouseup",bi,!0)),t.addEventListener("beforeunload",(()=>{Mi(e)}),{once:!0}),fi.set(t,{focus:r})}const Mi=(e,t)=>{const n=wo(e),r=Io(e);t&&r.removeEventListener("DOMContentLoaded",t),fi.has(n)&&(n.HTMLElement.prototype.focus=fi.get(n).focus,r.removeEventListener("keydown",hi,!0),r.removeEventListener("keyup",hi,!0),r.removeEventListener("click",yi,!0),n.removeEventListener("focus",Ii,!0),n.removeEventListener("blur",wi,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",bi,!0),r.removeEventListener("pointermove",bi,!0),r.removeEventListener("pointerup",bi,!0)):(r.removeEventListener("mousedown",bi,!0),r.removeEventListener("mousemove",bi,!0),r.removeEventListener("mouseup",bi,!0)),fi.delete(n))};function Ci(){return"pointer"!==ci}function Ti(){return ci}"undefined"!=typeof document&&function(e){const t=Io(e);let n;"loading"!==t.readyState?Ei(e):(n=()=>{Ei(e)},t.addEventListener("DOMContentLoaded",n))}();const Li=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Si(e){const t=Io(e),n=Ko(t);if("virtual"===Ti()){let r=n;To((()=>{Ko(t)===r&&e.isConnected&&zo(e)}))}else zo(e)}function Ni(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:i}=e;const a=(0,r.useCallback)((e=>{if(e.target===e.currentTarget)return o&&o(e),i&&i(!1),!0}),[o,i]),s=Ho(a),l=(0,r.useCallback)((e=>{const t=Io(e.target),r=t?Ko(t):Ko();e.target===e.currentTarget&&r===Qo(e.nativeEvent)&&(n&&n(e),i&&i(!0),s(e))}),[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||o)?l:void 0,onBlur:t||!o&&!i?void 0:a}}}function xi(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t};e(r),t&&n.stopPropagation()}}let Oi=r.createContext(null);function Ai(e,t){let{focusProps:n}=Ni(e),{keyboardProps:o}=function(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:xi(e.onKeyDown),onKeyUp:xi(e.onKeyUp)}}}(e),i=Qr(n,o),a=function(e){let t=(0,r.useContext)(Oi)||{};Zo(t,e);let{ref:n,...o}=t;return o}(t),s=e.isDisabled?{}:a,l=(0,r.useRef)(e.autoFocus);(0,r.useEffect)((()=>{l.current&&t.current&&Si(t.current),l.current=!1}),[t]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:Qr({...i,tabIndex:u},s)}}function Pi(e,t){let n,{elementType:o="button",isDisabled:i,onPress:a,onPressStart:s,onPressEnd:l,onPressUp:u,onPressChange:c,preventFocusOnPress:d,allowFocusWhenDisabled:f,onClick:p,href:g,target:m,rel:v,type:h="button"}=e;n="button"===o?{type:h,disabled:i}:{role:"button",href:"a"!==o||i?void 0:g,target:"a"===o?m:void 0,type:"input"===o?h:void 0,disabled:"input"===o?i:void 0,"aria-disabled":i&&"input"!==o?i:void 0,rel:"a"===o?v:void 0};let{pressProps:b,isPressed:y}=function(e){let{onPress:t,onPressChange:n,onPressStart:o,onPressEnd:i,onPressUp:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,r.useContext)(Ao);if(t){let{register:n,...r}=t;e=Qr(r,e),n()}return Zo(t,e.ref),e}(e),[g,m]=(0,r.useState)(!1),v=(0,r.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:h,removeAllGlobalListeners:b}=Uo(),y=Or(((e,t)=>{let r=v.current;if(s||r.didFirePressStart)return!1;let i=!0;if(r.isTriggeringEvent=!0,o){let n=new qo("pressstart",t,e);o(n),i=n.shouldStopPropagation}return n&&n(!0),r.isTriggeringEvent=!1,r.didFirePressStart=!0,m(!0),i})),I=Or(((e,r,o=!0)=>{let a=v.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(i){let t=new qo("pressend",r,e);i(t),l=t.shouldStopPropagation}if(n&&n(!1),m(!1),t&&o&&!s){let n=new qo("press",r,e);t(n),l&&(l=n.shouldStopPropagation)}return a.isTriggeringEvent=!1,l})),w=Or(((e,t)=>{let n=v.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new qo("pressup",t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0})),E=Or((e=>{let t=v.current;if(t.isPressed&&t.target){t.didFirePressStart&&null!=t.pointerType&&I(ii(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||Oo(t.target);for(let e of t.disposables)e();t.disposables=[]}})),M=Or((e=>{c&&E(e)})),C=(0,r.useMemo)((()=>{let e=v.current,t={onKeyDown(t){if(ni(t.nativeEvent,t.currentTarget)&&Go(t.currentTarget,Qo(t.nativeEvent))){var r;si(Qo(t.nativeEvent),t.key)&&t.preventDefault();let o=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=y(t,"keyboard");let r=t.currentTarget,i=t=>{ni(t,r)&&!t.repeat&&Go(r,Qo(t))&&e.target&&w(ii(e.target,t),"keyboard")};h(Io(t.currentTarget),"keyup",Nr(i,n),!0)}o&&t.stopPropagation(),t.metaKey&&fo()&&(null===(r=e.metaKeyEvents)||void 0===r||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||Go(t.currentTarget,Qo(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!Xo.isOpening){let n=!0;if(s&&t.preventDefault(),e.ignoreEmulatedMouseEvents||e.isPressed||"virtual"!==e.pointerType&&!$o(t.nativeEvent)){if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual";n=I(ii(t.currentTarget,t),r,!0),e.isOverTarget=!1,E(t)}}else{let e=y(t,"virtual"),r=w(t,"virtual"),o=I(t,"virtual");n=e&&r&&o}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n;if(e.isPressed&&e.target&&ni(t,e.target)){var r;si(Qo(t),t.key)&&t.preventDefault();let n=Qo(t);I(ii(e.target,t),"keyboard",Go(e.target,Qo(t))),b(),"Enter"!==t.key&&ti(e.target)&&Go(e.target,n)&&!t[ei]&&(t[ei]=!0,Xo(e.target,t,!1)),e.isPressed=!1,null===(r=e.metaKeyEvents)||void 0===r||r.delete(t.key)}else if("Meta"===t.key&&(null===(n=e.metaKeyEvents)||void 0===n?void 0:n.size)){var o;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())null===(o=e.target)||void 0===o||o.dispatchEvent(new KeyboardEvent("keyup",n))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{if(0!==t.button||!Go(t.currentTarget,Qo(t.nativeEvent)))return;if(o=t.nativeEvent,!bo()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType)return void(e.pointerType="virtual");var o;e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||xo(e.target),i=y(t,e.pointerType);let o=Qo(t.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(t.pointerId),h(Io(t.currentTarget),"pointerup",n,!1),h(Io(t.currentTarget),"pointercancel",r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(Go(t.currentTarget,Qo(t.nativeEvent))&&0===t.button){if(u){let n=Bo(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{Go(t.currentTarget,Qo(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&w(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,y(ii(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,I(ii(e.target,t),e.pointerType,!1),M(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(Go(e.target,Qo(t))&&null!=e.pointerType){let n=!1,r=setTimeout((()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?E(t):(zo(e.target),e.target.click()))}),80);h(t.currentTarget,"click",(()=>n=!0),!0),e.disposables.push((()=>clearTimeout(r)))}else E(t);e.isOverTarget=!1}},r=e=>{E(e)};t.onDragStart=e=>{Go(e.currentTarget,Qo(e.nativeEvent))&&E(e)}}else{t.onMouseDown=t=>{if(0===t.button&&Go(t.currentTarget,Qo(t.nativeEvent)))if(e.ignoreEmulatedMouseEvents)t.stopPropagation();else{if(e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=$o(t.nativeEvent)?"virtual":"mouse",(0,Xe.flushSync)((()=>y(t,e.pointerType)))&&t.stopPropagation(),u){let n=Bo(t.target);n&&e.disposables.push(n)}h(Io(t.currentTarget),"mouseup",n,!1)}},t.onMouseEnter=t=>{if(!Go(t.currentTarget,Qo(t.nativeEvent)))return;let n=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!0,n=y(t,e.pointerType)),n&&t.stopPropagation()},t.onMouseLeave=t=>{if(!Go(t.currentTarget,Qo(t.nativeEvent)))return;let n=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!1,n=I(t,e.pointerType,!1),M(t)),n&&t.stopPropagation()},t.onMouseUp=t=>{Go(t.currentTarget,Qo(t.nativeEvent))&&(e.ignoreEmulatedMouseEvents||0!==t.button||w(t,e.pointerType||"mouse"))};let n=t=>{0===t.button&&(e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:(e.target&&e.target.contains(t.target)&&null!=e.pointerType||E(t),e.isOverTarget=!1))};t.onTouchStart=t=>{if(!Go(t.currentTarget,Qo(t.nativeEvent)))return;let n=function(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}(t.nativeEvent);n&&(e.activePointerId=n.identifier,e.ignoreEmulatedMouseEvents=!0,e.isOverTarget=!0,e.isPressed=!0,e.target=t.currentTarget,e.pointerType="touch",d||xo(e.target),y(oi(e.target,t),e.pointerType)&&t.stopPropagation(),h(wo(t.currentTarget),"scroll",r,!0))},t.onTouchMove=t=>{if(!Go(t.currentTarget,Qo(t.nativeEvent)))return;if(!e.isPressed)return void t.stopPropagation();let n=ri(t.nativeEvent,e.activePointerId),r=!0;n&&ai(n,t.currentTarget)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,r=y(oi(e.target,t),e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,r=I(oi(e.target,t),e.pointerType,!1),M(oi(e.target,t))),r&&t.stopPropagation()},t.onTouchEnd=t=>{if(!Go(t.currentTarget,Qo(t.nativeEvent)))return;if(!e.isPressed)return void t.stopPropagation();let n=ri(t.nativeEvent,e.activePointerId),r=!0;n&&ai(n,t.currentTarget)&&null!=e.pointerType?(w(oi(e.target,t),e.pointerType),r=I(oi(e.target,t),e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(r=I(oi(e.target,t),e.pointerType,!1)),r&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!d&&Oo(e.target),b()},t.onTouchCancel=t=>{Go(t.currentTarget,Qo(t.nativeEvent))&&(t.stopPropagation(),e.isPressed&&E(oi(e.target,t)))};let r=t=>{e.isPressed&&Go(Qo(t),e.target)&&E({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{Go(e.currentTarget,Qo(e.nativeEvent))&&E(e)}}return t}),[h,s,u,b,d,E,M,I,y,w]);return(0,r.useEffect)((()=>{let e=v.current;return()=>{var t;d||Oo(null!==(t=e.target)&&void 0!==t?t:void 0);for(let t of e.disposables)t();e.disposables=[]}}),[d]),{isPressed:l||g,pressProps:Qr(p,C)}}({onPressStart:s,onPressEnd:l,onPressChange:c,onPress:a,onPressUp:u,isDisabled:i,preventFocusOnPress:d,ref:t}),{focusableProps:I}=Ai(e,t);f&&(I.tabIndex=i?-1:I.tabIndex);let w=Qr(I,b,so(e,{labelable:!0}));return{isPressed:y,buttonProps:Qr(n,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],onClick:e=>{p&&(p(e),console.warn("onClick is deprecated, please use onPress"))}})}}function Di(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:o,onFocusWithinChange:i}=e,a=(0,r.useRef)({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:l}=Uo(),u=(0,r.useCallback)((e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,l(),n&&n(e),i&&i(!1))}),[n,i,a,l]),c=Ho(u),d=(0,r.useCallback)((e=>{if(!e.currentTarget.contains(e.target))return;const t=Io(e.target),n=Ko(t);if(!a.current.isFocusWithin&&n===Qo(e.nativeEvent)){o&&o(e),i&&i(!0),a.current.isFocusWithin=!0,c(e);let n=e.currentTarget;s(t,"focus",(e=>{if(a.current.isFocusWithin&&!Go(n,e.target)){let r=new Vo("blur",new t.defaultView.FocusEvent("blur",{relatedTarget:e.target}));r.target=n,r.currentTarget=n,u(r)}}),{capture:!0})}}),[o,i,c,s,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:u}}}function ji(e={}){let{autoFocus:t=!1,isTextInput:n,within:o}=e,i=(0,r.useRef)({isFocused:!1,isFocusVisible:t||Ci()}),[a,s]=(0,r.useState)(!1),[l,u]=(0,r.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),c=(0,r.useCallback)((()=>u(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,r.useCallback)((e=>{i.current.isFocused=e,s(e),c()}),[c]);!function(e,t,n){Ei(),(0,r.useEffect)((()=>{let t=(t,r)=>{(function(e,t,n){let r=Io(null==n?void 0:n.target);const o="undefined"!=typeof window?wo(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?wo(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?wo(null==n?void 0:n.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?wo(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof o&&!Li.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof a&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof s&&!mi[n.key])})(!!(null==n?void 0:n.isTextInput),t,r)&&e(Ci())};return di.add(t),()=>{di.delete(t)}}),t)}((e=>{i.current.isFocusVisible=e,c()}),[],{isTextInput:n});let{focusProps:f}=Ni({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=Di({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?p:f}}let ki=!1,Ri=0;function zi(){ki=!0,setTimeout((()=>{ki=!1}),50)}function Fi(e){"touch"===e.pointerType&&zi()}function Vi(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",Fi):document.addEventListener("touchend",zi),Ri++,()=>{Ri--,Ri>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",Fi):document.removeEventListener("touchend",zi))}}if("undefined"!=typeof HTMLTemplateElement){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const Hi=(0,r.createContext)(!1),Wi=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Bi=(0,r.createContext)({}),_i=function(e){let t=(t,n)=>(0,r.useContext)(Hi)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,r.forwardRef)(t)}((function(e,t){[e,t]=qr(e,t,Bi);let n=e=function(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}(e),{isPending:o}=n,{buttonProps:i,isPressed:a}=Pi(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=ji(e),{hoverProps:c,isHovered:d}=function(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:o,isDisabled:i}=e,[a,s]=(0,r.useState)(!1),l=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(Vi,[]);let{addGlobalListener:u,removeAllGlobalListeners:c}=Uo(),{hoverProps:d,triggerHoverEnd:f}=(0,r.useMemo)((()=>{let e=(e,o)=>{if(l.pointerType=o,i||"touch"===o||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let a=e.currentTarget;l.target=a,u(Io(e.target),"pointerover",(e=>{l.isHovered&&l.target&&!Go(l.target,e.target)&&r(e,e.pointerType)}),{capture:!0}),t&&t({type:"hoverstart",target:a,pointerType:o}),n&&n(!0),s(!0)},r=(e,t)=>{let r=l.target;l.pointerType="",l.target=null,"touch"!==t&&l.isHovered&&r&&(l.isHovered=!1,c(),o&&o({type:"hoverend",target:r,pointerType:t}),n&&n(!1),s(!1))},a={};return"undefined"!=typeof PointerEvent?(a.onPointerEnter=t=>{ki&&"mouse"===t.pointerType||e(t,t.pointerType)},a.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,e.pointerType)}):(a.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},a.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||ki||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},a.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,"mouse")}),{hoverProps:a,triggerHoverEnd:r}}),[t,n,o,i,l,u,c]);return(0,r.useEffect)((()=>{i&&f({currentTarget:l.target},l.pointerType)}),[i]),{hoverProps:d,isHovered:a}}({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=Jr({...e,values:f,defaultClassName:"react-aria-Button"}),g=Yr(i.id),m=Yr(),v=i["aria-labelledby"];o&&(v?v=`${v} ${m}`:i["aria-label"]&&(v=`${g} ${m}`));let h=(0,r.useRef)(o);return(0,r.useEffect)((()=>{let e={"aria-labelledby":v||g};(!h.current&&l&&o||h.current&&l&&!o)&&function(e,t="assertive",n=7e3){to?to.announce(e,t,n):(to=new no,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?to.announce(e,t,n):setTimeout((()=>{(null==to?void 0:to.isAttached())&&(null==to||to.announce(e,t,n))}),100))}(e,"assertive"),h.current=o}),[o,l,v,g]),r.createElement("button",{...so(e,{propNames:Wi}),...Qr(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:g,ref:t,"aria-labelledby":v,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},r.createElement(eo.Provider,{value:{id:m}},p.children))}));(0,r.createContext)(null),(0,r.createContext)(null),(0,r.createContext)(null),(0,r.createContext)(null),(0,r.createContext)(null);const Yi=(0,r.createContext)({}),Zi=(0,r.createContext)({});function Ui({children:e}){let t=(0,r.useMemo)((()=>({register:()=>{}})),[]);return r.createElement(Ao.Provider,{value:t},e)}function Gi(e,t){return"#comment"!==e.nodeName&&function(e){const t=wo(e);if(!(e instanceof t.HTMLElement||e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o="none"!==n&&"hidden"!==r&&"collapse"!==r;if(o){const{getComputedStyle:t}=e.ownerDocument.defaultView;let{display:n,visibility:r}=t(e);o="none"!==n&&"hidden"!==r&&"collapse"!==r}return o}(e)&&function(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))}(e,t)&&(!e.parentElement||Gi(e.parentElement,e))}const Ki=r.createContext(null),Qi="react-aria-focus-scope-restore";let Xi=null;function $i(e){let{children:t,contain:n,restoreFocus:o,autoFocus:i}=e,a=(0,r.useRef)(null),s=(0,r.useRef)(null),l=(0,r.useRef)([]),{parentNode:u}=(0,r.useContext)(Ki)||{},c=(0,r.useMemo)((()=>new da({scopeRef:l})),[l]);xr((()=>{let e=u||fa.root;if(fa.getTreeNode(e.scopeRef)&&Xi&&!ra(Xi,e.scopeRef)){let t=fa.getTreeNode(Xi);t&&(e=t)}e.addChild(c),fa.addNode(c)}),[c,u]),xr((()=>{let e=fa.getTreeNode(l);e&&(e.contain=!!n)}),[n]),xr((()=>{var e;let t=null===(e=a.current)||void 0===e?void 0:e.nextSibling,n=[],r=e=>e.stopPropagation();for(;t&&t!==s.current;)n.push(t),t.addEventListener(Qi,r),t=t.nextSibling;return l.current=n,()=>{for(let e of n)e.removeEventListener(Qi,r)}}),[t]),function(e,t,n){xr((()=>{if(t||n)return;let r=e.current;const o=Io(r?r[0]:void 0);let i=t=>{let n=Qo(t);ta(n,e.current)?Xi=e:ea(n)||(Xi=null)};return o.addEventListener("focusin",i,!1),null==r||r.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{o.removeEventListener("focusin",i,!1),null==r||r.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,t,n])}(l,o,n),function(e,t){let n=(0,r.useRef)(void 0),o=(0,r.useRef)(void 0);xr((()=>{let r=e.current;if(!t)return void(o.current&&(cancelAnimationFrame(o.current),o.current=void 0));const i=Io(r?r[0]:void 0);let a=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!qi(e)||t.isComposing)return;let n=Ko(i),r=e.current;if(!r||!ta(n,r))return;let o=ua(Ji(r),{tabbable:!0},r);if(!n)return;o.currentNode=n;let a=t.shiftKey?o.previousNode():o.nextNode();a||(o.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,a=t.shiftKey?o.previousNode():o.nextNode()),t.preventDefault(),a&&oa(a,!0)},s=t=>{Xi&&!ra(Xi,e)||!ta(Qo(t),e.current)?qi(e)&&!na(Qo(t),e)?n.current?n.current.focus():Xi&&Xi.current&&aa(Xi.current):qi(e)&&(n.current=Qo(t)):(Xi=e,n.current=Qo(t))},l=t=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame((()=>{let r=Ti(),o=("virtual"===r||null===r)&&bo()&&ho(),a=Ko(i);if(!o&&a&&qi(e)&&!na(a,e)){Xi=e;let r=Qo(t);var s;r&&r.isConnected?(n.current=r,null===(s=n.current)||void 0===s||s.focus()):Xi.current&&aa(Xi.current)}}))};return i.addEventListener("keydown",a,!1),i.addEventListener("focusin",s,!1),null==r||r.forEach((e=>e.addEventListener("focusin",s,!1))),null==r||r.forEach((e=>e.addEventListener("focusout",l,!1))),()=>{i.removeEventListener("keydown",a,!1),i.removeEventListener("focusin",s,!1),null==r||r.forEach((e=>e.removeEventListener("focusin",s,!1))),null==r||r.forEach((e=>e.removeEventListener("focusout",l,!1)))}}),[e,t]),xr((()=>()=>{o.current&&cancelAnimationFrame(o.current)}),[o])}(l,n),function(e,t,n){const o=(0,r.useRef)("undefined"!=typeof document?Ko(Io(e.current?e.current[0]:void 0)):null);xr((()=>{let r=e.current;const o=Io(r?r[0]:void 0);if(!t||n)return;let i=()=>{Xi&&!ra(Xi,e)||!ta(Ko(o),e.current)||(Xi=e)};return o.addEventListener("focusin",i,!1),null==r||r.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{o.removeEventListener("focusin",i,!1),null==r||r.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,n]),xr((()=>{const r=Io(e.current?e.current[0]:void 0);if(!t)return;let o=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!qi(e)||t.isComposing)return;let n=r.activeElement;if(!na(n,e)||!sa(e))return;let o=fa.getTreeNode(e);if(!o)return;let i=o.nodeToRestore,a=ua(r.body,{tabbable:!0});a.currentNode=n;let s=t.shiftKey?a.previousNode():a.nextNode();if(i&&i.isConnected&&i!==r.body||(i=void 0,o.nodeToRestore=void 0),(!s||!na(s,e))&&i){a.currentNode=i;do{s=t.shiftKey?a.previousNode():a.nextNode()}while(na(s,e));t.preventDefault(),t.stopPropagation(),s?oa(s,!0):ea(i)?oa(i,!0):n.blur()}};return n||r.addEventListener("keydown",o,!0),()=>{n||r.removeEventListener("keydown",o,!0)}}),[e,t,n]),xr((()=>{const n=Io(e.current?e.current[0]:void 0);if(!t)return;let r=fa.getTreeNode(e);var i;return r?(r.nodeToRestore=null!==(i=o.current)&&void 0!==i?i:void 0,()=>{let r=fa.getTreeNode(e);if(!r)return;let o=r.nodeToRestore,i=Ko(n);if(t&&o&&(i&&na(i,e)||i===n.body&&sa(e))){let t=fa.clone();requestAnimationFrame((()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected)return void la(n.nodeToRestore);n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&fa.getTreeNode(n.scopeRef))return void la(ia(n.scopeRef.current,!0));n=n.parent}}}))}}):void 0}),[e,t])}(l,o,n),function(e,t){const n=r.useRef(t);(0,r.useEffect)((()=>{if(n.current){Xi=e;const t=Io(e.current?e.current[0]:void 0);!ta(Ko(t),Xi.current)&&e.current&&aa(e.current)}n.current=!1}),[e])}(l,i),(0,r.useEffect)((()=>{const e=Ko(Io(l.current?l.current[0]:void 0));let t=null;if(ta(e,l.current)){for(let n of fa.traverse())n.scopeRef&&ta(e,n.scopeRef.current)&&(t=n);t===fa.getTreeNode(l)&&(Xi=t.scopeRef)}}),[l]),xr((()=>()=>{var e,t,n;let r=null!==(n=null===(t=fa.getTreeNode(l))||void 0===t||null===(e=t.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==n?n:null;l!==Xi&&!ra(l,Xi)||r&&!fa.getTreeNode(r)||(Xi=r),fa.removeTreeNode(l)}),[l]);let d=(0,r.useMemo)((()=>function(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t;var s;let l=r||Ko(Io(null!==(s=n[0])&&void 0!==s?s:void 0)),u=n[0].previousElementSibling,c=ua(Ji(n),{tabbable:o,accept:a},n);c.currentNode=ta(l,n)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&oa(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:a}=t;var s;let l=r||Ko(Io(null!==(s=n[0])&&void 0!==s?s:void 0)),u=n[n.length-1].nextElementSibling,c=ua(Ji(n),{tabbable:o,accept:a},n);c.currentNode=ta(l,n)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&oa(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=ua(Ji(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();return a&&oa(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=ua(Ji(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();return a&&oa(a,!0),a}}}(l)),[]),f=(0,r.useMemo)((()=>({focusManager:d,parentNode:c})),[c,d]);return r.createElement(Ki.Provider,{value:f},r.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,r.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function Ji(e){return e[0].parentElement}function qi(e){let t=fa.getTreeNode(Xi);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function ea(e){return na(e)}function ta(e,t){return!!e&&!!t&&t.some((t=>t.contains(e)))}function na(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of fa.traverse(fa.getTreeNode(t)))if(n&&ta(e,n.current))return!0;return!1}function ra(e,t){var n;let r=null===(n=fa.getTreeNode(t))||void 0===n?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function oa(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{Si(e)}catch{}}function ia(e,t=!0){let n=e[0].previousElementSibling,r=Ji(e),o=ua(r,{tabbable:t},e);o.currentNode=n;let i=o.nextNode();return t&&!i&&(r=Ji(e),o=ua(r,{tabbable:!1},e),o.currentNode=n,i=o.nextNode()),i}function aa(e,t=!0){oa(ia(e,t))}function sa(e){let t=fa.getTreeNode(Xi);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function la(e){e.dispatchEvent(new CustomEvent(Qi,{bubbles:!0,cancelable:!0}))&&oa(e)}function ua(e,t,n){let r=(null==t?void 0:t.tabbable)?Ro:ko,o=(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,i=Io(o),a=function(e,t,n,r){return e.createTreeWalker(t,n,r)}(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var o;return(null==t||null===(o=t.from)||void 0===o?void 0:o.contains(e))?NodeFilter.FILTER_REJECT:!r(e)||!Gi(e)||n&&!ta(e,n)||(null==t?void 0:t.accept)&&!t.accept(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}});return(null==t?void 0:t.from)&&(a.currentNode=t.from),a}class ca{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!=t?t:null);if(!r)return;let o=new da({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&ta(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach((e=>n&&n.addChild(e)))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e;let t=new ca;var n;for(let r of this.traverse())t.addTreeNode(r.scopeRef,null!==(n=null===(e=r.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==n?n:null,r.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new da({scopeRef:null}),this.fastMap.set(null,this.root)}}class da{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let fa=new ca;const pa=r.createContext(null);function ga(e){let t=Hr(),{portalContainer:n=(t?null:document.body),isExiting:o}=e,[i,a]=(0,r.useState)(!1),s=(0,r.useMemo)((()=>({contain:i,setContain:a})),[i,a]),{getContainer:l}=null!==(u=(0,r.useContext)(Zi))&&void 0!==u?u:{};var u;if(!e.portalContainer&&l&&(n=l()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=r.createElement($i,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!o},c)),c=r.createElement(pa.Provider,{value:s},r.createElement(Ui,null,c)),Xe.createPortal(c,n)}function ma(){let e=(0,r.useContext)(pa),t=null==e?void 0:e.setContain;xr((()=>{null==t||t(!0)}),[t])}const va=(0,r.createContext)(null),ha=(0,r.createContext)(null),ba=(0,r.forwardRef)((function(e,t){let n=e["aria-labelledby"];[e,t]=qr(e,t,va);let{dialogProps:o,titleProps:i}=function(e,t){let{role:n="dialog"}=e,o=Ur();o=e["aria-label"]?void 0:o;let i=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t.current&&!t.current.contains(document.activeElement)){Si(t.current);let e=setTimeout((()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),Si(t.current)),i.current=!1)}),500);return()=>{clearTimeout(e)}}}),[t]),ma(),{dialogProps:{...so(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||o,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:o}}}({...e,"aria-labelledby":n},t),a=(0,r.useContext)(ha);o["aria-label"]||o["aria-labelledby"]||(e["aria-labelledby"]?o["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let s=Jr({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return r.createElement("section",{...so(e),...o,...s,ref:t,slot:e.slot||void 0},r.createElement($r,{values:[[Yi,{slots:{[Xr]:{},title:{...i,level:2}}}],[Bi,{slots:{[Xr]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},s.children))}));let ya=new WeakMap,Ia=[];function wa(e,t){if(e.button>0)return!1;if(e.target){const t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target))return!1;if(e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}const Ea=[];function Ma(e,t){let{onClose:n,shouldCloseOnBlur:o,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:l}=e;(0,r.useEffect)((()=>{if(i&&!Ea.includes(t))return Ea.push(t),()=>{let e=Ea.indexOf(t);e>=0&&Ea.splice(e,1)}}),[i,t]);let u=()=>{Ea[Ea.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:o,onInteractOutsideStart:i}=e,a=(0,r.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),s=Or((e=>{n&&wa(e,t)&&(i&&i(e),a.current.isPointerDown=!0)})),l=Or((e=>{n&&n(e)}));(0,r.useEffect)((()=>{let e=a.current;if(o)return;const n=t.current,r=Io(n);if("undefined"!=typeof PointerEvent){let n=n=>{e.isPointerDown&&wa(n,t)&&l(n),e.isPointerDown=!1};return r.addEventListener("pointerdown",s,!0),r.addEventListener("pointerup",n,!0),()=>{r.removeEventListener("pointerdown",s,!0),r.removeEventListener("pointerup",n,!0)}}{let n=n=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:e.isPointerDown&&wa(n,t)&&l(n),e.isPointerDown=!1},o=n=>{e.ignoreEmulatedMouseEvents=!0,e.isPointerDown&&wa(n,t)&&l(n),e.isPointerDown=!1};return r.addEventListener("mousedown",s,!0),r.addEventListener("mouseup",n,!0),r.addEventListener("touchstart",s,!0),r.addEventListener("touchend",o,!0),()=>{r.removeEventListener("mousedown",s,!0),r.removeEventListener("mouseup",n,!0),r.removeEventListener("touchstart",s,!0),r.removeEventListener("touchend",o,!0)}}}),[t,o,s,l])}({ref:t,onInteractOutside:a&&i?e=>{l&&!l(e.target)||(Ea[Ea.length-1]===t&&(e.stopPropagation(),e.preventDefault()),u())}:void 0,onInteractOutsideStart:e=>{l&&!l(e.target)||Ea[Ea.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=Di({isDisabled:!o,onBlurWithin:e=>{e.relatedTarget&&!na(e.relatedTarget,Xi)&&(l&&!l(e.relatedTarget)||null==n||n())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||s||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}function Ca(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Ta(e,t){let n=e;for(Ca(n,t)&&(n=n.parentElement);n&&!Ca(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}const La="undefined"!=typeof document&&window.visualViewport,Sa=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Na,xa=0;function Oa(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Aa(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Pa(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=Ta(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,r=n.getBoundingClientRect().top;r>t+n.clientHeight&&(e.scrollTop+=r-t)}n=e.parentElement}}function Da(e,t,n){let{overlayProps:o,underlayProps:i}=Ma({...e,isOpen:t.isOpen,onClose:t.close},n);return function(e={}){let{isDisabled:t}=e;xr((()=>{if(!t)return xa++,1===xa&&(Na=mo()?function(){let e,t,n=null,r=()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=Nr(Aa(window,"scroll",(()=>{window.scrollTo(0,0)})),Oa(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),Oa(document.documentElement,"overflow","hidden"),Oa(document.body,"marginTop",`-${t}px`),(()=>{window.scrollTo(e,t)})),window.scrollTo(0,0)},o=Nr(Aa(document,"touchstart",(n=>{e=Ta(n.target,!0),e===document.documentElement&&e===document.body||e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=Oa(e,"overscrollBehavior","contain"))}),{passive:!1,capture:!0}),Aa(document,"touchmove",(t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()}),{passive:!1,capture:!0}),Aa(document,"touchend",(()=>{t&&t()}),{passive:!1,capture:!0}),Aa(document,"focus",(e=>{let t=e.target;(function(e){return e instanceof HTMLInputElement&&!Sa.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable})(t)&&(r(),t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",La&&(La.height<window.innerHeight?requestAnimationFrame((()=>{Pa(t)})):La.addEventListener("resize",(()=>Pa(t)),{once:!0}))})))}),!0));return()=>{null==t||t(),null==n||n(),o()}}():Nr(Oa(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),Oa(document.documentElement,"overflow","hidden"))),()=>{xa--,0===xa&&Na()}}),[t])}({isDisabled:!t.isOpen}),ma(),(0,r.useEffect)((()=>{if(t.isOpen&&n.current)return function(e,t=document.body){let n=new Set(e),r=new Set,o=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(t);let t=e=>{if(n.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of n)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),a=t(e);if(a===NodeFilter.FILTER_ACCEPT&&i(e),a!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)i(e),e=o.nextNode()}},i=e=>{var t;let n=null!==(t=ya.get(e))&&void 0!==t?t:0;"true"===e.getAttribute("aria-hidden")&&0===n||(0===n&&e.setAttribute("aria-hidden","true"),r.add(e),ya.set(e,n+1))};Ia.length&&Ia[Ia.length-1].disconnect(),o(t);let a=new MutationObserver((e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...n,...r].some((e=>e.contains(t.target)))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(let e of t.addedNodes)!(e instanceof HTMLElement||e instanceof SVGElement)||"true"!==e.dataset.liveAnnouncer&&"true"!==e.dataset.reactAriaTopLayer?e instanceof Element&&o(e):n.add(e)}}));a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ia.push(s),()=>{a.disconnect();for(let e of r){let t=ya.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),ya.delete(e)):ya.set(e,t-1))}s===Ia[Ia.length-1]?(Ia.pop(),Ia.length&&Ia[Ia.length-1].observe()):Ia.splice(Ia.indexOf(s),1)}}([n.current])}),[t.isOpen,n]),{modalProps:Qr(o),underlayProps:i}}var ja;ja={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schließen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"Lõpeta"},"fi-FI":{dismiss:"Hylkää"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutasítás"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};const ka=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Ra=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function za(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return ka.has(t.script)}let t=e.split("-")[0];return Ra.has(t)}const Fa=Symbol.for("react-aria.i18n.locale");function Va(){let e="undefined"!=typeof window&&window[Fa]||"undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:za(e)?"rtl":"ltr"}}let Ha=Va(),Wa=new Set;function Ba(){Ha=Va();for(let e of Wa)e(Ha)}const _a=r.createContext(null);function Ya(){let e=function(){let e=Hr(),[t,n]=(0,r.useState)(Ha);return(0,r.useEffect)((()=>(0===Wa.size&&window.addEventListener("languagechange",Ba),Wa.add(n),()=>{Wa.delete(n),0===Wa.size&&window.removeEventListener("languagechange",Ba)})),[]),e?{locale:"en-US",direction:"ltr"}:t}();return(0,r.useContext)(_a)||e}const Za=Symbol.for("react-aria.i18n.locale"),Ua=Symbol.for("react-aria.i18n.strings");let Ga;class Ka{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw new Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){if(t[e])return t[e];let r=function(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("undefined"==typeof window)return null;let t=window[Za];if(void 0===Ga){let e=window[Ua];if(!e)return null;Ga={};for(let n in e)Ga[n]=new Ka({[t]:e[n]},t)}let n=null==Ga?void 0:Ga[e];if(!n)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter((([,e])=>e))),this.defaultLocale=t}}const Qa=new Map,Xa=new Map;class $a{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+n,i=Qa.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:n}),Qa.set(o,i)),r=t[i.select(e)]||t.other,"function"==typeof r?r():r}number(e){let t=Xa.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Xa.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}const Ja=new WeakMap;function qa(e,t){let{locale:n}=Ya(),o=function(e,t){return t&&Ka.getGlobalDictionaryForPackage(t)||function(e){let t=Ja.get(e);return t||(t=new Ka(e),Ja.set(e,t)),t}(e)}(e,t);return(0,r.useMemo)((()=>new $a(n,o)),[n,o])}const es={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function ts(e){let{children:t,elementType:n="div",isFocusable:o,style:i,...a}=e,{visuallyHiddenProps:s}=function(e={}){let{style:t,isFocusable:n}=e,[o,i]=(0,r.useState)(!1),{focusWithinProps:a}=Di({isDisabled:!n,onFocusWithinChange:e=>i(e)});return{visuallyHiddenProps:{...a,style:(0,r.useMemo)((()=>o?t:t?{...es,...t}:es),[o])}}}(e);return r.createElement(n,Qr(a,s),t)}function ns(e){let{onDismiss:t,...n}=e;var o;let i=function(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;if(n=Yr(n),o&&r){let e=new Set([n,...o.trim().split(/\s+/)]);o=[...e].join(" ")}else o&&(o=o.trim().split(/\s+/).join(" "));return r||o||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}(n,qa((o=ja)&&o.__esModule?o.default:o,"@react-aria/overlays").format("dismiss"));return r.createElement(ts,null,r.createElement("button",{...i,tabIndex:-1,onClick:()=>{t&&t()},style:{width:1,height:1}}))}function rs(e,t=!0){let[n,o]=(0,r.useState)(!0),i=n&&t;return xr((()=>{if(i&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()}),[e,i]),is(e,i,(0,r.useCallback)((()=>o(!1)),[])),i}function os(e,t){let[n,o]=(0,r.useState)(t?"open":"closed");switch(n){case"open":t||o("exiting");break;case"closed":case"exiting":t&&o("open")}let i="exiting"===n;return is(e,i,(0,r.useCallback)((()=>{o((e=>"exiting"===e?"closed":e))}),[])),i}function is(e,t,n){xr((()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.all(t.map((e=>e.finished))).then((()=>{r||(0,Xe.flushSync)((()=>{n()}))})).catch((()=>{})),()=>{r=!0}}}),[e,t,n])}let as="undefined"!=typeof document&&window.visualViewport;function ss(){return{width:as&&(null==as?void 0:as.width)||window.innerWidth,height:as&&(null==as?void 0:as.height)||window.innerHeight}}function ls(e){let[t,n]=function(e,t,n){let[o,i]=(0,r.useState)(e||t),a=(0,r.useRef)(void 0!==e),s=void 0!==e;(0,r.useEffect)((()=>{let e=a.current;e!==s&&console.warn(`WARN: A component changed from ${e?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s}),[s]);let l=s?e:o,u=(0,r.useCallback)(((e,...t)=>{let r=(e,...t)=>{n&&(Object.is(l,e)||n(e,...t)),s||(l=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i(((n,...o)=>{let i=e(s?l:n,...o);return r(i,...t),s?n:i}))):(s||i(e),r(e,...t))}),[s,l,n]);return[l,u]}(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const o=(0,r.useCallback)((()=>{n(!0)}),[n]),i=(0,r.useCallback)((()=>{n(!1)}),[n]),a=(0,r.useCallback)((()=>{n(!t)}),[n,t]);return{isOpen:t,setOpen:n,open:o,close:i,toggle:a}}const us=(0,r.createContext)(null),cs=(0,r.createContext)(null),ds=(0,r.forwardRef)((function(e,t){if((0,r.useContext)(cs))return r.createElement(ms,{...e,modalRef:t},e.children);let{isDismissable:n,isKeyboardDismissDisabled:o,isOpen:i,defaultOpen:a,onOpenChange:s,children:l,isEntering:u,isExiting:c,UNSTABLE_portalContainer:d,shouldCloseOnInteractOutside:f,...p}=e;return r.createElement(ps,{isDismissable:n,isKeyboardDismissDisabled:o,isOpen:i,defaultOpen:a,onOpenChange:s,isEntering:u,isExiting:c,UNSTABLE_portalContainer:d,shouldCloseOnInteractOutside:f},r.createElement(ms,{...p,modalRef:t},l))}));function fs(e,t){[e,t]=qr(e,t,us);let n=(0,r.useContext)(ha),o=ls(e),i=null==e.isOpen&&null==e.defaultOpen&&n?n:o,a=Lr(t),s=(0,r.useRef)(null),l=os(a,i.isOpen),u=os(s,i.isOpen),c=l||u||e.isExiting||!1,d=Hr();return!i.isOpen&&!c||d?null:r.createElement(gs,{...e,state:i,isExiting:c,overlayRef:a,modalRef:s})}const ps=(0,r.forwardRef)(fs);function gs({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:o}=t,{modalProps:i,underlayProps:a}=Da(t,o,n),s=rs(t.overlayRef)||t.isEntering||!1,l=Jr({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:s,isExiting:t.isExiting,state:o}}),u=function(){let e=Hr(),[t,n]=(0,r.useState)((()=>e?{width:0,height:0}:ss()));return(0,r.useEffect)((()=>{let e=()=>{n((e=>{let t=ss();return t.width===e.width&&t.height===e.height?e:t}))};return as?as.addEventListener("resize",e):window.addEventListener("resize",e),()=>{as?as.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),t}(),c={...l.style,"--visual-viewport-height":u.height+"px"};return r.createElement(ga,{isExiting:t.isExiting,portalContainer:e},r.createElement("div",{...Qr(so(t),a),...l,style:c,ref:t.overlayRef,"data-entering":s||void 0,"data-exiting":t.isExiting||void 0},r.createElement($r,{values:[[cs,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[ha,o]]},l.children)))}function ms(e){let{modalProps:t,modalRef:n,isExiting:o,isDismissable:i}=(0,r.useContext)(cs),a=(0,r.useContext)(ha),s=Lr((0,r.useMemo)((()=>Sr(e.modalRef,n)),[e.modalRef,n])),l=rs(s),u=Jr({...e,defaultClassName:"react-aria-Modal",values:{isEntering:l,isExiting:o,state:a}});return r.createElement("div",{...Qr(so(e),t),...u,ref:s,"data-entering":l||void 0,"data-exiting":o||void 0},i&&r.createElement(ns,{onDismiss:a.close}),u.children)}function vs(){return(0,r.createElement)(pr.SVG,{className:"givewp-donation-form-modal__close__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,r.createElement)(pr.Path,{stroke:"black",strokeWidth:"2",d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))}function hs({dataSrc:e,embedId:t,openFormButton:n,isFormRedirect:o,formViewUrl:i}){const[a,s]=(0,Tr.useState)(e),[l,c]=(0,Tr.useState)(o),[d,f]=(0,Tr.useState)(!1),[p,g]=(0,Tr.useState)(!1);(0,Tr.useEffect)((()=>{const e=`link[rel="preload"][href="${a}"][as="document"]`;if(!document.querySelector(e)){const e=document.createElement("link");e.rel="preload",e.href=a,e.as="document",document.head.appendChild(e)}return()=>{const t=document.querySelector(e);t&&document.head.removeChild(t)}}),[a]),(0,Tr.useEffect)((()=>{p&&!d&&v()}),[p,d]);const m=()=>{!l&&o&&s(i)},v=()=>{setTimeout((()=>{g(!1)}),2e3)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(_i,{type:"button",className:"givewp-donation-form-modal__open",onPress:()=>{g(!0),c(!0),f(!0),m()},isPending:d,"aria-label":d?(0,u.__)("Loading donation form","give"):(0,u.__)("Open donation form","give")},d&&(0,r.createElement)("span",{className:"givewp-donation-form-modal__open__spinner"},(0,r.createElement)(pr.Spinner,{style:{margin:"0 auto",verticalAlign:"middle"},"aria-label":(0,u.__)("In progress","give")})),(0,r.createElement)("span",{style:{margin:"0",visibility:d?"hidden":"visible"},"aria-hidden":d},n)),(0,r.createElement)(ps,{className:"givewp-donation-form-modal__overlay","data-loading":d,isOpen:l,onOpenChange:c,isDismissable:!0,isEntering:p},(0,r.createElement)("button",{"aria-label":(0,u.__)("Close donation form","give"),"aria-hidden":"false",type:"button",className:"givewp-donation-form-modal__close",onClick:()=>{c(!1),f(!1),m()}},(0,r.createElement)(vs,null)),(0,r.createElement)(ds,{className:"givewp-donation-form-modal"},(0,r.createElement)(ba,{className:"givewp-donation-form-modal__dialog","aria-label":(0,u.__)("Donation Form","give")},(0,r.createElement)("div",{className:"givewp-donation-form-modal__dialog__content"},(0,r.createElement)(Cr,{title:(0,u.__)("Donation Form","give"),id:t,src:a,checkOrigin:!1,heightCalculationMethod:"taggedElement",style:{minWidth:"100%",border:"none"},onInit:e=>{e.iFrameResizer.resize(),f(!1)}}))))))}function bs({clientId:e,formId:t,formFormat:n,openFormButton:o,link:i}){const a=(0,l.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),s=a?.clientId===e?"auto":"none",c="modal"===n||"reveal"===n;return"newTab"===n?(0,r.createElement)("a",{className:"givewp-donation-form-link",href:i,target:"_blank",rel:"noopener noreferrer"},o):c?(0,r.createElement)(hs,{dataSrc:`/?givewp-route=donation-form-view&form-id=${t}`,embedId:"",openFormButton:o,isFormRedirect:!1,formViewUrl:""}):(0,r.createElement)(Cr,{title:(0,u.__)("Donation Form","give"),src:`/?givewp-route=donation-form-view&form-id=${t}`,checkOrigin:!1,style:{width:"1px",minWidth:"100%",border:"0",pointerEvents:s}})}const ys={white:"#fff",grey:"#555d66",give:"#66bb6a"};(0,t.registerBlockType)(e,{icon:function({color:e="grey",size:t="24px",...n}){return(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 157.2 157.2",width:t,height:t,...n},(0,r.createElement)("circle",{fill:ys[e],cx:"78.6",cy:"78.6",r:"78.6"}),(0,r.createElement)("path",{fill:"#fff",d:"M89.8 84.2c.3.7 1 1.3 1 1.3 13.9 1.7 33.6-.2 48.6-2.2-8.6 18.5-24 30.8-38.1 30.8-26.5 0-46.9-32.1-46.9-32.1 8.2-7.2 21.7-30.8 41.2-30.8s28 10.7 28 10.7l2.2-3.5s-9.1-31.9-34.9-31.9-53.2 42.3-69.2 52c0 0 22 52.2 70.2 52.2 40.4 0 50.6-38.6 52.5-48.2 5.4-.8 9.9-1.6 12.8-2.1 1-2.2 2.1-6.1 1.3-11.3-16.1 6.2-40.5 13.2-69.1 13.2-.1 0 0 1 .4 1.9z"}))},edit:function({attributes:e,isSelected:t,setAttributes:n,className:o,clientId:a}){const{id:c,blockId:d,displayStyle:f,continueButtonTitle:p}=e,{formOptions:g,isResolving:m}=function(){const e=[],{forms:t,isResolving:n}=(0,l.useSelect)((e=>{const t={per_page:100};return{forms:e("core").getEntityRecords("postType","give_forms",t),isResolving:e("core/data").getIsResolving("core","getEntityRecords",["postType","give_forms",t])}}),[]);return t?.map((({title:t,id:n,formTemplate:r,isLegacyForm:o,link:i})=>{e.push({label:(0,u.__)(t.rendered,"give"),value:n,isLegacyForm:o,isLegacyTemplate:o&&"legacy"===r,link:i})})),{isResolving:n,formOptions:e}}(),[v,h]=(0,r.useState)(!!c);(0,r.useEffect)((()=>{d||n({blockId:a}),b||"reveal"!==f||n({displayStyle:"modal"})}),[]);const[b,y,I]=(()=>{const e=g.find((e=>e.value===c));return[e?.isLegacyForm,e?.isLegacyTemplate,e?.link]})();return!1!==m?(0,r.createElement)("div",{...(0,i.useBlockProps)()},(0,r.createElement)("p",null,(0,u.__)("Loading...","give"))):(0,r.createElement)("div",{...(0,i.useBlockProps)()},c&&v?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(gr,{attributes:e,setAttributes:n,formOptions:g,isResolving:m,isLegacyTemplate:y,isLegacyForm:b}),b?(0,r.createElement)("div",{className:t?`${o} isSelected`:o},(0,r.createElement)(s(),{block:"give/donation-form",attributes:e})):(0,r.createElement)(bs,{clientId:a,formId:c,formFormat:f,openFormButton:p,link:I})):(0,r.createElement)(fr,{formOptions:g,isResolving:m,handleSelect:e=>{n({id:e}),h(!0)}}))}})})()})();