OwlCyberSecurity - MANAGER
Edit File: adminBlocks.js
(()=>{var e={32485:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)o.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},4146:(e,t,n)=>{"use strict";var o=n(73404),r={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},l={};function s(e){return o.isMemo(e)?a:l[e.$$typeof]||r}l[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[o.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(g){var r=f(n);r&&r!==g&&e(t,r,o)}var a=c(n);d&&(a=a.concat(d(n)));for(var l=s(t),m=s(n),v=0;v<a.length;++v){var h=a[v];if(!(i[h]||o&&o[h]||m&&m[h]||l&&l[h])){var b=p(n,h);try{u(t,h,b)}catch(e){}}}}return t}},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=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,p=n?Symbol.for("react.forward_ref"):60112,f=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,w=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case c:case d:case i:case l:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case v:case m:case s:return e;default:return t}}case r:return t}}}function I(e){return E(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=r,t.Profiler=l,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return I(e)||E(e)===c},t.isConcurrentMode=I,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===i},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===r},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===l||e===a||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===s||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===h)},t.typeOf=E},73404:(e,t,n)=>{"use strict";e.exports=n(3072)},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var l=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 l.name="Invariant Violation",l}}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:r};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(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](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 o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React;var t=n.n(e);const o=window.wp.i18n,r=window.wp.blocks;var i=n(5556),a=n.n(i);const l={white:"#fff",grey:"#555d66",give:"#66bb6a"},s=({color:t="give",size:n="24px",...o})=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 157.2 157.2",width:n,height:n,...o},(0,e.createElement)("circle",{fill:l[t],cx:"78.6",cy:"78.6",r:"78.6"}),(0,e.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"}));s.propTypes={color:a().oneOf(Object.keys(l)),size:a().oneOfType([a().number,a().string])};const u=s,c=window.wp.blockEditor,d=window.wp.serverSideRender;var p=n.n(d);const f=window.wp.data;function g(e){return g="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},g(e)}function m(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}function v(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function w(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function E(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 o,r,i,a,l=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}(e,t)||w(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 I(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var C=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},M.apply(null,arguments)}function T(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function x(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(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 O=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}(),P=Math.abs,A=String.fromCharCode,D=Object.assign;function k(e){return e.trim()}function _(e,t,n){return e.replace(t,n)}function j(e,t){return e.indexOf(t)}function R(e,t){return 0|e.charCodeAt(t)}function F(e,t,n){return e.slice(t,n)}function z(e){return e.length}function V(e){return e.length}function B(e,t){return t.push(e),e}var H=1,W=1,G=0,Y=0,U=0,Z="";function K(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:H,column:W,length:a,return:""}}function Q(e,t){return D(K("",null,null,"",null,null,0),e,{length:-e.length},t)}function $(){return U=Y>0?R(Z,--Y):0,W--,10===U&&(W=1,H--),U}function X(){return U=Y<G?R(Z,Y++):0,W++,10===U&&(W=1,H++),U}function J(){return R(Z,Y)}function q(){return Y}function ee(e,t){return F(Z,e,t)}function te(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 ne(e){return H=W=1,G=z(Z=e),Y=0,[]}function oe(e){return Z="",e}function re(e){return k(ee(Y-1,le(91===e?e+2:40===e?e+1:e)))}function ie(e){for(;(U=J())&&U<33;)X();return te(e)>2||te(U)>3?"":" "}function ae(e,t){for(;--t&&X()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return ee(e,q()+(t<6&&32==J()&&32==X()))}function le(e){for(;X();)switch(U){case e:return Y;case 34:case 39:34!==e&&39!==e&&le(U);break;case 40:41===e&&le(e);break;case 92:X()}return Y}function se(e,t){for(;X()&&e+U!==57&&(e+U!==84||47!==J()););return"/*"+ee(t,Y-1)+"*"+A(47===e?e:X())}function ue(e){for(;!te(J());)X();return ee(e,Y)}var ce="-ms-",de="-moz-",pe="-webkit-",fe="comm",ge="rule",me="decl",ve="@keyframes";function he(e,t){for(var n="",o=V(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function be(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case me:return e.return=e.return||e.value;case fe:return"";case ve:return e.return=e.value+"{"+he(e.children,o)+"}";case ge:e.value=e.props.join(",")}return z(n=he(e.children,o))?e.return=e.value+"{"+n+"}":""}function ye(e){return oe(we("",null,null,null,[""],e=ne(e),0,[0],e))}function we(e,t,n,o,r,i,a,l,s){for(var u=0,c=0,d=a,p=0,f=0,g=0,m=1,v=1,h=1,b=0,y="",w=r,E=i,I=o,C=y;v;)switch(g=b,b=X()){case 40:if(108!=g&&58==R(C,d-1)){-1!=j(C+=_(re(b),"&","&\f"),"&\f")&&(h=-1);break}case 34:case 39:case 91:C+=re(b);break;case 9:case 10:case 13:case 32:C+=ie(g);break;case 92:C+=ae(q()-1,7);continue;case 47:switch(J()){case 42:case 47:B(Ie(se(X(),q()),t,n),s);break;default:C+="/"}break;case 123*m:l[u++]=z(C)*h;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==h&&(C=_(C,/\f/g,"")),f>0&&z(C)-d&&B(f>32?Ce(C+";",o,n,d-1):Ce(_(C," ","")+";",o,n,d-2),s);break;case 59:C+=";";default:if(B(I=Ee(C,t,n,u,c,r,l,y,w=[],E=[],d),i),123===b)if(0===c)we(C,t,I,I,w,i,d,l,E);else switch(99===p&&110===R(C,3)?100:p){case 100:case 108:case 109:case 115:we(e,I,I,o&&B(Ee(e,I,I,0,0,r,l,y,r,w=[],d),E),r,E,d,l,o?w:E);break;default:we(C,I,I,I,[""],E,0,l,E)}}u=c=f=0,m=h=1,y=C="",d=a;break;case 58:d=1+z(C),f=g;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==$())continue;switch(C+=A(b),b*m){case 38:h=c>0?1:(C+="\f",-1);break;case 44:l[u++]=(z(C)-1)*h,h=1;break;case 64:45===J()&&(C+=re(X())),p=J(),c=d=z(y=C+=ue(q())),b++;break;case 45:45===g&&2==z(C)&&(m=0)}}return i}function Ee(e,t,n,o,r,i,a,l,s,u,c){for(var d=r-1,p=0===r?i:[""],f=V(p),g=0,m=0,v=0;g<o;++g)for(var h=0,b=F(e,d+1,d=P(m=a[g])),y=e;h<f;++h)(y=k(m>0?p[h]+" "+b:_(b,/&\f/g,p[h])))&&(s[v++]=y);return K(e,t,n,0===r?ge:l,s,u,c)}function Ie(e,t,n){return K(e,t,n,fe,A(U),F(e,2,-2),0)}function Ce(e,t,n,o){return K(e,t,n,me,F(e,0,o),F(e,o+1,-1),o)}var Me=function(e,t,n){for(var o=0,r=0;o=r,r=J(),38===o&&12===r&&(t[n]=1),!te(r);)X();return ee(e,Y)},Te=new WeakMap,Se=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=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)||Te.get(n))&&!o){Te.set(e,!0);for(var r=[],i=function(e,t){return oe(function(e,t){var n=-1,o=44;do{switch(te(o)){case 0:38===o&&12===J()&&(t[n]=1),e[n]+=Me(Y-1,t,n);break;case 2:e[n]+=re(o);break;case 4:if(44===o){e[++n]=58===J()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=A(o)}}while(o=X());return e}(ne(e),t))}(t,r),a=n.props,l=0,s=0;l<i.length;l++)for(var u=0;u<a.length;u++,s++)e.props[s]=r[l]?i[l].replace(/&\f/g,a[u]):a[u]+" "+i[l]}}},Ne=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Le(e,t){switch(function(e,t){return 45^R(e,0)?(((t<<2^R(e,0))<<2^R(e,1))<<2^R(e,2))<<2^R(e,3):0}(e,t)){case 5103:return pe+"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 pe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return pe+e+de+e+ce+e+e;case 6828:case 4268:return pe+e+ce+e+e;case 6165:return pe+e+ce+"flex-"+e+e;case 5187:return pe+e+_(e,/(\w+).+(:[^]+)/,pe+"box-$1$2"+ce+"flex-$1$2")+e;case 5443:return pe+e+ce+"flex-item-"+_(e,/flex-|-self/,"")+e;case 4675:return pe+e+ce+"flex-line-pack"+_(e,/align-content|flex-|-self/,"")+e;case 5548:return pe+e+ce+_(e,"shrink","negative")+e;case 5292:return pe+e+ce+_(e,"basis","preferred-size")+e;case 6060:return pe+"box-"+_(e,"-grow","")+pe+e+ce+_(e,"grow","positive")+e;case 4554:return pe+_(e,/([^-])(transform)/g,"$1"+pe+"$2")+e;case 6187:return _(_(_(e,/(zoom-|grab)/,pe+"$1"),/(image-set)/,pe+"$1"),e,"")+e;case 5495:case 3959:return _(e,/(image-set\([^]*)/,pe+"$1$`$1");case 4968:return _(_(e,/(.+:)(flex-)?(.*)/,pe+"box-pack:$3"+ce+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pe+e+e;case 4095:case 3583:case 4068:case 2532:return _(e,/(.+)-inline(.+)/,pe+"$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(z(e)-1-t>6)switch(R(e,t+1)){case 109:if(45!==R(e,t+4))break;case 102:return _(e,/(.+:)(.+)-([^]+)/,"$1"+pe+"$2-$3$1"+de+(108==R(e,t+3)?"$3":"$2-$3"))+e;case 115:return~j(e,"stretch")?Le(_(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==R(e,t+1))break;case 6444:switch(R(e,z(e)-3-(~j(e,"!important")&&10))){case 107:return _(e,":",":"+pe)+e;case 101:return _(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pe+(45===R(e,14)?"inline-":"")+"box$3$1"+pe+"$2$3$1"+ce+"$2box$3")+e}break;case 5936:switch(R(e,t+11)){case 114:return pe+e+ce+_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return pe+e+ce+_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return pe+e+ce+_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return pe+e+ce+e+e}return e}var xe=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case me:e.return=Le(e.value,e.length);break;case ve:return he([Q(e,{value:_(e.value,"@","@"+pe)})],o);case ge:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return he([Q(e,{props:[_(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return he([Q(e,{props:[_(t,/:(plac\w+)/,":"+pe+"input-$1")]}),Q(e,{props:[_(t,/:(plac\w+)/,":-moz-$1")]}),Q(e,{props:[_(t,/:(plac\w+)/,ce+"input-$1")]})],o)}return""}))}}],Oe=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 o,r,i=e.stylisPlugins||xe,a={},l=[];o=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;l.push(e)}));var s,u,c,d,p=[be,(d=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(u=[Se,Ne].concat(i,p),c=V(u),function(e,t,n,o){for(var r="",i=0;i<c;i++)r+=u[i](e,t,n,o)||"";return r});r=function(e,t,n,o){s=n,he(ye(e?e+"{"+t.styles+"}":t.styles),f),o&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new O({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return g.sheet.hydrate(l),g},Pe=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},Ae={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 De(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var ke=/[A-Z]|^ms/g,_e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,je=function(e){return 45===e.charCodeAt(1)},Re=function(e){return null!=e&&"boolean"!=typeof e},Fe=De((function(e){return je(e)?e:e.replace(ke,"-$&").toLowerCase()})),ze=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_e,(function(e,t,n){return Be={name:t,styles:n,next:Be},t}))}return 1===Ae[e]||je(e)||"number"!=typeof t||0===t?t:t+"px"};function Ve(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 Be={name:n.name,styles:n.styles,next:Be},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)Be={name:o.name,styles:o.styles,next:Be},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=Ve(e,t,n[r])+";";else for(var i in n){var a=n[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?o+=i+"{"+t[a]+"}":Re(a)&&(o+=Fe(i)+":"+ze(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=Ve(e,t,a);switch(i){case"animation":case"animationName":o+=Fe(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var s=0;s<a.length;s++)Re(a[s])&&(o+=Fe(i)+":"+ze(i,a[s])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=Be,i=n(e);return Be=r,Ve(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Be,He=/label:\s*([^\s;\n{]+)\s*(;|$)/g,We=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";Be=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=Ve(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=Ve(n,t,e[a]),o&&(r+=i[a]);He.lastIndex=0;for(var l,s="";null!==(l=He.exec(r));)s+="-"+l[1];var u=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+s;return{name:u,styles:r,next:Be}},Ge={}.hasOwnProperty,Ye=(0,e.createContext)("undefined"!=typeof HTMLElement?Oe({key:"css"}):null);Ye.Provider;var Ue=function(t){return(0,e.forwardRef)((function(n,o){var r=(0,e.useContext)(Ye);return t(n,r,o)}))},Ze=(0,e.createContext)({}),Ke=e.useInsertionEffect?e.useInsertionEffect:function(e){e()},Qe="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",$e=function(e){var t,n=e.cache,o=e.serialized,r=e.isStringTag;return Pe(n,o,r),t=function(){return function(e,t,n){Pe(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(n,o,r)},Ke(t),null},Xe=Ue((function(t,n,o){var r=t.css;"string"==typeof r&&void 0!==n.registered[r]&&(r=n.registered[r]);var i=t[Qe],a=[r],l="";"string"==typeof t.className?l=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(n.registered,a,t.className):null!=t.className&&(l=t.className+" ");var s=We(a,void 0,(0,e.useContext)(Ze));l+=n.key+"-"+s.name;var u={};for(var c in t)Ge.call(t,c)&&"css"!==c&&c!==Qe&&(u[c]=t[c]);return u.ref=o,u.className=l,(0,e.createElement)(e.Fragment,null,(0,e.createElement)($e,{cache:n,serialized:s,isStringTag:"string"==typeof i}),(0,e.createElement)(i,u))}));n(4146);var Je=function(t,n){var o=arguments;if(null==n||!Ge.call(n,"css"))return e.createElement.apply(void 0,o);var r=o.length,i=new Array(r);i[0]=Xe,i[1]=function(e,t){var n={};for(var o in t)Ge.call(t,o)&&(n[o]=t[o]);return n[Qe]=e,n}(t,n);for(var a=2;a<r;a++)i[a]=o[a];return e.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 We(t)}e.useInsertionEffect?e.useInsertionEffect:e.useLayoutEffect;const et=window.ReactDOM,tt=Math.min,nt=Math.max,ot=Math.round,rt=Math.floor,it=e=>({x:e,y:e});function at(e){return ut(e)?(e.nodeName||"").toLowerCase():"#document"}function lt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function st(e){var t;return null==(t=(ut(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ut(e){return e instanceof Node||e instanceof lt(e).Node}function ct(e){return e instanceof Element||e instanceof lt(e).Element}function dt(e){return e instanceof HTMLElement||e instanceof lt(e).HTMLElement}function pt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof lt(e).ShadowRoot)}function ft(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function gt(e){return lt(e).getComputedStyle(e)}function mt(e){const t=function(e){if("html"===at(e))return e;const t=e.assignedSlot||e.parentNode||pt(e)&&e.host||st(e);return pt(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(at(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&ft(t)?t:mt(t)}function vt(e,t){var n;void 0===t&&(t=[]);const o=mt(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=lt(o);return r?t.concat(i,i.visualViewport||[],ft(o)?o:[]):t.concat(o,vt(o))}function ht(e){return ct(e)?e:e.contextElement}function bt(e){const t=ht(e);if(!dt(t))return it(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=function(e){const t=gt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=dt(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,l=ot(n)!==i||ot(o)!==a;return l&&(n=i,o=a),{width:n,height:o,$:l}}(t);let a=(i?ot(n.width):n.width)/o,l=(i?ot(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const yt=it(0);function wt(e){const t=lt(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:yt}function Et(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=ht(e);let a=it(1);t&&(o?ct(o)&&(a=bt(o)):a=bt(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==lt(e))&&t}(i,n,o)?wt(i):it(0);let s=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,c=r.width/a.x,d=r.height/a.y;if(i){const e=lt(i),t=o&&ct(o)?lt(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=bt(n),t=n.getBoundingClientRect(),o=gt(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,d*=e.y,s+=r,u+=i,n=lt(n).frameElement}}return p={width:c,height:d,x:s,y:u},{...p,top:p.y,left:p.x,right:p.x+p.width,bottom:p.y+p.height};var p}const It=e.useLayoutEffect;var Ct=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Mt=function(){};function Tt(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function St(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var i=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Tt(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Nt=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===g(e)&&null!==e?[e]:[];var t},Lt=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,b({},I(e,Ct))},xt=function(e,t,n){var o=e.cx,r=e.getStyles,i=e.getClassNames,a=e.className;return{css:r(t,e),className:o(null!=n?n:{},i(t,e),a)}};function Ot(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Pt(e){return Ot(e)?window.pageYOffset:e.scrollTop}function At(e,t){Ot(e)?window.scrollTo(0,t):e.scrollTop=t}function Dt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Mt,r=Pt(e),i=t-r,a=0;!function t(){var l,s=i*((l=(l=a+=10)/n-1)*l*l+1)+r;At(e,s),a<n?window.requestAnimationFrame(t):o(e)}()}function kt(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?At(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&At(e,Math.max(t.offsetTop-r,0))}function _t(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var jt=!1,Rt={get passive(){return jt=!0}},Ft="undefined"!=typeof window?window:{};Ft.addEventListener&&Ft.removeEventListener&&(Ft.addEventListener("p",Mt,Rt),Ft.removeEventListener("p",Mt,!1));var zt=jt;function Vt(e){return null!=e}function Bt(e,t,n){return e?t:n}var Ht=["children","innerProps"],Wt=["children","innerProps"];var Gt,Yt,Ut,Zt=function(e){return"auto"===e?"bottom":e},Kt=(0,e.createContext)(null),Qt=function(t){var n=t.children,o=t.minMenuHeight,r=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,s=t.theme,u=((0,e.useContext)(Kt)||{}).setPortalPlacement,c=(0,e.useRef)(null),d=E((0,e.useState)(r),2),p=d[0],f=d[1],g=E((0,e.useState)(null),2),m=g[0],v=g[1],h=s.spacing.controlHeight;return It((function(){var e=c.current;if(e){var t="fixed"===a,n=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,d=s.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,g=p.height,m=p.top,v=n.offsetParent.getBoundingClientRect().top,h=a||Ot(c=s)?window.innerHeight:c.clientHeight,b=Pt(s),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),E=v-w,I=h-m,C=E+b,M=d-b-m,T=f-h+b+y,S=b+m-w,N=160;switch(r){case"auto":case"bottom":if(I>=g)return{placement:"bottom",maxHeight:t};if(M>=g&&!a)return i&&Dt(s,T,N),{placement:"bottom",maxHeight:t};if(!a&&M>=o||a&&I>=o)return i&&Dt(s,T,N),{placement:"bottom",maxHeight:a?I-y:M-y};if("auto"===r||a){var L=t,x=a?E:C;return x>=o&&(L=Math.min(x-y-l,t)),{placement:"top",maxHeight:L}}if("bottom"===r)return i&&At(s,T),{placement:"bottom",maxHeight:t};break;case"top":if(E>=g)return{placement:"top",maxHeight:t};if(C>=g&&!a)return i&&Dt(s,S,N),{placement:"top",maxHeight:t};if(!a&&C>=o||a&&E>=o){var O=t;return(!a&&C>=o||a&&E>=o)&&(O=a?E-w:C-w),i&&Dt(s,S,N),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}({maxHeight:r,menuEl:e,minHeight:o,placement:i,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:h});f(n.maxHeight),v(n.placement),null==u||u(n.placement)}}),[r,i,a,l,o,u,h]),n({ref:c,placerProps:b(b({},t),{},{placement:m||Zt(i),maxHeight:p})})},$t=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return b({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Xt=$t,Jt=$t,qt=["size"],en=["innerProps","isRtl","size"],tn={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},nn=function(e){var t=e.size,n=I(e,qt);return Je("svg",M({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:tn},n))},on=function(e){return Je(nn,M({size:20},e),Je("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"}))},rn=function(e){return Je(nn,M({size:20},e),Je("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"}))},an=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return b({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},ln=an,sn=an,un=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_"}}}(Gt||(Yt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Ut||(Ut=Yt.slice(0)),Gt=Object.freeze(Object.defineProperties(Yt,{raw:{value:Object.freeze(Ut)}})))),cn=function(e){var t=e.delay,n=e.offset;return Je("span",{css:qe({animation:"".concat(un," 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"},"","")})},dn=["data"],pn=["innerRef","isDisabled","isHidden","inputClassName"],fn={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},gn={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":b({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},fn)},mn=function(e){return b({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},fn)},vn=function(e){var t=e.children,n=e.innerProps;return Je("div",n,t)},hn={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Je("div",M({},xt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Je(on,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Je("div",M({ref:r},xt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Je("div",M({},xt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Je(rn,null))},DownChevron:rn,CrossIcon:on,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,s=e.label,u=e.theme,c=e.selectProps;return Je("div",M({},xt(e,"group",{group:!0}),l),Je(i,M({},a,{selectProps:c,theme:u,getStyles:o,getClassNames:r,cx:n}),s),Je("div",null,t))},GroupHeading:function(e){var t=Lt(e);t.data;var n=I(t,dn);return Je("div",M({},xt(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Je("div",M({},xt(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Je("span",M({},t,xt(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=Lt(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,l=o.inputClassName,s=I(o,pn);return Je("div",M({},xt(e,"input",{"input-container":!0}),{"data-value":n||""}),Je("input",M({className:t({input:!0},l),ref:r,style:mn(a),disabled:i},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=I(e,en);return Je("div",M({},xt(b(b({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Je(cn,{delay:0,offset:n}),Je(cn,{delay:160,offset:!0}),Je(cn,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Je("div",M({},xt(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Je("div",M({},xt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(t){var n=t.appendTo,o=t.children,r=t.controlElement,i=t.innerProps,a=t.menuPlacement,l=t.menuPosition,s=(0,e.useRef)(null),u=(0,e.useRef)(null),c=E((0,e.useState)(Zt(a)),2),d=c[0],p=c[1],f=(0,e.useMemo)((function(){return{setPortalPlacement:p}}),[]),g=E((0,e.useState)(null),2),m=g[0],v=g[1],h=(0,e.useCallback)((function(){if(r){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}}(r),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||v({offset:n,rect:e})}}),[r,l,d,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);It((function(){h()}),[h]);var y=(0,e.useCallback)((function(){"function"==typeof u.current&&(u.current(),u.current=null),r&&s.current&&(u.current=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,u=ht(e),c=r||i?[...u?vt(u):[],...vt(t)]:[];c.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&l?function(e,t){let n,o=null;const r=st(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:u,top:c,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const f={rootMargin:-rt(c)+"px "+-rt(r.clientWidth-(u+d))+"px "+-rt(r.clientHeight-(c+p))+"px "+-rt(u)+"px",threshold:nt(0,tt(1,s))||1};let g=!0;function m(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}g=!1}try{o=new IntersectionObserver(m,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,f)}o.observe(e)}(!0),i}(u,n):null;let p,f=-1,g=null;a&&(g=new ResizeObserver((e=>{let[o]=e;o&&o.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{g&&g.observe(t)}))),n()})),u&&!s&&g.observe(u),g.observe(t));let m=s?Et(e):null;return s&&function t(){const o=Et(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,p=requestAnimationFrame(t)}(),n(),()=>{c.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),g&&g.disconnect(),g=null,s&&cancelAnimationFrame(p)}}(r,s.current,h,{elementResize:"ResizeObserver"in window}))}),[r,h]);It((function(){y()}),[y]);var w=(0,e.useCallback)((function(e){s.current=e,y()}),[y]);if(!n&&"fixed"!==l||!m)return null;var I=Je("div",M({ref:w},xt(b(b({},t),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),i),o);return Je(Kt.Provider,{value:f},n?(0,et.createPortal)(I,n):I)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=I(e,Wt);return Je("div",M({},xt(b(b({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=I(e,Ht);return Je("div",M({},xt(b(b({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,s=n.Container,u=n.Label,c=n.Remove;return Je(s,{data:o,innerProps:b(b({},xt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:l},Je(u,{data:o,innerProps:b({},xt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Je(c,{data:o,innerProps:b(b({},xt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},MultiValueContainer:vn,MultiValueLabel:vn,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Je("div",M({role:"button"},n),t||Je(on,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return Je("div",M({},xt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Je("div",M({},xt(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Je("div",M({},xt(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Je("div",M({},xt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Je("div",M({},xt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},bn=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function yn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(r=t[n])||bn(o)&&bn(r)))return!1;var o,r;return!0}for(var wn={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"},En=function(e){return Je("span",M({css:wn},e))},In={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.isDisabled,r=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return"".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,o=void 0===n?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,l=e.isDisabled,s=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=l?" disabled":"",d="".concat(s?"selected":"focused").concat(c);return"option ".concat(i," ").concat(d,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Cn=function(t){var n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.focusableOptions,a=t.isFocused,l=t.selectValue,s=t.selectProps,u=t.id,c=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,f=s.isMulti,g=s.isOptionDisabled,m=s.isSearchable,v=s.menuIsOpen,h=s.options,y=s.screenReaderStatus,w=s.tabSelectsValue,E=s["aria-label"],I=s["aria-live"],C=(0,e.useMemo)((function(){return b(b({},In),c||{})}),[c]),M=(0,e.useMemo)((function(){var e,t="";if(n&&C.onChange){var o=n.option,r=n.options,i=n.removedValue,a=n.removedValues,s=n.value,u=i||o||(e=s,Array.isArray(e)?null:e),c=u?d(u):"",p=r||a||void 0,f=p?p.map(d):[],m=b({isDisabled:u&&g(u,l),label:c,labels:f},n);t=C.onChange(m)}return t}),[n,C,g,l,d]),T=(0,e.useMemo)((function(){var e="",t=o||r,n=!!(o&&l&&l.includes(o));if(t&&C.onFocus){var a={focused:t,label:d(t),isDisabled:g(t,l),isSelected:n,options:i,context:t===o?"menu":"value",selectValue:l};e=C.onFocus(a)}return e}),[o,r,d,g,C,i,l]),S=(0,e.useMemo)((function(){var e="";if(v&&h.length&&C.onFilter){var t=y({count:i.length});e=C.onFilter({inputValue:p,resultsMessage:t})}return e}),[i,p,v,C,h,y]),N=(0,e.useMemo)((function(){var e="";if(C.guidance){var t=r?"value":v?"menu":"input";e=C.guidance({"aria-label":E,context:t,isDisabled:o&&g(o,l),isMulti:f,isSearchable:m,tabSelectsValue:w})}return e}),[E,o,r,f,g,m,v,C,l,w]),L="".concat(T," ").concat(S," ").concat(N),x=Je(e.Fragment,null,Je("span",{id:"aria-selection"},M),Je("span",{id:"aria-context"},L)),O="initial-input-focus"===(null==n?void 0:n.action);return Je(e.Fragment,null,Je(En,{id:u},O&&x),Je(En,{"aria-live":I,"aria-atomic":"false","aria-relevant":"additions text"},a&&!O&&x))},Mn=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Tn=new RegExp("["+Mn.map((function(e){return e.letters})).join("")+"]","g"),Sn={},Nn=0;Nn<Mn.length;Nn++)for(var Ln=Mn[Nn],xn=0;xn<Ln.letters.length;xn++)Sn[Ln.letters[xn]]=Ln.base;var On=function(e){return e.replace(Tn,(function(e){return Sn[e]}))},Pn=function(e,t){void 0===t&&(t=yn);var n=null;function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return o.clear=function(){n=null},o}(On),An=function(e){return e.replace(/^\s+|\s+$/g,"")},Dn=function(e){return"".concat(e.label," ").concat(e.value)},kn=["innerRef"];function jn(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=Object.entries(e).filter((function(e){var t=E(e,1)[0];return!n.includes(t)}));return r.reduce((function(e,t){var n=E(t,2),o=n[0],r=n[1];return e[o]=r,e}),{})}(I(e,kn),"onExited","in","enter","exit","appear");return Je("input",M({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 Rn=["boxSizing","height","overflow","paddingRight","position"],Fn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function zn(e){e.preventDefault()}function Vn(e){e.stopPropagation()}function Bn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Hn(){return"ontouchstart"in window||navigator.maxTouchPoints}var Wn=!("undefined"==typeof window||!window.document||!window.document.createElement),Gn=0,Yn={capture:!1,passive:!1},Un=function(){return document.activeElement&&document.activeElement.blur()},Zn={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Kn(t){var n=t.children,o=t.lockEnabled,r=t.captureEnabled,i=function(t){var n=t.isEnabled,o=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,a=t.onTopLeave,l=(0,e.useRef)(!1),s=(0,e.useRef)(!1),u=(0,e.useRef)(0),c=(0,e.useRef)(null),d=(0,e.useCallback)((function(e,t){if(null!==c.current){var n=c.current,u=n.scrollTop,d=n.scrollHeight,p=n.clientHeight,f=c.current,g=t>0,m=d-p-u,v=!1;m>t&&l.current&&(r&&r(e),l.current=!1),g&&s.current&&(a&&a(e),s.current=!1),g&&t>m?(o&&!l.current&&o(e),f.scrollTop=d,v=!0,l.current=!0):!g&&-t>u&&(i&&!s.current&&i(e),f.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[o,r,i,a]),p=(0,e.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,e.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),g=(0,e.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=(0,e.useCallback)((function(e){if(e){var t=!!zt&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",g,t)}}),[g,f,p]),v=(0,e.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",g,!1))}),[g,f,p]);return(0,e.useEffect)((function(){if(n){var e=c.current;return m(e),function(){v(e)}}}),[n,m,v]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),a=function(t){var n=t.isEnabled,o=t.accountForScrollbars,r=void 0===o||o,i=(0,e.useRef)({}),a=(0,e.useRef)(null),l=(0,e.useCallback)((function(e){if(Wn){var t=document.body,n=t&&t.style;if(r&&Rn.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Gn<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+o||0;Object.keys(Fn).forEach((function(e){var t=Fn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&Hn()&&(t.addEventListener("touchmove",zn,Yn),e&&(e.addEventListener("touchstart",Bn,Yn),e.addEventListener("touchmove",Vn,Yn))),Gn+=1}}),[r]),s=(0,e.useCallback)((function(e){if(Wn){var t=document.body,n=t&&t.style;Gn=Math.max(Gn-1,0),r&&Gn<1&&Rn.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Hn()&&(t.removeEventListener("touchmove",zn,Yn),e&&(e.removeEventListener("touchstart",Bn,Yn),e.removeEventListener("touchmove",Vn,Yn)))}}),[r]);return(0,e.useEffect)((function(){if(n){var e=a.current;return l(e),function(){s(e)}}}),[n,l,s]),function(e){a.current=e}}({isEnabled:o});return Je(e.Fragment,null,o&&Je("div",{onClick:Un,css:Zn}),n((function(e){i(e),a(e)})))}var Qn={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},$n=function(e){var t=e.name,n=e.onFocus;return Je("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Qn,value:"",onChange:function(){}})},Xn={clearIndicator:sn,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,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return b({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:ln,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,o=n.colors,r=n.spacing;return b({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return b({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return b(b({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},gn),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return b({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Jt,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,l=r.colors;return b((v(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),v(n,"position","absolute"),v(n,"width","100%"),v(n,"zIndex",1),n),t?{}:{backgroundColor:l.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,o=e.theme.spacing.baseUnit;return b({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return b({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return b({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return b({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Xt,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return b({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?l.primary:o?l.primary25:"transparent",color:n?l.neutral20:r?l.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return b({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return b({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return b({alignItems:"center",display:o&&r&&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")})}},Jn={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:_t(),captureMenuScroll:!_t(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=b({ignoreCase:!0,ignoreAccents:!0,stringify:Dn,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,a=n.trim,l=n.matchFrom,s=a?An(t):t,u=a?An(i(e)):i(e);return o&&(s=s.toLowerCase(),u=u.toLowerCase()),r&&(s=Pn(s),u=On(u)),"start"===l?u.substr(0,s.length)===s:u.indexOf(s)>-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 eo(e,t,n,o){return{type:"option",data:t,isDisabled:ao(e,t,n),isSelected:lo(e,t,n),label:ro(e,t),value:io(e,t),index:o}}function to(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return eo(e,n,t,o)})).filter((function(t){return oo(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=eo(e,n,t,o);return oo(e,i)?i:void 0})).filter(Vt)}function no(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,x(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function oo(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,l=t.value;return(!uo(e)||!i)&&so(e,{label:a,value:l,data:r},o)}var ro=function(e,t){return e.getOptionLabel(t)},io=function(e,t){return e.getOptionValue(t)};function ao(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function lo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=io(e,t);return n.some((function(t){return io(e,t)===o}))}function so(e,t,n){return!e.filterOption||e.filterOption(t,n)}var uo=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},co=1,po=function(t){!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&&S(e,t)}(o,t);var n=function(e){var t=L();return function(){var n,o=N(e);if(t){var r=N(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"==g(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)}}(o);function o(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.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},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var o=t.props,r=o.onChange,i=o.name;n.name=i,t.ariaOnChange(e,n),r(e,n)},t.setValue=function(e,n,o){var r=t.props,i=r.closeMenuOnSelect,a=r.isMulti,l=r.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:l}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:o})},t.selectOption=function(e){var n=t.props,o=n.blurInputOnSelect,r=n.isMulti,i=n.name,a=t.state.selectValue,l=r&&t.isOptionSelected(e,a),s=t.isOptionDisabled(e,a);if(l){var u=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==u})),"deselect-option",e)}else{if(s)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});r?t.setValue([].concat(x(a),[e]),"select-option",e):t.setValue(e,"select-option")}o&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,o=t.state.selectValue,r=t.getOptionValue(e),i=o.filter((function(e){return t.getOptionValue(e)!==r})),a=Bt(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Bt(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,o=n[n.length-1],r=n.slice(0,n.length-1),i=Bt(e,r,r[0]||null);t.onChange(i,{action:"pop-value",removedValue:o})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return St.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return ro(t.props,e)},t.getOptionValue=function(e){return io(t.props,e)},t.getStyles=function(e,n){var o=t.props.unstyled,r=Xn[e](n,o);r.boxSizing="border-box";var i=t.props.styles[e];return i?i(r,n):r},t.getClassNames=function(e,n){var o,r;return null===(o=(r=t.props.classNames)[e])||void 0===o?void 0:o.call(r,n)},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,b(b({},hn),e.components);var e},t.buildCategorizedOptions=function(){return to(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return no(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:b({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,o=n.isMulti,r=n.menuIsOpen;t.focusInput(),r?(t.setState({inputIsHiddenAfterUpdate:!o}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Ot(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,o=n&&n.item(0);o&&(t.initialTouchX=o.clientX,t.initialTouchY=o.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,o=n&&n.item(0);if(o){var r=Math.abs(o.clientX-t.initialTouchX),i=Math.abs(o.clientY-t.initialTouchY);t.userIsDragging=r>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,o=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(o,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return uo(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,o=n.isMulti,r=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,l=n.isClearable,s=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,d=n.tabSelectsValue,p=n.openMenuOnFocus,f=t.state,g=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!(s||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!o||a)return;t.focusValue("previous");break;case"ArrowRight":if(!o||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!r)return;o?t.popValue():l&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!d||!g||p&&t.isOptionSelected(g,v))return;t.selectOption(g);break;case"Enter":if(229===e.keyCode)break;if(u){if(!g)return;if(t.isComposing)return;t.selectOption(g);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):l&&i&&t.clearValue();break;case" ":if(a)return;if(!u){t.openMenu("first");break}if(!g)return;t.selectOption(g);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++co),t.state.selectValue=Nt(e.value),e.menuIsOpen&&t.state.selectValue.length){var r=t.buildFocusableOptions(),i=r.indexOf(t.state.selectValue[0]);t.state.focusedOption=r[i]}return t}return function(e,t,n){t&&T(e.prototype,t),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(o,[{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&&kt(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(kt(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,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var l=i.indexOf(o[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(r&&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,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r<i&&(a=r+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,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Jn):b(b({},Jn),this.props.theme):Jn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,l=this.props,s=l.isMulti,u=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:c,selectOption:i,selectProps:l,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 ao(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return lo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return so(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}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 t=this.props,n=t.isDisabled,o=t.isSearchable,r=t.inputId,i=t.inputValue,a=t.tabIndex,l=t.form,s=t.menuIsOpen,u=t.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,g=this.commonProps,m=r||this.getElementId("input"),v=b(b(b({"aria-autocomplete":"list","aria-expanded":s,"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"},s&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?e.createElement(c,M({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:l,type:"text",value:i},v)):e.createElement(jn,M({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Mt,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:l,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),o=n.MultiValue,r=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,l=n.SingleValue,s=n.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,p=c.isDisabled,f=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:e.createElement(s,M({},u,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return h.map((function(n,l){var s=n===b,c="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(o,M({},u,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:p,key:c,index:l,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))}));if(g)return null;var w=h[0];return e.createElement(l,M({},u,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,o=this.props,r=o.isDisabled,i=o.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||r||!this.hasValue()||i)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,M({},n,{innerProps:l,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,o=this.props,r=o.isDisabled,i=o.isLoading,a=this.state.isFocused;return t&&i?e.createElement(t,M({},n,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,o=t.IndicatorSeparator;if(!n||!o)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(o,M({},r,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,o=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,M({},n,{innerProps:i,isDisabled:o,isFocused:r}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),o=n.Group,r=n.GroupHeading,i=n.Menu,a=n.MenuList,l=n.MenuPortal,s=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,g=f.captureMenuScroll,m=f.inputValue,v=f.isLoading,h=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,E=f.menuPlacement,I=f.menuPosition,C=f.menuPortalTarget,T=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,N=f.noOptionsMessage,L=f.onMenuScrollToTop,x=f.onMenuScrollToBottom;if(!w)return null;var O,P=function(n,o){var r=n.type,i=n.data,a=n.isDisabled,l=n.isSelected,s=n.label,u=n.value,f=p===i,g=a?void 0:function(){return t.onOptionHover(i)},m=a?void 0:function(){return t.selectOption(i)},v="".concat(t.getElementId("option"),"-").concat(o),h={id:v,onClick:m,onMouseMove:g,onMouseOver:g,tabIndex:-1};return e.createElement(c,M({},d,{innerProps:h,data:i,isDisabled:a,isSelected:l,key:v,label:s,type:r,value:u,isFocused:f,innerRef:f?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(n){if("group"===n.type){var i=n.data,a=n.options,l=n.index,s="".concat(t.getElementId("group"),"-").concat(l),u="".concat(s,"-heading");return e.createElement(o,M({},d,{key:s,data:i,options:a,Heading:r,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===n.type)return P(n,"".concat(n.index))}));else if(v){var A=h({inputValue:m});if(null===A)return null;O=e.createElement(s,d,A)}else{var D=N({inputValue:m});if(null===D)return null;O=e.createElement(u,d,D)}var k={minMenuHeight:b,maxMenuHeight:y,menuPlacement:E,menuPosition:I,menuShouldScrollIntoView:S},_=e.createElement(Qt,M({},d,k),(function(n){var o=n.ref,r=n.placerProps,l=r.placement,s=r.maxHeight;return e.createElement(i,M({},d,k,{innerRef:o,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove,id:t.getElementId("listbox")},isLoading:v,placement:l}),e.createElement(Kn,{captureEnabled:g,onTopArrive:L,onBottomArrive:x,lockEnabled:T},(function(n){return e.createElement(a,M({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:v,maxHeight:s,focusedOption:p}),O)})))}));return C||"fixed"===I?e.createElement(l,M({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:E,menuPosition:I}),_):_}},{key:"renderFormField",value:function(){var t=this,n=this.props,o=n.delimiter,r=n.isDisabled,i=n.isMulti,a=n.name,l=n.required,s=this.state.selectValue;if(l&&!this.hasValue()&&!r)return e.createElement($n,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(i){if(o){var u=s.map((function(e){return t.getOptionValue(e)})).join(o);return e.createElement("input",{name:a,type:"hidden",value:u})}var c=s.length>0?s.map((function(n,o){return e.createElement("input",{key:"i-".concat(o),name:a,type:"hidden",value:t.getOptionValue(n)})})):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,c)}var d=s[0]?this.getOptionValue(s[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,o=n.ariaSelection,r=n.focusedOption,i=n.focusedValue,a=n.isFocused,l=n.selectValue,s=this.getFocusableOptions();return e.createElement(Cn,M({},t,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:r,focusedValue:i,isFocused:a,selectValue:l,focusableOptions:s}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,o=t.IndicatorsContainer,r=t.SelectContainer,i=t.ValueContainer,a=this.props,l=a.className,s=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.createElement(r,M({},p,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),e.createElement(n,M({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),e.createElement(i,M({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(o,M({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,l=t.prevWasFocused,s=e.options,u=e.value,c=e.menuIsOpen,d=e.inputValue,p=e.isMulti,f=Nt(u),g={};if(n&&(u!==n.value||s!==n.options||c!==n.menuIsOpen||d!==n.inputValue)){var m=c?function(e,t){return no(to(e,t))}(e,f):[],v=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,f):null,h=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);g={selectValue:f,focusedOption:h,focusedValue:v,clearFocusValueOnUpdate:!1}}var y=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},w=i,E=a&&l;return a&&!E&&(w={value:Bt(p,f,f[0]||null),options:f,action:"initial-input-focus"},E=!l),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),b(b(b({},g),y),{},{prevProps:e,ariaSelection:w,prevWasFocused:E})}}]),o}(e.Component);po.defaultProps=qn;var fo=(0,e.forwardRef)((function(t,n){var o=function(t){var n=t.defaultInputValue,o=void 0===n?"":n,r=t.defaultMenuIsOpen,i=void 0!==r&&r,a=t.defaultValue,l=void 0===a?null:a,s=t.inputValue,u=t.menuIsOpen,c=t.onChange,d=t.onInputChange,p=t.onMenuClose,f=t.onMenuOpen,g=t.value,m=I(t,C),v=E((0,e.useState)(void 0!==s?s:o),2),h=v[0],y=v[1],w=E((0,e.useState)(void 0!==u?u:i),2),M=w[0],T=w[1],S=E((0,e.useState)(void 0!==g?g:l),2),N=S[0],L=S[1],x=(0,e.useCallback)((function(e,t){"function"==typeof c&&c(e,t),L(e)}),[c]),O=(0,e.useCallback)((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),y(void 0!==n?n:e)}),[d]),P=(0,e.useCallback)((function(){"function"==typeof f&&f(),T(!0)}),[f]),A=(0,e.useCallback)((function(){"function"==typeof p&&p(),T(!1)}),[p]),D=void 0!==s?s:h,k=void 0!==u?u:M,_=void 0!==g?g:N;return b(b({},m),{},{inputValue:D,menuIsOpen:k,onChange:x,onInputChange:O,onMenuClose:A,onMenuOpen:P,value:_})}(t);return e.createElement(po,M({ref:n},o))})),go=fo;const mo={input:(e,t)=>({...e,height:"3rem"}),option:(e,t)=>({...e,paddingTop:"0.8rem",paddingBottom:"0.8rem",fontSize:"1rem"}),control:(e,t)=>({...e,fontSize:"1rem"})},vo=e=>({...e,colors:{...e.colors,primary:"#27ae60"}});function ho({formOptions:t,isResolving:n,handleSelect:r}){const[i,a]=(0,e.useState)(null),l=t.find((e=>e.value===i)),{isSaving:s,isDisabled:u}={isSaving:(0,f.useSelect)((e=>e("core/editor").isSavingPost()),[]),isDisabled:(0,f.useSelect)((e=>!e("core/editor").isEditedPostSaveable()),[])};return(0,e.createElement)("div",{className:"givewp-donation-form-selector"},(0,e.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,e.createElement)("div",{className:"givewp-donation-form-selector__select"},(0,e.createElement)("label",{htmlFor:"formId",className:"givewp-donation-form-selector__label"},(0,o.__)("Choose a donation form","give")),(0,e.createElement)(go,{name:"formId",inputId:"formId",value:l,placeholder:n?(0,o.__)("Loading Donation Forms...","give"):(0,o.__)("Select...","give"),onChange:e=>{e&&a(e.value)},noOptionsMessage:()=>(0,e.createElement)("p",null,(0,o.__)("No forms were found using the GiveWP form builder.","give")),options:t,loadingMessage:()=>(0,e.createElement)(e.Fragment,null,(0,o.__)("Loading Donation Forms...","give")),isLoading:n,theme:vo,styles:mo})),(0,e.createElement)("button",{className:"givewp-donation-form-selector__submit",type:"button",disabled:s||u||!i,onClick:()=>{r(i),(0,f.dispatch)("core/editor").savePost()}},(0,o.__)("Confirm","give")))}const bo=window.wp.components;function yo({attributes:t,setAttributes:n,formOptions:r,isResolving:i,isLegacyTemplate:a,isLegacyForm:l}){const{id:s,displayStyle:u,continueButtonTitle:d,showTitle:p,contentDisplay:f,showGoal:g,showContent:m}=t,v=a||!l,h=v&&["newTab","modal","reveal","button"].includes(u);return(0,e.createElement)(c.InspectorControls,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Form Settings","give"),initialOpen:!0},(0,e.createElement)(bo.PanelRow,null,!1===i&&0===r.length?(0,e.createElement)("p",null,(0,o.__)("No forms were found using the GiveWP form builder.","give")):(0,e.createElement)(bo.SelectControl,{label:(0,o.__)("Choose a donation form","give"),value:null!=s?s:"",options:[{value:"",label:(0,o.__)("Select...","give"),disabled:!0},...r.map((e=>({label:e.label,value:String(e.value)})))],onChange:e=>{n({id:Number(e)})}})),v&&(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.SelectControl,{label:(0,o.__)("Form Format","give"),value:u,options:((e,t,n)=>a?e.concat(t):e.concat(n))([{label:(0,o.__)("Full Form","give"),value:"onpage"},{label:(0,o.__)("Modal","give"),value:"modal"}],[{label:(0,o.__)("Reveal","give"),value:"reveal"},{value:"button",label:(0,o.__)("One Button Launch","give")}],[{label:(0,o.__)("New Tab","give"),value:"newTab"}]),onChange:e=>{n({displayStyle:e})}})),h&&(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.TextControl,{label:(0,o.__)("Open Form Button","give"),value:d,onChange:e=>{n({continueButtonTitle:e})}})),a&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.ToggleControl,{label:(0,o.__)("Title","give"),name:"showTitle",checked:!!p,onChange:e=>{n({showTitle:e})}})),(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.ToggleControl,{label:(0,o.__)("Goal","give"),name:"showGoal",checked:!!g,onChange:e=>{n({showGoal:e})}})),(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.ToggleControl,{label:(0,o.__)("Content","give"),name:"contentDisplay",checked:!!f,onChange:e=>{n({contentDisplay:e})}})),f&&(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.SelectControl,{label:(0,o.__)("Content Position","give"),name:"showContent",value:m,options:[{value:"above",label:(0,o.__)("Above","give")},{value:"below",label:(0,o.__)("Below","give")}],onChange:e=>{n({showContent:e})}}))),s&&(0,e.createElement)(bo.PanelRow,null,(0,e.createElement)(bo.ExternalLink,{href:l?`/wp-admin/post.php?post=${s}&action=edit`:`/wp-admin/edit.php?post_type=give_forms&page=givewp-form-builder&donationFormID=${s}`},(0,o.__)("Edit donation form","give")))))}function wo(){return wo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},wo.apply(this,arguments)}function Eo(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}var Io,Co,Mo=(Io=function(e){!function(t){if("undefined"!=typeof window){var n,o=0,r=!1,i=!1,a="[iFrameSizer]",l=null,s=window.requestAnimationFrame,u={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},c={},d=null,p={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(){w("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},f={};window.jQuery&&((n=window.jQuery).fn?n.fn.iFrameResize||(n.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){k(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:r}function b(e,t){E("log",e,t,h(e))}function y(e,t){E("info",e,t,h(e))}function w(e,t){E("warn",e,t,!0)}function E(e,t,n,o){!0===o&&"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 I(e){function t(){n("Height"),n("Width"),P((function(){O(j),N(R),p("onResized",j)}),j,"init")}function n(e){var t=Number(c[R]["max"+e]),n=Number(c[R]["min"+e]),o=e.toLowerCase(),r=Number(j[o]);b(R,"Checking "+o+" is in range "+n+"-"+t),r<n&&(r=n,b(R,"Set "+o+" to min value")),r>t&&(r=t,b(R,"Set "+o+" to max value")),j[o]=""+r}function o(e){return _.substr(_.indexOf(":")+7+e)}function r(e,t){var n,o;n=function(){var n,o;A("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),o=j.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:o.height,iframeWidth:o.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(o.top-n.top,10),offsetLeft:parseInt(o.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)},f[o=t]||(f[o]=setTimeout((function(){f[o]=null,n()}),32))}function i(e){var t=e.getBoundingClientRect();return S(R),{x:Math.floor(Number(t.left)+Number(l.x)),y:Math.floor(Number(t.top)+Number(l.y))}}function s(e){var t=e?i(j.iframe):{x:0,y:0},n={x:Number(j.width)+t.x,y:Number(j.height)+t.y};b(R,"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):w(R,"Unable to scroll to requested position, window.parentIFrame not found"):(l=n,u(),b(R,"--"))}function u(){!1!==p("onScroll",l)?N(R):L()}function d(e){p(e,{iframe:j.iframe,screenX:j.width,screenY:j.height,type:j.type})}function p(e,t){return C(R,e,t)}var g,h,E,I,M,k,_=e.data,j={},R=null;"[iFrameResizerChild]Ready"===_?function(){for(var e in c)A("iFrame requested init",D(e),c[e].iframe,e)}():a===(""+_).substr(0,13)&&_.substr(13).split(":")[0]in c?(I=(E=_.substr(13).split(":"))[1]?parseInt(E[1],10):0,M=c[E[0]]&&c[E[0]].iframe,k=getComputedStyle(M),j={iframe:M,id:E[0],height:I+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(k)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(k),width:E[2],type:E[3]},R=j.id,c[R]&&(c[R].loaded=!0),(h=j.type in{true:1,false:1,undefined:1})&&b(R,"Ignoring init message from meta parent page"),!h&&function(e){var t=!0;return c[e]||(t=!1,w(j.type+" No settings for "+e+". Message was: "+_)),t}(R)&&(b(R,"Received: "+_),g=!0,null===j.iframe&&(w(R,"IFrame ("+j.id+") not found"),g=!1),g&&function(){var t,n=e.origin,o=c[R]&&c[R].checkOrigin;if(o&&""+n!="null"&&!(o.constructor===Array?function(){var e=0,t=!1;for(b(R,"Checking connection is from allowed list of origins: "+o);e<o.length;e++)if(o[e]===n){t=!0;break}return t}():(t=c[R]&&c[R].remoteHost,b(R,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+j.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[R]&&c[R].firstRun&&c[R]&&(c[R].firstRun=!1),j.type){case"close":T(j.iframe);break;case"message":h=o(6),b(R,"onMessage passed: {iframe: "+j.iframe.id+", message: "+h+"}"),p("onMessage",{iframe:j.iframe,message:JSON.parse(h)}),b(R,"--");break;case"mouseenter":d("onMouseEnter");break;case"mouseleave":d("onMouseLeave");break;case"autoResize":c[R].autoResize=JSON.parse(o(9));break;case"scrollTo":s(!1);break;case"scrollToOffset":s(!0);break;case"pageInfo":r(c[R]&&c[R].iframe,R),function(){function e(e,o){function i(){c[n]?r(c[n].iframe,n):t()}["scroll","resize"].forEach((function(t){b(n,e+t+" listener for sendPageInfo"),o(window,t,i)}))}function t(){e("Remove ",v)}var n=R;e("Add ",m),c[n]&&(c[n].stopPageInfo=t)}();break;case"pageInfoStop":c[R]&&c[R].stopPageInfo&&(c[R].stopPageInfo(),delete c[R].stopPageInfo);break;case"inPageLink":e=o(9),a=e.split("#")[1]||"",f=decodeURIComponent(a),(g=document.getElementById(f)||document.getElementsByName(f)[0])?(n=i(g),b(R,"Moving to in page link (#"+a+") at x: "+n.x+" y: "+n.y),l={x:n.x,y:n.y},u(),b(R,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(a):b(R,"In page link #"+a+" not found and window.parentIFrame not found"):b(R,"In page link #"+a+" not found");break;case"reset":x(j);break;case"init":t(),p("onInit",j.iframe);break;default:t()}var e,n,a,f,g,h}())):y(R,"Ignored: "+_)}function C(e,t,n){var o=null,r=null;if(c[e]){if("function"!=typeof(o=c[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");r=o(n)}return r}function M(e){var t=e.id;delete c[t]}function T(e){var t=e.id;if(!1!==C(t,"onClose",t)){b(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){w(e)}C(t,"onClosed",t),b(t,"--"),M(e)}else b(t,"Close iframe cancelled by onClose event")}function S(e){null===l&&b(e,"Get page position: "+(l={x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}).x+","+l.y)}function N(e){null!==l&&(window.scrollTo(l.x,l.y),b(e,"Set page position: "+l.x+","+l.y),L())}function L(){l=null}function x(e){b(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),S(e.id),P((function(){O(e),A("reset","reset",e.iframe,e.id)}),e,"reset")}function O(e){function t(t){i||"0"!==e[t]||(i=!0,b(o,"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"))&&A("Visibility change","resize",c[e].iframe,e)}(e)}))}function t(t){b("window","Mutation observed: "+t[0].target+" "+t[0].type),_(e,16)}var n,o=g();o&&(n=document.querySelector("body"),new o(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 ("+o+") "+t+" set to "+e[t]+"px")):b("undefined","messageData id not set")}(n),t(n)}var o=e.iframe.id;c[o]&&(c[o].sizeHeight&&n("height"),c[o].sizeWidth&&n("width"))}function P(e,t,n){n!==t.type&&s&&!window.jasmine?(b(t.id,"Requesting animation frame"),s(e)):e()}function A(e,t,n,o,r){var i,l=!1;o=o||n.id,c[o]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(i=c[o]&&c[o].targetOrigin,b(o,"["+e+"] Sending msg to iframe["+o+"] ("+t+") targetOrigin: "+i),n.contentWindow.postMessage(a+t,i)):w(o,"["+e+"] IFrame("+o+") not found"),r&&c[o]&&c[o].warningTimeout&&(c[o].msgTimeout=setTimeout((function(){!c[o]||c[o].loaded||l||(l=!0,w(o,"IFrame has not responded within "+c[o].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[o].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 k(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],w(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||p.id+o++,null!==document.getElementById(i)&&(i+=o++),t=i),r=(n||{}).log,b(t,"Added missing iframe ID: "+t+" ("+e.src+")")),t}(e.id);a in c&&"iFrameResizer"in e?w(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 p)Object.prototype.hasOwnProperty.call(p,t)&&(c[a][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:p[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 o=g();o&&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})}(o),m(e,"load",(function(){var o,r;A("iFrame.onload",n,e,t,!0),o=c[a]&&c[a].firstRun,r=c[a]&&c[a].heightCalculationMethod in u,!o&&r&&x({iframe:e,height:0,width:0,type:"init"})})),A("init",n,e,t,!0)}(D(a)),c[a]&&(c[a].iframe.iFrameResizer={close:T.bind(null,c[a].iframe),removeListeners:M.bind(null,c[a].iframe),resize:A.bind(null,"Window resize","resize",c[a].iframe),moveToAnchor:function(e){A("Move to anchor","moveToAnchor:"+e,c[a].iframe,a)},sendMessage:function(e){A("Send Message","message:"+(e=JSON.stringify(e)),c[a].iframe,a)}}))}function _(e,t){null===d&&(d=setTimeout((function(){d=null,e()}),t))}function j(){"hidden"!==document.visibilityState&&(b("document","Trigger event: Visiblity change"),_((function(){R("Tab Visable","resize")}),16))}function R(e,t){Object.keys(c).forEach((function(n){(function(e){return c[e]&&"parent"===c[e].resizeFrom&&c[e].autoResize&&!c[e].firstRun})(n)&&A(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+">")}(),k(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!s;e+=1)s=window[t[e]+"RequestAnimationFrame"];s?s=s.bind(window):b("setup","RequestAnimationFrame not supported")}(),m(window,"message",I),m(window,"resize",(function(){b("window","Trigger event: resize"),_((function(){R("Window resize","resize")}),16)})),m(document,"visibilitychange",j),m(document,"-webkit-visibilitychange",j),function(o,r){switch(n=[],function(e){e&&e.enablePublicMethods&&w("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(o),typeof r){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(r||"iframe"),e.bind(t,o));break;case"object":e(o,r);break;default:throw new TypeError("Unexpected data type ("+typeof r+")")}return n}}}()},Io(Co={exports:{}}),Co.exports),To=function(){},So=function(n){var o=n.title,r=n.forwardRef,i=Eo(n,["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,Eo(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),l=(0,e.useRef)(null),s=function(){return To(!l.current,"[iframeSizerReact]["+(l&&l.current&&l.current.id)+"] Close event ignored, to remove the iframe update your React component"),!l.current};return(0,e.useEffect)((function(){var e=l.current;return Mo(wo({},i,{onClose:s}),e),function(){return e.iFrameResizer&&e.iFrameResizer.removeListeners()}}),[]),(0,e.useImperativeHandle)(r,(function(){return{resize:function(){return l.current.iFrameResizer.resize()},moveToAnchor:function(e){return l.current.iFrameResizer.moveToAnchor(e)},sendMessage:function(e,t){l.current.iFrameResizer.sendMessage(e,t)}}})),t().createElement("iframe",wo({title:o},a,{ref:l}))};So.defaultProps={title:"iframe"},So.propTypes={title:a().string};const No=So,Lo=window.wp.element;function xo(t){const n=(0,e.useRef)(null);return(0,e.useMemo)((()=>({get current(){return n.current},set current(e){n.current=e,"function"==typeof t?t(e):t&&(t.current=e)}})),[t])}function Oo(...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 Po(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const Ao="undefined"!=typeof document?e.useLayoutEffect:()=>{};function Do(t){const n=(0,e.useRef)(null);return Ao((()=>{n.current=t}),[t]),(0,e.useCallback)(((...e)=>{const t=n.current;return null==t?void 0:t(...e)}),[])}const ko={prefix:String(Math.round(1e10*Math.random())),current:0},_o=e.createContext(ko),jo=e.createContext(!1);let Ro=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Fo=new WeakMap;const zo="function"==typeof e.useId?function(t){let n=e.useId(),[o]=(0,e.useState)(Wo());return t||`${o?"react-aria":`react-aria${ko.prefix}`}-${n}`}:function(t){let n=(0,e.useContext)(_o);n!==ko||Ro||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 o=function(t=!1){let n=(0,e.useContext)(_o),o=(0,e.useRef)(null);if(null===o.current&&!t){var r,i;let t=null===(i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===i||null===(r=i.ReactCurrentOwner)||void 0===r?void 0:r.current;if(t){let e=Fo.get(t);null==e?Fo.set(t,{id:n.current,state:t.memoizedState}):t.memoizedState!==e.state&&(n.current=e.id,Fo.delete(t))}o.current=++n.current}return o.current}(!!t),r=`react-aria${n.prefix}`;return t||`${r}-${o}`};function Vo(){return!1}function Bo(){return!0}function Ho(e){return()=>{}}function Wo(){return"function"==typeof e.useSyncExternalStore?e.useSyncExternalStore(Ho,Vo,Bo):(0,e.useContext)(jo)}let Go,Yo=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Uo=new Map;function Zo(t){let[n,o]=(0,e.useState)(t),r=(0,e.useRef)(null),i=zo(n),a=(0,e.useRef)(null);if(Go&&Go.register(a,i),Yo){const e=Uo.get(i);e&&!e.includes(r)?e.push(r):Uo.set(i,[r])}return Ao((()=>{let e=i;return()=>{Go&&Go.unregister(a),Uo.delete(e)}}),[i]),(0,e.useEffect)((()=>{let e=r.current;return e&&o(e),()=>{e&&(r.current=null)}})),i}function Ko(e,t){if(e===t)return e;let n=Uo.get(e);if(n)return n.forEach((e=>e.current=t)),t;let o=Uo.get(t);return o?(o.forEach((t=>t.current=e)),e):t}function Qo(t=[]){let n=Zo(),[o,r]=function(t){let[n,o]=(0,e.useState)(t),r=(0,e.useRef)(null),i=Do((()=>{if(!r.current)return;let e=r.current.next();e.done?r.current=null:n===e.value?i():o(e.value)}));Ao((()=>{r.current&&i()}));let a=Do((e=>{r.current=e(n),i()}));return[n,a]}(n),i=(0,e.useCallback)((()=>{r((function*(){yield n,yield document.getElementById(n)?n:void 0}))}),[n,r]);return Ao(i,[n,i,...t]),o}function $o(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=$o(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}"undefined"!=typeof FinalizationRegistry&&(Go=new FinalizationRegistry((e=>{Uo.delete(e)})));const Xo=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=$o(e))&&(o&&(o+=" "),o+=t);return o};function Jo(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let o=e[n];for(let e in o){let n=t[e],r=o[e];"function"==typeof n&&"function"==typeof r&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=Po(n,r):"className"!==e&&"UNSAFE_className"!==e||"string"!=typeof n||"string"!=typeof r?"id"===e&&n&&r?t.id=Ko(n,r):t[e]=void 0!==r?r:n:t[e]=Xo(n,r)}}return t}const qo=Symbol("default");function er({values:t,children:n}){for(let[o,r]of t)n=e.createElement(o.Provider,{value:r},n);return n}function tr(t){let{className:n,style:o,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:l,values:s}=t;return(0,e.useMemo)((()=>{let e,t,u;return e="function"==typeof n?n({...s,defaultClassName:i}):n,t="function"==typeof o?o({...s,defaultStyle:l||{}}):o,u="function"==typeof r?r({...s,defaultChildren:a}):null==r?a:r,{className:null!=e?e:i,style:t||l?{...l,...t}:void 0,children:null!=u?u:a,"data-rac":""}}),[n,o,r,i,a,l,s])}function nr(t,n,o){let r=function(t,n){let o=(0,e.useContext)(t);if(null===n)return null;if(o&&"object"==typeof o&&"slots"in o&&o.slots){let e=n||qo;if(!o.slots[e]){let e=(new Intl.ListFormat).format(Object.keys(o.slots).map((e=>`"${e}"`)));throw new Error(`${n?`Invalid slot "${n}".`:"A slot prop is required."} Valid slot names are ${e}.`)}return o.slots[e]}return o}(o,t.slot)||{},{ref:i,...a}=r,l=xo((0,e.useMemo)((()=>Oo(n,i)),[n,i])),s=Jo(a,t);return"style"in a&&a.style&&"style"in t&&t.style&&("function"==typeof a.style||"function"==typeof t.style?s.style=e=>{let n="function"==typeof a.style?a.style(e):a.style,o={...e.defaultStyle,...n},r="function"==typeof t.style?t.style({...e,defaultStyle:o}):t.style;return{...o,...r}}:s.style={...a.style,...t.style}),[s,l]}const or=(0,e.createContext)(null);let rr=null;class ir{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 o,r;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===(o=this.assertiveLog)||void 0===o||o.appendChild(i):null===(r=this.politeLog)||void 0===r||r.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 ar=new Set(["id"]),lr=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),sr=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ur=/^(data-.*)$/;function cr(e,t={}){let{labelable:n,isLink:o,propNames:r}=t,i={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(ar.has(t)||n&&lr.has(t)||o&&sr.has(t)||(null==r?void 0:r.has(t))||ur.test(t))&&(i[t]=e[t]);return i}function dr(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 pr(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 fr(e){let t=null;return()=>(null==t&&(t=e()),t)}const gr=fr((function(){return pr(/^Mac/i)})),mr=fr((function(){return pr(/^iPhone/i)})),vr=fr((function(){return pr(/^iPad/i)||gr()&&navigator.maxTouchPoints>1})),hr=fr((function(){return mr()||vr()})),br=(fr((function(){return gr()||hr()})),fr((function(){return dr(/AppleWebKit/i)&&!yr()}))),yr=fr((function(){return dr(/Chrome/i)})),wr=fr((function(){return dr(/Android/i)})),Er=fr((function(){return dr(/Firefox/i)})),Ir=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Cr=e=>e&&"window"in e&&e.window===e?e:Ir(e).defaultView||window;let Mr=new Map,Tr=new Set;function Sr(){if("undefined"==typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let o=Mr.get(n.target);if(o&&(o.delete(n.propertyName),0===o.size&&(n.target.removeEventListener("transitioncancel",t),Mr.delete(n.target)),0===Mr.size)){for(let e of Tr)e();Tr.clear()}};document.body.addEventListener("transitionrun",(n=>{if(!e(n)||!n.target)return;let o=Mr.get(n.target);o||(o=new Set,Mr.set(n.target,o),n.target.addEventListener("transitioncancel",t,{once:!0})),o.add(n.propertyName)})),document.body.addEventListener("transitionend",t)}function Nr(e){requestAnimationFrame((()=>{0===Mr.size?e():Tr.add(e)}))}"undefined"!=typeof document&&("loading"!==document.readyState?Sr():document.addEventListener("DOMContentLoaded",Sr));let Lr="default",xr="",Or=new WeakMap;function Pr(e){if(hr()){if("default"===Lr){const t=Ir(e);xr=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Lr="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Or.set(e,e.style[t]),e.style[t]="none"}}function Ar(e){if(hr()){if("disabled"!==Lr)return;Lr="restoring",setTimeout((()=>{Nr((()=>{if("restoring"===Lr){const t=Ir(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=xr||""),xr="",Lr="default"}}))}),300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Or.has(e)){let t=Or.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),Or.delete(e)}}const Dr=e.createContext({register:()=>{}});Dr.displayName="PressResponderContext";const kr=["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"])'],_r=kr.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";kr.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const jr=kr.join(':not([hidden]):not([tabindex="-1"]),');function Rr(e){return e.matches(_r)}function Fr(e){return e.matches(jr)}function zr(e){if(function(){if(null==Vr){Vr=!1;try{document.createElement("div").focus({get preventScroll(){return Vr=!0,!0}})}catch{}}return Vr}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],o=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return o instanceof HTMLElement&&n.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:o}of e)t.scrollTop=n,t.scrollLeft=o}(t)}}let Vr=null;class Br{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 Hr(t){let n=(0,e.useRef)({isFocused:!1,observer:null});Ao((()=>{const e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let o=Do((e=>{null==t||t(e)}));return(0,e.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let t=e.target,r=e=>{n.current.isFocused=!1,t.disabled&&o(new Br("blur",e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)};t.addEventListener("focusout",r,{once:!0}),n.current.observer=new MutationObserver((()=>{if(n.current.isFocused&&t.disabled){var e;null===(e=n.current.observer)||void 0===e||e.disconnect();let o=t===document.activeElement?null:document.activeElement;t.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}})),n.current.observer.observe(t,{attributes:!0,attributeFilter:["disabled"]})}}),[o])}let Wr=!1;function Gr(e){for(;e&&!Rr(e);)e=e.parentElement;let t=Cr(e),n=t.document.activeElement;if(!n||n===e)return;Wr=!0;let o=!1,r=e=>{(e.target===n||o)&&e.stopImmediatePropagation()},i=t=>{(t.target===n||o)&&(t.stopImmediatePropagation(),e||o||(o=!0,zr(n),s()))},a=t=>{(t.target===e||o)&&t.stopImmediatePropagation()},l=t=>{(t.target===e||o)&&(t.stopImmediatePropagation(),o||(o=!0,zr(n),s()))};t.addEventListener("blur",r,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",l,!0),t.addEventListener("focus",a,!0);let s=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",r,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",l,!0),t.removeEventListener("focus",a,!0),Wr=!1,o=!1},u=requestAnimationFrame(s);return s}function Yr(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Ur(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,Yr(e,t,"set"),n),n}function Zr(e,t){Ao((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}}))}function Kr(){let t=(0,e.useRef)(new Map),n=(0,e.useCallback)(((e,n,o,r)=>{let i=(null==r?void 0:r.once)?(...e)=>{t.current.delete(o),o(...e)}:o;t.current.set(o,{type:n,eventTarget:e,fn:i,options:r}),e.addEventListener(n,i,r)}),[]),o=(0,e.useCallback)(((e,n,o,r)=>{var i;let a=(null===(i=t.current.get(o))||void 0===i?void 0:i.fn)||o;e.removeEventListener(n,a,r),t.current.delete(o)}),[]),r=(0,e.useCallback)((()=>{t.current.forEach(((e,t)=>{o(e.eventTarget,e.type,t,e.options)}))}),[o]);return(0,e.useEffect)((()=>r),[r]),{addGlobalListener:n,removeGlobalListener:o,removeAllGlobalListeners:r}}function Qr(e,t){return!(!t||!e)&&e.contains(t)}const $r=(e=document)=>e.activeElement;function Xr(e){return e.target}function Jr(e,t,n=!0){var o,r;let{metaKey:i,ctrlKey:a,altKey:l,shiftKey:s}=t;Er()&&(null===(r=window.event)||void 0===r||null===(o=r.type)||void 0===o?void 0:o.startsWith("key"))&&"_blank"===e.target&&(gr()?i=!0:a=!0);let u=br()&&gr()&&!vr()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:a,altKey:l,shiftKey:s}):new MouseEvent("click",{metaKey:i,ctrlKey:a,altKey:l,shiftKey:s,bubbles:!0,cancelable:!0});Jr.isOpening=n,zr(e),e.dispatchEvent(u),Jr.isOpening=!1}function qr(e){return!(0!==e.mozInputSource||!e.isTrusted)||(wr()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}Jr.isOpening=!1;var ei=new WeakMap;class ti{continuePropagation(){Ur(this,ei,!1)}get shouldStopPropagation(){return function(e,t){return t.get?t.get.call(e):t.value}(this,Yr(this,ei,"get"))}constructor(e,t,n,o){var r,i,a,l;l={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=ei),a.set(i,l),Ur(this,ei,!0);let s=null!==(r=null==o?void 0:o.target)&&void 0!==r?r:n.currentTarget;const u=null==s?void 0:s.getBoundingClientRect();let c,d,p=0,f=null;null!=n.clientX&&null!=n.clientY&&(d=n.clientX,f=n.clientY),u&&(null!=d&&null!=f?(c=d-u.left,p=f-u.top):(c=u.width/2,p=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=p}}const ni=Symbol("linkClicked");function oi(e){return"A"===e.tagName&&e.hasAttribute("href")}function ri(e,t){const{key:n,code:o}=e,r=t,i=r.getAttribute("role");return!("Enter"!==n&&" "!==n&&"Spacebar"!==n&&"Space"!==o||r instanceof Cr(r).HTMLInputElement&&!di(r,n)||r instanceof Cr(r).HTMLTextAreaElement||r.isContentEditable||("link"===i||!i&&oi(r))&&"Enter"!==n)}function ii(e,t){const n=e.changedTouches;for(let e=0;e<n.length;e++){const o=n[e];if(o.identifier===t)return o}return null}function ai(e,t){let n=0,o=0;return t.targetTouches&&1===t.targetTouches.length&&(n=t.targetTouches[0].clientX,o=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:o}}function li(e,t){let n=t.clientX,o=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:o}}function si(e,t){let n=t.getBoundingClientRect(),o=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=o,!((r=n).left>i.right||i.left>r.right||r.top>i.bottom||i.top>r.bottom);var r,i}function ui(e,t){return e instanceof HTMLInputElement?!di(e,t):function(e){return!(e instanceof HTMLInputElement||(e instanceof HTMLButtonElement?"submit"===e.type||"reset"===e.type:oi(e)))}(e)}const ci=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function di(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:ci.has(e.type)}let pi=null,fi=new Set,gi=new Map,mi=!1,vi=!1;const hi={Tab:!0,Escape:!0};function bi(e,t){for(let n of fi)n(e,t)}function yi(e){mi=!0,function(e){return!(e.metaKey||!gr()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(pi="keyboard",bi("keyboard",e))}function wi(e){pi="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(mi=!0,bi("pointer",e))}function Ei(e){qr(e)&&(mi=!0,pi="virtual")}function Ii(e){e.target!==window&&e.target!==document&&!Wr&&e.isTrusted&&(mi||vi||(pi="virtual",bi("virtual",e)),mi=!1,vi=!1)}function Ci(){Wr||(mi=!1,vi=!0)}function Mi(e){if("undefined"==typeof window||gi.get(Cr(e)))return;const t=Cr(e),n=Ir(e);let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){mi=!0,o.apply(this,arguments)},n.addEventListener("keydown",yi,!0),n.addEventListener("keyup",yi,!0),n.addEventListener("click",Ei,!0),t.addEventListener("focus",Ii,!0),t.addEventListener("blur",Ci,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",wi,!0),n.addEventListener("pointermove",wi,!0),n.addEventListener("pointerup",wi,!0)):(n.addEventListener("mousedown",wi,!0),n.addEventListener("mousemove",wi,!0),n.addEventListener("mouseup",wi,!0)),t.addEventListener("beforeunload",(()=>{Ti(e)}),{once:!0}),gi.set(t,{focus:o})}const Ti=(e,t)=>{const n=Cr(e),o=Ir(e);t&&o.removeEventListener("DOMContentLoaded",t),gi.has(n)&&(n.HTMLElement.prototype.focus=gi.get(n).focus,o.removeEventListener("keydown",yi,!0),o.removeEventListener("keyup",yi,!0),o.removeEventListener("click",Ei,!0),n.removeEventListener("focus",Ii,!0),n.removeEventListener("blur",Ci,!1),"undefined"!=typeof PointerEvent?(o.removeEventListener("pointerdown",wi,!0),o.removeEventListener("pointermove",wi,!0),o.removeEventListener("pointerup",wi,!0)):(o.removeEventListener("mousedown",wi,!0),o.removeEventListener("mousemove",wi,!0),o.removeEventListener("mouseup",wi,!0)),gi.delete(n))};function Si(){return"pointer"!==pi}function Ni(){return pi}"undefined"!=typeof document&&function(e){const t=Ir(e);let n;"loading"!==t.readyState?Mi(e):(n=()=>{Mi(e)},t.addEventListener("DOMContentLoaded",n))}();const Li=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xi(e){const t=Ir(e),n=$r(t);if("virtual"===Ni()){let o=n;Nr((()=>{$r(t)===o&&e.isConnected&&zr(e)}))}else zr(e)}function Oi(t){let{isDisabled:n,onFocus:o,onBlur:r,onFocusChange:i}=t;const a=(0,e.useCallback)((e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0}),[r,i]),l=Hr(a),s=(0,e.useCallback)((e=>{const t=Ir(e.target),n=t?$r(t):$r();e.target===e.currentTarget&&n===Xr(e.nativeEvent)&&(o&&o(e),i&&i(!0),l(e))}),[i,o,l]);return{focusProps:{onFocus:!n&&(o||i||r)?s:void 0,onBlur:n||!r&&!i?void 0:a}}}function Pi(e){if(!e)return;let t=!0;return n=>{let o={...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(o),t&&n.stopPropagation()}}let Ai=e.createContext(null);function Di(t,n){let{focusProps:o}=Oi(t),{keyboardProps:r}=function(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Pi(e.onKeyDown),onKeyUp:Pi(e.onKeyUp)}}}(t),i=Jo(o,r),a=function(t){let n=(0,e.useContext)(Ai)||{};Zr(n,t);let{ref:o,...r}=n;return r}(n),l=t.isDisabled?{}:a,s=(0,e.useRef)(t.autoFocus);(0,e.useEffect)((()=>{s.current&&n.current&&xi(n.current),s.current=!1}),[n]);let u=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(u=void 0),{focusableProps:Jo({...i,tabIndex:u},l)}}function ki(t,n){let o,{elementType:r="button",isDisabled:i,onPress:a,onPressStart:l,onPressEnd:s,onPressUp:u,onPressChange:c,preventFocusOnPress:d,allowFocusWhenDisabled:p,onClick:f,href:g,target:m,rel:v,type:h="button"}=t;o="button"===r?{type:h,disabled:i}:{role:"button",href:"a"!==r||i?void 0:g,target:"a"===r?m:void 0,type:"input"===r?h:void 0,disabled:"input"===r?i:void 0,"aria-disabled":i&&"input"!==r?i:void 0,rel:"a"===r?v:void 0};let{pressProps:b,isPressed:y}=function(t){let{onPress:n,onPressChange:o,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:l,isPressed:s,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...f}=function(t){let n=(0,e.useContext)(Dr);if(n){let{register:e,...o}=n;t=Jo(o,t),e()}return Zr(n,t.ref),t}(t),[g,m]=(0,e.useState)(!1),v=(0,e.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:h,removeAllGlobalListeners:b}=Kr(),y=Do(((e,t)=>{let n=v.current;if(l||n.didFirePressStart)return!1;let i=!0;if(n.isTriggeringEvent=!0,r){let n=new ti("pressstart",t,e);r(n),i=n.shouldStopPropagation}return o&&o(!0),n.isTriggeringEvent=!1,n.didFirePressStart=!0,m(!0),i})),w=Do(((e,t,r=!0)=>{let a=v.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let s=!0;if(i){let n=new ti("pressend",t,e);i(n),s=n.shouldStopPropagation}if(o&&o(!1),m(!1),n&&r&&!l){let o=new ti("press",t,e);n(o),s&&(s=o.shouldStopPropagation)}return a.isTriggeringEvent=!1,s})),E=Do(((e,t)=>{let n=v.current;if(l)return!1;if(a){n.isTriggeringEvent=!0;let o=new ti("pressup",t,e);return a(o),n.isTriggeringEvent=!1,o.shouldStopPropagation}return!0})),I=Do((e=>{let t=v.current;if(t.isPressed&&t.target){t.didFirePressStart&&null!=t.pointerType&&w(li(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||Ar(t.target);for(let e of t.disposables)e();t.disposables=[]}})),C=Do((e=>{c&&I(e)})),M=(0,e.useMemo)((()=>{let e=v.current,t={onKeyDown(t){if(ri(t.nativeEvent,t.currentTarget)&&Qr(t.currentTarget,Xr(t.nativeEvent))){var o;ui(Xr(t.nativeEvent),t.key)&&t.preventDefault();let r=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",r=y(t,"keyboard");let o=t.currentTarget,i=t=>{ri(t,o)&&!t.repeat&&Qr(o,Xr(t))&&e.target&&E(li(e.target,t),"keyboard")};h(Ir(t.currentTarget),"keyup",Po(i,n),!0)}r&&t.stopPropagation(),t.metaKey&&gr()&&(null===(o=e.metaKeyEvents)||void 0===o||o.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||Qr(t.currentTarget,Xr(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!Jr.isOpening){let n=!0;if(l&&t.preventDefault(),e.ignoreEmulatedMouseEvents||e.isPressed||"virtual"!==e.pointerType&&!qr(t.nativeEvent)){if(e.isPressed&&"keyboard"!==e.pointerType){let o=e.pointerType||t.nativeEvent.pointerType||"virtual";n=w(li(t.currentTarget,t),o,!0),e.isOverTarget=!1,I(t)}}else{let e=y(t,"virtual"),o=E(t,"virtual"),r=w(t,"virtual");n=e&&o&&r}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n;if(e.isPressed&&e.target&&ri(t,e.target)){var o;ui(Xr(t),t.key)&&t.preventDefault();let n=Xr(t);w(li(e.target,t),"keyboard",Qr(e.target,Xr(t))),b(),"Enter"!==t.key&&oi(e.target)&&Qr(e.target,n)&&!t[ni]&&(t[ni]=!0,Jr(e.target,t,!1)),e.isPressed=!1,null===(o=e.metaKeyEvents)||void 0===o||o.delete(t.key)}else if("Meta"===t.key&&(null===(n=e.metaKeyEvents)||void 0===n?void 0:n.size)){var r;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())null===(r=e.target)||void 0===r||r.dispatchEvent(new KeyboardEvent("keyup",n))}};if("undefined"!=typeof PointerEvent){t.onPointerDown=t=>{if(0!==t.button||!Qr(t.currentTarget,Xr(t.nativeEvent)))return;if(r=t.nativeEvent,!wr()&&0===r.width&&0===r.height||1===r.width&&1===r.height&&0===r.pressure&&0===r.detail&&"mouse"===r.pointerType)return void(e.pointerType="virtual");var r;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||Pr(e.target),i=y(t,e.pointerType);let r=Xr(t.nativeEvent);"releasePointerCapture"in r&&r.releasePointerCapture(t.pointerId),h(Ir(t.currentTarget),"pointerup",n,!1),h(Ir(t.currentTarget),"pointercancel",o,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(Qr(t.currentTarget,Xr(t.nativeEvent))&&0===t.button){if(u){let n=Gr(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{Qr(t.currentTarget,Xr(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,y(li(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(li(e.target,t),e.pointerType,!1),C(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(Qr(e.target,Xr(t))&&null!=e.pointerType){let n=!1,o=setTimeout((()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?I(t):(zr(e.target),e.target.click()))}),80);h(t.currentTarget,"click",(()=>n=!0),!0),e.disposables.push((()=>clearTimeout(o)))}else I(t);e.isOverTarget=!1}},o=e=>{I(e)};t.onDragStart=e=>{Qr(e.currentTarget,Xr(e.nativeEvent))&&I(e)}}else{t.onMouseDown=t=>{if(0===t.button&&Qr(t.currentTarget,Xr(t.nativeEvent)))if(e.ignoreEmulatedMouseEvents)t.stopPropagation();else{if(e.isPressed=!0,e.isOverTarget=!0,e.target=t.currentTarget,e.pointerType=qr(t.nativeEvent)?"virtual":"mouse",(0,et.flushSync)((()=>y(t,e.pointerType)))&&t.stopPropagation(),u){let n=Gr(t.target);n&&e.disposables.push(n)}h(Ir(t.currentTarget),"mouseup",n,!1)}},t.onMouseEnter=t=>{if(!Qr(t.currentTarget,Xr(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(!Qr(t.currentTarget,Xr(t.nativeEvent)))return;let n=!0;e.isPressed&&!e.ignoreEmulatedMouseEvents&&null!=e.pointerType&&(e.isOverTarget=!1,n=w(t,e.pointerType,!1),C(t)),n&&t.stopPropagation()},t.onMouseUp=t=>{Qr(t.currentTarget,Xr(t.nativeEvent))&&(e.ignoreEmulatedMouseEvents||0!==t.button||E(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||I(t),e.isOverTarget=!1))};t.onTouchStart=t=>{if(!Qr(t.currentTarget,Xr(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||Pr(e.target),y(ai(e.target,t),e.pointerType)&&t.stopPropagation(),h(Cr(t.currentTarget),"scroll",o,!0))},t.onTouchMove=t=>{if(!Qr(t.currentTarget,Xr(t.nativeEvent)))return;if(!e.isPressed)return void t.stopPropagation();let n=ii(t.nativeEvent,e.activePointerId),o=!0;n&&si(n,t.currentTarget)?e.isOverTarget||null==e.pointerType||(e.isOverTarget=!0,o=y(ai(e.target,t),e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,o=w(ai(e.target,t),e.pointerType,!1),C(ai(e.target,t))),o&&t.stopPropagation()},t.onTouchEnd=t=>{if(!Qr(t.currentTarget,Xr(t.nativeEvent)))return;if(!e.isPressed)return void t.stopPropagation();let n=ii(t.nativeEvent,e.activePointerId),o=!0;n&&si(n,t.currentTarget)&&null!=e.pointerType?(E(ai(e.target,t),e.pointerType),o=w(ai(e.target,t),e.pointerType)):e.isOverTarget&&null!=e.pointerType&&(o=w(ai(e.target,t),e.pointerType,!1)),o&&t.stopPropagation(),e.isPressed=!1,e.activePointerId=null,e.isOverTarget=!1,e.ignoreEmulatedMouseEvents=!0,e.target&&!d&&Ar(e.target),b()},t.onTouchCancel=t=>{Qr(t.currentTarget,Xr(t.nativeEvent))&&(t.stopPropagation(),e.isPressed&&I(ai(e.target,t)))};let o=t=>{e.isPressed&&Qr(Xr(t),e.target)&&I({currentTarget:e.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};t.onDragStart=e=>{Qr(e.currentTarget,Xr(e.nativeEvent))&&I(e)}}return t}),[h,l,u,b,d,I,C,w,y,E]);return(0,e.useEffect)((()=>{let e=v.current;return()=>{var t;d||Ar(null!==(t=e.target)&&void 0!==t?t:void 0);for(let t of e.disposables)t();e.disposables=[]}}),[d]),{isPressed:s||g,pressProps:Jo(f,M)}}({onPressStart:l,onPressEnd:s,onPressChange:c,onPress:a,onPressUp:u,isDisabled:i,preventFocusOnPress:d,ref:n}),{focusableProps:w}=Di(t,n);p&&(w.tabIndex=i?-1:w.tabIndex);let E=Jo(w,b,cr(t,{labelable:!0}));return{isPressed:y,buttonProps:Jo(o,E,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],onClick:e=>{f&&(f(e),console.warn("onClick is deprecated, please use onPress"))}})}}function _i(t){let{isDisabled:n,onBlurWithin:o,onFocusWithin:r,onFocusWithinChange:i}=t,a=(0,e.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=Kr(),u=(0,e.useCallback)((e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),o&&o(e),i&&i(!1))}),[o,i,a,s]),c=Hr(u),d=(0,e.useCallback)((e=>{if(!e.currentTarget.contains(e.target))return;const t=Ir(e.target),n=$r(t);if(!a.current.isFocusWithin&&n===Xr(e.nativeEvent)){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,c(e);let n=e.currentTarget;l(t,"focus",(e=>{if(a.current.isFocusWithin&&!Qr(n,e.target)){let o=new Br("blur",new t.defaultView.FocusEvent("blur",{relatedTarget:e.target}));o.target=n,o.currentTarget=n,u(o)}}),{capture:!0})}}),[r,i,c,l,u]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:u}}}function ji(t={}){let{autoFocus:n=!1,isTextInput:o,within:r}=t,i=(0,e.useRef)({isFocused:!1,isFocusVisible:n||Si()}),[a,l]=(0,e.useState)(!1),[s,u]=(0,e.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),c=(0,e.useCallback)((()=>u(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,e.useCallback)((e=>{i.current.isFocused=e,l(e),c()}),[c]);!function(t,n,o){Mi(),(0,e.useEffect)((()=>{let e=(e,n)=>{(function(e,t,n){let o=Ir(null==n?void 0:n.target);const r="undefined"!=typeof window?Cr(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?Cr(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?Cr(null==n?void 0:n.target).HTMLElement:HTMLElement,l="undefined"!=typeof window?Cr(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||o.activeElement instanceof r&&!Li.has(o.activeElement.type)||o.activeElement instanceof i||o.activeElement instanceof a&&o.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof l&&!hi[n.key])})(!!(null==o?void 0:o.isTextInput),e,n)&&t(Si())};return fi.add(e),()=>{fi.delete(e)}}),n)}((e=>{i.current.isFocusVisible=e,c()}),[],{isTextInput:o});let{focusProps:p}=Oi({isDisabled:r,onFocusChange:d}),{focusWithinProps:f}=_i({isDisabled:!r,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:s,focusProps:r?f:p}}let Ri=!1,Fi=0;function zi(){Ri=!0,setTimeout((()=>{Ri=!1}),50)}function Vi(e){"touch"===e.pointerType&&zi()}function Bi(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",Vi):document.addEventListener("touchend",zi),Fi++,()=>{Fi--,Fi>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",Vi):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,e.createContext)(!1),Wi=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Gi=(0,e.createContext)({}),Yi=function(t){let n=(n,o)=>(0,e.useContext)(Hi)?null:t(n,o);return n.displayName=t.displayName||t.name,(0,e.forwardRef)(n)}((function(t,n){[t,n]=nr(t,n,Gi);let o=t=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}(t),{isPending:r}=o,{buttonProps:i,isPressed:a}=ki(t,n),{focusProps:l,isFocused:s,isFocusVisible:u}=ji(t),{hoverProps:c,isHovered:d}=function(t){let{onHoverStart:n,onHoverChange:o,onHoverEnd:r,isDisabled:i}=t,[a,l]=(0,e.useState)(!1),s=(0,e.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,e.useEffect)(Bi,[]);let{addGlobalListener:u,removeAllGlobalListeners:c}=Kr(),{hoverProps:d,triggerHoverEnd:p}=(0,e.useMemo)((()=>{let e=(e,r)=>{if(s.pointerType=r,i||"touch"===r||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let a=e.currentTarget;s.target=a,u(Ir(e.target),"pointerover",(e=>{s.isHovered&&s.target&&!Qr(s.target,e.target)&&t(e,e.pointerType)}),{capture:!0}),n&&n({type:"hoverstart",target:a,pointerType:r}),o&&o(!0),l(!0)},t=(e,t)=>{let n=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&n&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:n,pointerType:t}),o&&o(!1),l(!1))},a={};return"undefined"!=typeof PointerEvent?(a.onPointerEnter=t=>{Ri&&"mouse"===t.pointerType||e(t,t.pointerType)},a.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&t(e,e.pointerType)}):(a.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},a.onMouseEnter=t=>{s.ignoreEmulatedMouseEvents||Ri||e(t,"mouse"),s.ignoreEmulatedMouseEvents=!1},a.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&t(e,"mouse")}),{hoverProps:a,triggerHoverEnd:t}}),[n,o,r,i,s,u,c]);return(0,e.useEffect)((()=>{i&&p({currentTarget:s.target},s.pointerType)}),[i]),{hoverProps:d,isHovered:a}}({...t,isDisabled:t.isDisabled||r}),p={isHovered:d,isPressed:(o.isPressed||a)&&!r,isFocused:s,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:null!=r&&r},f=tr({...t,values:p,defaultClassName:"react-aria-Button"}),g=Zo(i.id),m=Zo(),v=i["aria-labelledby"];r&&(v?v=`${v} ${m}`:i["aria-label"]&&(v=`${g} ${m}`));let h=(0,e.useRef)(r);return(0,e.useEffect)((()=>{let e={"aria-labelledby":v||g};(!h.current&&s&&r||h.current&&s&&!r)&&function(e,t="assertive",n=7e3){rr?rr.announce(e,t,n):(rr=new ir,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"undefined"!=typeof jest)?rr.announce(e,t,n):setTimeout((()=>{(null==rr?void 0:rr.isAttached())&&(null==rr||rr.announce(e,t,n))}),100))}(e,"assertive"),h.current=r}),[r,s,v,g]),e.createElement("button",{...cr(t,{propNames:Wi}),...Jo(i,l,c),...f,type:"submit"===i.type&&r?"button":i.type,id:g,ref:n,"aria-labelledby":v,slot:t.slot||void 0,"aria-disabled":r?"true":i["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":u||void 0},e.createElement(or.Provider,{value:{id:m}},f.children))}));(0,e.createContext)(null),(0,e.createContext)(null),(0,e.createContext)(null),(0,e.createContext)(null),(0,e.createContext)(null);const Ui=(0,e.createContext)({}),Zi=(0,e.createContext)({});function Ki({children:t}){let n=(0,e.useMemo)((()=>({register:()=>{}})),[]);return e.createElement(Dr.Provider,{value:n},t)}function Qi(e,t){return"#comment"!==e.nodeName&&function(e){const t=Cr(e);if(!(e instanceof t.HTMLElement||e instanceof t.SVGElement))return!1;let{display:n,visibility:o}=e.style,r="none"!==n&&"hidden"!==o&&"collapse"!==o;if(r){const{getComputedStyle:t}=e.ownerDocument.defaultView;let{display:n,visibility:o}=t(e);r="none"!==n&&"hidden"!==o&&"collapse"!==o}return r}(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||Qi(e.parentElement,e))}const $i=e.createContext(null),Xi="react-aria-focus-scope-restore";let Ji=null;function qi(t){let{children:n,contain:o,restoreFocus:r,autoFocus:i}=t,a=(0,e.useRef)(null),l=(0,e.useRef)(null),s=(0,e.useRef)([]),{parentNode:u}=(0,e.useContext)($i)||{},c=(0,e.useMemo)((()=>new fa({scopeRef:s})),[s]);Ao((()=>{let e=u||ga.root;if(ga.getTreeNode(e.scopeRef)&&Ji&&!ia(Ji,e.scopeRef)){let t=ga.getTreeNode(Ji);t&&(e=t)}e.addChild(c),ga.addNode(c)}),[c,u]),Ao((()=>{let e=ga.getTreeNode(s);e&&(e.contain=!!o)}),[o]),Ao((()=>{var e;let t=null===(e=a.current)||void 0===e?void 0:e.nextSibling,n=[],o=e=>e.stopPropagation();for(;t&&t!==l.current;)n.push(t),t.addEventListener(Xi,o),t=t.nextSibling;return s.current=n,()=>{for(let e of n)e.removeEventListener(Xi,o)}}),[n]),function(e,t,n){Ao((()=>{if(t||n)return;let o=e.current;const r=Ir(o?o[0]:void 0);let i=t=>{let n=Xr(t);oa(n,e.current)?Ji=e:na(n)||(Ji=null)};return r.addEventListener("focusin",i,!1),null==o||o.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{r.removeEventListener("focusin",i,!1),null==o||o.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[e,t,n])}(s,r,o),function(t,n){let o=(0,e.useRef)(void 0),r=(0,e.useRef)(void 0);Ao((()=>{let e=t.current;if(!n)return void(r.current&&(cancelAnimationFrame(r.current),r.current=void 0));const i=Ir(e?e[0]:void 0);let a=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!ta(t)||e.isComposing)return;let n=$r(i),o=t.current;if(!o||!oa(n,o))return;let r=da(ea(o),{tabbable:!0},o);if(!n)return;r.currentNode=n;let a=e.shiftKey?r.previousNode():r.nextNode();a||(r.currentNode=e.shiftKey?o[o.length-1].nextElementSibling:o[0].previousElementSibling,a=e.shiftKey?r.previousNode():r.nextNode()),e.preventDefault(),a&&aa(a,!0)},l=e=>{Ji&&!ia(Ji,t)||!oa(Xr(e),t.current)?ta(t)&&!ra(Xr(e),t)?o.current?o.current.focus():Ji&&Ji.current&&sa(Ji.current):ta(t)&&(o.current=Xr(e)):(Ji=t,o.current=Xr(e))},s=e=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame((()=>{let n=Ni(),r=("virtual"===n||null===n)&&wr()&&yr(),a=$r(i);if(!r&&a&&ta(t)&&!ra(a,t)){Ji=t;let n=Xr(e);var l;n&&n.isConnected?(o.current=n,null===(l=o.current)||void 0===l||l.focus()):Ji.current&&sa(Ji.current)}}))};return i.addEventListener("keydown",a,!1),i.addEventListener("focusin",l,!1),null==e||e.forEach((e=>e.addEventListener("focusin",l,!1))),null==e||e.forEach((e=>e.addEventListener("focusout",s,!1))),()=>{i.removeEventListener("keydown",a,!1),i.removeEventListener("focusin",l,!1),null==e||e.forEach((e=>e.removeEventListener("focusin",l,!1))),null==e||e.forEach((e=>e.removeEventListener("focusout",s,!1)))}}),[t,n]),Ao((()=>()=>{r.current&&cancelAnimationFrame(r.current)}),[r])}(s,o),function(t,n,o){const r=(0,e.useRef)("undefined"!=typeof document?$r(Ir(t.current?t.current[0]:void 0)):null);Ao((()=>{let e=t.current;const r=Ir(e?e[0]:void 0);if(!n||o)return;let i=()=>{Ji&&!ia(Ji,t)||!oa($r(r),t.current)||(Ji=t)};return r.addEventListener("focusin",i,!1),null==e||e.forEach((e=>e.addEventListener("focusin",i,!1))),()=>{r.removeEventListener("focusin",i,!1),null==e||e.forEach((e=>e.removeEventListener("focusin",i,!1)))}}),[t,o]),Ao((()=>{const e=Ir(t.current?t.current[0]:void 0);if(!n)return;let r=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey||!ta(t)||n.isComposing)return;let o=e.activeElement;if(!ra(o,t)||!ua(t))return;let r=ga.getTreeNode(t);if(!r)return;let i=r.nodeToRestore,a=da(e.body,{tabbable:!0});a.currentNode=o;let l=n.shiftKey?a.previousNode():a.nextNode();if(i&&i.isConnected&&i!==e.body||(i=void 0,r.nodeToRestore=void 0),(!l||!ra(l,t))&&i){a.currentNode=i;do{l=n.shiftKey?a.previousNode():a.nextNode()}while(ra(l,t));n.preventDefault(),n.stopPropagation(),l?aa(l,!0):na(i)?aa(i,!0):o.blur()}};return o||e.addEventListener("keydown",r,!0),()=>{o||e.removeEventListener("keydown",r,!0)}}),[t,n,o]),Ao((()=>{const e=Ir(t.current?t.current[0]:void 0);if(!n)return;let o=ga.getTreeNode(t);var i;return o?(o.nodeToRestore=null!==(i=r.current)&&void 0!==i?i:void 0,()=>{let o=ga.getTreeNode(t);if(!o)return;let r=o.nodeToRestore,i=$r(e);if(n&&r&&(i&&ra(i,t)||i===e.body&&ua(t))){let n=ga.clone();requestAnimationFrame((()=>{if(e.activeElement===e.body){let e=n.getTreeNode(t);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void ca(e.nodeToRestore);e=e.parent}for(e=n.getTreeNode(t);e;){if(e.scopeRef&&e.scopeRef.current&&ga.getTreeNode(e.scopeRef))return void ca(la(e.scopeRef.current,!0));e=e.parent}}}))}}):void 0}),[t,n])}(s,r,o),function(t,n){const o=e.useRef(n);(0,e.useEffect)((()=>{if(o.current){Ji=t;const e=Ir(t.current?t.current[0]:void 0);!oa($r(e),Ji.current)&&t.current&&sa(t.current)}o.current=!1}),[t])}(s,i),(0,e.useEffect)((()=>{const e=$r(Ir(s.current?s.current[0]:void 0));let t=null;if(oa(e,s.current)){for(let n of ga.traverse())n.scopeRef&&oa(e,n.scopeRef.current)&&(t=n);t===ga.getTreeNode(s)&&(Ji=t.scopeRef)}}),[s]),Ao((()=>()=>{var e,t,n;let o=null!==(n=null===(t=ga.getTreeNode(s))||void 0===t||null===(e=t.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==n?n:null;s!==Ji&&!ia(s,Ji)||o&&!ga.getTreeNode(o)||(Ji=o),ga.removeTreeNode(s)}),[s]);let d=(0,e.useMemo)((()=>function(e){return{focusNext(t={}){let n=e.current,{from:o,tabbable:r,wrap:i,accept:a}=t;var l;let s=o||$r(Ir(null!==(l=n[0])&&void 0!==l?l:void 0)),u=n[0].previousElementSibling,c=da(ea(n),{tabbable:r,accept:a},n);c.currentNode=oa(s,n)?s:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&aa(d,!0),d},focusPrevious(t={}){let n=e.current,{from:o,tabbable:r,wrap:i,accept:a}=t;var l;let s=o||$r(Ir(null!==(l=n[0])&&void 0!==l?l:void 0)),u=n[n.length-1].nextElementSibling,c=da(ea(n),{tabbable:r,accept:a},n);c.currentNode=oa(s,n)?s:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&aa(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:o,accept:r}=t,i=da(ea(n),{tabbable:o,accept:r},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();return a&&aa(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:o,accept:r}=t,i=da(ea(n),{tabbable:o,accept:r},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();return a&&aa(a,!0),a}}}(s)),[]),p=(0,e.useMemo)((()=>({focusManager:d,parentNode:c})),[c,d]);return e.createElement($i.Provider,{value:p},e.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),n,e.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function ea(e){return e[0].parentElement}function ta(e){let t=ga.getTreeNode(Ji);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function na(e){return ra(e)}function oa(e,t){return!!e&&!!t&&t.some((t=>t.contains(e)))}function ra(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ga.traverse(ga.getTreeNode(t)))if(n&&oa(e,n.current))return!0;return!1}function ia(e,t){var n;let o=null===(n=ga.getTreeNode(t))||void 0===n?void 0:n.parent;for(;o;){if(o.scopeRef===e)return!0;o=o.parent}return!1}function aa(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{xi(e)}catch{}}function la(e,t=!0){let n=e[0].previousElementSibling,o=ea(e),r=da(o,{tabbable:t},e);r.currentNode=n;let i=r.nextNode();return t&&!i&&(o=ea(e),r=da(o,{tabbable:!1},e),r.currentNode=n,i=r.nextNode()),i}function sa(e,t=!0){aa(la(e,t))}function ua(e){let t=ga.getTreeNode(Ji);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function ca(e){e.dispatchEvent(new CustomEvent(Xi,{bubbles:!0,cancelable:!0}))&&aa(e)}function da(e,t,n){let o=(null==t?void 0:t.tabbable)?Fr:Rr,r=(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,i=Ir(r),a=function(e,t,n,o){return e.createTreeWalker(t,n,o)}(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var r;return(null==t||null===(r=t.from)||void 0===r?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:!o(e)||!Qi(e)||n&&!oa(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 pa{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let o=this.fastMap.get(null!=t?t:null);if(!o)return;let r=new fa({scopeRef:e});o.addChild(r),r.parent=o,this.fastMap.set(e,r),n&&(r.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&&oa(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let o=t.children;n&&(n.removeChild(t),o.size>0&&o.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 pa;var n;for(let o of this.traverse())t.addTreeNode(o.scopeRef,null!==(n=null===(e=o.parent)||void 0===e?void 0:e.scopeRef)&&void 0!==n?n:null,o.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new fa({scopeRef:null}),this.fastMap.set(null,this.root)}}class fa{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 ga=new pa;const ma=e.createContext(null);function va(t){let n=Wo(),{portalContainer:o=(n?null:document.body),isExiting:r}=t,[i,a]=(0,e.useState)(!1),l=(0,e.useMemo)((()=>({contain:i,setContain:a})),[i,a]),{getContainer:s}=null!==(u=(0,e.useContext)(Zi))&&void 0!==u?u:{};var u;if(!t.portalContainer&&s&&(o=s()),!o)return null;let c=t.children;return t.disableFocusManagement||(c=e.createElement(qi,{restoreFocus:!0,contain:(t.shouldContainFocus||i)&&!r},c)),c=e.createElement(ma.Provider,{value:l},e.createElement(Ki,null,c)),et.createPortal(c,o)}function ha(){let t=(0,e.useContext)(ma),n=null==t?void 0:t.setContain;Ao((()=>{null==n||n(!0)}),[n])}const ba=(0,e.createContext)(null),ya=(0,e.createContext)(null),wa=(0,e.forwardRef)((function(t,n){let o=t["aria-labelledby"];[t,n]=nr(t,n,ba);let{dialogProps:r,titleProps:i}=function(t,n){let{role:o="dialog"}=t,r=Qo();r=t["aria-label"]?void 0:r;let i=(0,e.useRef)(!1);return(0,e.useEffect)((()=>{if(n.current&&!n.current.contains(document.activeElement)){xi(n.current);let e=setTimeout((()=>{document.activeElement===n.current&&(i.current=!0,n.current&&(n.current.blur(),xi(n.current)),i.current=!1)}),500);return()=>{clearTimeout(e)}}}),[n]),ha(),{dialogProps:{...cr(t,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}({...t,"aria-labelledby":o},n),a=(0,e.useContext)(ya);r["aria-label"]||r["aria-labelledby"]||(t["aria-labelledby"]?r["aria-labelledby"]=t["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 l=tr({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return e.createElement("section",{...cr(t),...r,...l,ref:n,slot:t.slot||void 0},e.createElement(er,{values:[[Ui,{slots:{[qo]:{},title:{...i,level:2}}}],[Gi,{slots:{[qo]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},l.children))}));let Ea=new WeakMap,Ia=[];function Ca(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 Ma=[];function Ta(t,n){let{onClose:o,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=t;(0,e.useEffect)((()=>{if(i&&!Ma.includes(n))return Ma.push(n),()=>{let e=Ma.indexOf(n);e>=0&&Ma.splice(e,1)}}),[i,n]);let u=()=>{Ma[Ma.length-1]===n&&o&&o()};!function(t){let{ref:n,onInteractOutside:o,isDisabled:r,onInteractOutsideStart:i}=t,a=(0,e.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Do((e=>{o&&Ca(e,n)&&(i&&i(e),a.current.isPointerDown=!0)})),s=Do((e=>{o&&o(e)}));(0,e.useEffect)((()=>{let e=a.current;if(r)return;const t=n.current,o=Ir(t);if("undefined"!=typeof PointerEvent){let t=t=>{e.isPointerDown&&Ca(t,n)&&s(t),e.isPointerDown=!1};return o.addEventListener("pointerdown",l,!0),o.addEventListener("pointerup",t,!0),()=>{o.removeEventListener("pointerdown",l,!0),o.removeEventListener("pointerup",t,!0)}}{let t=t=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:e.isPointerDown&&Ca(t,n)&&s(t),e.isPointerDown=!1},r=t=>{e.ignoreEmulatedMouseEvents=!0,e.isPointerDown&&Ca(t,n)&&s(t),e.isPointerDown=!1};return o.addEventListener("mousedown",l,!0),o.addEventListener("mouseup",t,!0),o.addEventListener("touchstart",l,!0),o.addEventListener("touchend",r,!0),()=>{o.removeEventListener("mousedown",l,!0),o.removeEventListener("mouseup",t,!0),o.removeEventListener("touchstart",l,!0),o.removeEventListener("touchend",r,!0)}}}),[n,r,l,s])}({ref:n,onInteractOutside:a&&i?e=>{s&&!s(e.target)||(Ma[Ma.length-1]===n&&(e.stopPropagation(),e.preventDefault()),u())}:void 0,onInteractOutsideStart:e=>{s&&!s(e.target)||Ma[Ma.length-1]===n&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=_i({isDisabled:!r,onBlurWithin:e=>{e.relatedTarget&&!ra(e.relatedTarget,Ji)&&(s&&!s(e.relatedTarget)||null==o||o())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||l||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}function Sa(e,t){if(!e)return!1;let n=window.getComputedStyle(e),o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function Na(e,t){let n=e;for(Sa(n,t)&&(n=n.parentElement);n&&!Sa(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}const La="undefined"!=typeof document&&window.visualViewport,xa=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Oa,Pa=0;function Aa(e,t,n){let o=e.style[t];return e.style[t]=n,()=>{e.style[t]=o}}function Da(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function ka(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=Na(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>t+n.clientHeight&&(e.scrollTop+=o-t)}n=e.parentElement}}function _a(t,n,o){let{overlayProps:r,underlayProps:i}=Ta({...t,isOpen:n.isOpen,onClose:n.close},o);return function(e={}){let{isDisabled:t}=e;Ao((()=>{if(!t)return Pa++,1===Pa&&(Oa=hr()?function(){let e,t,n=null,o=()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=Po(Da(window,"scroll",(()=>{window.scrollTo(0,0)})),Aa(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),Aa(document.documentElement,"overflow","hidden"),Aa(document.body,"marginTop",`-${t}px`),(()=>{window.scrollTo(e,t)})),window.scrollTo(0,0)},r=Po(Da(document,"touchstart",(n=>{e=Na(n.target,!0),e===document.documentElement&&e===document.body||e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=Aa(e,"overscrollBehavior","contain"))}),{passive:!1,capture:!0}),Da(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}),Da(document,"touchend",(()=>{t&&t()}),{passive:!1,capture:!0}),Da(document,"focus",(e=>{let t=e.target;(function(e){return e instanceof HTMLInputElement&&!xa.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable})(t)&&(o(),t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",La&&(La.height<window.innerHeight?requestAnimationFrame((()=>{ka(t)})):La.addEventListener("resize",(()=>ka(t)),{once:!0}))})))}),!0));return()=>{null==t||t(),null==n||n(),r()}}():Po(Aa(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"),Aa(document.documentElement,"overflow","hidden"))),()=>{Pa--,0===Pa&&Oa()}}),[t])}({isDisabled:!n.isOpen}),ha(),(0,e.useEffect)((()=>{if(n.isOpen&&o.current)return function(e,t=document.body){let n=new Set(e),o=new Set,r=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&&o.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},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),a=t(e);if(a===NodeFilter.FILTER_ACCEPT&&i(e),a!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)i(e),e=r.nextNode()}},i=e=>{var t;let n=null!==(t=Ea.get(e))&&void 0!==t?t:0;"true"===e.getAttribute("aria-hidden")&&0===n||(0===n&&e.setAttribute("aria-hidden","true"),o.add(e),Ea.set(e,n+1))};Ia.length&&Ia[Ia.length-1].disconnect(),r(t);let a=new MutationObserver((e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...n,...o].some((e=>e.contains(t.target)))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),o.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&&r(e):n.add(e)}}));a.observe(t,{childList:!0,subtree:!0});let l={visibleNodes:n,hiddenNodes:o,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Ia.push(l),()=>{a.disconnect();for(let e of o){let t=Ea.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),Ea.delete(e)):Ea.set(e,t-1))}l===Ia[Ia.length-1]?(Ia.pop(),Ia.length&&Ia[Ia.length-1].observe()):Ia.splice(Ia.indexOf(l),1)}}([o.current])}),[n.isOpen,o]),{modalProps:Jo(r),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 Ra=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Fa=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 Ra.has(t.script)}let t=e.split("-")[0];return Fa.has(t)}const Va=Symbol.for("react-aria.i18n.locale");function Ba(){let e="undefined"!=typeof window&&window[Va]||"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=Ba(),Wa=new Set;function Ga(){Ha=Ba();for(let e of Wa)e(Ha)}const Ya=e.createContext(null);function Ua(){let t=function(){let t=Wo(),[n,o]=(0,e.useState)(Ha);return(0,e.useEffect)((()=>(0===Wa.size&&window.addEventListener("languagechange",Ga),Wa.add(o),()=>{Wa.delete(o),0===Wa.size&&window.removeEventListener("languagechange",Ga)})),[]),t?{locale:"en-US",direction:"ltr"}:n}();return(0,e.useContext)(Ya)||t}const Za=Symbol.for("react-aria.i18n.locale"),Ka=Symbol.for("react-aria.i18n.strings");let Qa;class $a{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 o=function(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}(e);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))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===Qa){let e=window[Ka];if(!e)return null;Qa={};for(let n in e)Qa[n]=new $a({[t]:e[n]},t)}let n=null==Qa?void 0:Qa[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 Xa=new Map,Ja=new Map;class qa{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 o=t["="+e];if(o)return"function"==typeof o?o():o;let r=this.locale+":"+n,i=Xa.get(r);return i||(i=new Intl.PluralRules(this.locale,{type:n}),Xa.set(r,i)),o=t[i.select(e)]||t.other,"function"==typeof o?o():o}number(e){let t=Ja.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Ja.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 el=new WeakMap;function tl(t,n){let{locale:o}=Ua(),r=function(e,t){return t&&$a.getGlobalDictionaryForPackage(t)||function(e){let t=el.get(e);return t||(t=new $a(e),el.set(e,t)),t}(e)}(t,n);return(0,e.useMemo)((()=>new qa(o,r)),[o,r])}const nl={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 ol(t){let{children:n,elementType:o="div",isFocusable:r,style:i,...a}=t,{visuallyHiddenProps:l}=function(t={}){let{style:n,isFocusable:o}=t,[r,i]=(0,e.useState)(!1),{focusWithinProps:a}=_i({isDisabled:!o,onFocusWithinChange:e=>i(e)});return{visuallyHiddenProps:{...a,style:(0,e.useMemo)((()=>r?n:n?{...nl,...n}:nl),[r])}}}(t);return e.createElement(o,Jo(a,l),n)}function rl(t){let{onDismiss:n,...o}=t;var r;let i=function(e,t){let{id:n,"aria-label":o,"aria-labelledby":r}=e;if(n=Zo(n),r&&o){let e=new Set([n,...r.trim().split(/\s+/)]);r=[...e].join(" ")}else r&&(r=r.trim().split(/\s+/).join(" "));return o||r||!t||(o=t),{id:n,"aria-label":o,"aria-labelledby":r}}(o,tl((r=ja)&&r.__esModule?r.default:r,"@react-aria/overlays").format("dismiss"));return e.createElement(ol,null,e.createElement("button",{...i,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function il(t,n=!0){let[o,r]=(0,e.useState)(!0),i=o&&n;return Ao((()=>{if(i&&t.current&&"getAnimations"in t.current)for(let e of t.current.getAnimations())e instanceof CSSTransition&&e.cancel()}),[t,i]),ll(t,i,(0,e.useCallback)((()=>r(!1)),[])),i}function al(t,n){let[o,r]=(0,e.useState)(n?"open":"closed");switch(o){case"open":n||r("exiting");break;case"closed":case"exiting":n&&r("open")}let i="exiting"===o;return ll(t,i,(0,e.useCallback)((()=>{r((e=>"exiting"===e?"closed":e))}),[])),i}function ll(e,t,n){Ao((()=>{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 o=!1;return Promise.all(t.map((e=>e.finished))).then((()=>{o||(0,et.flushSync)((()=>{n()}))})).catch((()=>{})),()=>{o=!0}}}),[e,t,n])}let sl="undefined"!=typeof document&&window.visualViewport;function ul(){return{width:sl&&(null==sl?void 0:sl.width)||window.innerWidth,height:sl&&(null==sl?void 0:sl.height)||window.innerHeight}}function cl(t){let[n,o]=function(t,n,o){let[r,i]=(0,e.useState)(t||n),a=(0,e.useRef)(void 0!==t),l=void 0!==t;(0,e.useEffect)((()=>{let e=a.current;e!==l&&console.warn(`WARN: A component changed from ${e?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),a.current=l}),[l]);let s=l?t:r,u=(0,e.useCallback)(((e,...t)=>{let n=(e,...t)=>{o&&(Object.is(s,e)||o(e,...t)),l||(s=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(((o,...r)=>{let i=e(l?s:o,...r);return n(i,...t),l?o:i}))):(l||i(e),n(e,...t))}),[l,s,o]);return[s,u]}(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=(0,e.useCallback)((()=>{o(!0)}),[o]),i=(0,e.useCallback)((()=>{o(!1)}),[o]),a=(0,e.useCallback)((()=>{o(!n)}),[o,n]);return{isOpen:n,setOpen:o,open:r,close:i,toggle:a}}const dl=(0,e.createContext)(null),pl=(0,e.createContext)(null),fl=(0,e.forwardRef)((function(t,n){if((0,e.useContext)(pl))return e.createElement(hl,{...t,modalRef:n},t.children);let{isDismissable:o,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:l,children:s,isEntering:u,isExiting:c,UNSTABLE_portalContainer:d,shouldCloseOnInteractOutside:p,...f}=t;return e.createElement(ml,{isDismissable:o,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:l,isEntering:u,isExiting:c,UNSTABLE_portalContainer:d,shouldCloseOnInteractOutside:p},e.createElement(hl,{...f,modalRef:n},s))}));function gl(t,n){[t,n]=nr(t,n,dl);let o=(0,e.useContext)(ya),r=cl(t),i=null==t.isOpen&&null==t.defaultOpen&&o?o:r,a=xo(n),l=(0,e.useRef)(null),s=al(a,i.isOpen),u=al(l,i.isOpen),c=s||u||t.isExiting||!1,d=Wo();return!i.isOpen&&!c||d?null:e.createElement(vl,{...t,state:i,isExiting:c,overlayRef:a,modalRef:l})}const ml=(0,e.forwardRef)(gl);function vl({UNSTABLE_portalContainer:t,...n}){let o=n.modalRef,{state:r}=n,{modalProps:i,underlayProps:a}=_a(n,r,o),l=il(n.overlayRef)||n.isEntering||!1,s=tr({...n,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:l,isExiting:n.isExiting,state:r}}),u=function(){let t=Wo(),[n,o]=(0,e.useState)((()=>t?{width:0,height:0}:ul()));return(0,e.useEffect)((()=>{let e=()=>{o((e=>{let t=ul();return t.width===e.width&&t.height===e.height?e:t}))};return sl?sl.addEventListener("resize",e):window.addEventListener("resize",e),()=>{sl?sl.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),n}(),c={...s.style,"--visual-viewport-height":u.height+"px"};return e.createElement(va,{isExiting:n.isExiting,portalContainer:t},e.createElement("div",{...Jo(cr(n),a),...s,style:c,ref:n.overlayRef,"data-entering":l||void 0,"data-exiting":n.isExiting||void 0},e.createElement(er,{values:[[pl,{modalProps:i,modalRef:o,isExiting:n.isExiting,isDismissable:n.isDismissable}],[ya,r]]},s.children)))}function hl(t){let{modalProps:n,modalRef:o,isExiting:r,isDismissable:i}=(0,e.useContext)(pl),a=(0,e.useContext)(ya),l=xo((0,e.useMemo)((()=>Oo(t.modalRef,o)),[t.modalRef,o])),s=il(l),u=tr({...t,defaultClassName:"react-aria-Modal",values:{isEntering:s,isExiting:r,state:a}});return e.createElement("div",{...Jo(cr(t),n),...u,ref:l,"data-entering":s||void 0,"data-exiting":r||void 0},i&&e.createElement(rl,{onDismiss:a.close}),u.children)}function bl(){return(0,e.createElement)(bo.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,e.createElement)(bo.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 yl({dataSrc:t,embedId:n,openFormButton:r,isFormRedirect:i,formViewUrl:a}){const[l,s]=(0,Lo.useState)(t),[u,c]=(0,Lo.useState)(i),[d,p]=(0,Lo.useState)(!1),[f,g]=(0,Lo.useState)(!1);(0,Lo.useEffect)((()=>{const e=`link[rel="preload"][href="${l}"][as="document"]`;if(!document.querySelector(e)){const e=document.createElement("link");e.rel="preload",e.href=l,e.as="document",document.head.appendChild(e)}return()=>{const t=document.querySelector(e);t&&document.head.removeChild(t)}}),[l]),(0,Lo.useEffect)((()=>{f&&!d&&v()}),[f,d]);const m=()=>{!u&&i&&s(a)},v=()=>{setTimeout((()=>{g(!1)}),2e3)};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Yi,{type:"button",className:"givewp-donation-form-modal__open",onPress:()=>{g(!0),c(!0),p(!0),m()},isPending:d,"aria-label":d?(0,o.__)("Loading donation form","give"):(0,o.__)("Open donation form","give")},d&&(0,e.createElement)("span",{className:"givewp-donation-form-modal__open__spinner"},(0,e.createElement)(bo.Spinner,{style:{margin:"0 auto",verticalAlign:"middle"},"aria-label":(0,o.__)("In progress","give")})),(0,e.createElement)("span",{style:{margin:"0",visibility:d?"hidden":"visible"},"aria-hidden":d},r)),(0,e.createElement)(ml,{className:"givewp-donation-form-modal__overlay","data-loading":d,isOpen:u,onOpenChange:c,isDismissable:!0,isEntering:f},(0,e.createElement)("button",{"aria-label":(0,o.__)("Close donation form","give"),"aria-hidden":"false",type:"button",className:"givewp-donation-form-modal__close",onClick:()=>{c(!1),p(!1),m()}},(0,e.createElement)(bl,null)),(0,e.createElement)(fl,{className:"givewp-donation-form-modal"},(0,e.createElement)(wa,{className:"givewp-donation-form-modal__dialog","aria-label":(0,o.__)("Donation Form","give")},(0,e.createElement)("div",{className:"givewp-donation-form-modal__dialog__content"},(0,e.createElement)(No,{title:(0,o.__)("Donation Form","give"),id:n,src:l,checkOrigin:!1,heightCalculationMethod:"taggedElement",style:{minWidth:"100%",border:"none"},onInit:e=>{e.iFrameResizer.resize(),p(!1)}}))))))}function wl({clientId:t,formId:n,formFormat:r,openFormButton:i,link:a}){const l=(0,f.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),s=l?.clientId===t?"auto":"none",u="modal"===r||"reveal"===r;return"newTab"===r?(0,e.createElement)("a",{className:"givewp-donation-form-link",href:a,target:"_blank",rel:"noopener noreferrer"},i):u?(0,e.createElement)(yl,{dataSrc:`/?givewp-route=donation-form-view&form-id=${n}`,embedId:"",openFormButton:i,isFormRedirect:!1,formViewUrl:""}):(0,e.createElement)(No,{title:(0,o.__)("Donation Form","give"),src:`/?givewp-route=donation-form-view&form-id=${n}`,checkOrigin:!1,style:{width:"1px",minWidth:"100%",border:"0",pointerEvents:s}})}(0,r.registerBlockType)("give/donation-form",{title:(0,o.__)("Donation Form","give"),description:(0,o.__)("The GiveWP Donation Form block inserts an existing donation form into the page. Each donation form's presentation can be customized below.","give"),category:"give",icon:(0,e.createElement)(u,{color:"grey"}),keywords:[(0,o.__)("donation","give")],supports:{html:!1},attributes:{id:{type:"number",default:0},prevId:{type:"number"},displayStyle:{type:"string",default:"onpage"},continueButtonTitle:{type:"string",default:"Donate now"},showTitle:{type:"boolean",default:!0},showGoal:{type:"boolean",default:!0},contentDisplay:{type:"boolean",default:!0},showContent:{type:"string",default:"above"},blockId:{type:"string"}},edit:function({attributes:t,isSelected:n,setAttributes:r,className:i,clientId:a}){const{id:l,blockId:s,displayStyle:u,continueButtonTitle:d}=t,{formOptions:g,isResolving:m}=function(){const e=[],{forms:t,isResolving:n}=(0,f.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:i,link:a})=>{e.push({label:(0,o.__)(t.rendered,"give"),value:n,isLegacyForm:i,isLegacyTemplate:i&&"legacy"===r,link:a})})),{isResolving:n,formOptions:e}}(),[v,h]=(0,e.useState)(!!l);(0,e.useEffect)((()=>{s||r({blockId:a}),b||"reveal"!==u||r({displayStyle:"modal"})}),[]);const[b,y,w]=(()=>{const e=g.find((e=>e.value===l));return[e?.isLegacyForm,e?.isLegacyTemplate,e?.link]})();return!1!==m?(0,e.createElement)("div",{...(0,c.useBlockProps)()},(0,e.createElement)("p",null,(0,o.__)("Loading...","give"))):(0,e.createElement)("div",{...(0,c.useBlockProps)()},l&&v?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(yo,{attributes:t,setAttributes:r,formOptions:g,isResolving:m,isLegacyTemplate:y,isLegacyForm:b}),b?(0,e.createElement)("div",{className:n?`${i} isSelected`:i},(0,e.createElement)(p(),{block:"give/donation-form",attributes:t})):(0,e.createElement)(wl,{clientId:a,formId:l,formFormat:u,openFormButton:d,link:w})):(0,e.createElement)(ho,{formOptions:g,isResolving:m,handleSelect:e=>{r({id:e}),h(!0)}}))},save:()=>null});const El={};El.orderBy=[{value:"date",label:(0,o.__)("Date Created","give")},{value:"title",label:(0,o.__)("Form Name","give")},{value:"amount_donated",label:(0,o.__)("Amount Donated","give")},{value:"number_donations",label:(0,o.__)("Number of Donations","give")},{value:"menu_order",label:(0,o.__)("Menu Order","give")},{value:"post__in",label:(0,o.__)("Provided Form IDs","give")},{value:"closest_to_goal",label:(0,o.__)("Closest To Goal","give")},{value:"random",label:(0,o.__)("Random","give")}],El.order=[{value:"DESC",label:(0,o.__)("Descending","give")},{value:"ASC",label:(0,o.__)("Ascending","give")}],El.columns=[{value:"1",label:(0,o.__)("Full Width","give")},{value:"2",label:(0,o.__)("Double","give")},{value:"3",label:(0,o.__)("Triple","give")},{value:"4",label:(0,o.__)("Max (4)","give")}],El.displayType=[{value:"redirect",label:(0,o.__)("Redirect","give")},{value:"modal_reveal",label:(0,o.__)("Modal","give")}],El.filter=[{value:"formIDs",label:(0,o.__)("Form ID","give")},{value:"categories",label:(0,o.__)("Categories","give")},{value:"tags",label:(0,o.__)("Tags","give")}],El.imageHeight=[{value:"auto",label:(0,o.__)("Auto","give")},{value:"custom",label:(0,o.__)("Custom","give")}];const Il=El;var Cl=n(32485),Ml=n.n(Cl);function Tl({display:t,selected:n}){const o=String(t);return(0,e.createElement)("div",{className:Ml()("give_column_selector_container",{give_column_selector_selected:o===n})},(0,e.createElement)(e.Fragment,null,Array(t).fill(null).map(((t,n)=>(0,e.createElement)("div",{key:n,className:"give_column_selector_box"}," ")))))}function Sl({children:t}){return(0,e.createElement)("div",{className:"give_column_selector_row"},t)}function Nl({label:t,selected:n,help:o}){return(0,e.createElement)("div",{className:"give_column_selector"},t&&(0,e.createElement)("p",null,t),o&&(0,e.createElement)("p",{className:"give_column_selector_help_text"},o),"1"===n?(0,e.createElement)(Sl,null,(0,e.createElement)(Tl,{display:1,selected:n})):"2"===n?(0,e.createElement)(Sl,null,(0,e.createElement)(Tl,{display:2,selected:n})):"3"===n?(0,e.createElement)(Sl,null,(0,e.createElement)(Tl,{display:3,selected:n})):(0,e.createElement)(Sl,null,(0,e.createElement)(Tl,{display:4,selected:n})))}const Ll=({attributes:t,setAttributes:n})=>{const{formsPerPage:r,paged:i,imageSize:a,imageHeight:l,formIDs:s,excludeForms:u,excludedFormIDs:d,orderBy:p,order:g,categories:m,tags:v,columns:h,showTitle:b,showExcerpt:y,excerptLength:w,showGoal:E,showFeaturedImage:I,showDonateButton:C,tagBackgroundColor:M,donateButtonTextColor:T,displayType:S,filterOptions:N,tagTextColor:L,imageHeightOptions:x,progressBarColor:O}=t,P=(e,t)=>{n({[e]:t})},A=e=>Array.isArray(e)?e:s.indexOf(",")?e.split(","):[e];return(0,e.createElement)(c.InspectorControls,{key:"inspector"},(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Layout","give"),initialOpen:!0},(0,e.createElement)(Nl,{label:(0,o.__)("Columns","give"),selected:h,onClick:e=>P("columns",e),help:(0,o.__)('Controls how many columns of the Form Grid appear. "Best Fit" will adjust responsively to the space available.',"give")}),(0,e.createElement)(bo.SelectControl,{label:(0,o.__)("Columns","give"),name:"columns",value:h,options:Il.columns,onChange:e=>P("columns",e)}))),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Display Elements","give"),initialOpen:!0},(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector",name:"showTitle",label:(0,o.__)("Show Title","give"),checked:!!b,onChange:e=>P("showTitle",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector",name:"showGoal",label:(0,o.__)("Show Goal","give"),checked:!!E,onChange:e=>P("showGoal",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector",name:"showExcerpt",label:(0,o.__)("Show Excerpt","give"),checked:!!y,onChange:e=>P("showExcerpt",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector",name:"showDonateButton",label:(0,o.__)("Show Donate Button","give"),checked:!!C,onChange:e=>P("showDonateButton",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector",align:"right",name:"showFeaturedImage",label:(0,o.__)("Show Featured Image","give"),checked:!!I,onChange:e=>P("showFeaturedImage",e)}),I&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.SelectControl,{className:"give-form-grid-inspector",name:"imageSize",label:(0,o.__)("Image Size","give"),value:a,options:(0,f.select)(c.store).getSettings().imageSizes.map((({slug:e,name:t})=>({value:e,label:t}))),onChange:e=>P("imageSize",e)}),(0,e.createElement)(bo.SelectControl,{className:"give-form-grid-inspector",name:"imageHeightOptions",label:(0,o.__)("Image Height","give"),value:x,options:Il.imageHeight,onChange:e=>(e=>{P("imageHeightOptions",e),P("imageHeight",e)})(e)}),"custom"===x&&(0,e.createElement)(bo.TextControl,{className:"give-form-grid-inspector__filter",name:"imageHeight",value:l,onChange:e=>P("imageHeight",e),help:(0,o.__)('Featured image height. Default "auto". Accepts valid heights in px, em, or rem.',"give")})))),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{className:"give-donation-form-grid--grid-settings",title:(0,o.__)("Grid Settings","give"),initialOpen:!0},(0,e.createElement)(bo.SelectControl,{className:"give-form-grid-inspector",label:(0,o.__)("Order By","give"),name:"orderBy",value:p,options:Il.orderBy,onChange:e=>P("orderBy",e),help:(0,o.__)("The order forms are displayed in.","give")}),(0,e.createElement)(bo.SelectControl,{className:"give-form-grid-inspector",label:(0,o.__)("Order","give"),name:"order",value:g,options:Il.order,onChange:e=>P("order",e),help:(0,o.__)("Whether the order ascends or descends.","give")}),(0,e.createElement)(bo.SelectControl,{className:"give-form-grid-inspector",label:(0,o.__)("Filter","give"),name:"filter",value:N,options:Il.filter,onChange:e=>P("filterOptions",e)}),"categories"===N?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.FormTokenField,{className:"give-form-grid-inspector__filter",name:"categories",value:A(m),onChange:e=>P("categories",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the name of your category to add it to the list. Only forms within the categories you choose will be displayed in this grid.","give"))):"tags"===N?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.FormTokenField,{className:"give-form-grid-inspector__filter",name:"tags",value:A(v),onChange:e=>P("tags",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the name of your tag to add it to the list. Only forms with these tags you choose will be displayed in this grid.","give"))):"formIDs"===N?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.FormTokenField,{className:"give-form-grid-inspector__filter",name:"formIDs",value:A(s),onChange:e=>P("formIDs",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the ID of your form to add it to the list. Only forms with these IDs you choose will be displayed in this grid.","give"))):void 0,(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector exclude__form",name:"excludeForms",label:(0,o.__)("Exclude specific forms?","give"),checked:!!u,onChange:e=>P("excludeForms",e)}),u&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.FormTokenField,{name:"excludedFormIDs",label:(0,o.__)("Excluded Form IDs","give"),value:A(d),onChange:e=>P("excludedFormIDs",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the ID of your form to exclude it from the list. Forms with these IDs you choose will not be displayed in this grid.","give"))))),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Grid Interaction","give"),initialOpen:!0},(0,e.createElement)(bo.SelectControl,{className:"give-form-grid-inspector",label:(0,o.__)("Display Type","give"),name:"displayType",value:S,options:Il.displayType,onChange:e=>P("displayType",e)}),"redirect"===S?(0,e.createElement)("p",{className:"give-form-grid-inspector__help"},(0,o.__)("Users will be redirected to the donation form page.","give")):(0,e.createElement)("p",{className:"give-form-grid-inspector__help"},(0,o.__)("Modal with the donation form will be displayed on the same page.","give")),(0,e.createElement)(bo.TextControl,{className:"give-form-grid-inspector",name:"formsPerPage",label:(0,o.__)("Forms Per Page","give"),value:r,onChange:e=>P("formsPerPage",e),help:(0,o.__)("Sets the number of forms to be displayed on the first page load.","give")}),(0,e.createElement)(bo.ToggleControl,{className:"give-form-grid-inspector",name:"paged",label:(0,o.__)("Show Pagination","give"),checked:!!i,onChange:e=>P("paged",e),help:(0,o.__)("Enable form display to multiple pages.","give")}))),(0,e.createElement)(c.PanelColorSettings,{title:(0,o.__)("Color Settings","give"),colorSettings:[{value:M,onChange:e=>P("tagBackgroundColor",e),label:(0,o.__)("Tag Background Color","give")},{value:L,onChange:e=>P("tagTextColor",e),label:(0,o.__)("Tag Text Color","give")},{value:T,onChange:e=>P("donateButtonTextColor",e),label:(0,o.__)("Donate Button Text Color","give")},{value:O,onChange:e=>P("progressBarColor",e),label:(0,o.__)("Progress Bar Color","give")}]}))},xl=(0,f.withSelect)((e=>({forms:e("core").getEntityRecords("postType","give_forms")})))((t=>{const{attributes:n}=t;return(0,e.createElement)(Lo.Fragment,null,(0,e.createElement)(Ll,{...t}),(0,e.createElement)(p(),{block:"give/donation-form-grid",attributes:n}))})),Ol=((0,r.registerBlockType)("give/donation-form-grid",{title:(0,o.__)("Donation Form Grid","give"),description:(0,o.__)("The GiveWP Donation Form Grid block insert an existing donation form into the page. Each form's presentation can be customized below.","give"),category:"give",icon:(0,e.createElement)(u,{color:"grey"}),keywords:[(0,o.__)("donation","give"),(0,o.__)("grid","give")],supports:{html:!1},attributes:{formsPerPage:{type:"string",default:"12"},paged:{type:"boolean",default:!0},formIDs:{type:"array",default:[]},excludedFormIDs:{type:"array",default:[]},excludeForms:{type:"boolean",default:!1},orderBy:{type:"string",default:"date"},order:{type:"string",default:"DESC"},categories:{type:"array",default:[]},tags:{type:"array",default:[]},columns:{type:"string",default:"1"},imageSize:{type:"string",default:"medium"},imageHeight:{type:"string",default:"auto"},imageHeightOptions:{type:"string",default:"auto"},showTitle:{type:"boolean",default:!0},showExcerpt:{type:"boolean",default:!0},showGoal:{type:"boolean",default:!0},showFeaturedImage:{type:"boolean",default:!0},showDonateButton:{type:"boolean",default:!0},tagBackgroundColor:{type:"string",default:"#69b86b"},tagTextColor:{type:"string",default:"#ffffff"},donateButtonTextColor:{type:"string",default:"#69b86b"},displayType:{type:"string",default:"redirect"},excerptLength:{type:"integer",default:16},filterOptions:{type:"string",default:"tags"},progressBarColor:{type:"string",default:"#69b86b"}},edit:xl,save:()=>null}),{donorsPerPage:{type:"string",default:"12"},formID:{type:"array",default:[]},ids:{type:"array",default:[]},categories:{type:"array",default:[]},tags:{type:"string",default:[]},orderBy:{type:"string",default:"post_date"},order:{type:"string",default:"DESC"},paged:{type:"string",default:"1"},columns:{type:"string",default:"3"},showAvatar:{type:"boolean",default:!0},showName:{type:"boolean",default:!0},showCompanyName:{type:"boolean",default:!1},showForm:{type:"boolean",default:!0},showTotal:{type:"boolean",default:!0},showComments:{type:"boolean",default:!0},showTributes:{type:"boolean",default:!0},showAnonymous:{type:"boolean",default:!0},onlyComments:{type:"boolean",default:!1},commentLength:{type:"string",default:"80"},readMoreText:{type:"string",default:(0,o.__)("Read more","give")},loadMoreText:{type:"string",default:(0,o.__)("Load more","give")},avatarSize:{type:"string",default:"75"},toggleOptions:{type:"string",default:"donorInfo"},filterOptions:{type:"string",default:"ids"},color:{type:"string",default:"#219653"},showTimestamp:{type:"boolean",default:!0}}),Pl={};Pl.columns=[{value:"1",label:(0,o.__)("Full width","give")},{value:"2",label:(0,o.__)("Double","give")},{value:"3",label:(0,o.__)("Triple","give")},{value:"4",label:(0,o.__)("Max (4)","give")}],Pl.order=[{value:"DESC",label:(0,o.__)("Descending","give")},{value:"ASC",label:(0,o.__)("Ascending","give")}],Pl.orderBy=[{value:"donation_amount",label:(0,o.__)("Donation Amount","give")},{value:"post_date",label:(0,o.__)("Date Created","give")}],Pl.toggleOptions=[{value:"donorInfo",label:(0,o.__)("Donor Info","give")},{value:"wallAttributes",label:(0,o.__)("Wall Attributes","give")}],Pl.filter=[{value:"ids",label:(0,o.__)("Donor ID","give")},{value:"formID",label:(0,o.__)("Form ID","give")},{value:"categories",label:(0,o.__)("Categories","give")},{value:"tags",label:(0,o.__)("Tags","give")}];const Al=Pl;function Dl({options:t,onClick:n,selected:o}){return(0,e.createElement)("div",{className:"give-toggle"},t.map((({value:t,label:r},i)=>(0,e.createElement)("div",{key:i,onClick:()=>n(t),className:"give-toggle__option",style:o===t?{background:"#007cba",color:"white"}:{}},r))))}const kl=({attributes:t,setAttributes:n})=>{const{donorsPerPage:r,ids:i,formID:a,categories:l,tags:s,orderBy:u,order:d,columns:p,avatarSize:f,showAvatar:g,showName:m,showCompanyName:v,onlyComments:h,showForm:b,showTotal:y,showComments:w,showAnonymous:E,commentLength:I,readMoreText:C,loadMoreText:M,toggleOptions:T,filterOptions:S,color:N,showTimestamp:L,showTributes:x}=t,O=(e,t)=>{n({[e]:t})},P=e=>Array.isArray(e)?e:formIDs.indexOf(",")?e.split(","):[e];return(0,e.createElement)(c.InspectorControls,{key:"inspector"},(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Layout","give"),initialOpen:!0},(0,e.createElement)(Nl,{selected:p,onClick:e=>O("columns",e),help:(0,o.__)("Controls how many columns of the Form Grid appear. All sizes will adjust responsively to the space available. The maximum number allowed per row is 4","give")}),(0,e.createElement)(bo.SelectControl,{className:"give-donor-wall-inspector",name:"columns",label:(0,o.__)("Columns","give"),value:p,options:Al.columns,onChange:e=>O("columns",e)}))),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Display Elements","give"),initialOpen:!1},(0,e.createElement)(Dl,{options:Al.toggleOptions,onClick:e=>O("toggleOptions",e),selected:T}),"donorInfo"===T?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showName",label:(0,o.__)("Show Name","give"),checked:!!m,onChange:e=>O("showName",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showName",label:(0,o.__)("Show Company Name","give"),checked:!!v,onChange:e=>O("showCompanyName",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showAnonymous",label:(0,o.__)("Show Anonymous","give"),checked:!!E,onChange:e=>O("showAnonymous",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showAvatar",label:(0,o.__)("Show Avatar","give"),checked:!!g,onChange:e=>O("showAvatar",e)}),(0,e.createElement)(bo.TextControl,{className:"give-donor-wall-inspector",name:"avatarSize",label:(0,o.__)("Avatar Size","give"),help:(0,o.__)("Avatar size. Default height is 75. Accepts valid heights in px.","give"),value:f,onChange:e=>O("avatarSize",e)})):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showForm",label:(0,o.__)("Show Donation Form","give"),checked:!!b,onChange:e=>O("showForm",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showTotal",label:(0,o.__)("Show Total","give"),checked:!!y,onChange:e=>O("showTotal",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showTimestamp",label:(0,o.__)("Show Time","give"),checked:!!L,onChange:e=>O("showTimestamp",e)}),!!window.Give_Tribute&&(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showTributes",label:(0,o.__)("Show Tributes","give"),checked:!!x,onChange:e=>O("showTributes",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"showComments",label:(0,o.__)("Show Comments","give"),checked:!!w,onChange:e=>O("showComments",e)}),(0,e.createElement)(bo.ToggleControl,{className:"give-donor-wall-inspector",name:"onlyComments",label:(0,o.__)("Only Comments","give"),checked:!!h,onChange:e=>O("onlyComments",e)}),(0,e.createElement)(bo.TextControl,{className:"give-donor-wall-inspector",name:"commentLength",label:(0,o.__)("Comment Length","give"),help:(0,o.__)("Limits the amount of characters to be displayed on donations with comments.","give"),value:I,onChange:e=>O("commentLength",e)}),(0,e.createElement)(bo.TextControl,{className:"give-donor-wall-inspector",name:"readMoreText",label:(0,o.__)("Read More Text","give"),value:C,onChange:e=>O("readMoreText",e)})))),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{className:"give-wall--wall-settings",title:(0,o.__)("Wall Settings","give"),initialOpen:!1},(0,e.createElement)(bo.SelectControl,{className:"give-donor-wall-inspector",label:(0,o.__)("Sort By","give"),name:"orderBy",value:u,options:Al.orderBy,onChange:e=>O("orderBy",e)}),(0,e.createElement)(bo.SelectControl,{className:"give-donor-wall-inspector",label:(0,o.__)("Order","give"),name:"order",value:d,options:Al.order,onChange:e=>O("order",e)}),(0,e.createElement)(bo.SelectControl,{className:"give-donor-wall-inspector",label:(0,o.__)("Filter","give"),name:"filter",value:S,options:Al.filter,onChange:e=>O("filterOptions",e)}),"categories"===S?(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(bo.FormTokenField,{className:"give-donor-wall-inspector",onChange:e=>O("categories",e),value:P(l)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the name of your category to add it to the list. Only forms within the categories you choose will be displayed in this grid.","give"))):"tags"===S?(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(bo.FormTokenField,{className:"give-donor-wall-inspector",name:"tags",value:P(s),onChange:e=>O("tags",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the name of your tag to add it to the list. Only forms with these tags you choose will be displayed in this grid.","give"))):"ids"===S?(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(bo.FormTokenField,{className:"give-donor-wall-inspector",name:"ids",value:P(i),onChange:e=>O("ids",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("By default, all donors will display. Use this setting to restrict the donor wall to only display certain donors. Use a comma-separated list of donor IDs.","give"))):"formID"===S?(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(bo.FormTokenField,{className:"give-donor-wall-inspector",help:(0,o.__)("By Default, donations to all forms will display. Use this setting to restrict the donor to display only donations to certains forms. Use a comma-separated list of form IDs.","give"),name:"formID",value:P(a),onChange:e=>O("formID",e)}),(0,e.createElement)("p",{className:"components-form-token-field__help"},(0,o.__)("Type the ID of your form to add it to the list. Only forms with these IDs you choose will be displayed in this grid.","give"))):void 0)),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Wall Interaction","give"),initialOpen:!0},(0,e.createElement)(bo.TextControl,{className:"give-donor-wall-inspector",name:"donorsPerPage",label:(0,o.__)("Donors Per Page","give"),value:r,onChange:e=>O("donorsPerPage",e),help:(0,o.__)("How many donors should show up on the initial page load?","give")}),(0,e.createElement)(bo.TextControl,{className:"give-donor-wall-inspector",name:"loadMoreText",label:(0,o.__)("Load More Text","give"),value:M,onChange:e=>O("loadMoreText",e)}))),(0,e.createElement)(bo.Panel,null,(0,e.createElement)(bo.PanelBody,{title:(0,o.__)("Color","give"),initialOpen:!1},(0,e.createElement)(c.ColorPalette,{value:N,onChange:e=>n({color:e})}))))},{InnerBlocks:_l}=((0,r.registerBlockType)("give/donor-wall",{title:(0,o.__)("Donor Wall","give"),description:(0,o.__)("The GiveWP Donor Wall block displays donations on the front end of the site. The settings below allow you to customize the information displayed","give"),category:"give",icon:(0,e.createElement)(u,{color:"grey"}),keywords:[(0,o.__)("donation","give"),(0,o.__)("wall","give")],supports:{html:!1},attributes:Ol,edit:t=>{const{attributes:n}=t;return(0,e.createElement)(Lo.Fragment,null,(0,e.createElement)(kl,{...t}),(0,e.createElement)(p(),{block:"give/donor-wall",attributes:n}))},save:()=>null}),wp.blockEditor),{useEffect:jl}=wp.element,{select:Rl,dispatch:Fl}=wp.data,{InnerBlocks:zl}=wp.blockEditor,{registerBlockType:Vl}=wp.blocks,Bl=(Vl("give/multi-form-goal",{title:(0,o.__)("Multi-Form Goal","give"),description:(0,o.__)("The Multi-Form Goals block displays progress made across donation forms towards a common goal.","give"),category:"give",icon:(0,e.createElement)(u,{color:"grey"}),keywords:[(0,o.__)("donation","give"),(0,o.__)("multi form goals","give")],supports:{align:["wide"]},edit:({isSelected:t,clientId:n})=>{jl((()=>{t&&r()}),[]);const r=()=>{const e=Rl("core/editor").getBlocksByClientId(n)[0],t=e.innerBlocks[e.innerBlocks.length-1];t&&Fl("core/block-editor").selectBlock(t.clientId)},i=[["core/media-text",{imageFill:!0},[["core/heading",{placeholder:(0,o.__)("Heading","give")}],["core/paragraph",{placeholder:(0,o.__)("Summary","give")}]]],["give/progress-bar",{}]];return(0,e.createElement)("div",{className:"give-multi-form-goal-block"},(0,e.createElement)(_l,{template:i,templateLock:"all"}))},save:()=>(0,e.createElement)("div",{className:"give-multi-form-goal-block"},(0,e.createElement)(zl.Content,null))}),{ids:{type:"array",default:[]},categories:{type:"array",default:[]},tags:{type:"array",default:[]},goal:{type:"string",default:"1000"},enddate:{type:"string",default:""},color:{type:"string",default:"#66bb6a"}}),{useInstanceId:Hl}=wp.compose,{BaseControl:Wl}=wp.components,Gl=({name:t,label:n=null,help:r,className:i,value:a=null,placeholder:l=`${(0,o.__)("Select","give")}...`,hideLabelFromVision:s,isLoading:u,isDisabled:c,onChange:d=null,options:p=null})=>{const f=`give-multi-select-control-${t}-${Hl(Gl)}`;return p&&p.length<1?null:(0,e.createElement)(Wl,{label:n,hideLabelFromVision:s,id:f,help:r,className:i},(0,e.createElement)(go,{isLoading:u,inputId:f,value:a,onChange:e=>d(e),options:p,maxMenuHeight:"200px",isDisabled:c,placeholder:l,isMulti:!0,theme:e=>({...e,colors:{...e.colors,primary:"#007cba",primary75:"#31a6e0",primary50:"#5dbae8",primary25:"#9edaf7"}})}))};Gl.propTypes={label:a().string,value:a().any.isRequired,onChange:a().func,options:a().array.isRequired,name:a().string.isRequired,help:a().string,className:a().string,hideLabelFromVision:a().bool,isLoading:a().bool,isDisabled:a().bool,placeholder:a().string};const Yl=Gl,{useInstanceId:Ul}=wp.compose,{BaseControl:Zl,ColorPalette:Kl}=wp.components,Ql=({name:t,label:n,help:o,className:r,value:i,hideLabelFromVision:a,onChange:l=null,colors:s})=>{const u=`give-color-control-${t}-${Ul(Ql)}`;return(0,e.createElement)(Zl,{label:n,hideLabelFromVision:a,id:u,help:o,className:r},(0,e.createElement)(Kl,{value:i,colors:s,onChange:e=>l(e),clearable:!0}))};Ql.propTypes={label:a().string,value:a().any.isRequired,onChange:a().func,name:a().string.isRequired,help:a().string,className:a().string,hideLabelFromVision:a().bool};const $l=Ql,{useInstanceId:Xl}=wp.compose,{DateTimePicker:Jl,BaseControl:ql,Button:es,Dropdown:ts}=wp.components,{__experimentalGetSettings:ns,date:os}=wp.date,rs=({name:t,label:n,help:r,className:i,value:a,onChange:l=null})=>{const s=`give-date-time-control-${t}-${Xl(rs)}`,u=ns(),c=/a(?!\\)/i.test(u.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,e.createElement)(ql,{label:n,hideLabelFromVision:!0,id:s,help:r,className:i},(0,e.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},(0,e.createElement)("span",null,n),(0,e.createElement)(ts,{position:"bottom right",renderToggle:({isOpen:t,onToggle:n})=>(0,e.createElement)(es,{isSecondary:!0,onClick:n,"aria-expanded":t},""!==a?os("F j, Y",a):(0,o.__)("Set date","give")),renderContent:()=>(0,e.createElement)(Jl,{currentDate:a,onChange:e=>l(e),is12Hour:c})})))};rs.propTypes={label:a().string,value:a().any.isRequired,onChange:a().func,name:a().string.isRequired,help:a().string,className:a().string};const is=rs,{useSelect:as}=wp.data,{InspectorControls:ls}=wp.blockEditor,{PanelBody:ss,TextControl:us}=wp.components,cs=giveProgressBarThemeSupport.editorColorPalette,ds=({attributes:t,setAttributes:n})=>{const{ids:r,categories:i,tags:a,goal:l,enddate:s,color:u}=t,c=as((e=>{const t=e("core").getEntityRecords("postType","give_forms");return t?t.map((e=>({label:e.title.raw?e.title.raw:(0,o.__)("(no title)"),value:e.id}))):[]}),[]),d=as((e=>{const t=e("core").getEntityRecords("taxonomy","give_forms_tag",{per_page:100});return t?t.map((e=>({label:e.name?e.name:(0,o.__)("(no title)"),value:e.id}))):[]}),[]),p=as((e=>{const t=e("core").getEntityRecords("taxonomy","give_forms_category",{per_page:100});return t?t.map((e=>({label:e.name?e.name:(0,o.__)("(no title)"),value:e.id}))):[]}),[]),f=(e,t)=>{n({[e]:t})};return(0,e.createElement)(ls,{key:"inspector"},(0,e.createElement)(ss,{title:(0,o.__)("Goal","give"),initialOpen:!0},(0,e.createElement)(us,{name:"goal",label:(0,o.__)("Goal amount","give"),type:"number",onChange:e=>f("goal",e),value:l}),(0,e.createElement)(is,{name:"enddate",label:(0,o.__)("Goal end date","give"),value:s,onChange:e=>f("enddate",e)}),(0,e.createElement)($l,{colors:cs,name:"color",label:(0,o.__)("Progress bar color","give"),onChange:e=>f("color",e),value:u})),(0,e.createElement)(ss,{title:(0,o.__)("Filters","give"),initialOpen:!1},(0,e.createElement)(Yl,{name:"ids",label:(0,o.__)("Filter by forms","give"),value:c.filter((e=>r.includes(e.value))),placeholder:`${(0,o.__)("All forms","give")}...`,options:c,onChange:e=>f("ids",e?e.map((e=>e.value)):[])}),(0,e.createElement)(Yl,{name:"categories",label:(0,o.__)("Filter by categories","give"),value:p.filter((e=>i.includes(e.value))),placeholder:`${(0,o.__)("All categories","give")}...`,options:p,onChange:e=>f("categories",e?e.map((e=>e.value)):[])}),(0,e.createElement)(Yl,{name:"tags",label:(0,o.__)("Filter by tags","give"),value:d.filter((e=>a.includes(e.value))),placeholder:`${(0,o.__)("All tags","give")}...`,options:d,onChange:e=>f("tags",e?e.map((e=>e.value)):[])})))},ps=window.lodash,{Component:fs,RawHTML:gs,Fragment:ms}=wp.element,vs=wp.apiFetch,{addQueryArgs:hs}=wp.url,{Placeholder:bs}=wp.components,ys=class extends fs{constructor(e){super(e),this.state={response:null,prevResponse:null}}componentDidMount(){this.isStillMounted=!0,this.fetch(this.props),this.fetch=(0,ps.debounce)(this.fetch,500)}componentWillUnmount(){this.isStillMounted=!1}componentDidUpdate(e){(0,ps.isEqual)(e,this.props)||this.fetch(this.props)}fetch(e){if(!this.isStillMounted)return;null!==this.state.response&&this.setState((e=>({response:null,prevResponse:e.response})));const{block:t,attributes:n=null,urlQueryArgs:o={}}=e,r=function(e,t=null,n={}){return hs(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==t?{attributes:t}:{},...n})}(t,n,o),i=this.currentFetchRequest=vs({path:r}).then((e=>{this.isStillMounted&&i===this.currentFetchRequest&&e&&this.setState({response:e.rendered})})).catch((e=>{this.isStillMounted&&i===this.currentFetchRequest&&this.setState({response:{error:!0,errorMsg:e.message}})}));return i}render(){const{right:t,top:n,unit:r}=this.props.spinnerLocation,i=this.state.response,a=this.state.prevResponse;let l="";null!==a&&(l=`<div style="position:relative;"><div style="position:absolute;right:${t}${r};top:${n}${r};z-index:1"><span class="components-spinner"></span></div>${a}</div>`);const{className:s,EmptyResponsePlaceholder:u=({className:t})=>(0,e.createElement)(bs,{className:t},(0,o.__)("Block rendered as empty.")),ErrorResponsePlaceholder:c=({response:t,className:n})=>{const r=sprintf( // translators: %s: error message describing the problem // translators: %s: error message describing the problem (0,o.__)("Error loading block: %s"),t.errorMsg);return(0,e.createElement)(bs,{className:n},r)}}=this.props;return""===i?(0,e.createElement)(u,{response:i,...this.props}):i?i.error?(0,e.createElement)(c,{response:i,...this.props}):(0,e.createElement)(gs,{key:"html",className:s},i):(0,e.createElement)(ms,null,(0,e.createElement)(gs,{key:"html",className:s},l))}},{Fragment:ws}=wp.element,{registerBlockType:Es}=wp.blocks;Es("give/progress-bar",{title:(0,o.__)("Progress Bar","give"),description:(0,o.__)("The Progress Bar block displays progress made across donation forms towards a common goal.","give"),category:"give",icon:(0,e.createElement)(u,{color:"grey"}),keywords:[(0,o.__)("donation","give"),(0,o.__)("progress-bar","give")],attributes:Bl,parent:["give/multi-form-goal"],edit:({attributes:t,setAttributes:n})=>(0,e.createElement)(ws,null,(0,e.createElement)(ds,{attributes:t,setAttributes:n}),(0,e.createElement)(ys,{block:"give/progress-bar",attributes:t,spinnerLocation:{right:0,top:-30,unit:"px"}}))})})()})();