/*! For license information please see main.f5fd3637.js.LICENSE.txt */ (()=>{"use strict";var e={11:(e,t,n)=>{var r=n(214),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=f(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,m(w,y.prototype),w.isPureReactComponent=!0;var _=Array.isArray,S={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function x(e,t,r,o,i,a){return r=a.ref,{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:a}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(){}function R(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0;break;case h:return R((u=e._init)(e._payload),t,o,i,a)}}if(u)return a=a(e),u=""===i?"."+T(e,0):i,_(a)?(o="",null!=u&&(o=u.replace(E,"$&/")+"/"),R(a,t,o,"",(function(e){return e}))):null!=a&&(C(a)&&(l=a,c=o+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+u,a=x(l.type,c,void 0,0,0,l.props)),t.push(a)),1;u=0;var d,p=""===i?".":i+":";if(_(e))for(var m=0;m{e.exports=n(882)},261:(e,t,n)=>{e.exports=n(752)},367:(e,t,n)=>{!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(532)},399:(e,t)=>{var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler");Symbol.for("react.provider");var s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.for("react.client.reference");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case f:case h:case s:return e;default:return t}}case r:return t}}}t.Hy=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===a||e===i||e===u||e===d||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||void 0!==e.getModuleId)}},432:(e,t,n)=>{var r=n(643);function o(e){var t="https://react.dev/errors/"+e;if(1{e.exports=n(935)},532:(e,t,n)=>{var r=n(261),o=n(643),i=n(766);function a(e){var t="https://react.dev/errors/"+e;if(1)":-1--o||l[r]!==c[o]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}}while(1<=r&&0<=o);break}}}finally{O=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?A(n):""}function L(e){switch(e.tag){case 26:case 27:case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 15:return e=M(e.type,!1);case 11:return e=M(e.type.render,!1);case 1:return e=M(e.type,!0);default:return""}}function D(e){try{var t="";do{t+=L(e),e=e.return}while(e);return t}catch(n){return"\nError generating stack: "+n.message+"\n"+n.stack}}function F(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function z(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function j(e){if(F(e)!==e)throw Error(a(188))}function $(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=$(e)))return t;e=e.sibling}return null}var B=Array.isArray,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},q=[],H=-1;function V(e){return{current:e}}function K(e){0>H||(e.current=q[H],q[H]=null,H--)}function Y(e,t){H++,q[H]=e.current,e.current=t}var G=V(null),Q=V(null),X=V(null),J=V(null);function Z(e,t){switch(Y(X,t),Y(Q,e),Y(G,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Xu(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Ju(e=Xu(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(G),Y(G,t)}function ee(){K(G),K(Q),K(X)}function te(e){null!==e.memoizedState&&Y(J,e);var t=G.current,n=Ju(t,e.type);t!==n&&(Y(Q,e),Y(G,n))}function ne(e){Q.current===e&&(K(G),K(Q)),J.current===e&&(K(J),Fd._currentValue=U)}var re=Object.prototype.hasOwnProperty,oe=r.unstable_scheduleCallback,ie=r.unstable_cancelCallback,ae=r.unstable_shouldYield,se=r.unstable_requestPaint,le=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,fe=r.unstable_LowPriority,pe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,ye=null,ve=null;function be(e){if("function"===typeof me&&ge(e),ve&&"function"===typeof ve.setStrictMode)try{ve.setStrictMode(ye,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(_e(e)/Se|0)|0},_e=Math.log,Se=Math.LN2;var ke=128,xe=4194304;function Ce(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=e.warmLanes;e=0!==e.finishedLanes;var s=134217727&n;return 0!==s?0!==(n=s&~o)?r=Ce(n):0!==(i&=s)?r=Ce(i):e||0!==(a=s&~a)&&(r=Ce(a)):0!==(s=n&~o)?r=Ce(s):0!==i?r=Ce(i):e||0!==(a=n&~a)&&(r=Ce(a)),0===r?0:0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||32===o&&0!==(4194176&a))?t:r}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Pe(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Re(){var e=ke;return 0===(4194176&(ke<<=1))&&(ke=128),e}function Ie(){var e=xe;return 0===(62914560&(xe<<=1))&&(xe=4194304),e}function Ne(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ae(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function Me(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),o=1<=kn),En=String.fromCharCode(32),Tn=!1;function Pn(e,t){switch(e){case"keyup":return-1!==_n.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var In=!1;var Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function An(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function On(e,t,n,r){At?Mt?Mt.push(r):Mt=[r]:At=r,0<(t=Fu(t,"onChange")).length&&(n=new Zt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mn=null,Ln=null;function Dn(e){Ru(e,0)}function Fn(e){if(ht(Ge(e)))return e}function zn(e,t){if("change"===e)return t}var jn=!1;if(nt){var $n;if(nt){var Bn="oninput"in document;if(!Bn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Bn="function"===typeof Wn.oninput}$n=Bn}else $n=!1;jn=$n&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Xn(r)}}function Zn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Zn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function er(e){for(var t=ft((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=ft((e=t.contentWindow).document)}return t}function tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function nr(e,t){var n=er(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Zn(t.ownerDocument.documentElement,t)){if(null!==r&&tr(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var o=t.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!n.extend&&i>r&&(o=r,r=i,i=o),o=Jn(t,i);var a=Jn(t,r);o&&a&&(1!==n.rangeCount||n.anchorNode!==o.node||n.anchorOffset!==o.offset||n.focusNode!==a.node||n.focusOffset!==a.offset)&&((e=e.createRange()).setStart(o.node,o.offset),n.removeAllRanges(),i>r?(n.addRange(e),n.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"===typeof t.focus&&t.focus(),t=0;t=document.documentMode,or=null,ir=null,ar=null,sr=!1;function lr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sr||null==or||or!==ft(r)||("selectionStart"in(r=or)&&tr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ar&&Qn(ar,r)||(ar=r,0<(r=Fu(ir,"onSelect")).length&&(t=new Zt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=or)))}function cr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ur={animationend:cr("Animation","AnimationEnd"),animationiteration:cr("Animation","AnimationIteration"),animationstart:cr("Animation","AnimationStart"),transitionrun:cr("Transition","TransitionRun"),transitionstart:cr("Transition","TransitionStart"),transitioncancel:cr("Transition","TransitionCancel"),transitionend:cr("Transition","TransitionEnd")},dr={},hr={};function fr(e){if(dr[e])return dr[e];if(!ur[e])return e;var t,n=ur[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return dr[e]=n[t];return e}nt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete ur.animationend.animation,delete ur.animationiteration.animation,delete ur.animationstart.animation),"TransitionEvent"in window||delete ur.transitionend.transition);var pr=fr("animationend"),mr=fr("animationiteration"),gr=fr("animationstart"),yr=fr("transitionrun"),vr=fr("transitionstart"),br=fr("transitioncancel"),wr=fr("transitionend"),_r=new Map,Sr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function kr(e,t){_r.set(e,t),et(t,[e])}var xr=[],Cr=0,Er=0;function Tr(){for(var e=Cr,t=Er=Cr=0;t>=a,o-=a,Ur=1<<32-we(t)+o|n<h?(f=d,d=null):f=d.sibling;var p=y(o,d,s[h],l);if(null===p){null===d&&(d=f);break}e&&d&&null===p.alternate&&t(o,d),a=i(p,a,h),null===u?c=p:u.sibling=p,u=p,d=f}if(h===s.length)return n(o,d),Xr&&Hr(o,h),c;if(null===d){for(;hf?(p=h,h=null):p=h.sibling;var b=y(o,h,g.value,c);if(null===b){null===h&&(h=p);break}e&&h&&null===b.alternate&&t(o,h),s=i(b,s,f),null===d?u=b:d.sibling=b,d=b,h=p}if(g.done)return n(o,h),Xr&&Hr(o,f),u;if(null===h){for(;!g.done;f++,g=l.next())null!==(g=m(o,g.value,c))&&(s=i(g,s,f),null===d?u=g:d.sibling=g,d=g);return Xr&&Hr(o,f),u}for(h=r(h);!g.done;f++,g=l.next())null!==(g=v(h,o,f,g.value,c))&&(e&&null!==g.alternate&&h.delete(null===g.key?f:g.key),s=i(g,s,f),null===d?u=g:d.sibling=g,d=g);return e&&h.forEach((function(e){return t(o,e)})),Xr&&Hr(o,f),u}(l,h,f=w.call(f),p)}if("function"===typeof f.then)return b(l,h,vo(f),p);if(f.$$typeof===g)return b(l,h,Ts(l,f),p);wo(l,f)}return"string"===typeof f&&""!==f||"number"===typeof f||"bigint"===typeof f?(f=""+f,null!==h&&6===h.tag?(n(l,h.sibling),(p=o(h,f)).return=l,l=p):(n(l,h),(p=Ul(f,l.mode,p)).return=l,l=p),s(l)):n(l,h)}return function(e,t,n,r){try{yo=0;var o=b(e,t,n,r);return go=null,o}catch(a){if(a===so)throw a;var i=Dl(29,a,null,e.mode);return i.lanes=r,i.return=e,i}}}var ko=So(!0),xo=So(!1),Co=V(null),Eo=V(0);function To(e,t){Y(Eo,e=uc),Y(Co,t),uc=e|t.baseLanes}function Po(){Y(Eo,uc),Y(Co,Co.current)}function Ro(){uc=Eo.current,K(Co),K(Eo)}var Io=V(null),No=null;function Ao(e){var t=e.alternate;Y(Do,1&Do.current),Y(Io,e),null===No&&(null===t||null!==Co.current||null!==t.memoizedState)&&(No=e)}function Oo(e){if(22===e.tag){if(Y(Do,Do.current),Y(Io,e),null===No){var t=e.alternate;null!==t&&null!==t.memoizedState&&(No=e)}}else Mo()}function Mo(){Y(Do,Do.current),Y(Io,Io.current)}function Lo(e){K(Io),No===e&&(No=null),K(Do)}var Do=V(0);function Fo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},jo=r.unstable_scheduleCallback,$o=r.unstable_NormalPriority,Bo={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wo(){return{controller:new zo,data:new Map,refCount:0}}function Uo(e){e.refCount--,0===e.refCount&&jo($o,(function(){e.controller.abort()}))}var qo=null,Ho=0,Vo=0,Ko=null;function Yo(){if(0===--Ho&&null!==qo){null!==Ko&&(Ko.status="fulfilled");var e=qo;qo=null,Vo=0,Ko=null;for(var t=0;ti?i:8;var a=I.T,s={};I.T=s,Sa(e,!1,t,n);try{var l=o(),c=I.S;if(null!==c&&c(s,l),null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then((function(){r.status="fulfilled",r.value=t;for(var e=0;e title"))),Ku(i,r,n),i[ze]=e,Xe(i),r=i;break e;case"link":var s=Pd("link","href",o).get(r+(n.href||""));if(s)for(var l=0;l<\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"===typeof r.is?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"===typeof r.is?o.createElement(n,{is:r.is}):o.createElement(n)}}e[ze]=t,e[je]=r;e:for(o=t.child;null!==o;){if(5===o.tag||6===o.tag)e.appendChild(o.stateNode);else if(4!==o.tag&&27!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;null===o.sibling;){if(null===o.return||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(Ku(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Hl(t)}}return Gl(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&Hl(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(e=X.current,oo(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=Gr))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[ze]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||Uu(e.nodeValue,n)))||to(t)}else(e=Qu(e).createTextNode(r))[ze]=t,t.stateNode=e}return Gl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=oo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[ze]=t}else io(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gl(t),o=!1}else null!==Jr&&(Lc(Jr),Jr=null),o=!0;if(!o)return 256&t.flags?(Lo(t),t):(Lo(t),null)}if(Lo(t),0!==(128&t.flags))return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){o=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool);var i=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Kl(t,t.updateQueue),Gl(t),null;case 4:return ee(),null===e&&Ou(t.stateNode.containerInfo),Gl(t),null;case 10:return ws(t.type),Gl(t),null;case 19:if(K(Do),null===(o=t.memoizedState))return Gl(t),null;if(r=0!==(128&t.flags),null===(i=o.rendering))if(r)Yl(o,!1);else{if(0!==dc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=Fo(e))){for(t.flags|=128,Yl(o,!1),e=i.updateQueue,t.updateQueue=e,Kl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)jl(n,e),n=n.sibling;return Y(Do,1&Do.current|2),t.child}e=e.sibling}null!==o.tail&&le()>_c&&(t.flags|=128,r=!0,Yl(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=Fo(i))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Kl(t,e),Yl(o,!0),null===o.tail&&"hidden"===o.tailMode&&!i.alternate&&!Xr)return Gl(t),null}else 2*le()-o.renderingStartTime>_c&&536870912!==n&&(t.flags|=128,r=!0,Yl(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=o.last)?e.sibling=i:t.child=i,o.last=i)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=le(),t.sibling=null,e=Do.current,Y(Do,r?1&e|2:1&e),t):(Gl(t),null);case 22:case 23:return Lo(t),Ro(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(Gl(t),6&t.subtreeFlags&&(t.flags|=8192)):Gl(t),null!==(n=t.updateQueue)&&Kl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&K(Qo),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ws(Bo),Gl(t),null;case 25:return null}throw Error(a(156,t.tag))}function Xl(e,t){switch(Yr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ws(Bo),ee(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ne(t),null;case 13:if(Lo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));io()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return K(Do),null;case 4:return ee(),null;case 10:return ws(t.type),null;case 22:case 23:return Lo(t),Ro(),null!==e&&K(Qo),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return ws(Bo),null;default:return null}}function Jl(e,t){switch(Yr(t),t.tag){case 3:ws(Bo),ee();break;case 26:case 27:case 5:ne(t);break;case 4:ee();break;case 13:Lo(t);break;case 19:K(Do);break;case 10:ws(t.type);break;case 22:case 23:Lo(t),Ro(),null!==e&&K(Qo);break;case 24:ws(Bo)}}var Zl={getCacheForType:function(e){var t=Es(Bo),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},ec="function"===typeof WeakMap?WeakMap:Map,tc=0,nc=null,rc=null,oc=0,ic=0,ac=null,sc=!1,lc=!1,cc=!1,uc=0,dc=0,hc=0,fc=0,pc=0,mc=0,gc=0,yc=null,vc=null,bc=!1,wc=0,_c=1/0,Sc=null,kc=null,xc=!1,Cc=null,Ec=0,Tc=0,Pc=null,Rc=0,Ic=null;function Nc(){if(0!==(2&tc)&&0!==oc)return oc&-oc;if(null!==I.T){return 0!==Vo?Vo:Su()}return De()}function Ac(){0===mc&&(mc=0===(536870912&oc)||Xr?Re():536870912);var e=Io.current;return null!==e&&(e.flags|=32),mc}function Oc(e,t,n){(e===nc&&2===ic||null!==e.cancelPendingCommit)&&(Bc(e,0),zc(e,oc,mc,!1)),Ae(e,n),0!==(2&tc)&&e===nc||(e===nc&&(0===(2&tc)&&(fc|=n),4===dc&&zc(e,oc,mc,!1)),gu(e))}function Mc(e,t,n){if(0!==(6&tc))throw Error(a(327));for(var r=!n&&0===(60&t)&&0===(t&e.expiredLanes)||Te(e,t),o=r?function(e,t){var n=tc;tc|=2;var r=Uc(),o=qc();nc!==e||oc!==t?(Sc=null,_c=le()+500,Bc(e,t)):lc=Te(e,t);e:for(;;)try{if(0!==ic&&null!==rc){t=rc;var i=ac;t:switch(ic){case 1:ic=0,ac=null,Xc(e,t,i,1);break;case 2:if(uo(i)){ic=0,ac=null,Qc(t);break}t=function(){2===ic&&nc===e&&(ic=7),gu(e)},i.then(t,t);break e;case 3:ic=7;break e;case 4:ic=5;break e;case 7:uo(i)?(ic=0,ac=null,Qc(t)):(ic=0,ac=null,Xc(e,t,i,7));break;case 5:var s=null;switch(rc.tag){case 26:s=rc.memoizedState;case 5:case 27:var l=rc;if(!s||Id(s)){ic=0,ac=null;var c=l.sibling;if(null!==c)rc=c;else{var u=l.return;null!==u?(rc=u,Jc(u)):rc=null}break t}}ic=0,ac=null,Xc(e,t,i,5);break;case 6:ic=0,ac=null,Xc(e,t,i,6);break;case 8:$c(),dc=6;break e;default:throw Error(a(462))}}Yc();break}catch(d){Wc(e,d)}return vs=ys=null,I.H=r,I.A=o,tc=n,null!==rc?0:(nc=null,oc=0,Tr(),dc)}(e,t):Vc(e,t,!0),i=r;;){if(0===o){lc&&!r&&zc(e,t,0,!1);break}if(6===o)zc(e,t,0,!sc);else{if(n=e.current.alternate,i&&!Fc(n)){o=Vc(e,t,!1),i=!1;continue}if(2===o){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;o=yc;var c=l.current.memoizedState.isDehydrated;if(c&&(Bc(l,s).flags|=256),2!==(s=Vc(l,s,!1))){if(cc&&!c){l.errorRecoveryDisabledLanes|=i,fc|=i,o=4;break e}i=vc,vc=o,null!==i&&Lc(i)}o=s}if(i=!1,2!==o)continue}}if(1===o){Bc(e,0),zc(e,t,0,!0);break}e:{switch(r=e,o){case 0:case 1:throw Error(a(345));case 4:if((4194176&t)===t){zc(r,t,mc,!sc);break e}break;case 2:vc=null;break;case 3:case 5:break;default:throw Error(a(329))}if(r.finishedWork=n,r.finishedLanes=t,(62914560&t)===t&&10<(i=wc+300-le())){if(zc(r,t,mc,!sc),0!==Ee(r,0))break e;r.timeoutHandle=td(Dc.bind(null,r,n,vc,Sc,bc,t,mc,fc,gc,sc,2,-0,0),i)}else Dc(r,n,vc,Sc,bc,t,mc,fc,gc,sc,0,-0,0)}}break}gu(e)}function Lc(e){null===vc?vc=e:vc.push.apply(vc,e)}function Dc(e,t,n,r,o,i,s,l,c,u,d,h,f){var p=t.subtreeFlags;if((8192&p||16785408===(16785408&p))&&(Nd={stylesheets:null,count:0,unsuspend:Ad},Rl(t),null!==(t=function(){if(null===Nd)throw Error(a(475));var e=Nd;return e.stylesheets&&0===e.count&&Ld(e,e.stylesheets),0n?32:n,I.T=null,null===Cc)var i=!1;else{n=Pc,Pc=null;var s=Cc,l=Ec;if(Cc=null,Ec=0,0!==(6&tc))throw Error(a(331));var c=tc;if(tc|=4,Al(s.current),xl(s,s.current,l,n),tc=c,yu(0,!1),ve&&"function"===typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(ye,s)}catch(u){}i=!0}return i}finally{W.p=o,I.T=r,tu(e,t)}}return!1}function ru(e,t,n){t=Lr(n,t),null!==(e=Os(e,t=Ba(e.stateNode,t,2),2))&&(Ae(e,2),gu(e))}function ou(e,t,n){if(3===e.tag)ru(e,e,n);else for(;null!==t;){if(3===t.tag){ru(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===kc||!kc.has(r))){e=Lr(n,e),null!==(r=Os(t,n=Wa(2),2))&&(Ua(n,r,t,e),Ae(r,2),gu(r));break}}t=t.return}}function iu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ec;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(cc=!0,o.add(n),e=au.bind(null,e,t,n),t.then(e,e))}function au(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nc===e&&(oc&n)===n&&(4===dc||3===dc&&(62914560&oc)===oc&&300>le()-wc?0===(2&tc)&&Bc(e,0):pc|=n,gc===oc&&(gc=0)),gu(e)}function su(e,t){0===t&&(t=Ie()),null!==(e=Ir(e,t))&&(Ae(e,t),gu(e))}function lu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),su(e,n)}function cu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),su(e,n)}var uu=null,du=null,hu=!1,fu=!1,pu=!1,mu=0;function gu(e){var t;e!==du&&null===e.next&&(null===du?uu=du=e:du=du.next=e),fu=!0,hu||(hu=!0,t=vu,od((function(){0!==(6&tc)?oe(ue,t):t()})))}function yu(e,t){if(!pu&&fu){pu=!0;do{for(var n=!1,r=uu;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var i=0;else{var a=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-we(42|e)+1)-1,i=201326677&(i&=o&~(a&~s))?201326677&i|1:i?2|i:0}0!==i&&(n=!0,_u(r,i))}else i=oc,0===(3&(i=Ee(r,r===nc?i:0)))||Te(r,i)||(n=!0,_u(r,i));r=r.next}}while(n);pu=!1}}function vu(){fu=hu=!1;var e=0;0!==mu&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==ed&&(ed=e,!0);return ed=null,!1}()&&(e=mu),mu=0);for(var t=le(),n=null,r=uu;null!==r;){var o=r.next,i=bu(r,t);0===i?(r.next=null,null===n?uu=o:n.next=o,null===o&&(du=n)):(n=r,(0!==e||0!==(3&i))&&(fu=!0)),r=o}yu(e,!1)}function bu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=-62914561&e.pendingLanes;0 title"):null)}function Id(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var Nd=null;function Ad(){}function Od(){if(this.count--,0===this.count)if(this.stylesheets)Ld(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Md=null;function Ld(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Md=new Map,t.forEach(Dd,e),Md=null,Od.call(e))}function Dd(e,t){if(!(4&t.state.loading)){var n=Md.get(e);if(n)var r=n.get(null);else{n=new Map,Md.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i{e.exports=n(152)},752:(e,t)=>{function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;ri(l,n))ci(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(ci(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function _(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,N();else{var t=r(u);null!==t&&A(_,t.startTime-e)}}var S,k=!1,x=-1,C=5,E=-1;function T(){return!(t.unstable_now()-Ee&&T());){var a=h.callback;if("function"===typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof s){h.callback=s,w(e),n=!0;break t}h===r(c)&&o(c),w(e)}else o(c);h=r(c)}if(null!==h)n=!0;else{var l=r(u);null!==l&&A(_,l.startTime-e),n=!1}}break e}finally{h=null,f=i,p=!1}n=void 0}}finally{n?S():k=!1}}}if("function"===typeof b)S=function(){b(P)};else if("undefined"!==typeof MessageChannel){var R=new MessageChannel,I=R.port2;R.port1.onmessage=P,S=function(){I.postMessage(null)}}else S=function(){y(P,0)};function N(){k||(k=!0,S())}function A(e,n){x=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,N())},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(v(x),x=-1):g=!0,A(_,i-a))):(e.sortIndex=s,n(c,e),m||p||(m=!0,N())),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},766:(e,t,n)=>{!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(432)},882:(e,t)=>{var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case o:return t}}}function S(e){return _(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||_(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===h},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===a||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=_},935:(e,t)=>{var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/";var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>tl,hasStandardBrowserEnv:()=>rl,hasStandardBrowserWebWorkerEnv:()=>ol,navigator:()=>nl,origin:()=>il});var o=n(367);const i=n.p+"static/media/half-pot-logo.585886ddfcf94077aa2f.png",a=!1,s=!1,l="${JSCORE_VERSION}",c=function(e,t){if(!e)throw u(t)},u=function(e){return new Error("Firebase Database ("+l+") INTERNAL ASSERT FAILED: "+e)},d=function(e){const t=[];let n=0;for(let r=0;r>6|192,t[n++]=63&o|128):55296===(64512&o)&&r+1>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},h={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let o=0;o>2,u=(3&t)<<4|a>>4;let d=(15&a)<<2|l>>6,h=63&l;s||(h=64,i||(d=64)),r.push(n[c],n[u],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(d(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n191&&o<224){const i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){const i=((7&o)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(i>>10)),t[r++]=String.fromCharCode(56320+(1023&i))}else{const i=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let o=0;o>4;if(r.push(l),64!==a){const e=i<<4&240|a>>2;if(r.push(e),64!==s){const e=a<<6&192|s;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class f extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const p=function(e){const t=d(e);return h.encodeByteArray(t,!0)},m=function(e){return p(e).replace(/\./g,"")},g=function(e){try{return h.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function y(e){return v(void 0,e)}function v(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=v(e[n],t[n]));return e}const b=()=>function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,w=()=>{try{return b()||(()=>{if("undefined"===typeof process)return;const e={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://k76xrsk2m5hnvuk26o5brdvara0kmkkf.lambda-url.us-east-1.on.aws"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"===typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}const t=e&&g(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},_=e=>{const t=(e=>{var t,n;return null===(n=null===(t=w())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]})(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},S=()=>{var e;return null===(e=w())||void 0===e?void 0:e.config};class k{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"===typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function x(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function C(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(x())}function E(){return!0===a||!0===s}class T extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,T.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,P.prototype.create)}}class P{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e){const t=(arguments.length<=1?void 0:arguments[1])||{},n=`${this.service}/${e}`,r=this.errors[e],o=r?function(e,t){return e.replace(R,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(r,t):"Error",i=`${this.serviceName}: ${o} (${n}).`;return new T(n,i,t)}}const R=/\{\$([^}]+)}/g;function I(e){return JSON.parse(e)}function N(e){return JSON.stringify(e)}const A=function(e){let t={},n={},r={},o="";try{const i=e.split(".");t=I(g(i[0])||""),n=I(g(i[1])||""),o=i[2],r=n.d||{},delete n.d}catch(i){}return{header:t,claims:n,data:r,signature:o}};function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function L(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function D(e,t,n){const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r}function F(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const o of n){if(!r.includes(o))return!1;const n=e[o],i=t[o];if(z(n)&&z(i)){if(!F(n,i))return!1}else if(n!==i)return!1}for(const o of r)if(!n.includes(o))return!1;return!0}function z(e){return null!==e&&"object"===typeof e}class j{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e>>31)}let r,o,i=this.chain_[0],a=this.chain_[1],s=this.chain_[2],l=this.chain_[3],c=this.chain_[4];for(let u=0;u<80;u++){u<40?u<20?(r=l^a&(s^l),o=1518500249):(r=a^s^l,o=1859775393):u<60?(r=a&s|l&(a|s),o=2400959708):(r=a^s^l,o=3395469782);const e=(i<<5|i>>>27)+r+c+o+n[u]&4294967295;c=l,l=s,s=4294967295&(a<<30|a>>>2),a=i,i=e}this.chain_[0]=this.chain_[0]+i&4294967295,this.chain_[1]=this.chain_[1]+a&4294967295,this.chain_[2]=this.chain_[2]+s&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);const n=t-this.blockSize;let r=0;const o=this.buf_;let i=this.inbuf_;for(;r=56;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let r=0;r<5;r++)for(let t=24;t>=0;t-=8)e[n]=this.chain_[r]>>t&255,++n;return e}}function $(e,t){return`${e} failed: ${t} argument `}const B=function(e){let t=0;for(let n=0;n=55296&&r<=56319?(t+=4,n++):t+=3}return t};function W(e){return e&&e._delegate?e._delegate:e}class U{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const q="[DEFAULT]";class H{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new k;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(n){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(o){if(r)return null;throw o}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:q})}catch(t){}for(const[e,n]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});n.resolve(e)}catch(t){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;return this.instancesOptions.get(e)||{}}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[o,i]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(o)&&i.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),o=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;o.add(e),this.onInitCallbacks.set(r,o);const i=this.instances.get(r);return i&&e(i,r),()=>{o.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const o of n)try{o(e,t)}catch(r){}}getOrInitializeService(e){let{instanceIdentifier:t,options:n={}}=e,r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:V(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(o){}return r||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q;return this.component?this.component.multipleInstances?e:q:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}function V(e){return e===q?void 0:e}class K{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new H(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const Y=[];var G;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(G||(G={}));const Q={debug:G.DEBUG,verbose:G.VERBOSE,info:G.INFO,warn:G.WARN,error:G.ERROR,silent:G.SILENT},X=G.INFO,J={[G.DEBUG]:"log",[G.VERBOSE]:"log",[G.INFO]:"info",[G.WARN]:"warn",[G.ERROR]:"error"},Z=function(e,t){if(t2?o-2:0),a=2;a(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function ce(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(ne||(ne=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),o=1;o{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)}));oe.set(e,t)}(e),t=e,(te||(te=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,le):e);var t}function de(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",i)},o=()=>{t(de(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)}));return t.then((t=>{t instanceof IDBCursor&&re.set(t,e)})).catch((()=>{})),se.set(t,e),t}(e);if(ae.has(e))return ae.get(e);const t=ue(e);return t!==e&&(ae.set(e,t),se.set(t,e)),t}const he=e=>se.get(e);const fe=["get","getKey","getAll","getAllKeys","count"],pe=["put","add","delete","clear"],me=new Map;function ge(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(me.get(t))return me.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=pe.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!fe.includes(n))return;const i=async function(e){const t=this.transaction(e,o?"readwrite":"readonly");let i=t.store;for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l({...e,get:(t,n,r)=>ge(t,n)||e.get(t,n,r),has:(t,n)=>!!ge(t,n)||e.has(t,n)}))(le);class ye{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const ve="@firebase/app",be="0.11.2",we=new ee("@firebase/app"),_e="@firebase/app-compat",Se="@firebase/analytics-compat",ke="@firebase/analytics",xe="@firebase/app-check-compat",Ce="@firebase/app-check",Ee="@firebase/auth",Te="@firebase/auth-compat",Pe="@firebase/database",Re="@firebase/data-connect",Ie="@firebase/database-compat",Ne="@firebase/functions",Ae="@firebase/functions-compat",Oe="@firebase/installations",Me="@firebase/installations-compat",Le="@firebase/messaging",De="@firebase/messaging-compat",Fe="@firebase/performance",ze="@firebase/performance-compat",je="@firebase/remote-config",$e="@firebase/remote-config-compat",Be="@firebase/storage",We="@firebase/storage-compat",Ue="@firebase/firestore",qe="@firebase/vertexai",He="@firebase/firestore-compat",Ve="firebase",Ke="[DEFAULT]",Ye={[ve]:"fire-core",[_e]:"fire-core-compat",[ke]:"fire-analytics",[Se]:"fire-analytics-compat",[Ce]:"fire-app-check",[xe]:"fire-app-check-compat",[Ee]:"fire-auth",[Te]:"fire-auth-compat",[Pe]:"fire-rtdb",[Re]:"fire-data-connect",[Ie]:"fire-rtdb-compat",[Ne]:"fire-fn",[Ae]:"fire-fn-compat",[Oe]:"fire-iid",[Me]:"fire-iid-compat",[Le]:"fire-fcm",[De]:"fire-fcm-compat",[Fe]:"fire-perf",[ze]:"fire-perf-compat",[je]:"fire-rc",[$e]:"fire-rc-compat",[Be]:"fire-gcs",[We]:"fire-gcs-compat",[Ue]:"fire-fst",[He]:"fire-fst-compat",[qe]:"fire-vertex","fire-js":"fire-js",[Ve]:"fire-js-all"},Ge=new Map,Qe=new Map,Xe=new Map;function Je(e,t){try{e.container.addComponent(t)}catch(n){we.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Ze(e){const t=e.name;if(Xe.has(t))return we.debug(`There were multiple attempts to register component ${t}.`),!1;Xe.set(t,e);for(const n of Ge.values())Je(n,e);for(const n of Qe.values())Je(n,e);return!0}function et(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}const tt=new P("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class nt{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new U("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw tt.create("app-deleted",{appName:this._name})}}function rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){t={name:t}}const r=Object.assign({name:Ke,automaticDataCollectionEnabled:!1},t),o=r.name;if("string"!==typeof o||!o)throw tt.create("bad-app-name",{appName:String(o)});if(n||(n=S()),!n)throw tt.create("no-options");const i=Ge.get(o);if(i){if(F(n,i.options)&&F(r,i.config))return i;throw tt.create("duplicate-app",{appName:o})}const a=new K(o);for(const l of Xe.values())a.addComponent(l);const s=new nt(n,r,a);return Ge.set(o,s),s}function ot(e,t,n){var r;let o=null!==(r=Ye[e])&&void 0!==r?r:e;n&&(o+=`-${n}`);const i=o.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const e=[`Unable to register library "${o}" with version "${t}":`];return i&&e.push(`library name "${o}" contains illegal characters (whitespace or "/")`),i&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void we.warn(e.join(" "))}Ze(new U(`${o}-version`,(()=>({library:o,version:t})),"VERSION"))}const it="firebase-heartbeat-store";let at=null;function st(){return at||(at=function(e,t){let{blocked:n,upgrade:r,blocking:o,terminated:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=indexedDB.open(e,t),s=de(a);return r&&a.addEventListener("upgradeneeded",(e=>{r(de(a.result),e.oldVersion,e.newVersion,de(a.transaction),e)})),n&&a.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{i&&e.addEventListener("close",(()=>i())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(it)}catch(n){console.warn(n)}}}).catch((e=>{throw tt.create("idb-open",{originalErrorMessage:e.message})}))),at}async function lt(e,t){try{const n=(await st()).transaction(it,"readwrite"),r=n.objectStore(it);await r.put(t,ct(e)),await n.done}catch(n){if(n instanceof T)we.warn(n.message);else{const e=tt.create("idb-set",{originalErrorMessage:null===n||void 0===n?void 0:n.message});we.warn(e.message)}}}function ct(e){return`${e.name}!${e.options.appId}`}class ut{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new ht(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=dt();if(null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some((e=>e.date===r)))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>30){const e=function(e){if(0===e.length)return-1;let t=0,n=e[0].date;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:1024;const n=[];let r=e.slice();for(const o of e){const e=n.find((e=>e.agent===o.agent));if(e){if(e.dates.push(o.date),ft(n)>t){e.dates.pop();break}}else if(n.push({agent:o.agent,dates:[o.date]}),ft(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),o=m(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(t){return we.warn(t),""}}}function dt(){return(new Date).toISOString().substring(0,10)}class ht{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"===typeof indexedDB}catch(e){return!1}}()&&new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{var e;t((null===(e=o.error)||void 0===e?void 0:e.message)||"")}}catch(Ot){t(Ot)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await st()).transaction(it),n=await t.objectStore(it).get(ct(e));return await t.done,n}catch(t){if(t instanceof T)we.warn(t.message);else{const e=tt.create("idb-get",{originalErrorMessage:null===t||void 0===t?void 0:t.message});we.warn(e.message)}}}(this.app);return(null===e||void 0===e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return lt(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return lt(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function ft(e){return m(JSON.stringify({version:2,heartbeats:e})).length}var pt;pt="",Ze(new U("platform-logger",(e=>new ye(e)),"PRIVATE")),Ze(new U("heartbeat",(e=>new ut(e)),"PRIVATE")),ot(ve,be,pt),ot(ve,be,"esm2017"),ot("fire-js","");const mt="@firebase/database",gt="1.0.13";let yt="";function vt(e){yt=e}class bt{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),N(t))}get(e){const t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:I(t)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}class wt{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}get(e){return O(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}const _t=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){const t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new bt(t)}}catch(t){}return new wt},St=_t("localStorage"),kt=_t("sessionStorage"),xt=new ee("@firebase/database"),Ct=function(){let e=1;return function(){return e++}}(),Et=function(e){const t=function(e){const t=[];let n=0;for(let r=0;r=55296&&o<=56319){const t=o-55296;r++,c(r>6|192,t[n++]=63&o|128):o<65536?(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t}(e),n=new j;n.update(t);const r=n.digest();return h.encodeByteArray(r)},Tt=function(){let e="";for(let t=0;tn?r.push(e.substring(o,n)):r.push(e.substring(o,o+t));return r};function qt(e,t){for(const n in e)e.hasOwnProperty(n)&&t(n,e[n])}const Ht=function(e){c(!Dt(e),"Invalid JSON number");const t=1023;let n,r,o,i,a;0===e?(r=0,o=0,n=1/e===-1/0?1:0):(n=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(e)/Math.LN2),t),r=i+t,o=Math.round(e*Math.pow(2,52-i)-Math.pow(2,52))):(r=0,o=Math.round(e/Math.pow(2,-1074))));const s=[];for(a=52;a;a-=1)s.push(o%2?1:0),o=Math.floor(o/2);for(a=11;a;a-=1)s.push(r%2?1:0),r=Math.floor(r/2);s.push(n?1:0),s.reverse();const l=s.join("");let u="";for(a=0;a<64;a+=8){let e=parseInt(l.substr(a,8),2).toString(16);1===e.length&&(e="0"+e),u+=e}return u.toLowerCase()};const Vt=new RegExp("^-?(0*)\\d{1,10}$"),Kt=function(e){if(Vt.test(e)){const t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},Yt=function(e){try{e()}catch(t){setTimeout((()=>{const e=t.stack||"";throw Lt("Exception was thrown by user callback.",e),t}),Math.floor(0))}},Gt=function(e,t){const n=setTimeout(e,t);return"number"===typeof n&&"undefined"!==typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(n):"object"===typeof n&&n.unref&&n.unref(),n};class Qt{constructor(e,t){var n;this.appCheckProvider=t,this.appName=e.name,null!==(n=e)&&void 0!==n&&void 0!==n.settings&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.appCheck=null===t||void 0===t?void 0:t.getImmediate({optional:!0}),this.appCheck||null===t||void 0===t||t.get().then((e=>this.appCheck=e))}getToken(e){if(this.serverAppAppCheckToken){if(e)throw new Error("Attempted reuse of `FirebaseServerApp.appCheckToken` after previous usage failed.");return Promise.resolve({token:this.serverAppAppCheckToken})}return this.appCheck?this.appCheck.getToken(e):new Promise(((t,n)=>{setTimeout((()=>{this.appCheck?this.getToken(e).then(t,n):t(null)}),0)}))}addTokenChangeListener(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then((t=>t.addTokenListener(e)))}notifyForInvalidToken(){Lt(`Provided AppCheck credentials for the app named "${this.appName}" are invalid. This usually indicates your app was not initialized correctly.`)}}class Xt{constructor(e,t,n){this.appName_=e,this.firebaseOptions_=t,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit((e=>this.auth_=e))}getToken(e){return this.auth_?this.auth_.getToken(e).catch((e=>e&&"auth/token-not-initialized"===e.code?(Nt("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e))):new Promise(((t,n)=>{setTimeout((()=>{this.auth_?this.getToken(e).then(t,n):t(null)}),0)}))}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then((t=>t.addAuthTokenListener(e)))}removeTokenChangeListener(e){this.authProvider_.get().then((t=>t.removeAuthTokenListener(e)))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',Lt(e)}}class Jt{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}Jt.OWNER="owner";const Zt="5",en=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,tn="ac",nn="websocket",rn="long_polling";class on{constructor(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=o,this.persistenceKey=i,this.includeNamespaceInQueryParams=a,this.isUsingEmulator=s,this.emulatorOptions=l,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=St.get("host:"+e)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&St.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){const e=this.secure?"https://":"http://",t=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${t}`}}function an(e,t,n){let r;if(c("string"===typeof t,"typeof type must == string"),c("object"===typeof n,"typeof params must == object"),t===nn)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else{if(t!==rn)throw new Error("Unknown connection type: "+t);r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?"}(function(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams})(e)&&(n.ns=e.namespace);const o=[];return qt(n,((e,t)=>{o.push(e+"="+t)})),r+o.join("&")}class sn{constructor(){this.counters_={}}incrementCounter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;O(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}get(){return y(this.counters_)}}const ln={},cn={};function un(e){const t=e.toString();return ln[t]||(ln[t]=new sn),ln[t]}class dn{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse{this.onMessage_(e[t])}));if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}const hn="start";class fn{constructor(e,t,n,r,o,i,a){this.connId=e,this.repoInfo=t,this.applicationId=n,this.appCheckToken=r,this.authToken=o,this.transportSessionId=i,this.lastSessionId=a,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=At(e),this.stats_=un(t),this.urlFn=e=>(this.appCheckToken&&(e[tn]=this.appCheckToken),an(t,rn,e))}open(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new dn(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(E()||"complete"===document.readyState)e();else{let t=!1;const n=function(){document.body?t||(t=!0,e()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(()=>{"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((()=>{if(this.isClosed_)return;this.scriptTagHolder=new pn((function(){for(var e=arguments.length,t=new Array(e),r=0;r{n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.onClosed_()}),this.urlFn);const e={};e[hn]="t",e.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=this.scriptTagHolder.uniqueCallbackIdentifier),e.v=Zt,this.transportSessionId&&(e.s=this.transportSessionId),this.lastSessionId&&(e.ls=this.lastSessionId),this.applicationId&&(e.p=this.applicationId),this.appCheckToken&&(e[tn]=this.appCheckToken),"undefined"!==typeof location&&location.hostname&&en.test(location.hostname)&&(e.r="f");const t=this.urlFn(e);this.log_("Connecting via long-poll to "+t),this.scriptTagHolder.addTag(t,(()=>{}))}))}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){fn.forceAllow_=!0}static forceDisallow(){fn.forceDisallow_=!0}static isAvailable(){return!E()&&(!!fn.forceAllow_||!fn.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){const t=N(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=p(t),r=Ut(n,1840);for(let o=0;odocument.domain="'+document.domain+'";<\/script>'}const r=""+n+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(r),this.myIFrame.doc.close()}catch(o){Nt("frame writing exception"),o.stack&&Nt(o.stack),Nt(o)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||Nt("No IE domain setting required")}catch(t){const n=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+n+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout((()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)}),Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;let t=this.urlFn(e),n="",r=0;for(;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;{const e=this.pendingSegs.shift();n=n+"&seg"+r+"="+e.seg+"&ts"+r+"="+e.ts+"&d"+r+"="+e.d,r++}}return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1}enqueueSegment(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()}addLongPollTag_(e,t){this.outstandingRequests.add(t);const n=()=>{this.outstandingRequests.delete(t),this.newRequest_()},r=setTimeout(n,Math.floor(25e3));this.addTag(e,(()=>{clearTimeout(r),n()}))}addTag(e,t){E()?this.doNodeLongPoll(e,t):setTimeout((()=>{try{if(!this.sendNewPolls)return;const n=this.myIFrame.doc.createElement("script");n.type="text/javascript",n.async=!0,n.src=e,n.onload=n.onreadystatechange=function(){const e=n.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),t())},n.onerror=()=>{Nt("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(n)}catch(n){}}),Math.floor(1))}}let mn=null;"undefined"!==typeof MozWebSocket?mn=MozWebSocket:"undefined"!==typeof WebSocket&&(mn=WebSocket);class gn{constructor(e,t,n,r,o,i,a){this.connId=e,this.applicationId=n,this.appCheckToken=r,this.authToken=o,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=At(this.connId),this.stats_=un(t),this.connURL=gn.connectionURL_(t,i,a,r,n),this.nodeAdmin=t.nodeAdmin}static connectionURL_(e,t,n,r,o){const i={};return i.v=Zt,!E()&&"undefined"!==typeof location&&location.hostname&&en.test(location.hostname)&&(i.r="f"),t&&(i.s=t),n&&(i.ls=n),r&&(i[tn]=r),o&&(i.p=o),an(e,nn,i)}open(e,t){this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,St.set("previous_websocket_failure",!0);try{let e;if(E()){const t=this.nodeAdmin?"AdminNode":"Node";e={headers:{"User-Agent":`Firebase/${Zt}/${yt}/${process.platform}/${t}`,"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(e.headers.Authorization=`Bearer ${this.authToken}`),this.appCheckToken&&(e.headers["X-Firebase-AppCheck"]=this.appCheckToken);const n={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://k76xrsk2m5hnvuk26o5brdvara0kmkkf.lambda-url.us-east-1.on.aws"},r=0===this.connURL.indexOf("wss://")?n.HTTPS_PROXY||n.https_proxy:n.HTTP_PROXY||n.http_proxy;r&&(e.proxy={origin:r})}this.mySock=new mn(this.connURL,[],e)}catch(n){this.log_("Error instantiating WebSocket.");const e=n.message||n.data;return e&&this.log_(e),void this.onClosed_()}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=e=>{this.handleIncomingFrame(e)},this.mySock.onerror=e=>{this.log_("WebSocket error. Closing connection.");const t=e.message||e.data;t&&this.log_(t),this.onClosed_()}}start(){}static forceDisallow(){gn.forceDisallow_=!0}static isAvailable(){let e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){const t=/Android ([0-9]{0,}\.[0-9]{0,})/,n=navigator.userAgent.match(t);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==mn&&!gn.forceDisallow_}static previouslyFailed(){return St.isInMemoryStorage||!0===St.get("previous_websocket_failure")}markConnectionHealthy(){St.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const e=this.frames.join("");this.frames=null;const t=I(e);this.onMessage(t)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(c(null===this.frames,"We already have a frame buffer"),e.length<=6){const t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(null===this.mySock)return;const t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{const e=this.extractFrameCount_(t);null!==e&&this.appendFrame_(e)}}send(e){this.resetKeepAlive();const t=N(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);const n=Ut(t,16384);n.length>1&&this.sendString_(String(n.length));for(let r=0;r{this.mySock&&this.sendString_("0"),this.resetKeepAlive()}),Math.floor(45e3))}sendString_(e){try{this.mySock.send(e)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}gn.responsesRequiredToBeHealthy=2,gn.healthyTimeout=3e4;class yn{static get ALL_TRANSPORTS(){return[fn,gn]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}constructor(e){this.initTransports_(e)}initTransports_(e){const t=gn&&gn.isAvailable();let n=t&&!gn.previouslyFailed();if(e.webSocketOnly&&(t||Lt("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),n=!0),n)this.transports_=[gn];else{const e=this.transports_=[];for(const t of yn.ALL_TRANSPORTS)t&&t.isAvailable()&&e.push(t);yn.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}yn.globalTransportInitialized_=!1;class vn{constructor(e,t,n,r,o,i,a,s,l,c){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.appCheckToken_=r,this.authToken_=o,this.onMessage_=i,this.onReady_=a,this.onDisconnect_=s,this.onKill_=l,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=At("c:"+this.id+":"),this.transportManager_=new yn(t),this.log_("Connection created"),this.start_()}start_(){const e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const t=this.connReceiver_(this.conn_),n=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((()=>{this.conn_&&this.conn_.open(t,n)}),Math.floor(0));const r=e.healthyTimeout||0;r>0&&(this.healthyTimeout_=Gt((()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>10240?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))}),Math.floor(r)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return t=>{e===this.conn_?this.onConnectionLost_(t):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return t=>{2!==this.state_&&(e===this.rx_?this.onPrimaryMessageReceived_(t):e===this.secondaryConn_?this.onSecondaryMessageReceived_(t):this.log_("message on old connection"))}}sendRequest(e){const t={t:"d",d:e};this.sendData_(t)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if("t"in e){const t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const t=Bt("t",e),n=Bt("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const t=Bt("t",e),n=Bt("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){const t=Bt("t",e);if("d"in e){const n=e.d;if("h"===t){const e=Object.assign({},n);this.repoInfo_.isUsingEmulator&&(e.h=this.repoInfo_.host),this.onHandshake_(e)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let e=0;e{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())}),Math.floor(6e4))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,t){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Gt((()=>{this.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()}onConnectionLost_(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(St.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}close(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}class bn{put(e,t,n,r){}merge(e,t,n,r){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,t,n){}onDisconnectMerge(e,t,n){}onDisconnectCancel(e,t){}reportStats(e){}}class wn{constructor(e){this.allowedEvents_=e,this.listeners_={},c(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e){if(Array.isArray(this.listeners_[e])){const o=[...this.listeners_[e]];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt===e)),"Unknown event: "+e)}}class _n extends wn{static getInstance(){return new _n}constructor(){super(["online"]),this.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||C()||(window.addEventListener("online",(()=>{this.online_||(this.online_=!0,this.trigger("online",!0))}),!1),window.addEventListener("offline",(()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))}),!1))}getInitialEvent(e){return c("online"===e,"Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}class Sn{constructor(e,t){if(void 0===t){this.pieces_=e.split("/");let t=0;for(let e=0;e0&&(this.pieces_[t]=this.pieces_[e],t++);this.pieces_.length=t,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}toString(){let e="";for(let t=this.pieceNum_;t=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function Cn(e){return e.pieces_.length-e.pieceNum_}function En(e){let t=e.pieceNum_;return t1&&void 0!==arguments[1]?arguments[1]:0;return e.pieces_.slice(e.pieceNum_+t)}function Rn(e){if(e.pieceNum_>=e.pieces_.length)return null;const t=[];for(let n=e.pieceNum_;n0&&n.push(e[t])}return new Sn(n,0)}function Nn(e){return e.pieceNum_>=e.pieces_.length}function An(e,t){const n=xn(e),r=xn(t);if(null===n)return t;if(n===r)return An(En(e),En(t));throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function On(e,t){if(Cn(e)!==Cn(t))return!1;for(let n=e.pieceNum_,r=t.pieceNum_;n<=e.pieces_.length;n++,r++)if(e.pieces_[n]!==t.pieces_[r])return!1;return!0}function Mn(e,t){let n=e.pieceNum_,r=t.pieceNum_;if(Cn(e)>Cn(t))return!1;for(;n768)throw new Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+Fn(e))}function Fn(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}class zn extends wn{static getInstance(){return new zn}constructor(){let e,t;super(["visible"]),"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(t="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(t="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(t="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(t="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,t&&document.addEventListener(t,(()=>{const t=!document[e];t!==this.visible_&&(this.visible_=t,this.trigger("visible",t))}),!1)}getInitialEvent(e){return c("visible"===e,"Unknown event type: "+e),[this.visible_]}}const jn=1e3;class $n extends bn{constructor(e,t,n,r,o,i,a,s){if(super(),this.repoInfo_=e,this.applicationId_=t,this.onDataUpdate_=n,this.onConnectStatus_=r,this.onServerInfoUpdate_=o,this.authTokenProvider_=i,this.appCheckTokenProvider_=a,this.authOverride_=s,this.id=$n.nextPersistentConnectionId_++,this.log_=At("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=jn,this.maxReconnectDelay_=3e5,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,s&&!E())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");zn.getInstance().on("visible",this.onVisible_,this),-1===e.host.indexOf("fblocal")&&_n.getInstance().on("online",this.onOnline_,this)}sendRequest(e,t,n){const r=++this.requestNumber_,o={r:r,a:e,b:t};this.log_(N(o)),c(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(o),n&&(this.requestCBHash_[r]=n)}get(e){this.initConnection_();const t=new k,n={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:e=>{const n=e.d;"ok"===e.s?t.resolve(n):t.reject(n)}};this.outstandingGets_.push(n),this.outstandingGetCount_++;const r=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(r),t.promise}listen(e,t,n,r){this.initConnection_();const o=e._queryIdentifier,i=e._path.toString();this.log_("Listen called for "+i+" "+o),this.listens.has(i)||this.listens.set(i,new Map),c(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),c(!this.listens.get(i).has(o),"listen() called twice for same path/queryId.");const a={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(i).set(o,a),this.connected_&&this.sendListen_(a)}sendGet_(e){const t=this.outstandingGets_[e];this.sendRequest("g",t.request,(n=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),t.onComplete&&t.onComplete(n)}))}sendListen_(e){const t=e.query,n=t._path.toString(),r=t._queryIdentifier;this.log_("Listen on "+n+" for "+r);const o={p:n};e.tag&&(o.q=t._queryObject,o.t=e.tag),o.h=e.hashFn(),this.sendRequest("q",o,(o=>{const i=o.d,a=o.s;$n.warnOnListenWarnings_(i,t);(this.listens.get(n)&&this.listens.get(n).get(r))===e&&(this.log_("listen response",o),"ok"!==a&&this.removeListen_(n,r),e.onComplete&&e.onComplete(a,i))}))}static warnOnListenWarnings_(e,t){if(e&&"object"===typeof e&&O(e,"w")){const n=M(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){const e='".indexOn": "'+t._queryParams.getIndex().toString()+'"',n=t._path.toString();Lt(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${e} at ${n} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(()=>{})),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&40===e.length||function(e){const t=A(e).claims;return"object"===typeof t&&!0===t.admin}(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},(()=>{}))}tryAuth(){if(this.connected_&&this.authToken_){const e=this.authToken_,t=function(e){const t=A(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")}(e)?"auth":"gauth",n={cred:e};null===this.authOverride_?n.noauth=!0:"object"===typeof this.authOverride_&&(n.authvar=this.authOverride_),this.sendRequest(t,n,(t=>{const n=t.s,r=t.d||"error";this.authToken_===e&&("ok"===n?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(n,r))}))}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},(e=>{const t=e.s,n=e.d||"error";"ok"===t?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(t,n)}))}unlisten(e,t){const n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),c(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query");this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)}sendUnlisten_(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);const o={p:e};r&&(o.q=n,o.t=r),this.sendRequest("n",o)}onDisconnectPut(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})}onDisconnectMerge(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})}onDisconnectCancel(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}sendOnDisconnect_(e,t,n,r){const o={p:t,d:n};this.log_("onDisconnect "+e,o),this.sendRequest(e,o,(e=>{r&&setTimeout((()=>{r(e.s,e.d)}),Math.floor(0))}))}put(e,t,n,r){this.putInternal("p",e,t,n,r)}merge(e,t,n,r){this.putInternal("m",e,t,n,r)}putInternal(e,t,n,r,o){this.initConnection_();const i={p:t,d:n};void 0!==o&&(i.h=o),this.outstandingPuts_.push({action:e,request:i,onComplete:r}),this.outstandingPutCount_++;const a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+t)}sendPut_(e){const t=this.outstandingPuts_[e].action,n=this.outstandingPuts_[e].request,r=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(t,n,(n=>{this.log_(t+" response",n),delete this.outstandingPuts_[e],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),r&&r(n.s,n.d)}))}reportStats(e){if(this.connected_){const t={c:e};this.log_("reportStats",t),this.sendRequest("s",t,(e=>{if("ok"!==e.s){const t=e.d;this.log_("reportStats","Error sending stats: "+t)}}))}}onDataMessage_(e){if("r"in e){this.log_("from server: "+N(e));const t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}onDataPush_(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):Ot("Unrecognized action received from server: "+N(e)+"\nAre you using the latest client?")}onReady_(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){c(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((()=>{this.establishConnectionTimer_=null,this.establishConnection_()}),Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=jn,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=jn,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=jn),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();const e=Math.max(0,(new Date).getTime()-this.lastConnectionAttemptTime_);let t=Math.max(0,this.reconnectDelay_-e);t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;const e=this.onDataMessage_.bind(this),t=this.onReady_.bind(this),n=this.onRealtimeDisconnect_.bind(this),r=this.id+":"+$n.nextConnectionId_++,o=this.lastSessionId;let i=!1,a=null;const s=function(){a?a.close():(i=!0,n())},l=function(e){c(a,"sendRequest call when we're not connected not allowed."),a.sendRequest(e)};this.realtime_={close:s,sendRequest:l};const u=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[s,l]=await Promise.all([this.authTokenProvider_.getToken(u),this.appCheckTokenProvider_.getToken(u)]);i?Nt("getToken() completed but was canceled"):(Nt("getToken() completed. Creating connection."),this.authToken_=s&&s.accessToken,this.appCheckToken_=l&&l.token,a=new vn(r,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,t,n,(e=>{Lt(e+" ("+this.repoInfo_.toString()+")"),this.interrupt("server_kill")}),o))}catch(Ot){this.log_("Failed to get token: "+Ot),i||(this.repoInfo_.nodeAdmin&&Lt(Ot),s())}}}interrupt(e){Nt("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){Nt("Resuming connection for reason: "+e),delete this.interruptReasons_[e],L(this.interruptReasons_)&&(this.reconnectDelay_=jn,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}cancelSentTransactions_(){for(let e=0;eWt(e))).join("$"):"default";const r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")}removeListen_(e,t){const n=new Sn(e).toString();let r;if(this.listens.has(n)){const e=this.listens.get(n);r=e.get(t),e.delete(t),0===e.size&&this.listens.delete(n)}else r=void 0;return r}onAuthRevoked_(e,t){Nt("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,t){Nt("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const t of e.values())this.sendListen_(t);for(let e=0;e4&&void 0!==arguments[4]?arguments[4]:null;this.isReverse_=r,this.resultGenerator_=o,this.nodeStack_=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.isReverse_?e.left:e.right;else{if(0===i){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}getNext(){if(0===this.nodeStack_.length)return null;let e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}hasNext(){return this.nodeStack_.length>0}peek(){if(0===this.nodeStack_.length)return null;const e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class Kn{constructor(e,t,n,r,o){this.key=e,this.value=t,this.color=null!=n?n:Kn.RED,this.left=null!=r?r:Yn.EMPTY_NODE,this.right=null!=o?o:Yn.EMPTY_NODE}copy(e,t,n,r,o){return new Kn(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=o?o:this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this;const o=n(e,r.key);return r=o<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===o?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp_()}removeMin_(){if(this.left.isEmpty())return Yn.EMPTY_NODE;let e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()}remove(e,t){let n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return Yn.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e}rotateLeft_(){const e=this.copy(null,null,Kn.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,Kn.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth_(){const e=this.check_();return Math.pow(2,e)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}Kn.RED=!0,Kn.BLACK=!1;class Yn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yn.EMPTY_NODE;this.comparator_=e,this.root_=t}insert(e,t){return new Yn(this.comparator_,this.root_.insert(e,t,this.comparator_).copy(null,null,Kn.BLACK,null,null))}remove(e){return new Yn(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Kn.BLACK,null,null))}get(e){let t,n=this.root_;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t)return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null}getPredecessorKey(e){let t,n=this.root_,r=null;for(;!n.isEmpty();){if(t=this.comparator_(e,n.key),0===t){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new Vn(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,t){return new Vn(this.root_,e,this.comparator_,!1,t)}getReverseIteratorFrom(e,t){return new Vn(this.root_,e,this.comparator_,!0,t)}getReverseIterator(e){return new Vn(this.root_,null,this.comparator_,!0,e)}}function Gn(e,t){return jt(e.name,t.name)}function Qn(e,t){return jt(e,t)}let Xn;Yn.EMPTY_NODE=new class{copy(e,t,n,r,o){return this}insert(e,t,n){return new Kn(e,t,null)}remove(e,t){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}};const Jn=function(e){return"number"===typeof e?"number:"+Ht(e):"string:"+e},Zn=function(e){if(e.isLeafNode()){const t=e.val();c("string"===typeof t||"number"===typeof t||"object"===typeof t&&O(t,".sv"),"Priority must be a string or number.")}else c(e===Xn||e.isEmpty(),"priority of unexpected type.");c(e===Xn||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};let er,tr,nr;class rr{static set __childrenNodeConstructor(e){er=e}static get __childrenNodeConstructor(){return er}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rr.__childrenNodeConstructor.EMPTY_NODE;this.value_=e,this.priorityNode_=t,this.lazyHash_=null,c(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Zn(this.priorityNode_)}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new rr(this.value_,e)}getImmediateChild(e){return".priority"===e?this.priorityNode_:rr.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return Nn(e)?this:".priority"===xn(e)?this.priorityNode_:rr.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,t){return null}updateImmediateChild(e,t){return".priority"===e?this.updatePriority(t):t.isEmpty()&&".priority"!==e?this:rr.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,t).updatePriority(this.priorityNode_)}updateChild(e,t){const n=xn(e);return null===n?t:t.isEmpty()&&".priority"!==n?this:(c(".priority"!==n||1===Cn(e),".priority must be the last token in a path"),this.updateImmediateChild(n,rr.__childrenNodeConstructor.EMPTY_NODE.updateChild(En(e),t)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,t){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+Jn(this.priorityNode_.val())+":");const t=typeof this.value_;e+=t+":",e+="number"===t?Ht(this.value_):this.value_,this.lazyHash_=Et(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===rr.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof rr.__childrenNodeConstructor?-1:(c(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const t=typeof e.value_,n=typeof this.value_,r=rr.VALUE_TYPE_ORDER.indexOf(t),o=rr.VALUE_TYPE_ORDER.indexOf(n);return c(r>=0,"Unknown leaf type: "+t),c(o>=0,"Unknown leaf type: "+n),r===o?"object"===n?0:this.value_{const o=M(this.indexSet_,r);if(c(o,"Missing index implementation for "+r),n===cr){if(o.isDefinedOn(e.node)){const n=[],r=t.getIterator(Bn.Wrap);let i=r.getNext();for(;i;)i.name!==e.name&&n.push(i),i=r.getNext();return n.push(e),sr(n,o.getCompare())}return cr}{const r=t.get(e.name);let o=n;return r&&(o=o.remove(new Bn(e.name,r))),o.insert(e,e.node)}}));return new ur(n,this.indexSet_)}removeFromIndexes(e,t){const n=D(this.indexes_,(n=>{if(n===cr)return n;{const r=t.get(e.name);return r?n.remove(new Bn(e.name,r)):n}}));return new ur(n,this.indexSet_)}}let dr;class hr{static get EMPTY_NODE(){return dr||(dr=new hr(new Yn(Qn),null,ur.Default))}constructor(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Zn(this.priorityNode_),this.children_.isEmpty()&&c(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}isLeafNode(){return!1}getPriority(){return this.priorityNode_||dr}updatePriority(e){return this.children_.isEmpty()?this:new hr(this.children_,e,this.indexMap_)}getImmediateChild(e){if(".priority"===e)return this.getPriority();{const t=this.children_.get(e);return null===t?dr:t}}getChild(e){const t=xn(e);return null===t?this:this.getImmediateChild(t).getChild(En(e))}hasChild(e){return null!==this.children_.get(e)}updateImmediateChild(e,t){if(c(t,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(t);{const n=new Bn(e,t);let r,o;t.isEmpty()?(r=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(n,this.children_)):(r=this.children_.insert(e,t),o=this.indexMap_.addToIndexes(n,this.children_));const i=r.isEmpty()?dr:this.priorityNode_;return new hr(r,i,o)}}updateChild(e,t){const n=xn(e);if(null===n)return t;{c(".priority"!==xn(e)||1===Cn(e),".priority must be the last token in a path");const r=this.getImmediateChild(n).updateChild(En(e),t);return this.updateImmediateChild(n,r)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const t={};let n=0,r=0,o=!0;if(this.forEachChild(or,((i,a)=>{t[i]=a.val(e),n++,o&&hr.INTEGER_REGEXP_.test(i)?r=Math.max(r,Number(i)):o=!1})),!e&&o&&r<2*n){const e=[];for(const n in t)e[n]=t[n];return e}return e&&!this.getPriority().isEmpty()&&(t[".priority"]=this.getPriority().val()),t}hash(){if(null===this.lazyHash_){let e="";this.getPriority().isEmpty()||(e+="priority:"+Jn(this.getPriority().val())+":"),this.forEachChild(or,((t,n)=>{const r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":Et(e)}return this.lazyHash_}getPredecessorChildName(e,t,n){const r=this.resolveIndex_(n);if(r){const n=r.getPredecessorKey(new Bn(e,t));return n?n.name:null}return this.children_.getPredecessorKey(e)}getFirstChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.minKey();return e&&e.name}return this.children_.minKey()}getFirstChild(e){const t=this.getFirstChildName(e);return t?new Bn(t,this.children_.get(t)):null}getLastChildName(e){const t=this.resolveIndex_(e);if(t){const e=t.maxKey();return e&&e.name}return this.children_.maxKey()}getLastChild(e){const t=this.getLastChildName(e);return t?new Bn(t,this.children_.get(t)):null}forEachChild(e,t){const n=this.resolveIndex_(e);return n?n.inorderTraversal((e=>t(e.name,e.node))):this.children_.inorderTraversal(t)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(e=>e));{const n=this.children_.getIteratorFrom(e.name,Bn.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)<0;)n.getNext(),r=n.peek();return n}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,t){const n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(e=>e));{const n=this.children_.getReverseIteratorFrom(e.name,Bn.Wrap);let r=n.peek();for(;null!=r&&t.compare(r,e)>0;)n.getNext(),r=n.peek();return n}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===fr?-1:0}withIndex(e){if(e===Hn||this.indexMap_.hasIndex(e))return this;{const t=this.indexMap_.addIndex(e,this.children_);return new hr(this.children_,this.priorityNode_,t)}}isIndexed(e){return e===Hn||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){const e=this.getIterator(or),n=t.getIterator(or);let r=e.getNext(),o=n.getNext();for(;r&&o;){if(r.name!==o.name||!r.node.equals(o.node))return!1;r=e.getNext(),o=n.getNext()}return null===r&&null===o}return!1}return!1}}resolveIndex_(e){return e===Hn?null:this.indexMap_.get(e.toString())}}hr.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;const fr=new class extends hr{constructor(){super(new Yn(Qn),hr.EMPTY_NODE,ur.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return hr.EMPTY_NODE}isEmpty(){return!1}};Object.defineProperties(Bn,{MIN:{value:new Bn(Ft,hr.EMPTY_NODE)},MAX:{value:new Bn(zt,fr)}}),qn.__EMPTY_NODE=hr.EMPTY_NODE,rr.__childrenNodeConstructor=hr,Xn=fr,function(e){nr=e}(fr);function pr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null===e)return hr.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),c(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e){return new rr(e,pr(t))}if(e instanceof Array){let n=hr.EMPTY_NODE;return qt(e,((t,r)=>{if(O(e,t)&&"."!==t.substring(0,1)){const e=pr(r);!e.isLeafNode()&&e.isEmpty()||(n=n.updateImmediateChild(t,e))}})),n.updatePriority(pr(t))}{const n=[];let r=!1;if(qt(e,((e,t)=>{if("."!==e.substring(0,1)){const o=pr(t);o.isEmpty()||(r=r||!o.getPriority().isEmpty(),n.push(new Bn(e,o)))}})),0===n.length)return hr.EMPTY_NODE;const o=sr(n,Gn,(e=>e.name),Qn);if(r){const e=sr(n,or.getCompare());return new hr(o,pr(t),new ur({".priority":e},{".priority":or}))}return new hr(o,pr(t),ur.Default)}}!function(e){tr=e}(pr);class mr extends Wn{constructor(e){super(),this.indexPath_=e,c(!Nn(e)&&".priority"!==xn(e),"Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,t){const n=this.extractChild(e.node),r=this.extractChild(t.node),o=n.compareTo(r);return 0===o?jt(e.name,t.name):o}makePost(e,t){const n=pr(e),r=hr.EMPTY_NODE.updateChild(this.indexPath_,n);return new Bn(t,r)}maxPost(){const e=hr.EMPTY_NODE.updateChild(this.indexPath_,fr);return new Bn(zt,e)}toString(){return Pn(this.indexPath_,0).join("/")}}const gr=new class extends Wn{compare(e,t){const n=e.node.compareTo(t.node);return 0===n?jt(e.name,t.name):n}isDefinedOn(e){return!0}indexedValueChanged(e,t){return!e.equals(t)}minPost(){return Bn.MIN}maxPost(){return Bn.MAX}makePost(e,t){const n=pr(e);return new Bn(t,n)}toString(){return".value"}};function yr(e){return{type:"value",snapshotNode:e}}function vr(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function br(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function wr(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}class _r{constructor(e){this.index_=e}updateChild(e,t,n,r,o,i){c(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const a=e.getImmediateChild(t);return a.getChild(r).equals(n.getChild(r))&&a.isEmpty()===n.isEmpty()?e:(null!=i&&(n.isEmpty()?e.hasChild(t)?i.trackChildChange(br(t,a)):c(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):a.isEmpty()?i.trackChildChange(vr(t,n)):i.trackChildChange(wr(t,n,a))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))}updateFullNode(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(or,((e,r)=>{t.hasChild(e)||n.trackChildChange(br(e,r))})),t.isLeafNode()||t.forEachChild(or,((t,r)=>{if(e.hasChild(t)){const o=e.getImmediateChild(t);o.equals(r)||n.trackChildChange(wr(t,r,o))}else n.trackChildChange(vr(t,r))}))),t.withIndex(this.index_)}updatePriority(e,t){return e.isEmpty()?hr.EMPTY_NODE:e.updatePriority(t)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class Sr{constructor(e){this.indexedFilter_=new _r(e.getIndex()),this.index_=e.getIndex(),this.startPost_=Sr.getStartPost_(e),this.endPost_=Sr.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const t=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,n=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return t&&n}updateChild(e,t,n,r,o,i){return this.matches(new Bn(t,n))||(n=hr.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,o,i)}updateFullNode(e,t,n){t.isLeafNode()&&(t=hr.EMPTY_NODE);let r=t.withIndex(this.index_);r=r.updatePriority(hr.EMPTY_NODE);const o=this;return t.forEachChild(or,((e,t)=>{o.matches(new Bn(e,t))||(r=r.updateImmediateChild(e,hr.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()}}class kr{constructor(e){this.withinDirectionalStart=e=>this.reverse_?this.withinEndPost(e):this.withinStartPost(e),this.withinDirectionalEnd=e=>this.reverse_?this.withinStartPost(e):this.withinEndPost(e),this.withinStartPost=e=>{const t=this.index_.compare(this.rangedFilter_.getStartPost(),e);return this.startIsInclusive_?t<=0:t<0},this.withinEndPost=e=>{const t=this.index_.compare(e,this.rangedFilter_.getEndPost());return this.endIsInclusive_?t<=0:t<0},this.rangedFilter_=new Sr(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,t,n,r,o,i){return this.rangedFilter_.matches(new Bn(t,n))||(n=hr.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()e(n,t)}else i=this.index_.getCompare();const a=e;c(a.numChildren()===this.limit_,"");const s=new Bn(t,n),l=this.reverse_?a.getFirstChild(this.index_):a.getLastChild(this.index_),u=this.rangedFilter_.matches(s);if(a.hasChild(t)){const e=a.getImmediateChild(t);let c=r.getChildAfterChild(this.index_,l,this.reverse_);for(;null!=c&&(c.name===t||a.hasChild(c.name));)c=r.getChildAfterChild(this.index_,c,this.reverse_);const d=null==c?1:i(c,s);if(u&&!n.isEmpty()&&d>=0)return null!=o&&o.trackChildChange(wr(t,n,e)),a.updateImmediateChild(t,n);{null!=o&&o.trackChildChange(br(t,e));const n=a.updateImmediateChild(t,hr.EMPTY_NODE);return null!=c&&this.rangedFilter_.matches(c)?(null!=o&&o.trackChildChange(vr(c.name,c.node)),n.updateImmediateChild(c.name,c.node)):n}}return n.isEmpty()?e:u&&i(l,s)>=0?(null!=o&&(o.trackChildChange(br(l.name,l.node)),o.trackChildChange(vr(t,n))),a.updateImmediateChild(t,n).updateImmediateChild(l.name,hr.EMPTY_NODE)):e}}class xr{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=or}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return c(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return c(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:Ft}hasEnd(){return this.endSet_}getIndexEndValue(){return c(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return c(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:zt}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return c(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===or}copy(){const e=new xr;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function Cr(e){const t={};if(e.isDefault())return t;let n;if(e.index_===or?n="$priority":e.index_===gr?n="$value":e.index_===Hn?n="$key":(c(e.index_ instanceof mr,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=N(n),e.startSet_){const n=e.startAfterSet_?"startAfter":"startAt";t[n]=N(e.indexStartValue_),e.startNameSet_&&(t[n]+=","+N(e.indexStartName_))}if(e.endSet_){const n=e.endBeforeSet_?"endBefore":"endAt";t[n]=N(e.indexEndValue_),e.endNameSet_&&(t[n]+=","+N(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function Er(e){const t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==or&&(t.i=e.index_.toString()),t}class Tr extends bn{reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,t){return void 0!==t?"tag$"+t:(c(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}constructor(e,t,n,r){super(),this.repoInfo_=e,this.onDataUpdate_=t,this.authTokenProvider_=n,this.appCheckTokenProvider_=r,this.log_=At("p:rest:"),this.listens_={}}listen(e,t,n,r){const o=e._path.toString();this.log_("Listen called for "+o+" "+e._queryIdentifier);const i=Tr.getListenId_(e,n),a={};this.listens_[i]=a;const s=Cr(e._queryParams);this.restRequest_(o+".json",s,((e,t)=>{let s=t;if(404===e&&(s=null,e=null),null===e&&this.onDataUpdate_(o,s,!1,n),M(this.listens_,i)===a){let t;t=e?401===e?"permission_denied":"rest_error:"+e:"ok",r(t,null)}}))}unlisten(e,t){const n=Tr.getListenId_(e,t);delete this.listens_[n]}get(e){const t=Cr(e._queryParams),n=e._path.toString(),r=new k;return this.restRequest_(n+".json",t,((e,t)=>{let o=t;404===e&&(o=null,e=null),null===e?(this.onDataUpdate_(n,o,!1,null),r.resolve(o)):r.reject(new Error(o))})),r.promise}refreshAuthToken(e){}restRequest_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then((r=>{let[o,i]=r;o&&o.accessToken&&(t.auth=o.accessToken),i&&i.token&&(t.ac=i.token);const a=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+function(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}(t);this.log_("Sending REST request for "+a);const s=new XMLHttpRequest;s.onreadystatechange=()=>{if(n&&4===s.readyState){this.log_("REST Response for "+a+" received. status:",s.status,"response:",s.responseText);let t=null;if(s.status>=200&&s.status<300){try{t=I(s.responseText)}catch(e){Lt("Failed to parse JSON response for "+a+": "+s.responseText)}n(null,t)}else 401!==s.status&&404!==s.status&&Lt("Got unsuccessful REST response for "+a+" Status: "+s.status),n(s.status);n=null}},s.open("GET",a,!0),s.send()}))}}class Pr{constructor(){this.rootNode_=hr.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}function Rr(){return{value:null,children:new Map}}function Ir(e,t,n){if(Nn(t))e.value=n,e.children.clear();else if(null!==e.value)e.value=e.value.updateChild(t,n);else{const r=xn(t);e.children.has(r)||e.children.set(r,Rr());Ir(e.children.get(r),t=En(t),n)}}function Nr(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEach(((e,n)=>{t(n,e)}))}(e,((e,r)=>{Nr(r,new Sn(t.toString()+"/"+e),n)}))}class Ar{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),t=Object.assign({},e);return this.last_&&qt(this.last_,((e,n)=>{t[e]=t[e]-n})),this.last_=e,t}}class Or{constructor(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new Ar(e);const n=1e4+2e4*Math.random();Gt(this.reportStats_.bind(this),Math.floor(n))}reportStats_(){const e=this.statsListener_.get(),t={};let n=!1;qt(e,((e,r)=>{r>0&&O(this.statsToReport_,e)&&(t[e]=r,n=!0)})),n&&this.server_.reportStats(t),Gt(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}var Mr;function Lr(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(Mr||(Mr={}));class Dr{constructor(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=Mr.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}operationForChild(e){if(Nn(this.path)){if(null!=this.affectedTree.value)return c(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const t=this.affectedTree.subtree(new Sn(e));return new Dr(kn(),t,this.revert)}}return c(xn(this.path)===e,"operationForChild called for unrelated child."),new Dr(En(this.path),this.affectedTree,this.revert)}}class Fr{constructor(e,t){this.source=e,this.path=t,this.type=Mr.LISTEN_COMPLETE}operationForChild(e){return Nn(this.path)?new Fr(this.source,kn()):new Fr(this.source,En(this.path))}}class zr{constructor(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=Mr.OVERWRITE}operationForChild(e){return Nn(this.path)?new zr(this.source,kn(),this.snap.getImmediateChild(e)):new zr(this.source,En(this.path),this.snap)}}class jr{constructor(e,t,n){this.source=e,this.path=t,this.children=n,this.type=Mr.MERGE}operationForChild(e){if(Nn(this.path)){const t=this.children.subtree(new Sn(e));return t.isEmpty()?null:t.value?new zr(this.source,kn(),t.value):new jr(this.source,kn(),t)}return c(xn(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new jr(this.source,En(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class $r{constructor(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(Nn(e))return this.isFullyInitialized()&&!this.filtered_;const t=xn(e);return this.isCompleteForChild(t)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}class Br{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function Wr(e,t,n,r,o,i){const a=r.filter((e=>e.type===n));a.sort(((t,n)=>function(e,t,n){if(null==t.childName||null==n.childName)throw u("Should only compare child_ events.");const r=new Bn(t.childName,t.snapshotNode),o=new Bn(n.childName,n.snapshotNode);return e.index_.compare(r,o)}(e,t,n))),a.forEach((n=>{const r=function(e,t,n){return"value"===t.type||"child_removed"===t.type||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}(e,n,i);o.forEach((o=>{o.respondsTo(n.type)&&t.push(o.createEvent(r,e.query_))}))}))}function Ur(e,t){return{eventCache:e,serverCache:t}}function qr(e,t,n,r){return Ur(new $r(t,n,r),e.serverCache)}function Hr(e,t,n,r){return Ur(e.eventCache,new $r(t,n,r))}function Vr(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function Kr(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let Yr;class Gr{static fromObject(e){let t=new Gr(null);return qt(e,((e,n)=>{t=t.set(new Sn(e),n)})),t}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(Yr||(Yr=new Yn($t)),Yr);this.value=e,this.children=t}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,t){if(null!=this.value&&t(this.value))return{path:kn(),value:this.value};if(Nn(e))return null;{const n=xn(e),r=this.children.get(n);if(null!==r){const o=r.findRootMostMatchingPathAndValue(En(e),t);if(null!=o){return{path:In(new Sn(n),o.path),value:o.value}}return null}return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,(()=>!0))}subtree(e){if(Nn(e))return this;{const t=xn(e),n=this.children.get(t);return null!==n?n.subtree(En(e)):new Gr(null)}}set(e,t){if(Nn(e))return new Gr(t,this.children);{const n=xn(e),r=(this.children.get(n)||new Gr(null)).set(En(e),t),o=this.children.insert(n,r);return new Gr(this.value,o)}}remove(e){if(Nn(e))return this.children.isEmpty()?new Gr(null):new Gr(null,this.children);{const t=xn(e),n=this.children.get(t);if(n){const r=n.remove(En(e));let o;return o=r.isEmpty()?this.children.remove(t):this.children.insert(t,r),null===this.value&&o.isEmpty()?new Gr(null):new Gr(this.value,o)}return this}}get(e){if(Nn(e))return this.value;{const t=xn(e),n=this.children.get(t);return n?n.get(En(e)):null}}setTree(e,t){if(Nn(e))return t;{const n=xn(e),r=(this.children.get(n)||new Gr(null)).setTree(En(e),t);let o;return o=r.isEmpty()?this.children.remove(n):this.children.insert(n,r),new Gr(this.value,o)}}fold(e){return this.fold_(kn(),e)}fold_(e,t){const n={};return this.children.inorderTraversal(((r,o)=>{n[r]=o.fold_(In(e,r),t)})),t(e,this.value,n)}findOnPath(e,t){return this.findOnPath_(e,kn(),t)}findOnPath_(e,t,n){const r=!!this.value&&n(t,this.value);if(r)return r;if(Nn(e))return null;{const r=xn(e),o=this.children.get(r);return o?o.findOnPath_(En(e),In(t,r),n):null}}foreachOnPath(e,t){return this.foreachOnPath_(e,kn(),t)}foreachOnPath_(e,t,n){if(Nn(e))return this;{this.value&&n(t,this.value);const r=xn(e),o=this.children.get(r);return o?o.foreachOnPath_(En(e),In(t,r),n):new Gr(null)}}foreach(e){this.foreach_(kn(),e)}foreach_(e,t){this.children.inorderTraversal(((n,r)=>{r.foreach_(In(e,n),t)})),this.value&&t(e,this.value)}foreachChild(e){this.children.inorderTraversal(((t,n)=>{n.value&&e(t,n.value)}))}}class Qr{constructor(e){this.writeTree_=e}static empty(){return new Qr(new Gr(null))}}function Xr(e,t,n){if(Nn(t))return new Qr(new Gr(n));{const r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){const o=r.path;let i=r.value;const a=An(o,t);return i=i.updateChild(a,n),new Qr(e.writeTree_.set(o,i))}{const r=new Gr(n),o=e.writeTree_.setTree(t,r);return new Qr(o)}}}function Jr(e,t,n){let r=e;return qt(n,((e,n)=>{r=Xr(r,In(t,e),n)})),r}function Zr(e,t){if(Nn(t))return Qr.empty();{const n=e.writeTree_.setTree(t,new Gr(null));return new Qr(n)}}function eo(e,t){return null!=to(e,t)}function to(e,t){const n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(An(n.path,t)):null}function no(e){const t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(or,((e,n)=>{t.push(new Bn(e,n))})):e.writeTree_.children.inorderTraversal(((e,n)=>{null!=n.value&&t.push(new Bn(e,n.value))})),t}function ro(e,t){if(Nn(t))return e;{const n=to(e,t);return new Qr(null!=n?new Gr(n):e.writeTree_.subtree(t))}}function oo(e){return e.writeTree_.isEmpty()}function io(e,t){return ao(kn(),e.writeTree_,t)}function ao(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);{let r=null;return t.children.inorderTraversal(((t,o)=>{".priority"===t?(c(null!==o.value,"Priority writes must always be leaf nodes"),r=o.value):n=ao(In(e,t),o,n)})),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(In(e,".priority"),r)),n}}function so(e,t){return _o(t,e)}function lo(e,t){const n=e.allWrites.findIndex((e=>e.writeId===t));c(n>=0,"removeWrite called with nonexistent writeId.");const r=e.allWrites[n];e.allWrites.splice(n,1);let o=r.visible,i=!1,a=e.allWrites.length-1;for(;o&&a>=0;){const t=e.allWrites[a];t.visible&&(a>=n&&co(t,r.path)?o=!1:Mn(r.path,t.path)&&(i=!0)),a--}if(o){if(i)return function(e){e.visibleWrites=ho(e.allWrites,uo,kn()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}(e),!0;if(r.snap)e.visibleWrites=Zr(e.visibleWrites,r.path);else{qt(r.children,(t=>{e.visibleWrites=Zr(e.visibleWrites,In(r.path,t))}))}return!0}return!1}function co(e,t){if(e.snap)return Mn(e.path,t);for(const n in e.children)if(e.children.hasOwnProperty(n)&&Mn(In(e.path,n),t))return!0;return!1}function uo(e){return e.visible}function ho(e,t,n){let r=Qr.empty();for(let o=0;o{r=r.updateImmediateChild(e,t)})),r;if(n){const o=ro(e.visibleWrites,t);return n.forEachChild(or,((e,t)=>{const n=io(ro(o,new Sn(e)),t);r=r.updateImmediateChild(e,n)})),no(o).forEach((e=>{r=r.updateImmediateChild(e.name,e.node)})),r}return no(ro(e.visibleWrites,t)).forEach((e=>{r=r.updateImmediateChild(e.name,e.node)})),r}(e.writeTree,e.treePath,t)}function go(e,t,n,r){return function(e,t,n,r,o){c(r||o,"Either existingEventSnap or existingServerSnap must exist");const i=In(t,n);if(eo(e.visibleWrites,i))return null;{const t=ro(e.visibleWrites,i);return oo(t)?o.getChild(n):io(t,o.getChild(n))}}(e.writeTree,e.treePath,t,n,r)}function yo(e,t){return function(e,t){return to(e.visibleWrites,t)}(e.writeTree,In(e.treePath,t))}function vo(e,t,n,r,o,i){return function(e,t,n,r,o,i,a){let s;const l=ro(e.visibleWrites,t),c=to(l,kn());if(null!=c)s=c;else{if(null==n)return[];s=io(l,n)}if(s=s.withIndex(a),s.isEmpty()||s.isLeafNode())return[];{const e=[],t=a.getCompare(),n=i?s.getReverseIteratorFrom(r,a):s.getIteratorFrom(r,a);let l=n.getNext();for(;l&&e.length2&&void 0!==arguments[2]?arguments[2]:null;this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}getCompleteChild(e){const t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);{const t=null!=this.optCompleteServerCache_?new $r(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return bo(this.writes_,e,t)}}getChildAfterChild(e,t,n){const r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:Kr(this.viewCache_),o=vo(this.writes_,r,t,1,n,e);return 0===o.length?null:o[0]}}function Co(e,t,n,r,o){const i=new So;let a,s;if(n.type===Mr.OVERWRITE){const l=n;l.source.fromUser?a=Po(e,t,l.path,l.snap,r,o,i):(c(l.source.fromServer,"Unknown source."),s=l.source.tagged||t.serverCache.isFiltered()&&!Nn(l.path),a=To(e,t,l.path,l.snap,r,o,s,i))}else if(n.type===Mr.MERGE){const l=n;l.source.fromUser?a=function(e,t,n,r,o,i,a){let s=t;return r.foreach(((r,l)=>{const c=In(n,r);Ro(t,xn(c))&&(s=Po(e,s,c,l,o,i,a))})),r.foreach(((r,l)=>{const c=In(n,r);Ro(t,xn(c))||(s=Po(e,s,c,l,o,i,a))})),s}(e,t,l.path,l.children,r,o,i):(c(l.source.fromServer,"Unknown source."),s=l.source.tagged||t.serverCache.isFiltered(),a=No(e,t,l.path,l.children,r,o,s,i))}else if(n.type===Mr.ACK_USER_WRITE){const s=n;a=s.revert?function(e,t,n,r,o,i){let a;if(null!=yo(r,n))return t;{const s=new xo(r,t,o),l=t.eventCache.getNode();let u;if(Nn(n)||".priority"===xn(n)){let n;if(t.serverCache.isFullyInitialized())n=po(r,Kr(t));else{const e=t.serverCache.getNode();c(e instanceof hr,"serverChildren would be complete if leaf node"),n=mo(r,e)}u=e.filter.updateFullNode(l,n,i)}else{const o=xn(n);let c=bo(r,o,t.serverCache);null==c&&t.serverCache.isCompleteForChild(o)&&(c=l.getImmediateChild(o)),u=null!=c?e.filter.updateChild(l,o,c,En(n),s,i):t.eventCache.getNode().hasChild(o)?e.filter.updateChild(l,o,hr.EMPTY_NODE,En(n),s,i):l,u.isEmpty()&&t.serverCache.isFullyInitialized()&&(a=po(r,Kr(t)),a.isLeafNode()&&(u=e.filter.updateFullNode(u,a,i)))}return a=t.serverCache.isFullyInitialized()||null!=yo(r,kn()),qr(t,u,a,e.filter.filtersNodes())}}(e,t,s.path,r,o,i):function(e,t,n,r,o,i,a){if(null!=yo(o,n))return t;const s=t.serverCache.isFiltered(),l=t.serverCache;if(null!=r.value){if(Nn(n)&&l.isFullyInitialized()||l.isCompleteForPath(n))return To(e,t,n,l.getNode().getChild(n),o,i,s,a);if(Nn(n)){let r=new Gr(null);return l.getNode().forEachChild(Hn,((e,t)=>{r=r.set(new Sn(e),t)})),No(e,t,n,r,o,i,s,a)}return t}{let c=new Gr(null);return r.foreach(((e,t)=>{const r=In(n,e);l.isCompleteForPath(r)&&(c=c.set(e,l.getNode().getChild(r)))})),No(e,t,n,c,o,i,s,a)}}(e,t,s.path,s.affectedTree,r,o,i)}else{if(n.type!==Mr.LISTEN_COMPLETE)throw u("Unknown operation type: "+n.type);a=function(e,t,n,r,o){const i=t.serverCache,a=Hr(t,i.getNode(),i.isFullyInitialized()||Nn(n),i.isFiltered());return Eo(e,a,n,r,ko,o)}(e,t,n.path,r,i)}const l=i.getChanges();return function(e,t,n){const r=t.eventCache;if(r.isFullyInitialized()){const o=r.getNode().isLeafNode()||r.getNode().isEmpty(),i=Vr(e);(n.length>0||!e.eventCache.isFullyInitialized()||o&&!r.getNode().equals(i)||!r.getNode().getPriority().equals(i.getPriority()))&&n.push(yr(Vr(t)))}}(t,a,l),{viewCache:a,changes:l}}function Eo(e,t,n,r,o,i){const a=t.eventCache;if(null!=yo(r,n))return t;{let s,l;if(Nn(n))if(c(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){const n=Kr(t),o=mo(r,n instanceof hr?n:hr.EMPTY_NODE);s=e.filter.updateFullNode(t.eventCache.getNode(),o,i)}else{const n=po(r,Kr(t));s=e.filter.updateFullNode(t.eventCache.getNode(),n,i)}else{const u=xn(n);if(".priority"===u){c(1===Cn(n),"Can't have a priority with additional path components");const o=a.getNode();l=t.serverCache.getNode();const i=go(r,n,o,l);s=null!=i?e.filter.updatePriority(o,i):a.getNode()}else{const c=En(n);let d;if(a.isCompleteForChild(u)){l=t.serverCache.getNode();const e=go(r,n,a.getNode(),l);d=null!=e?a.getNode().getImmediateChild(u).updateChild(c,e):a.getNode().getImmediateChild(u)}else d=bo(r,u,t.serverCache);s=null!=d?e.filter.updateChild(a.getNode(),u,d,c,o,i):a.getNode()}}return qr(t,s,a.isFullyInitialized()||Nn(n),e.filter.filtersNodes())}}function To(e,t,n,r,o,i,a,s){const l=t.serverCache;let c;const u=a?e.filter:e.filter.getIndexedFilter();if(Nn(n))c=u.updateFullNode(l.getNode(),r,null);else if(u.filtersNodes()&&!l.isFiltered()){const e=l.getNode().updateChild(n,r);c=u.updateFullNode(l.getNode(),e,null)}else{const e=xn(n);if(!l.isCompleteForPath(n)&&Cn(n)>1)return t;const o=En(n),i=l.getNode().getImmediateChild(e).updateChild(o,r);c=".priority"===e?u.updatePriority(l.getNode(),i):u.updateChild(l.getNode(),e,i,o,ko,null)}const d=Hr(t,c,l.isFullyInitialized()||Nn(n),u.filtersNodes());return Eo(e,d,n,o,new xo(o,d,i),s)}function Po(e,t,n,r,o,i,a){const s=t.eventCache;let l,c;const u=new xo(o,t,i);if(Nn(n))c=e.filter.updateFullNode(t.eventCache.getNode(),r,a),l=qr(t,c,!0,e.filter.filtersNodes());else{const o=xn(n);if(".priority"===o)c=e.filter.updatePriority(t.eventCache.getNode(),r),l=qr(t,c,s.isFullyInitialized(),s.isFiltered());else{const i=En(n),c=s.getNode().getImmediateChild(o);let d;if(Nn(i))d=r;else{const e=u.getCompleteChild(o);d=null!=e?".priority"===Tn(i)&&e.getChild(Rn(i)).isEmpty()?e:e.updateChild(i,r):hr.EMPTY_NODE}if(c.equals(d))l=t;else{l=qr(t,e.filter.updateChild(s.getNode(),o,d,i,u,a),s.isFullyInitialized(),e.filter.filtersNodes())}}}return l}function Ro(e,t){return e.eventCache.isCompleteForChild(t)}function Io(e,t,n){return n.foreach(((e,n)=>{t=t.updateChild(e,n)})),t}function No(e,t,n,r,o,i,a,s){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let l,c=t;l=Nn(n)?r:new Gr(null).setTree(n,r);const u=t.serverCache.getNode();return l.children.inorderTraversal(((n,r)=>{if(u.hasChild(n)){const l=Io(0,t.serverCache.getNode().getImmediateChild(n),r);c=To(e,c,new Sn(n),l,o,i,a,s)}})),l.children.inorderTraversal(((n,r)=>{const l=!t.serverCache.isCompleteForChild(n)&&null===r.value;if(!u.hasChild(n)&&!l){const l=Io(0,t.serverCache.getNode().getImmediateChild(n),r);c=To(e,c,new Sn(n),l,o,i,a,s)}})),c}class Ao{constructor(e,t){this.query_=e,this.eventRegistrations_=[];const n=this.query_._queryParams,r=new _r(n.getIndex()),o=(i=n).loadsAllData()?new _r(i.getIndex()):i.hasLimit()?new kr(i):new Sr(i);var i;this.processor_=function(e){return{filter:e}}(o);const a=t.serverCache,s=t.eventCache,l=r.updateFullNode(hr.EMPTY_NODE,a.getNode(),null),c=o.updateFullNode(hr.EMPTY_NODE,s.getNode(),null),u=new $r(l,a.isFullyInitialized(),r.filtersNodes()),d=new $r(c,s.isFullyInitialized(),o.filtersNodes());this.viewCache_=Ur(d,u),this.eventGenerator_=new Br(this.query_)}get query(){return this.query_}}function Oo(e,t){const n=Kr(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!Nn(t)&&!n.getImmediateChild(xn(t)).isEmpty())?n.getChild(t):null}function Mo(e){return 0===e.eventRegistrations_.length}function Lo(e,t,n){const r=[];if(n){c(null==t,"A cancel should cancel all event registrations.");const o=e.query._path;e.eventRegistrations_.forEach((e=>{const t=e.createCancelEvent(n,o);t&&r.push(t)}))}if(t){let n=[];for(let r=0;r{var n;"child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&i.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))})),Wr(e,o,"child_removed",t,r,n),Wr(e,o,"child_added",t,r,n),Wr(e,o,"child_moved",i,r,n),Wr(e,o,"child_changed",t,r,n),Wr(e,o,"value",t,r,n),o}(e.eventGenerator_,t,n,o)}let zo,jo;class $o{constructor(){this.views=new Map}}function Bo(e,t,n,r){const o=t.source.queryId;if(null!==o){const i=e.views.get(o);return c(null!=i,"SyncTree gave us an op for an invalid query."),Do(i,t,n,r)}{let o=[];for(const i of e.views.values())o=o.concat(Do(i,t,n,r));return o}}function Wo(e,t,n,r,o){const i=t._queryIdentifier,a=e.views.get(i);if(!a){let e=po(n,o?r:null),i=!1;e?i=!0:r instanceof hr?(e=mo(n,r),i=!1):(e=hr.EMPTY_NODE,i=!1);const a=Ur(new $r(e,i,!1),new $r(r,o,!1));return new Ao(t,a)}return a}function Uo(e,t,n,r,o,i){const a=Wo(e,t,r,o,i);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,a),function(e,t){e.eventRegistrations_.push(t)}(a,n),function(e,t){const n=e.viewCache_.eventCache,r=[];n.getNode().isLeafNode()||n.getNode().forEachChild(or,((e,t)=>{r.push(vr(e,t))}));return n.isFullyInitialized()&&r.push(yr(n.getNode())),Fo(e,r,n.getNode(),t)}(a,n)}function qo(e,t,n,r){const o=t._queryIdentifier,i=[];let a=[];const s=Go(e);if("default"===o)for(const[l,c]of e.views.entries())a=a.concat(Lo(c,n,r)),Mo(c)&&(e.views.delete(l),c.query._queryParams.loadsAllData()||i.push(c.query));else{const t=e.views.get(o);t&&(a=a.concat(Lo(t,n,r)),Mo(t)&&(e.views.delete(o),t.query._queryParams.loadsAllData()||i.push(t.query)))}return s&&!Go(e)&&i.push(new(c(zo,"Reference.ts has not been loaded"),zo)(t._repo,t._path)),{removed:i,events:a}}function Ho(e){const t=[];for(const n of e.views.values())n.query._queryParams.loadsAllData()||t.push(n);return t}function Vo(e,t){let n=null;for(const r of e.views.values())n=n||Oo(r,t);return n}function Ko(e,t){if(t._queryParams.loadsAllData())return Qo(e);{const n=t._queryIdentifier;return e.views.get(n)}}function Yo(e,t){return null!=Ko(e,t)}function Go(e){return null!=Qo(e)}function Qo(e){for(const t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}let Xo=1;class Jo{constructor(e){this.listenProvider_=e,this.syncPointTree_=new Gr(null),this.pendingWriteTree_={visibleWrites:Qr.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function Zo(e,t,n,r,o){return function(e,t,n,r,o){c(r>e.lastWriteId,"Stacking an older write on top of newer ones"),void 0===o&&(o=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:o}),o&&(e.visibleWrites=Xr(e.visibleWrites,t,n)),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r,o),o?ai(e,new zr({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,n)):[]}function ei(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=function(e,t){for(let n=0;n{t=t.set(new Sn(e),!0)})),ai(e,new Dr(r.path,t,n))}return[]}function ti(e,t,n){return ai(e,new zr({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))}function ni(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=t._path,a=e.syncPointTree_.get(i);let s=[];if(a&&("default"===t._queryIdentifier||Yo(a,t))){const l=qo(a,t,n,r);0===a.views.size&&(e.syncPointTree_=e.syncPointTree_.remove(i));const c=l.removed;if(s=l.events,!o){const n=-1!==c.findIndex((e=>e._queryParams.loadsAllData())),o=e.syncPointTree_.findOnPath(i,((e,t)=>Go(t)));if(n&&!o){const t=e.syncPointTree_.subtree(i);if(!t.isEmpty()){const n=function(e){return e.fold(((e,t,n)=>{if(t&&Go(t)){return[Qo(t)]}{let e=[];return t&&(e=Ho(t)),qt(n,((t,n)=>{e=e.concat(n)})),e}}))}(t);for(let t=0;t0&&!r)if(n){const n=null;e.listenProvider_.stopListening(mi(t),n)}else c.forEach((t=>{const n=e.queryToTagMap.get(di(t));e.listenProvider_.stopListening(mi(t),n)}))}!function(e,t){for(let n=0;n3&&void 0!==arguments[3]&&arguments[3];const o=t._path;let i=null,a=!1;e.syncPointTree_.foreachOnPath(o,((e,t)=>{const n=An(e,o);i=i||Vo(t,n),a=a||Go(t)}));let s,l=e.syncPointTree_.get(o);if(l?(a=a||Go(l),i=i||Vo(l,kn())):(l=new $o,e.syncPointTree_=e.syncPointTree_.set(o,l)),null!=i)s=!0;else{s=!1,i=hr.EMPTY_NODE;e.syncPointTree_.subtree(o).foreachChild(((e,t)=>{const n=Vo(t,kn());n&&(i=i.updateImmediateChild(e,n))}))}const u=Yo(l,t);if(!u&&!t._queryParams.loadsAllData()){const n=di(t);c(!e.queryToTagMap.has(n),"View does not exist, but we have a tag");const r=Xo++;e.queryToTagMap.set(n,r),e.tagToQueryMap.set(r,n)}let d=Uo(l,t,n,so(e.pendingWriteTree_,o),i,s);if(!u&&!a&&!r){const n=Ko(l,t);d=d.concat(function(e,t,n){const r=t._path,o=ui(e,t),i=ci(e,n),a=e.listenProvider_.startListening(mi(t),o,i.hashFn,i.onComplete),s=e.syncPointTree_.subtree(r);if(o)c(!Go(s.value),"If we're adding a query, it shouldn't be shadowed");else{const t=s.fold(((e,t,n)=>{if(!Nn(e)&&t&&Go(t))return[Qo(t).query];{let e=[];return t&&(e=e.concat(Ho(t).map((e=>e.query)))),qt(n,((t,n)=>{e=e.concat(n)})),e}}));for(let n=0;n{const r=Vo(n,An(e,t));if(r)return r}));return fo(r,t,o,n,!0)}function ai(e,t){return si(t,e.syncPointTree_,null,so(e.pendingWriteTree_,kn()))}function si(e,t,n,r){if(Nn(e.path))return li(e,t,n,r);{const o=t.get(kn());null==n&&null!=o&&(n=Vo(o,kn()));let i=[];const a=xn(e.path),s=e.operationForChild(a),l=t.children.get(a);if(l&&s){const e=n?n.getImmediateChild(a):null,t=wo(r,a);i=i.concat(si(s,l,e,t))}return o&&(i=i.concat(Bo(o,e,r,n))),i}}function li(e,t,n,r){const o=t.get(kn());null==n&&null!=o&&(n=Vo(o,kn()));let i=[];return t.children.inorderTraversal(((t,o)=>{const a=n?n.getImmediateChild(t):null,s=wo(r,t),l=e.operationForChild(t);l&&(i=i.concat(li(l,o,a,s)))})),o&&(i=i.concat(Bo(o,e,r,n))),i}function ci(e,t){const n=t.query,r=ui(e,n);return{hashFn:()=>{const e=function(e){return e.viewCache_.serverCache.getNode()}(t)||hr.EMPTY_NODE;return e.hash()},onComplete:t=>{if("ok"===t)return r?function(e,t,n){const r=hi(e,n);if(r){const n=fi(r),o=n.path,i=n.queryId,a=An(o,t);return pi(e,o,new Fr(Lr(i),a))}return[]}(e,n._path,r):function(e,t){return ai(e,new Fr({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))}(e,n._path);{const r=function(e,t){let n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");const r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return ni(e,n,null,r)}}}}function ui(e,t){const n=di(t);return e.queryToTagMap.get(n)}function di(e){return e._path.toString()+"$"+e._queryIdentifier}function hi(e,t){return e.tagToQueryMap.get(t)}function fi(e){const t=e.indexOf("$");return c(-1!==t&&t{const o=ki(r,t.getImmediateChild(e),n);o!==r&&(i=i.updateImmediateChild(e,o))})),i}}class xi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{children:{},childCount:0};this.name=e,this.parent=t,this.node=n}}function Ci(e,t){let n=t instanceof Sn?t:new Sn(t),r=e,o=xn(n);for(;null!==o;){const e=M(r.node.children,o)||{children:{},childCount:0};r=new xi(o,r,e),n=En(n),o=xn(n)}return r}function Ei(e){return e.node.value}function Ti(e,t){e.node.value=t,Oi(e)}function Ri(e){return e.node.childCount>0}function Ii(e,t){qt(e.node.children,((n,r)=>{t(new xi(n,e,r))}))}function Ni(e,t,n,r){n&&!r&&t(e),Ii(e,(e=>{Ni(e,t,!0,r)})),n&&r&&t(e)}function Ai(e){return new Sn(null===e.parent?e.name:Ai(e.parent)+"/"+e.name)}function Oi(e){null!==e.parent&&function(e,t,n){const r=function(e){return void 0===Ei(e)&&!Ri(e)}(n),o=O(e.node.children,t);r&&o?(delete e.node.children[t],e.node.childCount--,Oi(e)):r||o||(e.node.children[t]=n.node,e.node.childCount++,Oi(e))}(e.parent,e.name,e)}const Mi=/[\[\].#$\/\u0000-\u001F\u007F]/,Li=/[\[\].#$\u0000-\u001F\u007F]/,Di=10485760,Fi=function(e){return"string"===typeof e&&0!==e.length&&!Mi.test(e)},zi=function(e){return"string"===typeof e&&0!==e.length&&!Li.test(e)},ji=function(e,t,n){const r=n instanceof Sn?new Ln(n,e):n;if(void 0===t)throw new Error(e+"contains undefined "+Fn(r));if("function"===typeof t)throw new Error(e+"contains a function "+Fn(r)+" with contents = "+t.toString());if(Dt(t))throw new Error(e+"contains "+t.toString()+" "+Fn(r));if("string"===typeof t&&t.length>Di/3&&B(t)>Di)throw new Error(e+"contains a string greater than "+Di+" utf8 bytes "+Fn(r)+" ('"+t.substring(0,50)+"...')");if(t&&"object"===typeof t){let n=!1,o=!1;if(qt(t,((t,i)=>{if(".value"===t)n=!0;else if(".priority"!==t&&".sv"!==t&&(o=!0,!Fi(t)))throw new Error(e+" contains an invalid key ("+t+") "+Fn(r)+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');!function(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=B(t),Dn(e)}(r,t),ji(e,i,r),function(e){const t=e.parts_.pop();e.byteLength_-=B(t),e.parts_.length>0&&(e.byteLength_-=1)}(r)})),n&&o)throw new Error(e+' contains ".value" child '+Fn(r)+" in addition to actual children.")}},$i=function(e,t,n,r){if((!r||void 0!==n)&&!zi(n))throw new Error($(e,t)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},Bi=function(e,t){const n=t.path.toString();if("string"!==typeof t.repoInfo.host||0===t.repoInfo.host.length||!Fi(t.repoInfo.namespace)&&"localhost"!==t.repoInfo.host.split(":")[0]||0!==n.length&&!function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),zi(e)}(n))throw new Error($(e,"url")+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')};class Wi{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function Ui(e,t){let n=null;for(let r=0;rOn(e,t)))}function Hi(e,t,n){Ui(e,n),Vi(e,(e=>Mn(e,t)||Mn(t,e)))}function Vi(e,t){e.recursionDepth_++;let n=!0;for(let r=0;r=0)e.server_=new Tr(e.repoInfo_,((t,n,r,o)=>{Zi(e,t,n,r,o)}),e.authTokenProvider_,e.appCheckProvider_),setTimeout((()=>ea(e,!0)),0);else{if("undefined"!==typeof n&&null!==n){if("object"!==typeof n)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{N(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}e.persistentConnection_=new $n(e.repoInfo_,t,((t,n,r,o)=>{Zi(e,t,n,r,o)}),(t=>{ea(e,t)}),(t=>{!function(e,t){qt(t,((t,n)=>{ta(e,t,n)}))}(e,t)}),e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener((t=>{e.server_.refreshAuthToken(t)})),e.appCheckProvider_.addTokenChangeListener((t=>{e.server_.refreshAppCheckToken(t.token)})),e.statsReporter_=function(e,t){const n=e.toString();return cn[n]||(cn[n]=t()),cn[n]}(e.repoInfo_,(()=>new Or(e.stats_,e.server_))),e.infoData_=new Pr,e.infoSyncTree_=new Jo({startListening:(t,n,r,o)=>{let i=[];const a=e.infoData_.getNode(t._path);return a.isEmpty()||(i=ti(e.infoSyncTree_,t._path,a),setTimeout((()=>{o("ok")}),0)),i},stopListening:()=>{}}),ta(e,"connected",!1),e.serverSyncTree_=new Jo({startListening:(t,n,r,o)=>(e.server_.listen(t,r,n,((n,r)=>{const i=o(n,r);Hi(e.eventQueue_,t._path,i)})),[]),stopListening:(t,n)=>{e.server_.unlisten(t,n)}})}function Xi(e){const t=e.infoData_.getNode(new Sn(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t}function Ji(e){return function(e){return(e=e||{}).timestamp=e.timestamp||(new Date).getTime(),e}({timestamp:Xi(e)})}function Zi(e,t,n,r,o){e.dataUpdateCount++;const i=new Sn(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;let a=[];if(o)if(r){const t=D(n,(e=>pr(e)));a=function(e,t,n,r){const o=hi(e,r);if(o){const r=fi(o),i=r.path,a=r.queryId,s=An(i,t),l=Gr.fromObject(n);return pi(e,i,new jr(Lr(a),s,l))}return[]}(e.serverSyncTree_,i,t,o)}else{const t=pr(n);a=ri(e.serverSyncTree_,i,t,o)}else if(r){const t=D(n,(e=>pr(e)));a=function(e,t,n){const r=Gr.fromObject(n);return ai(e,new jr({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,r))}(e.serverSyncTree_,i,t)}else{const t=pr(n);a=ti(e.serverSyncTree_,i,t)}let s=i;a.length>0&&(s=la(e,i)),Hi(e.eventQueue_,s,a)}function ea(e,t){ta(e,"connected",t),!1===t&&function(e){ia(e,"onDisconnectEvents");const t=Ji(e),n=Rr();Nr(e.onDisconnect_,kn(),((r,o)=>{const i=_i(r,o,e.serverSyncTree_,t);Ir(n,r,i)}));let r=[];Nr(n,kn(),((t,n)=>{r=r.concat(ti(e.serverSyncTree_,t,n));const o=fa(e,t);la(e,o)})),e.onDisconnect_=Rr(),Hi(e.eventQueue_,kn(),r)}(e)}function ta(e,t,n){const r=new Sn("/.info/"+t),o=pr(n);e.infoData_.updateSnapshot(r,o);const i=ti(e.infoSyncTree_,r,o);Hi(e.eventQueue_,r,i)}function na(e){return e.nextWriteId_++}function ra(e,t,n){let r;r=".info"===xn(t._path)?ni(e.infoSyncTree_,t,n):ni(e.serverSyncTree_,t,n),qi(e.eventQueue_,t._path,r)}function oa(e){e.persistentConnection_&&e.persistentConnection_.interrupt(Yi)}function ia(e){let t="";e.persistentConnection_&&(t=e.persistentConnection_.id+":");for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:e.transactionQueueTree_;if(t||ha(e,t),Ei(t)){const n=ua(e,t);c(n.length>0,"Sending zero length transaction queue");n.every((e=>0===e.status))&&function(e,t,n){const r=n.map((e=>e.currentWriteId)),o=aa(e,t,r);let i=o;const a=o.hash();for(let u=0;u{ia(e,"transaction put response",{path:l.toString(),status:r});let o=[];if("ok"===r){const r=[];for(let t=0;tn[t].onComplete(null,!0,n[t].currentOutputSnapshotResolved))),n[t].unwatcher();ha(e,Ci(e.transactionQueueTree_,t)),sa(e,e.transactionQueueTree_),Hi(e.eventQueue_,t,o);for(let e=0;e{sa(e,t)}))}function la(e,t){const n=ca(e,t),r=Ai(n);return function(e,t,n){if(0===t.length)return;const r=[];let o=[];const i=t.filter((e=>0===e.status)),a=i.map((e=>e.currentWriteId));for(let l=0;l=25)h=!0,d="maxretry",o=o.concat(ei(e.serverSyncTree_,i.currentWriteId,!0));else{const n=aa(e,i.path,a);i.currentInputSnapshot=n;const r=t[l].update(n.val());if(void 0!==r){ji("transaction failed: Data returned ",r,i.path);let t=pr(r);"object"===typeof r&&null!=r&&O(r,".priority")||(t=t.updatePriority(n.getPriority()));const s=i.currentWriteId,l=Ji(e),c=Si(t,n,l);i.currentOutputSnapshotRaw=t,i.currentOutputSnapshotResolved=c,i.currentWriteId=na(e),a.splice(a.indexOf(s),1),o=o.concat(Zo(e.serverSyncTree_,i.path,c,i.currentWriteId,i.applyLocally)),o=o.concat(ei(e.serverSyncTree_,s,!0))}else h=!0,d="nodata",o=o.concat(ei(e.serverSyncTree_,i.currentWriteId,!0))}Hi(e.eventQueue_,n,o),o=[],h&&(t[l].status=2,s=t[l].unwatcher,setTimeout(s,Math.floor(0)),t[l].onComplete&&("nodata"===d?r.push((()=>t[l].onComplete(null,!1,t[l].currentInputSnapshot))):r.push((()=>t[l].onComplete(new Error(d),!1,null)))))}var s;ha(e,e.transactionQueueTree_);for(let l=0;le.order-t.order)),n}function da(e,t,n){const r=Ei(t);if(r)for(let o=0;o{da(e,t,n)}))}function ha(e,t){const n=Ei(t);if(n){let e=0;for(let t=0;t0?n:void 0)}Ii(t,(t=>{ha(e,t)}))}function fa(e,t){const n=Ai(ca(e,t)),r=Ci(e.transactionQueueTree_,t);return function(e,t,n){let r=n?e:e.parent;for(;null!==r;){if(t(r))return!0;r=r.parent}}(r,(t=>{pa(e,t)})),pa(e,r),Ni(r,(t=>{pa(e,t)})),n}function pa(e,t){const n=Ei(t);if(n){const r=[];let o=[],i=-1;for(let t=0;t.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||Mt("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&Lt("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");const o="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new on(n.host,n.secure,r,o,t,"",r!==n.subdomain),path:new Sn(n.pathString)}},ga=function(e){let t="",n="",r="",o="",i="",a=!0,s="https",l=443;if("string"===typeof e){let c=e.indexOf("//");c>=0&&(s=e.substring(0,c-1),e=e.substring(c+2));let u=e.indexOf("/");-1===u&&(u=e.length);let d=e.indexOf("?");-1===d&&(d=e.length),t=e.substring(0,Math.min(u,d)),u0){let e=n[o];try{e=decodeURIComponent(e.replace(/\+/g," "))}catch(r){}t+="/"+e}return t}(e.substring(u,d)));const h=function(e){const t={};"?"===e.charAt(0)&&(e=e.substring(1));for(const n of e.split("&")){if(0===n.length)continue;const r=n.split("=");2===r.length?t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):Lt(`Invalid query segment '${n}' in query '${e}'`)}return t}(e.substring(Math.min(e.length,d)));c=t.indexOf(":"),c>=0?(a="https"===s||"wss"===s,l=parseInt(t.substring(c+1),10)):c=t.length;const f=t.slice(0,c);if("localhost"===f.toLowerCase())n="localhost";else if(f.split(".").length<=2)n=f;else{const e=t.indexOf(".");r=t.substring(0,e).toLowerCase(),n=t.substring(e+1),i=r}"ns"in h&&(i=h.ns)}return{host:t,port:l,domain:n,subdomain:r,secure:a,scheme:s,pathString:o,namespace:i}},ya="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";!function(){let e=0;const t=[]}();class va{constructor(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}getPath(){const e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+N(this.snapshot.exportVal())}}class ba{constructor(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class wa{constructor(e,t){this.snapshotCallback=e,this.cancelCallback=t}onValue(e,t){this.snapshotCallback.call(null,e,t)}onCancel(e){return c(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}class _a{constructor(e,t,n,r){this._repo=e,this._path=t,this._queryParams=n,this._orderByCalled=r}get key(){return Nn(this._path)?null:Tn(this._path)}get ref(){return new Sa(this._repo,this._path)}get _queryIdentifier(){const e=Er(this._queryParams),t=Wt(e);return"{}"===t?"default":t}get _queryObject(){return Er(this._queryParams)}isEqual(e){if(!((e=W(e))instanceof _a))return!1;const t=this._repo===e._repo,n=On(this._path,e._path),r=this._queryIdentifier===e._queryIdentifier;return t&&n&&r}toJSON(){return this.toString()}toString(){return this._repo.toString()+function(e){let t="";for(let n=e.pieceNum_;ne(new ka(n,Ca(this.ref,t),or))))}hasChild(e){const t=new Sn(e);return!this._node.getChild(t).isEmpty()}hasChildren(){return!this._node.isLeafNode()&&!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function xa(e,t){return(e=W(e))._checkNotDeleted("ref"),void 0!==t?Ca(e._root,t):e._root}function Ca(e,t){var n,r,o,i;return null===xn((e=W(e))._path)?(n="child",r="path",i=!1,(o=t)&&(o=o.replace(/^\/*\.info(\/|$)/,"/")),$i(n,r,o,i)):$i("child","path",t,!1),new Sa(e._repo,In(e._path,t))}class Ea{constructor(e){this.callbackContext=e}respondsTo(e){return"value"===e}createEvent(e,t){const n=t._queryParams.getIndex();return new va("value",this,new ka(e.snapshotNode,new Sa(t._repo,t._path),n))}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new ba(this,e,t):null}matches(e){return e instanceof Ea&&(!e.callbackContext||!this.callbackContext||e.callbackContext.matches(this.callbackContext))}hasAnyCallback(){return null!==this.callbackContext}}class Ta{constructor(e,t){this.eventType=e,this.callbackContext=t}respondsTo(e){let t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new ba(this,e,t):null}createEvent(e,t){c(null!=e.childName,"Child events should have a childName.");const n=Ca(new Sa(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new va(e.type,this,new ka(e.snapshotNode,n,r),e.prevName)}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof Ta&&(this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)))}hasAnyCallback(){return!!this.callbackContext}}function Pa(e,t,n,r,o){let i;if("object"===typeof r&&(i=void 0,o=r),"function"===typeof r&&(i=r),o&&o.onlyOnce){const t=n,r=(n,r)=>{ra(e._repo,e,s),t(n,r)};r.userCallback=n.userCallback,r.context=n.context,n=r}const a=new wa(n,i||void 0),s="value"===t?new Ea(a):new Ta(t,a);return function(e,t,n){let r;r=".info"===xn(t._path)?oi(e.infoSyncTree_,t,n):oi(e.serverSyncTree_,t,n),qi(e.eventQueue_,t._path,r)}(e._repo,e,s),()=>ra(e._repo,e,s)}function Ra(e,t,n,r){return Pa(e,"value",t,n,r)}!function(e){c(!zo,"__referenceConstructor has already been defined"),zo=e}(Sa),function(e){c(!jo,"__referenceConstructor has already been defined"),jo=e}(Sa);const Ia={};let Na=!1;function Aa(e,t,n,r,o){let i=r||e.options.databaseURL;void 0===i&&(e.options.projectId||Mt("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),Nt("Using default host for project ",e.options.projectId),i=`${e.options.projectId}-default-rtdb.firebaseio.com`);let a,s,l=ma(i,o),c=l.repoInfo;"undefined"!==typeof process&&(s={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://k76xrsk2m5hnvuk26o5brdvara0kmkkf.lambda-url.us-east-1.on.aws"}.FIREBASE_DATABASE_EMULATOR_HOST),s?(a=!0,i=`http://${s}?ns=${c.namespace}`,l=ma(i,o),c=l.repoInfo):a=!l.repoInfo.secure;const u=o&&a?new Jt(Jt.OWNER):new Xt(e.name,e.options,t);Bi("Invalid Firebase Database URL",l),Nn(l.path)||Mt("Database URL must point to the root of a Firebase Database (not including a child path).");const d=function(e,t,n,r){let o=Ia[t.name];o||(o={},Ia[t.name]=o);let i=o[e.toURLString()];i&&Mt("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.");return i=new Gi(e,Na,n,r),o[e.toURLString()]=i,i}(c,e,u,new Qt(e,n));return new Oa(d,e)}class Oa{constructor(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(Qi(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new Sa(this._repo,kn())),this._rootInternal}_delete(){return null!==this._rootInternal&&(!function(e,t){const n=Ia[t];n&&n[e.key]===e||Mt(`Database ${t}(${e.repoInfo_}) has already been deleted.`),oa(e),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){null===this._rootInternal&&Mt("Cannot call "+e+" on a deleted database.")}}$n.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},$n.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};!function(e){vt("11.4.0"),Ze(new U("database",((e,t)=>{let{instanceIdentifier:n}=t;return Aa(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),n)}),"PUBLIC").setMultipleInstances(!0)),ot(mt,gt,e),ot(mt,gt,"esm2017")}();var Ma=n(643),La=n.t(Ma,2),Da=function(){return Da=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&void 0!==arguments[0]?arguments[0]:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ke;const t=Ge.get(e);if(!t&&e===Ke&&S())return rt();if(!t)throw tt.create("no-app",{appName:e});return t}(),t=arguments.length>1?arguments[1]:void 0;const n=et(e,"database").getImmediate({identifier:t});if(!n._instanceStarted){const e=_("database");e&&function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e=W(e),e._checkNotDeleted("useEmulator");const o=`${t}:${n}`,i=e._repoInternal;if(e._instanceStarted){if(o===e._repoInternal.repoInfo_.host&&F(r,i.repoInfo_.emulatorOptions))return;Mt("connectDatabaseEmulator() cannot initialize or alter the emulator configuration after the database instance has started.")}let a;if(i.repoInfo_.nodeAdmin)r.mockUserToken&&Mt('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),a=new Jt(Jt.OWNER);else if(r.mockUserToken){const t="string"===typeof r.mockUserToken?r.mockUserToken:function(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,o=e.sub||e.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const i=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},e);return[m(JSON.stringify({alg:"none",type:"JWT"})),m(JSON.stringify(i)),""].join(".")}(r.mockUserToken,e.app.options.projectId);a=new Jt(t)}!function(e,t,n,r){e.repoInfo_=new on(t,!1,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams,!0,n),r&&(e.authTokenProvider_=r)}(i,o,r,a)}(n,...e)}return n}(rt({apiKey:"AIzaSyDflhS2gnAcCU-EtzvZrBH5gvlH69d6siw",authDomain:"pi-half-pot.firebaseapp.com",databaseURL:"https://pi-half-pot-default-rtdb.firebaseio.com",projectId:"pi-half-pot",storageBucket:"pi-half-pot.firebasestorage.app",messagingSenderId:"887285646941",appId:"1:887285646941:web:2362c58ab12261b80c2fb4"})),Qa=e=>xa(Ga,`${Va}:${e}`),Xa=e=>function(e,t){var n=null!==t&&void 0!==t?t:{},r=n.keyField,o=n.refField,i=n.transform,a=Ua(e),s=a[0],l=a[1],c=a[2];return[(0,Ma.useMemo)((function(){return s?Wa(s,r,o,i):void 0}),[s,r,o,i]),l,c]}(Qa(e));function Ja(e,t){return function(){return e.apply(t,arguments)}}const{toString:Za}=Object.prototype,{getPrototypeOf:es}=Object,ts=(e=>t=>{const n=Za.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ns=e=>(e=e.toLowerCase(),t=>ts(t)===e),rs=e=>t=>typeof t===e,{isArray:os}=Array,is=rs("undefined");const as=ns("ArrayBuffer");const ss=rs("string"),ls=rs("function"),cs=rs("number"),us=e=>null!==e&&"object"===typeof e,ds=e=>{if("object"!==ts(e))return!1;const t=es(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},hs=ns("Date"),fs=ns("File"),ps=ns("Blob"),ms=ns("FileList"),gs=ns("URLSearchParams"),[ys,vs,bs,ws]=["ReadableStream","Request","Response","Headers"].map(ns);function _s(e,t){let n,r,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),os(e))for(n=0,r=e.length;n0;)if(r=n[o],t===r.toLowerCase())return r;return null}const ks="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,xs=e=>!is(e)&&e!==ks;const Cs=(Es="undefined"!==typeof Uint8Array&&es(Uint8Array),e=>Es&&e instanceof Es);var Es;const Ts=ns("HTMLFormElement"),Ps=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),Rs=ns("RegExp"),Is=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_s(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)};const Ns=ns("AsyncFunction"),As=(Os="function"===typeof setImmediate,Ms=ls(ks.postMessage),Os?setImmediate:Ms?((e,t)=>(ks.addEventListener("message",(n=>{let{source:r,data:o}=n;r===ks&&o===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),ks.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Os,Ms;const Ls="undefined"!==typeof queueMicrotask?queueMicrotask.bind(ks):"undefined"!==typeof process&&process.nextTick||As,Ds={isArray:os,isArrayBuffer:as,isBuffer:function(e){return null!==e&&!is(e)&&null!==e.constructor&&!is(e.constructor)&&ls(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||ls(e.append)&&("formdata"===(t=ts(e))||"object"===t&&ls(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&as(e.buffer),t},isString:ss,isNumber:cs,isBoolean:e=>!0===e||!1===e,isObject:us,isPlainObject:ds,isReadableStream:ys,isRequest:vs,isResponse:bs,isHeaders:ws,isUndefined:is,isDate:hs,isFile:fs,isBlob:ps,isRegExp:Rs,isFunction:ls,isStream:e=>us(e)&&ls(e.pipe),isURLSearchParams:gs,isTypedArray:Cs,isFileList:ms,forEach:_s,merge:function e(){const{caseless:t}=xs(this)&&this||{},n={},r=(r,o)=>{const i=t&&Ss(n,o)||o;ds(n[i])&&ds(r)?n[i]=e(n[i],r):ds(r)?n[i]=e({},r):os(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o3&&void 0!==arguments[3]?arguments[3]:{};return _s(t,((t,r)=>{n&&ls(t)?e[r]=Ja(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&es(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ts,kindOfTest:ns,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(os(e))return e;let t=e.length;if(!cs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Ts,hasOwnProperty:Ps,hasOwnProp:Ps,reduceDescriptors:Is,freezeMethods:e=>{Is(e,((t,n)=>{if(ls(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];ls(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return os(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ss,global:ks,isContextDefined:xs,isSpecCompliantForm:function(e){return!!(e&&ls(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(us(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=os(e)?[]:{};return _s(e,((e,t)=>{const i=n(e,r+1);!is(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Ns,isThenable:e=>e&&(us(e)||ls(e))&&ls(e.then)&&ls(e.catch),setImmediate:As,asap:Ls};function Fs(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Ds.inherits(Fs,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ds.toJSONObject(this.config),code:this.code,status:this.status}}});const zs=Fs.prototype,js={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{js[e]={value:e}})),Object.defineProperties(Fs,js),Object.defineProperty(zs,"isAxiosError",{value:!0}),Fs.from=(e,t,n,r,o,i)=>{const a=Object.create(zs);return Ds.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Fs.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const $s=Fs;function Bs(e){return Ds.isPlainObject(e)||Ds.isArray(e)}function Ws(e){return Ds.endsWith(e,"[]")?e.slice(0,-2):e}function Us(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ws(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const qs=Ds.toFlatObject(Ds,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Hs=function(e,t,n){if(!Ds.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ds.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ds.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&Ds.isSpecCompliantForm(t);if(!Ds.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ds.isDate(e))return e.toISOString();if(!s&&Ds.isBlob(e))throw new $s("Blob is not supported. Use a Buffer instead.");return Ds.isArrayBuffer(e)||Ds.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"===typeof e)if(Ds.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ds.isArray(e)&&function(e){return Ds.isArray(e)&&!e.some(Bs)}(e)||(Ds.isFileList(e)||Ds.endsWith(n,"[]"))&&(s=Ds.toArray(e)))return n=Ws(n),s.forEach((function(e,r){!Ds.isUndefined(e)&&null!==e&&t.append(!0===a?Us([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!Bs(e)||(t.append(Us(o,n,i),l(e)),!1)}const u=[],d=Object.assign(qs,{defaultVisitor:c,convertValue:l,isVisitable:Bs});if(!Ds.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ds.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ds.forEach(n,(function(n,i){!0===(!(Ds.isUndefined(n)||null===n)&&o.call(t,n,Ds.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function Vs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ks(e,t){this._pairs=[],e&&Hs(e,this,t)}const Ys=Ks.prototype;Ys.append=function(e,t){this._pairs.push([e,t])},Ys.toString=function(e){const t=e?function(t){return e.call(this,t,Vs)}:Vs;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Gs=Ks;function Qs(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xs(e,t,n){if(!t)return e;const r=n&&n.encode||Qs;Ds.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Ds.isURLSearchParams(t)?t.toString():new Gs(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Js=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ds.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Zs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},el={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Gs,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},tl="undefined"!==typeof window&&"undefined"!==typeof document,nl="object"===typeof navigator&&navigator||void 0,rl=tl&&(!nl||["ReactNative","NativeScript","NS"].indexOf(nl.product)<0),ol="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,il=tl&&window.location.href||"http://localhost",al={...r,...el};const sl=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Ds.isArray(r)?r.length:i,s)return Ds.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&Ds.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Ds.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return Ds.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const ll={transitional:Zs,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ds.isObject(e);o&&Ds.isHTMLForm(e)&&(e=new FormData(e));if(Ds.isFormData(e))return r?JSON.stringify(sl(e)):e;if(Ds.isArrayBuffer(e)||Ds.isBuffer(e)||Ds.isStream(e)||Ds.isFile(e)||Ds.isBlob(e)||Ds.isReadableStream(e))return e;if(Ds.isArrayBufferView(e))return e.buffer;if(Ds.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Hs(e,new al.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return al.isNode&&Ds.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Ds.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Hs(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ds.isString(e))try{return(t||JSON.parse)(e),Ds.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ll.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ds.isResponse(e)||Ds.isReadableStream(e))return e;if(e&&Ds.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw $s.from(o,$s.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:al.classes.FormData,Blob:al.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ds.forEach(["delete","get","head","post","put","patch"],(e=>{ll.headers[e]={}}));const cl=ll,ul=Ds.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dl=Symbol("internals");function hl(e){return e&&String(e).trim().toLowerCase()}function fl(e){return!1===e||null==e?e:Ds.isArray(e)?e.map(fl):String(e)}function pl(e,t,n,r,o){return Ds.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ds.isString(t)?Ds.isString(r)?-1!==t.indexOf(r):Ds.isRegExp(r)?r.test(t):void 0:void 0)}class ml{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=hl(t);if(!o)throw new Error("header name must be a non-empty string");const i=Ds.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fl(e))}const i=(e,t)=>Ds.forEach(e,((e,n)=>o(e,n,t)));if(Ds.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Ds.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ul[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Ds.isHeaders(e))for(const[a,s]of e.entries())o(s,a,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=hl(e)){const n=Ds.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ds.isFunction(t))return t.call(this,e,n);if(Ds.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=hl(e)){const n=Ds.findKey(this,e);return!(!n||void 0===this[n]||t&&!pl(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=hl(e)){const o=Ds.findKey(n,e);!o||t&&!pl(0,n[o],o,t)||(delete n[o],r=!0)}}return Ds.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!pl(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ds.forEach(this,((r,o)=>{const i=Ds.findKey(n,o);if(i)return t[i]=fl(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=fl(r),n[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n{null!=n&&!1!==n&&(t[r]=e&&Ds.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;ot.set(e))),t}static accessor(e){const t=(this[dl]=this[dl]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=hl(e);t[r]||(!function(e,t){const n=Ds.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Ds.isArray(e)?e.forEach(r):r(e),this}}ml.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ds.reduceDescriptors(ml.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),Ds.freezeMethods(ml);const gl=ml;function yl(e,t){const n=this||cl,r=t||n,o=gl.from(r.headers);let i=r.data;return Ds.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function vl(e){return!(!e||!e.__CANCEL__)}function bl(e,t,n){$s.call(this,null==e?"canceled":e,$s.ERR_CANCELED,t,n),this.name="CanceledError"}Ds.inherits(bl,$s,{__CANCEL__:!0});const wl=bl;function _l(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new $s("Request failed with status code "+n.status,[$s.ERR_BAD_REQUEST,$s.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Sl=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-o;for(var s=arguments.length,l=new Array(s),c=0;c=i?a(l,e):(n=l,r||(r=setTimeout((()=>{r=null,a(n)}),i-t)))},()=>n&&a(n)]},xl=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const o=Sl(50,250);return kl((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Cl=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},El=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;re(...n)))},Tl=al.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,al.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(al.origin),al.navigator&&/(msie|trident)/i.test(al.navigator.userAgent)):()=>!0,Pl=al.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Ds.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ds.isString(r)&&a.push("path="+r),Ds.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Rl(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&r||0==n?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Il=e=>e instanceof gl?{...e}:e;function Nl(e,t){t=t||{};const n={};function r(e,t,n,r){return Ds.isPlainObject(e)&&Ds.isPlainObject(t)?Ds.merge.call({caseless:r},e,t):Ds.isPlainObject(t)?Ds.merge({},t):Ds.isArray(t)?t.slice():t}function o(e,t,n,o){return Ds.isUndefined(t)?Ds.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Ds.isUndefined(t))return r(void 0,t)}function a(e,t){return Ds.isUndefined(t)?Ds.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Il(e),Il(t),0,!0)};return Ds.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);Ds.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Al=e=>{const t=Nl({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=gl.from(s),t.url=Xs(Rl(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Ds.isFormData(r))if(al.hasStandardBrowserEnv||al.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(al.hasStandardBrowserEnv&&(o&&Ds.isFunction(o)&&(o=o(t)),o||!1!==o&&Tl(t.url))){const e=i&&a&&Pl.read(a);e&&s.set(i,e)}return t},Ol="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Al(e);let o=r.data;const i=gl.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=gl.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());_l((function(e){t(e),p()}),(function(e){n(e),p()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new $s("Request aborted",$s.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new $s("Network Error",$s.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Zs;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new $s(t,o.clarifyTimeoutError?$s.ETIMEDOUT:$s.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Ds.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Ds.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,u]=xl(f,!0),m.addEventListener("progress",l)),h&&m.upload&&([s,c]=xl(h),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new wl(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===al.protocols.indexOf(y)?n(new $s("Unsupported protocol "+y+":",$s.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Ml=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof $s?t:new wl(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new $s(`timeout ${t} of ms exceeded`,$s.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>Ds.asap(a),s}},Ll=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of Dl(e))yield*Ll(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},zl="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,jl=zl&&"function"===typeof ReadableStream,$l=zl&&("function"===typeof TextEncoder?(Bl=new TextEncoder,e=>Bl.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Bl;const Wl=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let e=!1;const t=new Request(al.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ql=jl&&Wl((()=>Ds.isReadableStream(new Response("").body))),Hl={stream:ql&&(e=>e.body)};var Vl;zl&&(Vl=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Hl[e]&&(Hl[e]=Ds.isFunction(Vl[e])?t=>t[e]():(t,n)=>{throw new $s(`Response type '${e}' is not supported`,$s.ERR_NOT_SUPPORT,n)})})));const Kl=async(e,t)=>{const n=Ds.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Ds.isBlob(e))return e.size;if(Ds.isSpecCompliantForm(e)){const t=new Request(al.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ds.isArrayBufferView(e)||Ds.isArrayBuffer(e)?e.byteLength:(Ds.isURLSearchParams(e)&&(e+=""),Ds.isString(e)?(await $l(e)).byteLength:void 0)})(t):n},Yl=zl&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=Al(e);c=c?(c+"").toLowerCase():"text";let f,p=Ml([o,i&&i.toAbortSignal()],a);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&Ul&&"get"!==n&&"head"!==n&&0!==(g=await Kl(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Ds.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Cl(g,xl(El(l)));r=Fl(n.body,65536,e,t)}}Ds.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(f);const a=ql&&("stream"===c||"response"===c);if(ql&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Ds.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&Cl(t,xl(El(s),!0))||[];i=new Response(Fl(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let y=await Hl[Ds.findKey(Hl,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{_l(t,n,{data:y,headers:gl.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(y){if(m&&m(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new $s("Network Error",$s.ERR_NETWORK,e,f),{cause:y.cause||y});throw $s.from(y,y&&y.code,e,f)}}),Gl={http:null,xhr:Ol,fetch:Yl};Ds.forEach(Gl,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ql=e=>`- ${e}`,Xl=e=>Ds.isFunction(e)||null===e||!1===e,Jl=e=>{e=Ds.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i{let[t,n]=e;return`adapter ${t} `+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(Ql).join("\n"):" "+Ql(e[0]):"as no adapter specified";throw new $s("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Zl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wl(null,e)}function ec(e){Zl(e),e.headers=gl.from(e.headers),e.data=yl.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Jl(e.adapter||cl.adapter)(e).then((function(t){return Zl(e),t.data=yl.call(e,e.transformResponse,t),t.headers=gl.from(t.headers),t}),(function(t){return vl(t)||(Zl(e),t&&t.response&&(t.response.data=yl.call(e,e.transformResponse,t.response),t.response.headers=gl.from(t.response.headers))),Promise.reject(t)}))}const tc="1.8.2",nc={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{nc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const rc={};nc.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new $s(r(o," has been removed"+(t?" in "+t:"")),$s.ERR_DEPRECATED);return t&&!rc[o]&&(rc[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},nc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const oc={assertOptions:function(e,t,n){if("object"!==typeof e)throw new $s("options must be an object",$s.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new $s("option "+i+" must be "+n,$s.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $s("Unknown option "+i,$s.ERR_BAD_OPTION)}},validators:nc},ic=oc.validators;class ac{constructor(e){this.defaults=e,this.interceptors={request:new Js,response:new Js}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Nl(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&oc.assertOptions(n,{silentJSONParsing:ic.transitional(ic.boolean),forcedJSONParsing:ic.transitional(ic.boolean),clarifyTimeoutError:ic.transitional(ic.boolean)},!1),null!=r&&(Ds.isFunction(r)?t.paramsSerializer={serialize:r}:oc.assertOptions(r,{encode:ic.function,serialize:ic.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),oc.assertOptions(t,{baseUrl:ic.spelling("baseURL"),withXsrfToken:ic.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Ds.merge(o.common,o[t.method]);o&&Ds.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=gl.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[ec.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new wl(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lc((function(t){e=t})),cancel:e}}}const cc=lc;const uc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uc).forEach((e=>{let[t,n]=e;uc[n]=t}));const dc=uc;const hc=function e(t){const n=new sc(t),r=Ja(sc.prototype.request,n);return Ds.extend(r,sc.prototype,n,{allOwnKeys:!0}),Ds.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Nl(t,n))},r}(cl);hc.Axios=sc,hc.CanceledError=wl,hc.CancelToken=cc,hc.isCancel=vl,hc.VERSION=tc,hc.toFormData=Hs,hc.AxiosError=$s,hc.Cancel=hc.CanceledError,hc.all=function(e){return Promise.all(e)},hc.spread=function(e){return function(t){return e.apply(null,t)}},hc.isAxiosError=function(e){return Ds.isObject(e)&&!0===e.isAxiosError},hc.mergeConfig=Nl,hc.AxiosHeaders=gl,hc.formToJSON=e=>sl(Ds.isHTMLForm(e)?new FormData(e):e),hc.getAdapter=Jl,hc.HttpStatusCode=dc,hc.default=hc;const fc=hc.create({baseURL:Ya}),pc=async(e,t)=>(await fc.post(`/payments/${e}/commit`,{txid:t})).data,mc=["payments","username","wallet_address"],gc=()=>{const[e,t]=(0,Ma.useState)(null);return(0,Ma.useEffect)((()=>{const e=async()=>{await Pi.init({version:"2.0",sandbox:window.location.host.includes("localhost")});const n=await Pi.authenticate(mc,(e=>{pc(e.identifier,e.transaction.txid)}));t(n);const r=1e3*n.user.credentials.valid_until.timestamp-Date.now();setTimeout(e,r)};e()}),[]),e},yc=(e,t)=>{var n;const r=gc(),[o,i]=(0,Ma.useState)(0),[a,s]=(0,Ma.useState)(!0),l=null===r||void 0===r||null===(n=r.user)||void 0===n?void 0:n.uid;return(0,Ma.useEffect)((()=>{l&&(s(!0),(async e=>(await fc.get(`/half-pots/${e.halfPotId}/users/${e.userId}/entries`)).data)({halfPotId:e,userId:l}).then((e=>{i(e.entries),s(!1)})))}),[e,l,t]),{entries:o,loading:a,setEntries:i}};function vc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;e{null==t&&(_c+=1,n(`mui-${_c}`))}),[t]),r}(e)}function xc(e){const t=new URL(`https://mui.com/production-error/?code=${e}`);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;ot.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${t} for the full message.`}function Cc(e){if("string"!==typeof e)throw new Error(xc(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Ec=Cc;function Tc(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function Pc(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{Tc(t,e)}))}),t)}function Rc(e){return parseInt(Ma.version,10)>=19?e?.props?.ref||null:e?.ref||null}function Ic(e){return e&&e.ownerDocument||document}var Nc=n(507);const Ac=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Oc(e){const t=[],n=[];return Array.from(e.querySelectorAll(Ac)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function Mc(){return!0}const Lc=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Oc,isEnabled:a=Mc,open:s}=e,l=Ma.useRef(!1),c=Ma.useRef(null),u=Ma.useRef(null),d=Ma.useRef(null),h=Ma.useRef(null),f=Ma.useRef(!1),p=Ma.useRef(null),m=Pc(Rc(t),p),g=Ma.useRef(null);Ma.useEffect((()=>{s&&p.current&&(f.current=!n)}),[n,s]),Ma.useEffect((()=>{if(!s||!p.current)return;const e=Ic(p.current);return p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),f.current&&p.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),Ma.useEffect((()=>{if(!s||!p.current)return;const e=Ic(p.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===p.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=p.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!f.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=i(p.current)),n.length>0){const e=Boolean(g.current?.shiftKey&&"Tab"===g.current?.key),t=n[0],r=n[n.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,s,i]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return(0,Nc.jsxs)(Ma.Fragment,{children:[(0,Nc.jsx)("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),Ma.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,h.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,Nc.jsx)("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})};var Dc=n(766);const Fc="undefined"!==typeof window?Ma.useLayoutEffect:Ma.useEffect;const zc=Ma.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=Ma.useState(null),s=Pc(Ma.isValidElement(n)?Rc(n):null,t);if(Fc((()=>{o||a(function(e){return"function"===typeof e?e():e}(r)||document.body)}),[r,o]),Fc((()=>{if(i&&!o)return Tc(t,i),()=>{Tc(t,null)}}),[t,i,o]),o){if(Ma.isValidElement(n)){const e={ref:s};return Ma.cloneElement(n,e)}return n}return i?Dc.createPortal(n,i):i}));function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Kc(ru,--tu):0,Zc--,10===nu&&(Zc=1,Jc--),nu}function su(){return nu=tu2||du(nu)>3?"":" "}function gu(e,t){for(;--t&&su()&&!(nu<48||nu>102||nu>57&&nu<65||nu>70&&nu<97););return uu(e,cu()+(t<6&&32==lu()&&32==su()))}function yu(e){for(;su();)switch(nu){case e:return tu;case 34:case 39:34!==e&&39!==e&&yu(nu);break;case 40:41===e&&yu(e);break;case 92:su()}return tu}function vu(e,t){for(;su()&&e+nu!==57&&(e+nu!==84||47!==lu()););return"/*"+uu(t,tu-1)+"*"+Wc(47===e?e:su())}function bu(e){for(;!du(lu());)su();return uu(e,tu)}var wu="-ms-",_u="-moz-",Su="-webkit-",ku="comm",xu="rule",Cu="decl",Eu="@keyframes";function Tu(e,t){for(var n="",r=Qc(e),o=0;o0&&Gc(k)-d&&Xc(f>32?Mu(k+";",r,n,d-1):Mu(Hc(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(Xc(S=Au(k,t,n,c,u,o,s,b,w=[],_=[],d),i),123===v)if(0===u)Nu(k,t,S,S,w,i,d,s,_);else switch(99===h&&110===Kc(k,3)?100:h){case 100:case 108:case 109:case 115:Nu(e,S,S,r&&Xc(Au(e,S,S,0,0,o,s,b,o,w=[],d),_),o,_,d,s,r?w:_);break;default:Nu(k,S,S,S,[""],_,0,s,_)}}c=u=f=0,m=y=1,b=k="",d=a;break;case 58:d=1+Gc(k),f=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==au())continue;switch(k+=Wc(v),v*m){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(Gc(k)-1)*y,y=1;break;case 64:45===lu()&&(k+=pu(su())),h=lu(),u=d=Gc(b=k+=bu(cu())),v++;break;case 45:45===p&&2==Gc(k)&&(m=0)}}return i}function Au(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,h=0===o?i:[""],f=Qc(h),p=0,m=0,g=0;p0?h[y]+" "+v:Hc(v,/&\f/g,h[y])))&&(l[g++]=b);return ou(e,t,n,0===o?xu:s,l,c,u)}function Ou(e,t,n){return ou(e,t,n,ku,Wc(nu),Yc(e,2,-2),0)}function Mu(e,t,n,r){return ou(e,t,n,Cu,Yc(e,0,r),Yc(e,r+1,-1),r)}var Lu=function(e,t,n){for(var r=0,o=0;r=o,o=lu(),38===r&&12===o&&(t[n]=1),!du(o);)su();return uu(e,tu)},Du=function(e,t){return fu(function(e,t){var n=-1,r=44;do{switch(du(r)){case 0:38===r&&12===lu()&&(t[n]=1),e[n]+=Lu(tu-1,t,n);break;case 2:e[n]+=pu(r);break;case 4:if(44===r){e[++n]=58===lu()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Wc(r)}}while(r=su());return e}(hu(e),t))},Fu=new WeakMap,zu=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Fu.get(n))&&!r){Fu.set(e,!0);for(var o=[],i=Du(t,o),a=n.props,s=0,l=0;s6)switch(Kc(e,t+1)){case 109:if(45!==Kc(e,t+4))break;case 102:return Hc(e,/(.+:)(.+)-([^]+)/,"$1"+Su+"$2-$3$1"+_u+(108==Kc(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Vc(e,"stretch")?$u(Hc(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Kc(e,t+1))break;case 6444:switch(Kc(e,Gc(e)-3-(~Vc(e,"!important")&&10))){case 107:return Hc(e,":",":"+Su)+e;case 101:return Hc(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Su+(45===Kc(e,14)?"inline-":"")+"box$3$1"+Su+"$2$3$1"+wu+"$2box$3")+e}break;case 5936:switch(Kc(e,t+11)){case 114:return Su+e+wu+Hc(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Su+e+wu+Hc(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Su+e+wu+Hc(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Su+e+wu+e+e}return e}var Bu=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Cu:e.return=$u(e.value,e.length);break;case Eu:return Tu([iu(e,{value:Hc(e.value,"@","@"+Su)})],r);case xu:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Tu([iu(e,{props:[Hc(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Tu([iu(e,{props:[Hc(t,/:(plac\w+)/,":"+Su+"input-$1")]}),iu(e,{props:[Hc(t,/:(plac\w+)/,":-moz-$1")]}),iu(e,{props:[Hc(t,/:(plac\w+)/,wu+"input-$1")]})],r)}return""}))}}],Wu=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||Bu,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:td}}var od=!!La.useInsertionEffect&&La.useInsertionEffect,id=od||function(e){return e()},ad=od||Ma.useLayoutEffect,sd=Ma.createContext("undefined"!==typeof HTMLElement?Wu({key:"css"}):null),ld=sd.Provider,cd=function(e){return(0,Ma.forwardRef)((function(t,n){var r=(0,Ma.useContext)(sd);return e(t,r,n)}))},ud=Ma.createContext({});var dd={}.hasOwnProperty,hd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fd=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return qu(t,n,r),id((function(){return Hu(t,n,r)})),null},pd=cd((function(e,t,n){var r=e.css;"string"===typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[hd],i=[r],a="";"string"===typeof e.className?a=Uu(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=rd(i,void 0,Ma.useContext(ud));a+=t.key+"-"+s.name;var l={};for(var c in e)dd.call(e,c)&&"css"!==c&&c!==hd&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),Ma.createElement(Ma.Fragment,null,Ma.createElement(fd,{cache:t,serialized:s,isStringTag:"string"===typeof o}),Ma.createElement(o,l))})),md=pd,gd=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,yd=Ku((function(e){return gd.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),vd=function(e){return"theme"!==e},bd=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?yd:vd},wd=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},_d=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return qu(t,n,r),id((function(){return Hu(t,n,r)})),null},Sd=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=wd(t,n,i),l=s||bd(a),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var h=u[0];d.push(h[0]);for(var f=u.length,p=1;p{t[n]=Pd(e[n])})),t}function Rd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const r=n.clone?{...e}:e;return Td(e)&&Td(t)&&Object.keys(t).forEach((o=>{Ma.isValidElement(t[o])||(0,Ed.Hy)(t[o])?r[o]=t[o]:Td(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Td(e[o])?r[o]=Rd(e[o],t[o],n):n.clone?r[o]=Td(t[o])?Pd(t[o]):t[o]:r[o]=t[o]})),r}function Id(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1`@media (min-width:${Ad[e]}px)`},Md={containerQueries:e=>({up:t=>{let n="number"===typeof t?t:Ad[t]||t;return"number"===typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ld(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Od;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||Od;return Object.keys(t).reduce(((o,i)=>{if(function(e,t){return"@"===t||t.startsWith("@")&&(e.some((e=>t.startsWith(`@${e}`)))||!!t.match(/^@\d/))}(e.keys,i)){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:Md,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||Ad).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}return o}),{})}return n(t)}function Dd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function Fd(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function zd(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function jd(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:zd(e,n)||o,t&&(r=t(r,o,e)),r}const $d=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=zd(e.theme,r)||{};return Ld(e,i,(e=>{let r=jd(a,o,e);return e===r&&"string"===typeof e&&(r=jd(a,o,`${t}${"default"===e?"":Cc(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i};const Bd=function(e,t){return t?Rd(e,t,{clone:!1}):e};const Wd={m:"margin",p:"padding"},Ud={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qd={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Hd=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!qd[e])return[e];e=qd[e]}const[t,n]=e.split(""),r=Wd[t],o=Ud[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Vd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Kd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Yd=[...Vd,...Kd];function Gd(e,t,n,r){const o=zd(e,t,!0)??n;return"number"===typeof o||"string"===typeof o?e=>"string"===typeof e?e:"string"===typeof o?`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"===typeof e)return e;const t=Math.abs(e);const n=o[t];return e>=0?n:"number"===typeof n?-n:`-${n}`}:"function"===typeof o?o:()=>{}}function Qd(e){return Gd(e,"spacing",8)}function Xd(e,t){return"string"===typeof t||null==t?t:e(t)}function Jd(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=Xd(t,n),e)),{})}(Hd(n),r);return Ld(e,e[n],o)}function Zd(e,t){const n=Qd(e.theme);return Object.keys(e).map((r=>Jd(e,t,r,n))).reduce(Bd,{})}function eh(e){return Zd(e,Vd)}function th(e){return Zd(e,Kd)}function nh(e){return Zd(e,Yd)}eh.propTypes={},eh.filterProps=Vd,th.propTypes={},th.filterProps=Kd,nh.propTypes={},nh.filterProps=Yd;function rh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qd({spacing:e});if(e.mui)return e;const n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}const oh=function(){for(var e=arguments.length,t=new Array(e),n=0;n(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?Bd(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};function ih(e){return"number"!==typeof e?e:`${e}px solid`}function ah(e,t){return $d({prop:e,themeKey:"borders",transform:t})}const sh=ah("border",ih),lh=ah("borderTop",ih),ch=ah("borderRight",ih),uh=ah("borderBottom",ih),dh=ah("borderLeft",ih),hh=ah("borderColor"),fh=ah("borderTopColor"),ph=ah("borderRightColor"),mh=ah("borderBottomColor"),gh=ah("borderLeftColor"),yh=ah("outline",ih),vh=ah("outlineColor"),bh=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Gd(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Xd(t,e)});return Ld(e,e.borderRadius,n)}return null};bh.propTypes={},bh.filterProps=["borderRadius"];oh(sh,lh,ch,uh,dh,hh,fh,ph,mh,gh,bh,yh,vh);const wh=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Gd(e.theme,"spacing",8),n=e=>({gap:Xd(t,e)});return Ld(e,e.gap,n)}return null};wh.propTypes={},wh.filterProps=["gap"];const _h=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Gd(e.theme,"spacing",8),n=e=>({columnGap:Xd(t,e)});return Ld(e,e.columnGap,n)}return null};_h.propTypes={},_h.filterProps=["columnGap"];const Sh=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Gd(e.theme,"spacing",8),n=e=>({rowGap:Xd(t,e)});return Ld(e,e.rowGap,n)}return null};Sh.propTypes={},Sh.filterProps=["rowGap"];oh(wh,_h,Sh,$d({prop:"gridColumn"}),$d({prop:"gridRow"}),$d({prop:"gridAutoFlow"}),$d({prop:"gridAutoColumns"}),$d({prop:"gridAutoRows"}),$d({prop:"gridTemplateColumns"}),$d({prop:"gridTemplateRows"}),$d({prop:"gridTemplateAreas"}),$d({prop:"gridArea"}));function kh(e,t){return"grey"===t?t:e}oh($d({prop:"color",themeKey:"palette",transform:kh}),$d({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:kh}),$d({prop:"backgroundColor",themeKey:"palette",transform:kh}));function xh(e){return e<=1&&0!==e?100*e+"%":e}const Ch=$d({prop:"width",transform:xh}),Eh=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||Ad[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:xh(t)}};return Ld(e,e.maxWidth,t)}return null};Eh.filterProps=["maxWidth"];const Th=$d({prop:"minWidth",transform:xh}),Ph=$d({prop:"height",transform:xh}),Rh=$d({prop:"maxHeight",transform:xh}),Ih=$d({prop:"minHeight",transform:xh}),Nh=($d({prop:"size",cssProperty:"width",transform:xh}),$d({prop:"size",cssProperty:"height",transform:xh}),oh(Ch,Eh,Th,Ph,Rh,Ih,$d({prop:"boxSizing"})),{border:{themeKey:"borders",transform:ih},borderTop:{themeKey:"borders",transform:ih},borderRight:{themeKey:"borders",transform:ih},borderBottom:{themeKey:"borders",transform:ih},borderLeft:{themeKey:"borders",transform:ih},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ih},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:bh},color:{themeKey:"palette",transform:kh},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:kh},backgroundColor:{themeKey:"palette",transform:kh},p:{style:th},pt:{style:th},pr:{style:th},pb:{style:th},pl:{style:th},px:{style:th},py:{style:th},padding:{style:th},paddingTop:{style:th},paddingRight:{style:th},paddingBottom:{style:th},paddingLeft:{style:th},paddingX:{style:th},paddingY:{style:th},paddingInline:{style:th},paddingInlineStart:{style:th},paddingInlineEnd:{style:th},paddingBlock:{style:th},paddingBlockStart:{style:th},paddingBlockEnd:{style:th},m:{style:eh},mt:{style:eh},mr:{style:eh},mb:{style:eh},ml:{style:eh},mx:{style:eh},my:{style:eh},margin:{style:eh},marginTop:{style:eh},marginRight:{style:eh},marginBottom:{style:eh},marginLeft:{style:eh},marginX:{style:eh},marginY:{style:eh},marginInline:{style:eh},marginInlineStart:{style:eh},marginInlineEnd:{style:eh},marginBlock:{style:eh},marginBlockStart:{style:eh},marginBlockEnd:{style:eh},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:wh},rowGap:{style:Sh},columnGap:{style:_h},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:xh},maxWidth:{style:Eh},minWidth:{transform:xh},height:{transform:xh},maxHeight:{transform:xh},minHeight:{transform:xh},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}});const Ah=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=zd(n,s)||{};if(c)return c(o);return Ld(o,t,(t=>{let n=jd(u,l,t);return t===n&&"string"===typeof t&&(n=jd(u,l,`${e}${"default"===t?"":Cc(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Nh;function a(n){let r=n;if("function"===typeof n)r=n(o);else if("object"!==typeof n)return n;if(!r)return null;const a=Dd(o.breakpoints),s=Object.keys(a);let l=a;return Object.keys(r).forEach((n=>{const a=function(e,t){return"function"===typeof e?e(t):e}(r[n],o);if(null!==a&&void 0!==a)if("object"===typeof a)if(i[n])l=Bd(l,e(n,a,o,i));else{const e=Ld({theme:o},a,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;ne.concat(Object.keys(t))),[]),o=new Set(r);return t.every((e=>o.size===Object.keys(e).length))}(e,a)?l=Bd(l,e):l[n]=t({sx:a,theme:o})}else l=Bd(l,e(n,a,o,i))})),function(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}(o,Fd(s,l))}return Array.isArray(r)?r.map(a):a(r)}}();Ah.filterProps=["sx"];const Oh=Ah;function Mh(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!==typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}const Lh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:r,shape:o={},...i}=e;let a=Rd({breakpoints:Id(t),direction:"ltr",components:{},palette:{mode:"light",...n},spacing:rh(r),shape:{...Nd,...o}},i);a=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=function(){return t(e.breakpoints.up(...arguments),r)},n.down=function(){return t(e.breakpoints.down(...arguments),r)},n.between=function(){return t(e.breakpoints.between(...arguments),r)},n.only=function(){return t(e.breakpoints.only(...arguments),r)},n.not=function(){const n=t(e.breakpoints.not(...arguments),r);return n.includes("not all and")?n.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):n}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(a),a.applyStyles=Mh;for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;cRd(e,t)),a),a.unstable_sxConfig={...Nh,...i?.unstable_sxConfig},a.unstable_sx=function(e){return Oh({sx:e,theme:this})},a};function Dh(e){const{variants:t,...n}=e,r={variants:t,style:Cd(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!==typeof e.style&&(e.style=Cd(e.style))})),r}const Fh=Lh();function zh(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function jh(e){return e?(t,n)=>n[e]:null}function $h(e,t){const n="function"===typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>$h(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return Bh(e,n.variants,[t])}return n?.isProcessed?n.style:n}function Bh(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e:for(let o=0;o0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=Fh,rootShouldForwardProp:r=zh,slotShouldForwardProp:o=zh}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,(e=>e.filter((e=>e!==Oh))));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=jh(qh(a)),...u}=t,d=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,h=l||!1;let f=zh;"Root"===a||"root"===a?f=r:a?f=o:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(f=void 0);const p=kd(e,{shouldForwardProp:f,label:Uh(n,a),...u}),m=e=>{if("function"===typeof e&&e.__emotion_real!==e)return function(t){return $h(t,e)};if(Td(e)){const t=Dh(e);return t.variants?function(e){return $h(e,t)}:t.style}return e},g=function(){const t=[];for(var r=arguments.length,o=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))};function Vh(e){return Hh(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)}function Kh(e){if(e.type)return e;if("#"===e.charAt(0))return Kh(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(xc(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(xc(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const Yh=(e,t)=>{try{return(e=>{const t=Kh(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(Ot){return e}};function Gh(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function Qh(e){e=Kh(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Gh({type:s,values:l})}function Xh(e){let t="hsl"===(e=Kh(e)).type||"hsla"===e.type?Kh(Qh(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Jh(e,t){return e=Kh(e),t=Vh(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Gh(e)}function Zh(e,t,n){try{return Jh(e,t)}catch(Ot){return e}}function ef(e,t){if(e=Kh(e),t=Vh(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Gh(e)}function tf(e,t,n){try{return ef(e,t)}catch(Ot){return e}}function nf(e,t){if(e=Kh(e),t=Vh(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Gh(e)}function rf(e,t,n){try{return nf(e,t)}catch(Ot){return e}}function of(e,t,n){try{return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return Xh(e)>.5?ef(e,t):nf(e,t)}(e,t)}catch(Ot){return e}}const af={black:"#000",white:"#fff"},sf={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},lf={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},cf={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},uf={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},df={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},hf={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},ff={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function pf(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:af.white,default:af.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const mf=pf();function gf(){return{text:{primary:af.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:af.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const yf=gf();function vf(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=nf(e.main,o):"dark"===t&&(e.dark=ef(e.main,i)))}function bf(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:df[200],light:df[50],dark:df[400]}:{main:df[700],light:df[400],dark:df[800]}}(t),a=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:lf[200],light:lf[50],dark:lf[400]}:{main:lf[500],light:lf[300],dark:lf[700]}}(t),s=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:cf[500],light:cf[300],dark:cf[700]}:{main:cf[700],light:cf[400],dark:cf[800]}}(t),l=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:hf[400],light:hf[300],dark:hf[700]}:{main:hf[700],light:hf[500],dark:hf[900]}}(t),c=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:ff[400],light:ff[300],dark:ff[700]}:{main:ff[800],light:ff[500],dark:ff[900]}}(t),u=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:uf[400],light:uf[300],dark:uf[700]}:{main:"#ed6c02",light:uf[500],dark:uf[900]}}(t);function d(e){const t=function(e,t){const n=Xh(e),r=Xh(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,yf.text.primary)>=n?yf.text.primary:mf.text.primary;return t}const h=e=>{let{color:t,name:n,mainShade:o=500,lightShade:i=300,darkShade:a=700}=e;if(t={...t},!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error(xc(11,n?` (${n})`:"",o));if("string"!==typeof t.main)throw new Error(xc(12,n?` (${n})`:"",JSON.stringify(t.main)));return vf(t,"light",i,r),vf(t,"dark",a,r),t.contrastText||(t.contrastText=d(t.main)),t};let f;"light"===t?f=pf():"dark"===t&&(f=gf());return Rd({common:{...af},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:sf,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r,...f},o)}function wf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";function t(){for(var n=arguments.length,r=new Array(n),o=0;o1?r-1:0),i=1;i{const[n,r]=e;"object"===typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const Sf=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"===typeof o&&(o[e]=n):o&&"object"===typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function kf(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return((e,t,n)=>{!function e(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Object.entries(r).forEach((r=>{let[a,s]=r;(!n||n&&!n([...o,a]))&&void 0!==s&&null!==s&&("object"===typeof s&&Object.keys(s).length>0?e(s,[...o,a],Array.isArray(s)?[...i,a]:i):t([...o,a],s,i))}))}(e)})(e,((e,t,s)=>{if(("string"===typeof t||"number"===typeof t)&&(!r||!r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>{if("number"===typeof t)return["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`;return t})(e,t);Object.assign(o,{[r]:l}),Sf(i,e,`var(${r})`,s),Sf(a,e,`var(${r}, ${l})`,s)}}),(e=>"vars"===e[0])),{css:o,vars:i,varsWithDefaults:a}}const xf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=kf(l,t);let h=d;const f={},{[s]:p,...m}=i;if(Object.entries(m||{}).forEach((e=>{let[n,r]=e;const{vars:o,css:i,varsWithDefaults:a}=kf(r,t);h=Rd(h,a),f[n]={css:i,vars:o}})),p){const{css:e,vars:n,varsWithDefaults:r}=kf(p,t);h=Rd(h,r),f[s]={css:e,vars:n}}function g(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=i[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:h,generateThemeVars:()=>{let e={...c};return Object.entries(f).forEach((t=>{let[,{vars:n}]=t;e=Rd(e,n)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"===typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[o]:s,...l}=f;if(s){const{css:e}=s,t=i[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(o,{...l}),l)}return Object.entries(l).forEach((e=>{let[t,{css:o}]=e;const s=i[t]?.palette?.mode,l=!r&&s?{colorScheme:s,...o}:{...o};a(n(t,{...l}),l)})),t}}};function Cf(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}const Ef={textTransform:"uppercase"},Tf='"Roboto", "Helvetica", "Arial", sans-serif';function Pf(e,t){const{fontFamily:n=Tf,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"===typeof t?t(e):t;const h=r/14,f=u||(e=>e/l*h+"rem"),p=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:f(t),lineHeight:r,...n===Tf?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:p(o,96,1.167,-1.5),h2:p(o,60,1.2,-.5),h3:p(i,48,1.167,0),h4:p(i,34,1.235,.25),h5:p(i,24,1.334,0),h6:p(a,20,1.6,.15),subtitle1:p(i,16,1.75,.15),subtitle2:p(a,14,1.57,.1),body1:p(i,16,1.5,.15),body2:p(i,14,1.43,.15),button:p(a,14,1.75,.4,Ef),caption:p(i,12,1.66,.4),overline:p(i,12,2.66,1,Ef),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Rd({htmlFontSize:l,pxToRem:f,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function Rf(){return[`${arguments.length<=0?void 0:arguments[0]}px ${arguments.length<=1?void 0:arguments[1]}px ${arguments.length<=2?void 0:arguments[2]}px ${arguments.length<=3?void 0:arguments[3]}px rgba(0,0,0,0.2)`,`${arguments.length<=4?void 0:arguments[4]}px ${arguments.length<=5?void 0:arguments[5]}px ${arguments.length<=6?void 0:arguments[6]}px ${arguments.length<=7?void 0:arguments[7]}px rgba(0,0,0,0.14)`,`${arguments.length<=8?void 0:arguments[8]}px ${arguments.length<=9?void 0:arguments[9]}px ${arguments.length<=10?void 0:arguments[10]}px ${arguments.length<=11?void 0:arguments[11]}px rgba(0,0,0,0.12)`].join(",")}const If=["none",Rf(0,2,1,-1,0,1,1,0,0,1,3,0),Rf(0,3,1,-2,0,2,2,0,0,1,5,0),Rf(0,3,3,-2,0,3,4,0,0,1,8,0),Rf(0,2,4,-1,0,4,5,0,0,1,10,0),Rf(0,3,5,-1,0,5,8,0,0,1,14,0),Rf(0,3,5,-1,0,6,10,0,0,1,18,0),Rf(0,4,5,-2,0,7,10,1,0,2,16,1),Rf(0,5,5,-3,0,8,10,1,0,3,14,2),Rf(0,5,6,-3,0,9,12,1,0,3,16,2),Rf(0,6,6,-3,0,10,14,1,0,4,18,3),Rf(0,6,7,-4,0,11,15,1,0,4,20,3),Rf(0,7,8,-4,0,12,17,2,0,5,22,4),Rf(0,7,8,-4,0,13,19,2,0,5,24,4),Rf(0,7,9,-4,0,14,21,2,0,5,26,4),Rf(0,8,9,-5,0,15,22,2,0,6,28,5),Rf(0,8,10,-5,0,16,24,2,0,6,30,5),Rf(0,8,11,-5,0,17,26,2,0,6,32,5),Rf(0,9,11,-5,0,18,28,2,0,7,34,6),Rf(0,9,12,-6,0,19,29,2,0,7,36,6),Rf(0,10,13,-6,0,20,31,3,0,8,38,7),Rf(0,10,13,-6,0,21,33,3,0,8,40,7),Rf(0,10,14,-6,0,22,35,3,0,8,42,7),Rf(0,11,14,-7,0,23,36,3,0,9,44,8),Rf(0,11,15,-7,0,24,38,3,0,9,46,8)],Nf={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Af={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Of(e){return`${Math.round(e)}ms`}function Mf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Lf(e){const t={...Nf,...e.easing},n={...Af,...e.duration};return{getAutoHeightDuration:Mf,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof o?o:Of(o)} ${i} ${"string"===typeof a?a:Of(a)}`)).join(",")},...e,easing:t,duration:n}}const Df={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ff(e){return Td(e)||"undefined"===typeof e||"string"===typeof e||"boolean"===typeof e||"number"===typeof e||Array.isArray(e)}function zf(){const e={...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}};return function e(t){const n=Object.entries(t);for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t,mixins:n={},spacing:r,palette:o={},transitions:i={},typography:a={},shape:s,...l}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(xc(20));const c=bf(o),u=Lh(e);let d=Rd(u,{mixins:Cf(u.breakpoints,n),palette:c,shadows:If.slice(),typography:Pf(c,a),transitions:Lf(i),zIndex:{...Df}});d=Rd(d,l);for(var h=arguments.length,f=new Array(h>1?h-1:0),p=1;pRd(e,t)),d),d.unstable_sxConfig={...Nh,...l?.unstable_sxConfig},d.unstable_sx=function(e){return Oh({sx:e,theme:this})},d.toRuntimeSource=zf,d}const $f=jf;function Bf(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}const Wf=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=Bf(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function Uf(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function qf(e){return"dark"===e?Wf:[]}function Hf(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Vf=e=>[...[...Array(25)].map(((t,n)=>`--${e?`${e}-`:""}overlays-${n}`)),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Kf=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return Vf(e.cssVarPrefix).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function Yf(e,t,n){!e[t]&&n&&(e[t]=n)}function Gf(e){return"string"===typeof e&&e.startsWith("hsl")?Qh(e):e}function Qf(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Yh(Gf(e[t])))}const Xf=e=>{try{return e()}catch(Ot){}};function Jf(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=bf(t);return{palette:i,opacity:{...Uf(i.mode),...n},overlays:r||qf(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=$f({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...Uf(o),...t?.opacity},overlays:t?.overlays||qf(o)},a}function Zf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{colorSchemes:t={light:!0},defaultColorScheme:n,disableCssColorScheme:r=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:i=Hf,colorSchemeSelector:a=(t.light&&t.dark?"media":void 0),rootSelector:s=":root",...l}=e,c=Object.keys(t)[0],u=n||(t.light&&"light"!==c?"light":c),d=function(){return wf(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mui")}(o),{[u]:h,light:f,dark:p,...m}=t,g={...m};let y=h;if(("dark"===u&&!("dark"in t)||"light"===u&&!("light"in t))&&(y=!0),!y)throw new Error(xc(21,u));const v=Jf(g,y,l,u);f&&!g.light&&Jf(g,f,void 0,"light"),p&&!g.dark&&Jf(g,p,void 0,"dark");let b={defaultColorScheme:u,...v,cssVarPrefix:o,colorSchemeSelector:a,rootSelector:s,getCssVar:d,colorSchemes:g,font:{..._f(v.typography),...v.font},spacing:(w=l.spacing,"number"===typeof w?`${w}px`:"string"===typeof w||"function"===typeof w||Array.isArray(w)?w:"8px")};var w;Object.keys(b.colorSchemes).forEach((e=>{const t=b.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return d(e,t[r][o])};var r;if("light"===t.mode&&(Yf(t.common,"background","#fff"),Yf(t.common,"onBackground","#000")),"dark"===t.mode&&(Yf(t.common,"background","#000"),Yf(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){Yf(t.Alert,"errorColor",tf(t.error.light,.6)),Yf(t.Alert,"infoColor",tf(t.info.light,.6)),Yf(t.Alert,"successColor",tf(t.success.light,.6)),Yf(t.Alert,"warningColor",tf(t.warning.light,.6)),Yf(t.Alert,"errorFilledBg",n("palette-error-main")),Yf(t.Alert,"infoFilledBg",n("palette-info-main")),Yf(t.Alert,"successFilledBg",n("palette-success-main")),Yf(t.Alert,"warningFilledBg",n("palette-warning-main")),Yf(t.Alert,"errorFilledColor",Xf((()=>t.getContrastText(t.error.main)))),Yf(t.Alert,"infoFilledColor",Xf((()=>t.getContrastText(t.info.main)))),Yf(t.Alert,"successFilledColor",Xf((()=>t.getContrastText(t.success.main)))),Yf(t.Alert,"warningFilledColor",Xf((()=>t.getContrastText(t.warning.main)))),Yf(t.Alert,"errorStandardBg",rf(t.error.light,.9)),Yf(t.Alert,"infoStandardBg",rf(t.info.light,.9)),Yf(t.Alert,"successStandardBg",rf(t.success.light,.9)),Yf(t.Alert,"warningStandardBg",rf(t.warning.light,.9)),Yf(t.Alert,"errorIconColor",n("palette-error-main")),Yf(t.Alert,"infoIconColor",n("palette-info-main")),Yf(t.Alert,"successIconColor",n("palette-success-main")),Yf(t.Alert,"warningIconColor",n("palette-warning-main")),Yf(t.AppBar,"defaultBg",n("palette-grey-100")),Yf(t.Avatar,"defaultBg",n("palette-grey-400")),Yf(t.Button,"inheritContainedBg",n("palette-grey-300")),Yf(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),Yf(t.Chip,"defaultBorder",n("palette-grey-400")),Yf(t.Chip,"defaultAvatarColor",n("palette-grey-700")),Yf(t.Chip,"defaultIconColor",n("palette-grey-700")),Yf(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Yf(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Yf(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Yf(t.LinearProgress,"primaryBg",rf(t.primary.main,.62)),Yf(t.LinearProgress,"secondaryBg",rf(t.secondary.main,.62)),Yf(t.LinearProgress,"errorBg",rf(t.error.main,.62)),Yf(t.LinearProgress,"infoBg",rf(t.info.main,.62)),Yf(t.LinearProgress,"successBg",rf(t.success.main,.62)),Yf(t.LinearProgress,"warningBg",rf(t.warning.main,.62)),Yf(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),Yf(t.Slider,"primaryTrack",rf(t.primary.main,.62)),Yf(t.Slider,"secondaryTrack",rf(t.secondary.main,.62)),Yf(t.Slider,"errorTrack",rf(t.error.main,.62)),Yf(t.Slider,"infoTrack",rf(t.info.main,.62)),Yf(t.Slider,"successTrack",rf(t.success.main,.62)),Yf(t.Slider,"warningTrack",rf(t.warning.main,.62));const e=of(t.background.default,.8);Yf(t.SnackbarContent,"bg",e),Yf(t.SnackbarContent,"color",Xf((()=>t.getContrastText(e)))),Yf(t.SpeedDialAction,"fabHoverBg",of(t.background.paper,.15)),Yf(t.StepConnector,"border",n("palette-grey-400")),Yf(t.StepContent,"border",n("palette-grey-400")),Yf(t.Switch,"defaultColor",n("palette-common-white")),Yf(t.Switch,"defaultDisabledColor",n("palette-grey-100")),Yf(t.Switch,"primaryDisabledColor",rf(t.primary.main,.62)),Yf(t.Switch,"secondaryDisabledColor",rf(t.secondary.main,.62)),Yf(t.Switch,"errorDisabledColor",rf(t.error.main,.62)),Yf(t.Switch,"infoDisabledColor",rf(t.info.main,.62)),Yf(t.Switch,"successDisabledColor",rf(t.success.main,.62)),Yf(t.Switch,"warningDisabledColor",rf(t.warning.main,.62)),Yf(t.TableCell,"border",rf(Zh(t.divider,1),.88)),Yf(t.Tooltip,"bg",Zh(t.grey[700],.92))}if("dark"===t.mode){Yf(t.Alert,"errorColor",rf(t.error.light,.6)),Yf(t.Alert,"infoColor",rf(t.info.light,.6)),Yf(t.Alert,"successColor",rf(t.success.light,.6)),Yf(t.Alert,"warningColor",rf(t.warning.light,.6)),Yf(t.Alert,"errorFilledBg",n("palette-error-dark")),Yf(t.Alert,"infoFilledBg",n("palette-info-dark")),Yf(t.Alert,"successFilledBg",n("palette-success-dark")),Yf(t.Alert,"warningFilledBg",n("palette-warning-dark")),Yf(t.Alert,"errorFilledColor",Xf((()=>t.getContrastText(t.error.dark)))),Yf(t.Alert,"infoFilledColor",Xf((()=>t.getContrastText(t.info.dark)))),Yf(t.Alert,"successFilledColor",Xf((()=>t.getContrastText(t.success.dark)))),Yf(t.Alert,"warningFilledColor",Xf((()=>t.getContrastText(t.warning.dark)))),Yf(t.Alert,"errorStandardBg",tf(t.error.light,.9)),Yf(t.Alert,"infoStandardBg",tf(t.info.light,.9)),Yf(t.Alert,"successStandardBg",tf(t.success.light,.9)),Yf(t.Alert,"warningStandardBg",tf(t.warning.light,.9)),Yf(t.Alert,"errorIconColor",n("palette-error-main")),Yf(t.Alert,"infoIconColor",n("palette-info-main")),Yf(t.Alert,"successIconColor",n("palette-success-main")),Yf(t.Alert,"warningIconColor",n("palette-warning-main")),Yf(t.AppBar,"defaultBg",n("palette-grey-900")),Yf(t.AppBar,"darkBg",n("palette-background-paper")),Yf(t.AppBar,"darkColor",n("palette-text-primary")),Yf(t.Avatar,"defaultBg",n("palette-grey-600")),Yf(t.Button,"inheritContainedBg",n("palette-grey-800")),Yf(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),Yf(t.Chip,"defaultBorder",n("palette-grey-700")),Yf(t.Chip,"defaultAvatarColor",n("palette-grey-300")),Yf(t.Chip,"defaultIconColor",n("palette-grey-300")),Yf(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Yf(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Yf(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Yf(t.LinearProgress,"primaryBg",tf(t.primary.main,.5)),Yf(t.LinearProgress,"secondaryBg",tf(t.secondary.main,.5)),Yf(t.LinearProgress,"errorBg",tf(t.error.main,.5)),Yf(t.LinearProgress,"infoBg",tf(t.info.main,.5)),Yf(t.LinearProgress,"successBg",tf(t.success.main,.5)),Yf(t.LinearProgress,"warningBg",tf(t.warning.main,.5)),Yf(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),Yf(t.Slider,"primaryTrack",tf(t.primary.main,.5)),Yf(t.Slider,"secondaryTrack",tf(t.secondary.main,.5)),Yf(t.Slider,"errorTrack",tf(t.error.main,.5)),Yf(t.Slider,"infoTrack",tf(t.info.main,.5)),Yf(t.Slider,"successTrack",tf(t.success.main,.5)),Yf(t.Slider,"warningTrack",tf(t.warning.main,.5));const e=of(t.background.default,.98);Yf(t.SnackbarContent,"bg",e),Yf(t.SnackbarContent,"color",Xf((()=>t.getContrastText(e)))),Yf(t.SpeedDialAction,"fabHoverBg",of(t.background.paper,.15)),Yf(t.StepConnector,"border",n("palette-grey-600")),Yf(t.StepContent,"border",n("palette-grey-600")),Yf(t.Switch,"defaultColor",n("palette-grey-300")),Yf(t.Switch,"defaultDisabledColor",n("palette-grey-600")),Yf(t.Switch,"primaryDisabledColor",tf(t.primary.main,.55)),Yf(t.Switch,"secondaryDisabledColor",tf(t.secondary.main,.55)),Yf(t.Switch,"errorDisabledColor",tf(t.error.main,.55)),Yf(t.Switch,"infoDisabledColor",tf(t.info.main,.55)),Yf(t.Switch,"successDisabledColor",tf(t.success.main,.55)),Yf(t.Switch,"warningDisabledColor",tf(t.warning.main,.55)),Yf(t.TableCell,"border",tf(Zh(t.divider,1),.68)),Yf(t.Tooltip,"bg",Zh(t.grey[700],.92))}Qf(t.background,"default"),Qf(t.background,"paper"),Qf(t.common,"background"),Qf(t.common,"onBackground"),Qf(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"===typeof n&&(n.main&&Yf(t[e],"mainChannel",Yh(Gf(n.main))),n.light&&Yf(t[e],"lightChannel",Yh(Gf(n.light))),n.dark&&Yf(t[e],"darkChannel",Yh(Gf(n.dark))),n.contrastText&&Yf(t[e],"contrastTextChannel",Yh(Gf(n.contrastText))),"text"===e&&(Qf(t[e],"primary"),Qf(t[e],"secondary")),"action"===e&&(n.active&&Qf(t[e],"active"),n.selected&&Qf(t[e],"selected")))}))}));for(var _=arguments.length,S=new Array(_>1?_-1:0),k=1;k<_;k++)S[k-1]=arguments[k];b=S.reduce(((e,t)=>Rd(e,t)),b);const x={prefix:o,disableCssColorScheme:r,shouldSkipGeneratingVar:i,getSelector:Kf(b)},{vars:C,generateThemeVars:E,generateStyleSheets:T}=xf(b,x);return b.vars=C,Object.entries(b.colorSchemes[b.defaultColorScheme]).forEach((e=>{let[t,n]=e;b[t]=n})),b.generateThemeVars=E,b.generateStyleSheets=T,b.generateSpacing=function(){return rh(l.spacing,Qd(this))},b.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(a),b.spacing=b.generateSpacing(),b.shouldSkipGeneratingVar=i,b.unstable_sxConfig={...Nh,...l?.unstable_sxConfig},b.unstable_sx=function(e){return Oh({sx:e,theme:this})},b.toRuntimeSource=zf,b}function ep(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:bf({...!0===n?{}:n.palette,mode:t})})}function tp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{palette:t,cssVariables:n=!1,colorSchemes:r=(t?void 0:{light:!0}),defaultColorScheme:o=t?.mode,...i}=e,a=o||"light",s=r?.[a],l={...r,...t?{[a]:{..."boolean"!==typeof s&&s,palette:t}}:void 0};for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;dop(e)&&"classes"!==e,ap=Wh({themeId:rp,defaultTheme:np,rootShouldForwardProp:ip}),sp={theme:void 0};const lp=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(sp.theme=r.theme,o=Dh(e(sp)),t=o,n=r.theme),o}};function cp(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const r=e[o],i=t[o];if(i)if(r){n[o]={...i};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[o][t]=cp(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}const up=Ma.createContext(void 0);function dp(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?cp(o.defaultProps,r):o.styleOverrides||o.variants?r:cp(o,r)}({props:t,name:n,theme:{components:Ma.useContext(up)}})}const hp=function(e){let{value:t,children:n}=e;return(0,Nc.jsx)(up.Provider,{value:t,children:n})};function fp(e){return dp(e)}const pp=function(e){return"string"===typeof e};const mp=function(e,t,n){return void 0===e||pp(e)?t:{...t,ownerState:{...t.ownerState,...n}}};const gp=function(e,t,n){return"function"===typeof e?e(t,n):e};const yp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n};const vp=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t};const bp=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=bc(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=yp({...o,...r}),s=vp(r),l=vp(o),c=t(a),u=bc(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...s};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}};function wp(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...h}=i,f=u[e]||r,p=gp(d[e],o),{props:{component:m,...g},internalRef:y}=bp({className:n,...l,externalForwardedProps:"root"===e?h:void 0,externalSlotProps:p}),v=Pc(y,p?.ref,t.ref),b="root"===e?m||c:m;return[f,mp(f,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...b&&!s&&{as:b},...b&&s&&{component:b},ref:v},o)]}function _p(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Sp(e,t){return Sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sp(e,t)}function kp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Sp(e,t)}const xp=!1,Cp=Ma.createContext(null);var Ep="unmounted",Tp="exited",Pp="entering",Rp="entered",Ip="exiting",Np=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=Tp,r.appearStatus=Pp):o=Rp:o=t.unmountOnExit||t.mountOnEnter?Ep:Tp,r.state={status:o},r.nextCallback=null,r}kp(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ep?{status:Tp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Pp&&n!==Rp&&(t=Pp):n!==Pp&&n!==Rp||(t=Ip)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Pp){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Dc.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Tp&&this.setState({status:Ep})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Dc.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||xp?this.safeSetState({status:Rp},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:Pp},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Rp},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Dc.findDOMNode(this);t&&!xp?(this.props.onExit(r),this.safeSetState({status:Ip},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Tp},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Tp},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Dc.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Ep)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,_p(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return Ma.createElement(Cp.Provider,{value:null},"function"===typeof n?n(e,r):Ma.cloneElement(Ma.Children.only(n),r))},t}(Ma.Component);function Ap(){}Np.contextType=Cp,Np.propTypes={},Np.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ap,onEntering:Ap,onEntered:Ap,onExit:Ap,onExiting:Ap,onExited:Ap},Np.UNMOUNTED=Ep,Np.EXITED=Tp,Np.ENTERING=Pp,Np.ENTERED=Rp,Np.EXITING=Ip;const Op=Np;const Mp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=Ma.useContext(ud);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Lp=Lh();const Dp=function(){return Mp(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lp)};function Fp(){const e=Dp(np);return e[rp]||e}const zp=e=>e.scrollTop;function jp(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"===typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"===typeof r?r[t.mode]:r),delay:o.transitionDelay}}const $p=Pc,Bp={entering:{opacity:1},entered:{opacity:1}},Wp=Ma.forwardRef((function(e,t){const n=Fp(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:h,onExited:f,onExiting:p,style:m,timeout:g=r,TransitionComponent:y=Op,...v}=e,b=Ma.useRef(null),w=$p(b,Rc(a),t),_=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},S=_(d),k=_(((e,t)=>{zp(e);const r=jp({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),x=_(u),C=_(p),E=_((e=>{const t=jp({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)})),T=_(f);return(0,Nc.jsx)(y,{appear:i,in:l,nodeRef:b,onEnter:k,onEntered:x,onEntering:S,onExit:E,onExited:T,onExiting:C,addEndListener:e=>{o&&o(b.current,e)},timeout:g,...v,children:(e,t)=>{let{ownerState:n,...r}=t;return Ma.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||l?void 0:"hidden",...Bp[e],...m,...a.props.style},ref:w,...r})}})})),Up=Wp,qp=e=>e,Hp=(()=>{let e=qp;return{configure(t){e=t},generate:t=>e(t),reset(){e=qp}}})(),Vp={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Kp(e,t){const n=Vp[t];return n?`${arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui"}-${n}`:`${Hp.generate(e)}-${t}`}function Yp(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r={};return t.forEach((t=>{r[t]=Kp(e,t,n)})),r}function Gp(e){return Kp("MuiBackdrop",e)}Yp("MuiBackdrop",["root","invisible"]);const Qp=ap("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Xp=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:c={},slotProps:u={},slots:d={},TransitionComponent:h,transitionDuration:f,...p}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return wc({root:["root",n&&"invisible"]},Gp,t)})(m),y={slots:{transition:h,root:l.Root,...d},slotProps:{...c,...u}},[v,b]=wp("root",{elementType:Qp,externalForwardedProps:y,className:bc(g.root,o),ownerState:m}),[w,_]=wp("transition",{elementType:Up,externalForwardedProps:y,ownerState:m});return(0,Nc.jsx)(w,{in:s,timeout:f,...p,..._,children:(0,Nc.jsx)(v,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})})),Jp=Xp;const Zp=function(e){const t=Ma.useRef(e);return Fc((()=>{t.current=e})),Ma.useRef((function(){return(0,t.current)(...arguments)})).current};function em(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o{}))}function tm(e){return Ic(e).defaultView||window}function nm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function rm(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function om(e){return parseInt(tm(e).getComputedStyle(e).paddingRight,10)||0}function im(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&rm(e,o)}))}function am(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function sm(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Ic(e);return t.body===e?tm(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=nm(tm(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${om(r)+e}px`;const t=Ic(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${om(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Ic(r).body;else{const t=r.parentElement,n=tm(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const lm=()=>{},cm=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&rm(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);im(t,e.mount,e.modalRef,r,!0);const o=am(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=am(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=sm(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=am(this.containers,(t=>t.modals.includes(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&rm(e.modalRef,t),im(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&rm(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const um=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=Ma.useRef({}),h=Ma.useRef(null),f=Ma.useRef(null),p=Pc(f,u),[m,g]=Ma.useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let v=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(v=!1);const b=()=>(d.current.modalRef=f.current,d.current.mount=h.current,d.current),w=()=>{cm.mount(b(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},_=Zp((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||Ic(h.current).body;cm.add(b(),e),f.current&&w()})),S=()=>cm.isTopModal(b()),k=Zp((e=>{h.current=e,e&&(c&&S()?w():f.current&&rm(f.current,v))})),x=Ma.useCallback((()=>{cm.remove(b(),v)}),[v]);Ma.useEffect((()=>()=>{x()}),[x]),Ma.useEffect((()=>{c?_():y&&o||x()}),[c,x,y,o,_]);const C=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),l&&l(t,"escapeKeyDown")))},E=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&l&&l(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=yp(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:C(r),ref:p}},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{"aria-hidden":!0,...e,onClick:E(e),open:c}},getTransitionProps:()=>({onEnter:em((()=>{g(!1),i&&i()}),s?.props.onEnter??lm),onExited:em((()=>{g(!0),a&&a(),o&&x()}),s?.props.onExited??lm)}),rootRef:p,portalRef:k,isTopModal:S,exited:m,hasTransition:y}};function dm(e){return Kp("MuiModal",e)}Yp("MuiModal",["root","hidden","backdrop"]);const hm=ap("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(lp((e=>{let{theme:t}=e;return{position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:e=>{let{ownerState:t}=e;return!t.open&&t.exited},style:{visibility:"hidden"}}]}}))),fm=ap(Jp,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),pm=Ma.forwardRef((function(e,t){const n=fp({name:"MuiModal",props:e}),{BackdropComponent:r=fm,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:l,container:c,component:u,components:d={},componentsProps:h={},disableAutoFocus:f=!1,disableEnforceFocus:p=!1,disableEscapeKeyDown:m=!1,disablePortal:g=!1,disableRestoreFocus:y=!1,disableScrollLock:v=!1,hideBackdrop:b=!1,keepMounted:w=!1,onBackdropClick:_,onClose:S,onTransitionEnter:k,onTransitionExited:x,open:C,slotProps:E={},slots:T={},theme:P,...R}=n,I={...n,closeAfterTransition:s,disableAutoFocus:f,disableEnforceFocus:p,disableEscapeKeyDown:m,disablePortal:g,disableRestoreFocus:y,disableScrollLock:v,hideBackdrop:b,keepMounted:w},{getRootProps:N,getBackdropProps:A,getTransitionProps:O,portalRef:M,isTopModal:L,exited:D,hasTransition:F}=um({...I,rootRef:t}),z={...I,exited:D},j=(e=>{const{open:t,exited:n,classes:r}=e;return wc({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},dm,r)})(z),$={};if(void 0===l.props.tabIndex&&($.tabIndex="-1"),F){const{onEnter:e,onExited:t}=O();$.onEnter=e,$.onExited=t}const B={slots:{root:d.Root,backdrop:d.Backdrop,...T},slotProps:{...h,...E}},[W,U]=wp("root",{ref:t,elementType:hm,externalForwardedProps:{...B,...R,component:u},getSlotProps:N,ownerState:z,className:bc(a,j?.root,!z.open&&z.exited&&j?.hidden)}),[q,H]=wp("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>A({...e,onClick:t=>{_&&_(t),e?.onClick&&e.onClick(t)}}),className:bc(o?.className,j?.backdrop),ownerState:z});return w||C||F&&!D?(0,Nc.jsx)(zc,{ref:M,container:c,disablePortal:g,children:(0,Nc.jsxs)(W,{...U,children:[!b&&r?(0,Nc.jsx)(q,{...H}):null,(0,Nc.jsx)(Lc,{disableEnforceFocus:p,disableAutoFocus:f,disableRestoreFocus:y,isEnabled:L,open:C,children:Ma.cloneElement(l,$)})]})}):null})),mm=pm;function gm(e){return Kp("MuiPaper",e)}Yp("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const ym=ap("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(lp((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:e=>{let{ownerState:t}=e;return!t.square},style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}}))),vm=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiPaper"}),r=Fp(),{className:o,component:i="div",elevation:a=1,square:s=!1,variant:l="elevation",...c}=n,u={...n,component:i,elevation:a,square:s,variant:l},d=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e;return wc({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},gm,o)})(u);return(0,Nc.jsx)(ym,{as:i,ownerState:u,className:bc(d.root,o),ref:t,...c,style:{..."elevation"===l&&{"--Paper-shadow":(r.vars||r).shadows[a],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[a]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${Jh("#fff",Bf(a))}, ${Jh("#fff",Bf(a))})`}},...c.style}})})),bm=vm;function wm(e){return Kp("MuiDialog",e)}const _m=Yp("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const Sm=Ma.createContext({}),km=ap(Jp,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),xm=ap(mm,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Cm=ap("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ec(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Em=ap(bm,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ec(n.scroll)}`],t[`paperWidth${Ec(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(lp((e=>{let{theme:t}=e;return{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:e=>{let{ownerState:t}=e;return!t.maxWidth},style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${_m.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(t.breakpoints.values).filter((e=>"xs"!==e)).map((e=>({props:{maxWidth:e},style:{maxWidth:`${t.breakpoints.values[e]}${t.breakpoints.unit}`,[`&.${_m.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e]+64)]:{maxWidth:"calc(100% - 64px)"}}}}))),{props:e=>{let{ownerState:t}=e;return t.fullWidth},style:{width:"calc(100% - 64px)"}},{props:e=>{let{ownerState:t}=e;return t.fullScreen},style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${_m.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}}))),Tm=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiDialog"}),r=Fp(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,"aria-modal":s=!0,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:h=!1,fullScreen:f=!1,fullWidth:p=!1,maxWidth:m="sm",onBackdropClick:g,onClick:y,onClose:v,open:b,PaperComponent:w=bm,PaperProps:_={},scroll:S="paper",slots:k={},slotProps:x={},TransitionComponent:C=Up,transitionDuration:E=o,TransitionProps:T,...P}=n,R={...n,disableEscapeKeyDown:h,fullScreen:f,fullWidth:p,maxWidth:m,scroll:S},I=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return wc({root:["root"],container:["container",`scroll${Ec(n)}`],paper:["paper",`paperScroll${Ec(n)}`,`paperWidth${Ec(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]},wm,t)})(R),N=Ma.useRef(),A=kc(a),O=Ma.useMemo((()=>({titleId:A})),[A]),M={slots:{transition:C,...k},slotProps:{transition:T,paper:_,backdrop:c,...x}},[L,D]=wp("root",{elementType:xm,shouldForwardComponentProp:!0,externalForwardedProps:M,ownerState:R,className:bc(I.root,d),ref:t}),[F,z]=wp("backdrop",{elementType:km,shouldForwardComponentProp:!0,externalForwardedProps:M,ownerState:R}),[j,$]=wp("paper",{elementType:Em,shouldForwardComponentProp:!0,externalForwardedProps:M,ownerState:R,className:bc(I.paper,_.className)}),[B,W]=wp("container",{elementType:Cm,externalForwardedProps:M,ownerState:R,className:bc(I.container)}),[U,q]=wp("transition",{elementType:Up,externalForwardedProps:M,ownerState:R,additionalProps:{appear:!0,in:b,timeout:E,role:"presentation"}});return(0,Nc.jsx)(L,{closeAfterTransition:!0,slots:{backdrop:F},slotProps:{backdrop:{transitionDuration:E,as:l,...z}},disableEscapeKeyDown:h,onClose:v,open:b,onClick:e=>{y&&y(e),N.current&&(N.current=null,g&&g(e),v&&v(e,"backdropClick"))},...D,...P,children:(0,Nc.jsx)(U,{...q,children:(0,Nc.jsx)(B,{onMouseDown:e=>{N.current=e.target===e.currentTarget},...W,children:(0,Nc.jsx)(j,{as:w,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":A,"aria-modal":s,...$,children:(0,Nc.jsx)(Sm.Provider,{value:O,children:u})})})})})})),Pm=Tm,Rm=kc;function Im(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t=>{let[,n]=t;return n&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!function(e){return"string"===typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!==typeof e[n])return!1;return!0}(n,e)}}function Nm(e){try{return e.matches(":focus-visible")}catch(Ot){0}return!1}const Am=Zp,Om={};function Mm(e,t){const n=Ma.useRef(Om);return n.current===Om&&(n.current=e(t)),n}class Lm{static create(){return new Lm}static use(){const e=Mm(Lm.create).current,[t,n]=Ma.useState(!1);return e.shouldMount=t,e.setShouldMount=n,Ma.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(){for(var e=arguments.length,t=new Array(e),n=0;nthis.ref.current?.start(...t)))}stop(){for(var e=arguments.length,t=new Array(e),n=0;nthis.ref.current?.stop(...t)))}pulsate(){for(var e=arguments.length,t=new Array(e),n=0;nthis.ref.current?.pulsate(...t)))}}function Dm(e,t){var n=Object.create(null);return e&&Ma.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,Ma.isValidElement)(e)?t(e):e}(e)})),n}function Fm(e,t,n){return null!=n[t]?n[t]:e.props[t]}function zm(e,t,n){var r=Dm(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r{this.currentId=null,t()}),e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function qm(){const e=Mm(Um.create).current;var t;return t=e.disposeEffect,Ma.useEffect(t,Wm),e}n(11);var Hm=function(e,t){var n=arguments;if(null==t||!dd.call(t,"css"))return Ma.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=md,o[1]=function(e,t){var n={};for(var r in t)dd.call(t,r)&&(n[r]=t[r]);return n[hd]=e,n}(e,t);for(var i=2;i{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}}),[l,s,c]),(0,Nc.jsx)("span",{className:h,style:f,children:(0,Nc.jsx)("span",{className:p})})};const Qm=Yp("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Xm=Ym` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `,Jm=Ym` 0% { opacity: 1; } 100% { opacity: 0; } `,Zm=Ym` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `,eg=ap("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),tg=ap(Gm,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; &.${Qm.rippleVisible} { opacity: 0.3; transform: scale(1); animation-name: ${Xm}; animation-duration: ${550}ms; animation-timing-function: ${e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}}; } &.${Qm.ripplePulsate} { animation-duration: ${e=>{let{theme:t}=e;return t.transitions.duration.shorter}}ms; } & .${Qm.child} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${Qm.childLeaving} { opacity: 0; animation-name: ${Jm}; animation-duration: ${550}ms; animation-timing-function: ${e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}}; } & .${Qm.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${Zm}; animation-duration: 2500ms; animation-timing-function: ${e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}}; animation-iteration-count: infinite; animation-delay: 200ms; } `,ng=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i,...a}=n,[s,l]=Ma.useState([]),c=Ma.useRef(0),u=Ma.useRef(null);Ma.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=Ma.useRef(!1),h=qm(),f=Ma.useRef(null),p=Ma.useRef(null),m=Ma.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;l((e=>[...e,(0,Nc.jsx)(tg,{classes:{ripple:bc(o.ripple,Qm.ripple),rippleVisible:bc(o.rippleVisible,Qm.rippleVisible),ripplePulsate:bc(o.ripplePulsate,Qm.ripplePulsate),child:bc(o.child,Qm.child),childLeaving:bc(o.childLeaving,Qm.childLeaving),childPulsate:bc(o.childPulsate,Qm.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)])),c.current+=1,u.current=a}),[o]),g=Ma.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&d.current)return void(d.current=!1);"touchstart"===e?.type&&(d.current=!0);const s=a?null:p.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2===0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}e?.touches?null===f.current&&(f.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},h.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,m,h]),y=Ma.useCallback((()=>{g({},{pulsate:!0})}),[g]),v=Ma.useCallback(((e,t)=>{if(h.clear(),"touchend"===e?.type&&f.current)return f.current(),f.current=null,void h.start(0,(()=>{v(e,t)}));f.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[h]);return Ma.useImperativeHandle(t,(()=>({pulsate:y,start:g,stop:v})),[y,g,v]),(0,Nc.jsx)(eg,{className:bc(Qm.root,o.root,i),ref:p,...a,children:(0,Nc.jsx)(Bm,{component:null,exit:!0,children:s})})})),rg=ng;function og(e){return Kp("MuiButtonBase",e)}const ig=Yp("MuiButtonBase",["root","disabled","focusVisible"]),ag=ap("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ig.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),sg=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:h,LinkComponent:f="a",onBlur:p,onClick:m,onContextMenu:g,onDragLeave:y,onFocus:v,onFocusVisible:b,onKeyDown:w,onKeyUp:_,onMouseDown:S,onMouseLeave:k,onMouseUp:x,onTouchEnd:C,onTouchMove:E,onTouchStart:T,tabIndex:P=0,TouchRippleProps:R,touchRippleRef:I,type:N,...A}=n,O=Ma.useRef(null),M=Lm.use(),L=$p(M.ref,I),[D,F]=Ma.useState(!1);l&&D&&F(!1),Ma.useImperativeHandle(r,(()=>({focusVisible:()=>{F(!0),O.current.focus()}})),[]);const z=M.shouldMount&&!c&&!l;Ma.useEffect((()=>{D&&d&&!c&&M.pulsate()}),[c,d,D,M]);const j=lg(M,"start",S,u),$=lg(M,"stop",g,u),B=lg(M,"stop",y,u),W=lg(M,"stop",x,u),U=lg(M,"stop",(e=>{D&&e.preventDefault(),k&&k(e)}),u),q=lg(M,"start",T,u),H=lg(M,"stop",C,u),V=lg(M,"stop",E,u),K=lg(M,"stop",(e=>{Nm(e.target)||F(!1),p&&p(e)}),!1),Y=Am((e=>{O.current||(O.current=e.currentTarget),Nm(e.target)&&(F(!0),b&&b(e)),v&&v(e)})),G=()=>{const e=O.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},Q=Am((e=>{d&&!e.repeat&&D&&" "===e.key&&M.stop(e,(()=>{M.start(e)})),e.target===e.currentTarget&&G()&&" "===e.key&&e.preventDefault(),w&&w(e),e.target===e.currentTarget&&G()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))})),X=Am((e=>{d&&" "===e.key&&D&&!e.defaultPrevented&&M.stop(e,(()=>{M.pulsate(e)})),_&&_(e),m&&e.target===e.currentTarget&&G()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let J=s;"button"===J&&(A.href||A.to)&&(J=f);const Z={};"button"===J?(Z.type=void 0===N?"button":N,Z.disabled=l):(A.href||A.to||(Z.role="button"),l&&(Z["aria-disabled"]=l));const ee=$p(t,O),te={...n,centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:P,focusVisible:D},ne=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=wc({root:["root",t&&"disabled",n&&"focusVisible"]},og,o);return n&&r&&(i.root+=` ${r}`),i})(te);return(0,Nc.jsxs)(ag,{as:J,className:bc(ne.root,a),ownerState:te,onBlur:K,onClick:m,onContextMenu:$,onFocus:Y,onKeyDown:Q,onKeyUp:X,onMouseDown:j,onMouseLeave:U,onMouseUp:W,onDragLeave:B,onTouchEnd:H,onTouchMove:V,onTouchStart:q,ref:ee,tabIndex:l?-1:P,type:N,...Z,...A,children:[i,z?(0,Nc.jsx)(rg,{ref:L,center:o,...R}):null]})}));function lg(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Am((o=>(n&&n(o),r||e[t](o),!0)))}const cg=sg;function ug(e){return Kp("MuiCircularProgress",e)}Yp("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const dg=44,hg=Ym` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `,fg=Ym` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 1px, 200px; stroke-dashoffset: -126px; } `,pg="string"!==typeof hg?Km` animation: ${hg} 1.4s linear infinite; `:null,mg="string"!==typeof fg?Km` animation: ${fg} 1.4s ease-in-out infinite; `:null,gg=ap("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ec(n.color)}`]]}})(lp((e=>{let{theme:t}=e;return{display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:pg||{animation:`${hg} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}}))]}}))),yg=ap("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),vg=ap("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ec(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(lp((e=>{let{theme:t}=e;return{stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink},style:mg||{animation:`${fg} 1.4s ease-in-out infinite`}}]}}))),bg=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate",...d}=n,h={...n,color:o,disableShrink:i,size:a,thickness:l,value:c,variant:u},f=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return wc({root:["root",n,`color${Ec(r)}`],svg:["svg"],circle:["circle",`circle${Ec(n)}`,o&&"circleDisableShrink"]},ug,t)})(h),p={},m={},g={};if("determinate"===u){const e=2*Math.PI*((dg-l)/2);p.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),p.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return(0,Nc.jsx)(gg,{className:bc(f.root,r),style:{width:a,height:a,...m,...s},ownerState:h,ref:t,role:"progressbar",...g,...d,children:(0,Nc.jsx)(yg,{className:f.svg,ownerState:h,viewBox:"22 22 44 44",children:(0,Nc.jsx)(vg,{className:f.circle,style:p,ownerState:h,cx:dg,cy:dg,r:(dg-l)/2,fill:"none",strokeWidth:l})})})})),wg=bg;function _g(e){return Kp("MuiIconButton",e)}const Sg=Yp("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),kg=ap(cg,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${Ec(n.color)}`],n.edge&&t[`edge${Ec(n.edge)}`],t[`size${Ec(n.size)}`]]}})(lp((e=>{let{theme:t}=e;return{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Jh(t.palette.action.active,t.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}})),lp((e=>{let{theme:t}=e;return{variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}})),...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Jh((t.vars||t).palette[n].main,t.palette.action.hoverOpacity)}}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${Sg.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${Sg.loading}`]:{color:"transparent"}}}))),xg=ap("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((e=>{let{theme:t}=e;return{display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}})),Cg=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:h,...f}=n,p=Rm(u),m=h??(0,Nc.jsx)(wg,{"aria-labelledby":p,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:c},y=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return wc({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${Ec(r)}`,o&&`edge${Ec(o)}`,`size${Ec(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},_g,t)})(g);return(0,Nc.jsxs)(kg,{id:d?p:u,className:bc(y.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"===typeof d&&(0,Nc.jsx)("span",{className:y.loadingWrapper,style:{display:"contents"},children:(0,Nc.jsx)(xg,{className:y.loadingIndicator,ownerState:g,children:d&&m})}),o]})})),Eg=Cg;function Tg(e){return Kp("MuiIcon",e)}Yp("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Pg=ap("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ec(n.color)}`],t[`fontSize${Ec(n.fontSize)}`]]}})(lp((e=>{let{theme:t}=e;return{userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}}))]}}))),Rg=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiIcon"}),{baseClassName:r="material-icons",className:o,color:i="inherit",component:a="span",fontSize:s="medium",...l}=n,c={...n,baseClassName:r,color:i,component:a,fontSize:s},u=(e=>{const{color:t,fontSize:n,classes:r}=e;return wc({root:["root","inherit"!==t&&`color${Ec(t)}`,`fontSize${Ec(n)}`]},Tg,r)})(c);return(0,Nc.jsx)(Pg,{as:a,className:bc(r,"notranslate",u.root,o),ownerState:c,"aria-hidden":!0,ref:t,...l})}));Rg.muiName="Icon";const Ig=Rg;function Ng(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Nh;return Object.keys(e).forEach((r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"===typeof t?function(){const e=t(...arguments);return Td(e)?{...r,...e}:r}:{...r,...t},{...o,sx:i}}function Ag(e){const{styles:t,defaultTheme:n={}}=e,r="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,Nc.jsx)(Vm,{styles:r})}const Og=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const o=Dp(r),i="function"===typeof t?t(n&&o[n]||o):t;return(0,Nc.jsx)(Ag,{styles:i})};const Mg=function(e){return(0,Nc.jsx)(Og,{...e,defaultTheme:np,themeId:rp})};function Lg(e){return function(t){return(0,Nc.jsx)(Mg,{styles:"function"===typeof e?n=>e({theme:n,...t}):e})}}function Dg(e){return Kp("MuiTypography",e)}Yp("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Fg={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},zg=Ng,jg=ap("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Ec(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(lp((e=>{let{theme:t}=e;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter((e=>{let[t,n]=e;return"inherit"!==t&&n&&"object"===typeof n})).map((e=>{let[t,n]=e;return{props:{variant:t},style:n}})),...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars||t).palette[n].main}}})),...Object.entries(t.palette?.text||{}).filter((e=>{let[,t]=e;return"string"===typeof t})).map((e=>{let[n]=e;return{props:{color:`text${Ec(n)}`},style:{color:(t.vars||t).palette.text[n]}}})),{props:e=>{let{ownerState:t}=e;return"inherit"!==t.align},style:{textAlign:"var(--Typography-textAlign)"}},{props:e=>{let{ownerState:t}=e;return t.noWrap},style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:e=>{let{ownerState:t}=e;return t.gutterBottom},style:{marginBottom:"0.35em"}},{props:e=>{let{ownerState:t}=e;return t.paragraph},style:{marginBottom:16}}]}}))),$g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Bg=Ma.forwardRef((function(e,t){const{color:n,...r}=fp({props:e,name:"MuiTypography"}),o=zg({...r,...!Fg[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=$g,...f}=o,p={...o,align:i,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h},m=s||(u?"p":h[d]||$g[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return wc({root:["root",i,"inherit"!==e.align&&`align${Ec(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Dg,a)})(p);return(0,Nc.jsx)(jg,{as:m,ref:t,className:bc(g.root,a),...f,ownerState:p,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...f.style}})})),Wg=Bg;function Ug(e){return Kp("MuiDialogTitle",e)}const qg=Yp("MuiDialogTitle",["root"]),Hg=ap(Wg,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),Vg=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiDialogTitle"}),{className:r,id:o,...i}=n,a=n,s=(e=>{const{classes:t}=e;return wc({root:["root"]},Ug,t)})(a),{titleId:l=o}=Ma.useContext(Sm);return(0,Nc.jsx)(Hg,{component:"h2",className:bc(s.root,r),ownerState:a,ref:t,variant:"h6",id:o??l,...i})})),Kg=Vg;const Yg=Yp("MuiBox",["root"]),Gg=tp(),Qg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=kd("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Oh),a=Ma.forwardRef((function(e,a){const s=Dp(n),{className:l,component:c="div",...u}=Ng(e);return(0,Nc.jsx)(i,{as:c,ref:a,className:bc(l,o?o(r):r),theme:t&&s[t]||s,...u})}));return a}({themeId:rp,defaultTheme:Gg,defaultClassName:Yg.root,generateClassName:Hp.generate}),Xg=Qg;function Jg(e){return Kp("MuiDialogContent",e)}Yp("MuiDialogContent",["root","dividers"]);const Zg=ap("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(lp((e=>{let{theme:t}=e;return{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:e=>{let{ownerState:t}=e;return t.dividers},style:{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:e=>{let{ownerState:t}=e;return!t.dividers},style:{[`.${qg.root} + &`]:{paddingTop:0}}}]}}))),ey=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1,...i}=n,a={...n,dividers:o},s=(e=>{const{classes:t,dividers:n}=e;return wc({root:["root",n&&"dividers"]},Jg,t)})(a);return(0,Nc.jsx)(Zg,{className:bc(s.root,r),ownerState:a,ref:t,...i})})),ty=ey,ny=()=>(0,Nc.jsx)(Wg,{fontSize:"0.7rem",component:"sup",children:"\u2122"}),ry=()=>{const[e,t]=(0,Ma.useState)(!1);return(0,Nc.jsxs)(Nc.Fragment,{children:[(0,Nc.jsxs)(Pm,{open:e,onClose:(e,n)=>!n&&t(!1),children:[(0,Nc.jsxs)(Kg,{sx:{paddingRight:8,fontWeight:"600"},children:["Half-Pot (50/50) for PI",(0,Nc.jsx)(ny,{})]}),(0,Nc.jsx)(Eg,{"aria-label":"close",onClick:()=>t(!1),sx:e=>({position:"absolute",right:8,top:8,color:Jh(e.palette.primary.main,.8)}),children:(0,Nc.jsx)(Ig,{children:"close"})}),(0,Nc.jsxs)(ty,{sx:{paddingTop:0},children:[(0,Nc.jsx)(Wg,{variant:"h6"}),(0,Nc.jsxs)(Wg,{variant:"body1",marginBottom:1,children:["Purchase entries with PI",(0,Nc.jsx)(ny,{})," for a chance to win big! There are"," ",(0,Nc.jsx)(Wg,{fontWeight:"600",component:"span",color:"primary",children:"10 winners"})," ","each raffle, and payouts follow a half-pot split:"]}),(0,Nc.jsx)(Wg,{variant:"body1",children:"- 1st place wins \xbd of the total pot"}),(0,Nc.jsx)(Wg,{variant:"body1",children:"- 2nd place wins \xbc"}),(0,Nc.jsx)(Wg,{variant:"body1",marginBottom:1,children:"- 3rd place wins \u215b, and so on"}),(0,Nc.jsxs)(Wg,{variant:"body1",marginBottom:1,children:["After the final payout, any leftover PI",(0,Nc.jsx)(ny,{})," is added back into the pot, and a new countdown begins."]}),(0,Nc.jsxs)(Wg,{variant:"body1",children:["All payouts are made via the PI",(0,Nc.jsx)(ny,{})," blockchain"," ",(0,Nc.jsx)(Wg,{fontWeight:"600",component:"span",color:"primary",children:"after the timer ends."})]}),(0,Nc.jsxs)(Wg,{variant:"caption",sx:{marginTop:3},component:"p",children:["PI",(0,Nc.jsx)(ny,{})," is a trademark of Pi Community Company."]})]})]}),(0,Nc.jsx)(Xg,{position:"absolute",top:8,right:0,children:(0,Nc.jsx)(Eg,{size:"small",color:"primary",onClick:()=>t(!0),children:(0,Nc.jsx)(Ig,{children:"help"})})})]})};function oy(e){let{props:t,name:n,defaultTheme:r,themeId:o}=e,i=Dp(r);return o&&(i=i[o]||i),function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?cp(t.components[n].defaultProps,r):r}({theme:i,name:n,props:t})}const iy=Wh(),ay=Lh(),sy=iy("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Cc(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),ly=e=>oy({props:e,name:"MuiContainer",defaultTheme:ay});const cy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=sy,useThemeProps:n=ly,componentName:r="MuiContainer"}=e,o=t((e=>{let{theme:t,ownerState:n}=e;return{width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}}}}),(e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce(((e,n)=>{const r=n,o=t.breakpoints.values[r];return 0!==o&&(e[t.breakpoints.up(r)]={maxWidth:`${o}${t.breakpoints.unit}`}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return{..."xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},...n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:`${t.breakpoints.values[n.maxWidth]}${t.breakpoints.unit}`}}}})),i=Ma.forwardRef((function(e,t){const i=n(e),{className:a,component:s="div",disableGutters:l=!1,fixed:c=!1,maxWidth:u="lg",classes:d,...h}=i,f={...i,component:s,disableGutters:l,fixed:c,maxWidth:u},p=((e,t)=>{const{classes:n,fixed:r,disableGutters:o,maxWidth:i}=e;return wc({root:["root",i&&`maxWidth${Cc(String(i))}`,r&&"fixed",o&&"disableGutters"]},(e=>Kp(t,e)),n)})(f,r);return(0,Nc.jsx)(o,{as:s,ownerState:f,className:bc(p.root,a),ref:t,...h})}));return i}({createStyledComponent:ap("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ec(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>fp({props:e,name:"MuiContainer"})}),uy=cy;function dy(e){return Kp("MuiButton",e)}const hy=Yp("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]);const fy=Ma.createContext({});const py=Ma.createContext(void 0),my=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],gy=ap(cg,{shouldForwardProp:e=>ip(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ec(n.color)}`],t[`size${Ec(n.size)}`],t[`${n.variant}Size${Ec(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(lp((e=>{let{theme:t}=e;const n="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],r="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${hy.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${hy.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${hy.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${hy.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{"--variant-textColor":(t.vars||t).palette[n].main,"--variant-outlinedColor":(t.vars||t).palette[n].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.5)`:Jh(t.palette[n].main,.5),"--variant-containedColor":(t.vars||t).palette[n].contrastText,"--variant-containedBg":(t.vars||t).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[n].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Jh(t.palette[n].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[n].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Jh(t.palette[n].main,t.palette.action.hoverOpacity)}}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:n,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Jh(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Jh(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${hy.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${hy.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${hy.loading}`]:{color:"transparent"}}}]}}))),yy=ap("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Ec(n.size)}`]]}})((e=>{let{theme:t}=e;return{display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...my]}})),vy=ap("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Ec(n.size)}`]]}})((e=>{let{theme:t}=e;return{display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...my]}})),by=ap("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((e=>{let{theme:t}=e;return{display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}})),wy=ap("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),_y=Ma.forwardRef((function(e,t){const n=Ma.useContext(fy),r=Ma.useContext(py),o=fp({props:cp(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:h,focusVisibleClassName:f,fullWidth:p=!1,id:m,loading:g=null,loadingIndicator:y,loadingPosition:v="center",size:b="medium",startIcon:w,type:_,variant:S="text",...k}=o,x=Rm(m),C=y??(0,Nc.jsx)(wg,{"aria-labelledby":x,color:"inherit",size:16}),E={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:p,loading:g,loadingIndicator:C,loadingPosition:v,size:b,type:_,variant:S},T=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=wc({root:["root",a&&"loading",i,`${i}${Ec(t)}`,`size${Ec(o)}`,`${i}Size${Ec(o)}`,`color${Ec(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${Ec(s)}`],startIcon:["icon","startIcon",`iconSize${Ec(o)}`],endIcon:["icon","endIcon",`iconSize${Ec(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},dy,l);return{...l,...c}})(E),P=(w||g&&"start"===v)&&(0,Nc.jsx)(yy,{className:T.startIcon,ownerState:E,children:w||(0,Nc.jsx)(wy,{className:T.loadingIconPlaceholder,ownerState:E})}),R=(h||g&&"end"===v)&&(0,Nc.jsx)(vy,{className:T.endIcon,ownerState:E,children:h||(0,Nc.jsx)(wy,{className:T.loadingIconPlaceholder,ownerState:E})}),I=r||"",N="boolean"===typeof g?(0,Nc.jsx)("span",{className:T.loadingWrapper,style:{display:"contents"},children:g&&(0,Nc.jsx)(by,{className:T.loadingIndicator,ownerState:E,children:C})}):null;return(0,Nc.jsxs)(gy,{ownerState:E,className:bc(n.className,T.root,l,I),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:bc(T.focusVisible,f),ref:t,type:_,id:g?x:m,...k,classes:T,children:[P,"end"!==v&&N,i,"end"===v&&N,R]})})),Sy=_y;function ky(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i{e.apply(this,o)}),n)}return r.clear=()=>{clearTimeout(t)},r}function xy(e){return parseInt(e,10)||0}const Cy={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const Ey=Ma.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:l}=Ma.useRef(null!=a),c=Ma.useRef(null),u=Pc(t,c),d=Ma.useRef(null),h=Ma.useRef(null),f=Ma.useCallback((()=>{const t=c.current,n=h.current;if(!t||!n)return;const i=tm(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,s=xy(i.paddingBottom)+xy(i.paddingTop),l=xy(i.borderBottomWidth)+xy(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let f=u;o&&(f=Math.max(Number(o)*d,f)),r&&(f=Math.min(Number(r)*d,f)),f=Math.max(f,d);return{outerHeightStyle:f+("border-box"===a?s+l:0),overflowing:Math.abs(f-u)<=1}}),[r,o,e.placeholder]),p=Ma.useCallback((()=>{const e=c.current,t=f();if(!e||!t||(function(e){for(const t in e)return!1;return!0}(n=t)||0===n.outerHeightStyle&&!n.overflowing))return;var n;const r=t.outerHeightStyle;d.current!==r&&(d.current=r,e.style.height=`${r}px`),e.style.overflow=t.overflowing?"hidden":""}),[f]),m=Ma.useRef(-1);Fc((()=>{const e=ky((()=>p())),t=c?.current;if(!t)return;const n=tm(t);let r;return n.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(r=new ResizeObserver((()=>{r.unobserve(t),cancelAnimationFrame(m.current),p(),m.current=requestAnimationFrame((()=>{r.observe(t)}))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(m.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[f,p]),Fc((()=>{p()}));return(0,Nc.jsxs)(Ma.Fragment,{children:[(0,Nc.jsx)("textarea",{value:a,onChange:e=>{l||p(),n&&n(e)},ref:u,rows:o,style:i,...s}),(0,Nc.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:{...Cy,...i,paddingTop:0,paddingBottom:0}})]})})),Ty=Ey;const Py=function(e){return"string"===typeof e};function Ry(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}const Iy=Ma.createContext(void 0);function Ny(){return Ma.useContext(Iy)}const Ay=Fc;function Oy(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function My(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Oy(e.value)&&""!==e.value||t&&Oy(e.defaultValue)&&""!==e.defaultValue)}function Ly(e){return Kp("MuiInputBase",e)}const Dy=Yp("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Fy;const zy=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Ec(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},jy=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},$y=ap("div",{name:"MuiInputBase",slot:"Root",overridesResolver:zy})(lp((e=>{let{theme:t}=e;return{...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Dy.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:"4px 0 5px"}},{props:e=>{let{ownerState:t,size:n}=e;return t.multiline&&"small"===n},style:{paddingTop:1}},{props:e=>{let{ownerState:t}=e;return t.fullWidth},style:{width:"100%"}}]}}))),By=ap("input",{name:"MuiInputBase",slot:"Input",overridesResolver:jy})(lp((e=>{let{theme:t}=e;const n="light"===t.palette.mode,r={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},o={opacity:"0 !important"},i=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Dy.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Dy.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:e=>{let{ownerState:t}=e;return!t.disableInjectingGlobalStyles},style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),Wy=Lg({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Uy=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:l={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:h,endAdornment:f,error:p,fullWidth:m=!1,id:g,inputComponent:y="input",inputProps:v={},inputRef:b,margin:w,maxRows:_,minRows:S,multiline:k=!1,name:x,onBlur:C,onChange:E,onClick:T,onFocus:P,onKeyDown:R,onKeyUp:I,placeholder:N,readOnly:A,renderSuffix:O,rows:M,size:L,slotProps:D={},slots:F={},startAdornment:z,type:j="text",value:$,...B}=n,W=null!=v.value?v.value:$,{current:U}=Ma.useRef(null!=W),q=Ma.useRef(),H=Ma.useCallback((e=>{0}),[]),V=$p(q,b,v.ref,H),[K,Y]=Ma.useState(!1),G=Ny();const Q=Ry({props:n,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=G?G.focused:K,Ma.useEffect((()=>{!G&&d&&K&&(Y(!1),C&&C())}),[G,d,K,C]);const X=G&&G.onFilled,J=G&&G.onEmpty,Z=Ma.useCallback((e=>{My(e)?X&&X():J&&J()}),[X,J]);Ay((()=>{U&&Z({value:W})}),[W,Z,U]);Ma.useEffect((()=>{Z(q.current)}),[]);let ee=y,te=v;k&&"input"===ee&&(te=M?{type:void 0,minRows:M,maxRows:M,...te}:{type:void 0,maxRows:_,minRows:S,...te},ee=Ty);Ma.useEffect((()=>{G&&G.setAdornedStart(Boolean(z))}),[G,z]);const ne={...n,color:Q.color||"primary",disabled:Q.disabled,endAdornment:f,error:Q.error,focused:Q.focused,formControl:G,fullWidth:m,hiddenLabel:Q.hiddenLabel,multiline:k,size:Q.size,startAdornment:z,type:j},re=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:f,type:p}=e;return wc({root:["root",`color${Ec(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&`size${Ec(h)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===p&&"inputTypeSearch",u&&"inputMultiline","small"===h&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Ly,t)})(ne),oe=F.root||l.Root||$y,ie=D.root||c.root||{},ae=F.input||l.Input||By;return te={...te,...D.input??c.input},(0,Nc.jsxs)(Ma.Fragment,{children:[!h&&"function"===typeof Wy&&(Fy||(Fy=(0,Nc.jsx)(Wy,{}))),(0,Nc.jsxs)(oe,{...ie,ref:t,onClick:e=>{q.current&&e.currentTarget===e.target&&q.current.focus(),T&&T(e)},...B,...!Py(oe)&&{ownerState:{...ne,...ie.ownerState}},className:bc(re.root,ie.className,a,A&&"MuiInputBase-readOnly"),children:[z,(0,Nc.jsx)(Iy.Provider,{value:null,children:(0,Nc.jsx)(ae,{"aria-invalid":Q.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:u,disabled:Q.disabled,id:g,onAnimationStart:e=>{Z("mui-auto-fill-cancel"===e.animationName?q.current:{value:"x"})},name:x,placeholder:N,readOnly:A,required:Q.required,rows:M,value:W,onKeyDown:R,onKeyUp:I,type:j,...te,...!Py(ae)&&{as:ee,ownerState:{...ne,...te.ownerState}},ref:V,className:bc(re.input,te.className,A&&"MuiInputBase-readOnly"),onBlur:e=>{C&&C(e),v.onBlur&&v.onBlur(e),G&&G.onBlur?G.onBlur(e):Y(!1)},onChange:function(e){if(!U){const t=e.target||q.current;if(null==t)throw new Error(xc(1));Z({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{P&&P(e),v.onFocus&&v.onFocus(e),G&&G.onFocus?G.onFocus(e):Y(!0)}})}),f,O?O({...Q,startAdornment:z}):null]})]})})),qy=Uy;function Hy(e){return Kp("MuiInput",e)}const Vy={...Dy,...Yp("MuiInput",["root","underline","input"])},Ky=ap($y,{shouldForwardProp:e=>ip(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...zy(e,t),!n.disableUnderline&&t.underline]}})(lp((e=>{let{theme:t}=e;let n="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:e=>{let{ownerState:t}=e;return t.formControl},style:{"label + &":{marginTop:16}}},{props:e=>{let{ownerState:t}=e;return!t.disableUnderline},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Vy.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Vy.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Vy.disabled}, .${Vy.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Vy.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n].main}`}}}}))]}}))),Yy=ap(By,{name:"MuiInput",slot:"Input",overridesResolver:jy})({}),Gy=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,inputComponent:s="input",multiline:l=!1,slotProps:c,slots:u={},type:d="text",...h}=n,f=(e=>{const{classes:t,disableUnderline:n}=e,r=wc({root:["root",!n&&"underline"],input:["input"]},Hy,t);return{...t,...r}})(n),p={root:{ownerState:{disableUnderline:r}}},m=c??i?Rd(c??i,p):p,g=u.root??o.Root??Ky,y=u.input??o.Input??Yy;return(0,Nc.jsx)(qy,{slots:{root:g,input:y},slotProps:m,fullWidth:a,inputComponent:s,multiline:l,ref:t,type:d,...h,classes:f})}));Gy.muiName="Input";const Qy=Gy;function Xy(e){return Kp("MuiFilledInput",e)}const Jy={...Dy,...Yp("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Zy=ap($y,{shouldForwardProp:e=>ip(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...zy(e,t),!n.disableUnderline&&t.underline]}})(lp((e=>{let{theme:t}=e;const n="light"===t.palette.mode,r=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${Jy.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${Jy.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a},variants:[{props:e=>{let{ownerState:t}=e;return!t.disableUnderline},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Jy.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Jy.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Jy.disabled}, .${Jy.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Jy.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{disableUnderline:!1,color:n},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n]?.main}`}}}})),{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:12}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:12}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:"25px 12px 8px"}},{props:e=>{let{ownerState:t,size:n}=e;return t.multiline&&"small"===n},style:{paddingTop:21,paddingBottom:4}},{props:e=>{let{ownerState:t}=e;return t.multiline&&t.hiddenLabel},style:{paddingTop:16,paddingBottom:17}},{props:e=>{let{ownerState:t}=e;return t.multiline&&t.hiddenLabel&&"small"===t.size},style:{paddingTop:8,paddingBottom:9}}]}}))),ev=ap(By,{name:"MuiFilledInput",slot:"Input",overridesResolver:jy})(lp((e=>{let{theme:t}=e;return{paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:e=>{let{ownerState:t}=e;return t.hiddenLabel},style:{paddingTop:16,paddingBottom:17}},{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:0}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:0}},{props:e=>{let{ownerState:t}=e;return t.hiddenLabel&&"small"===t.size},style:{paddingTop:8,paddingBottom:9}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}}))),tv=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,hiddenLabel:s,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:h="text",...f}=n,p={...n,disableUnderline:r,fullWidth:a,inputComponent:l,multiline:c,type:h},m=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l=wc({root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===i&&`size${Ec(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},Xy,t);return{...t,...l}})(n),g={root:{ownerState:p},input:{ownerState:p}},y=u??i?Rd(g,u??i):g,v=d.root??o.Root??Zy,b=d.input??o.Input??ev;return(0,Nc.jsx)(qy,{slots:{root:v,input:b},slotProps:y,fullWidth:a,inputComponent:l,multiline:c,ref:t,type:h,...f,classes:m})}));tv.muiName="Input";const nv=tv;var rv;const ov=ap("fieldset",{shouldForwardProp:ip})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),iv=ap("legend",{shouldForwardProp:ip})(lp((e=>{let{theme:t}=e;return{float:"unset",width:"auto",overflow:"hidden",variants:[{props:e=>{let{ownerState:t}=e;return!t.withLabel},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:e=>{let{ownerState:t}=e;return t.withLabel},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:e=>{let{ownerState:t}=e;return t.withLabel&&t.notched},style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}})));function av(e){return Kp("MuiOutlinedInput",e)}const sv={...Dy,...Yp("MuiOutlinedInput",["root","notchedOutline","input"])},lv=ap($y,{shouldForwardProp:e=>ip(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:zy})(lp((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${sv.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${sv.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${sv.focused} .${sv.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${sv.focused} .${sv.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}})),{props:{},style:{[`&.${sv.error} .${sv.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${sv.disabled} .${sv.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}}},{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:14}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:14}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:"16.5px 14px"}},{props:e=>{let{ownerState:t,size:n}=e;return t.multiline&&"small"===n},style:{padding:"8.5px 14px"}}]}}))),cv=ap((function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return(0,Nc.jsx)(ov,{"aria-hidden":!0,className:r,ownerState:l,...a,children:(0,Nc.jsx)(iv,{ownerState:l,children:s?(0,Nc.jsx)("span",{children:o}):rv||(rv=(0,Nc.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200b"}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(lp((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}}))),uv=ap(By,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:jy})(lp((e=>{let{theme:t}=e;return{padding:"16.5px 14px",...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:e=>{let{ownerState:t}=e;return t.multiline},style:{padding:0}},{props:e=>{let{ownerState:t}=e;return t.startAdornment},style:{paddingLeft:0}},{props:e=>{let{ownerState:t}=e;return t.endAdornment},style:{paddingRight:0}}]}}))),dv=Ma.forwardRef((function(e,t){var n;const r=fp({props:e,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},type:d="text",...h}=r,f=(e=>{const{classes:t}=e,n=wc({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},av,t);return{...t,...n}})(r),p=Ny(),m=Ry({props:r,muiFormControl:p,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),g={...r,color:m.color||"primary",disabled:m.disabled,error:m.error,focused:m.focused,formControl:p,fullWidth:i,hiddenLabel:m.hiddenLabel,multiline:l,size:m.size,type:d},y=u.root??o.Root??lv,v=u.input??o.Input??uv;return(0,Nc.jsx)(qy,{slots:{root:y,input:v},renderSuffix:e=>(0,Nc.jsx)(cv,{ownerState:g,className:f.notchedOutline,label:null!=s&&""!==s&&m.required?n||(n=(0,Nc.jsxs)(Ma.Fragment,{children:[s,"\u2009","*"]})):s,notched:"undefined"!==typeof c?c:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:i,inputComponent:a,multiline:l,ref:t,type:d,...h,classes:{...f,notchedOutline:null}})}));dv.muiName="Input";const hv=dv;function fv(e){return Kp("MuiFormLabel",e)}const pv=Yp("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),mv=ap("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})(lp((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Im()).map((e=>{let[n]=e;return{props:{color:n},style:{[`&.${pv.focused}`]:{color:(t.vars||t).palette[n].main}}}})),{props:{},style:{[`&.${pv.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${pv.error}`]:{color:(t.vars||t).palette.error.main}}}]}}))),gv=ap("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(lp((e=>{let{theme:t}=e;return{[`&.${pv.error}`]:{color:(t.vars||t).palette.error.main}}}))),yv=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiFormLabel"}),{children:r,className:o,color:i,component:a="label",disabled:s,error:l,filled:c,focused:u,required:d,...h}=n,f=Ry({props:n,muiFormControl:Ny(),states:["color","required","focused","disabled","error","filled"]}),p={...n,color:f.color||"primary",component:a,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required},m=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return wc({root:["root",`color${Ec(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},fv,t)})(p);return(0,Nc.jsxs)(mv,{as:a,ownerState:p,className:bc(m.root,o),ref:t,...h,children:[r,f.required&&(0,Nc.jsxs)(gv,{ownerState:p,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]})})),vv=yv;function bv(e){return Kp("MuiInputLabel",e)}Yp("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const wv=ap(vv,{shouldForwardProp:e=>ip(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${pv.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(lp((e=>{let{theme:t}=e;return{display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:e=>{let{ownerState:t}=e;return t.formControl},style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:e=>{let{ownerState:t}=e;return t.shrink},style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:e=>{let{ownerState:t}=e;return!t.disableAnimation},style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:e=>{let{variant:t,ownerState:n}=e;return"filled"===t&&n.shrink},style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:e=>{let{variant:t,ownerState:n,size:r}=e;return"filled"===t&&n.shrink&&"small"===r},style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:e=>{let{variant:t,ownerState:n}=e;return"outlined"===t&&n.shrink},style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}}))),_v=Ma.forwardRef((function(e,t){const n=fp({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:o,shrink:i,variant:a,className:s,...l}=n,c=Ny();let u=i;"undefined"===typeof u&&c&&(u=c.filled||c.focused||c.adornedStart);const d=Ry({props:n,muiFormControl:c,states:["size","variant","required","focused"]}),h={...n,disableAnimation:r,formControl:c,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},f=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l=wc({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"normal"!==r&&`size${Ec(r)}`,a],asterisk:[s&&"asterisk"]},bv,t);return{...t,...l}})(h);return(0,Nc.jsx)(wv,{"data-shrink":u,ref:t,className:bc(f.root,s),...l,ownerState:h,classes:f})})),Sv=_v;const kv=function(e,t){return Ma.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)};function xv(e){return Kp("MuiFormControl",e)}Yp("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Cv=ap("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Ec(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ev=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiFormControl"}),{children:r,className:o,color:i="primary",component:a="div",disabled:s=!1,error:l=!1,focused:c,fullWidth:u=!1,hiddenLabel:d=!1,margin:h="none",required:f=!1,size:p="medium",variant:m="outlined",...g}=n,y={...n,color:i,component:a,disabled:s,error:l,fullWidth:u,hiddenLabel:d,margin:h,required:f,size:p,variant:m},v=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return wc({root:["root","none"!==n&&`margin${Ec(n)}`,r&&"fullWidth"]},xv,t)})(y),[b,w]=Ma.useState((()=>{let e=!1;return r&&Ma.Children.forEach(r,(t=>{if(!kv(t,["Input","Select"]))return;const n=kv(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)})),e})),[_,S]=Ma.useState((()=>{let e=!1;return r&&Ma.Children.forEach(r,(t=>{kv(t,["Input","Select"])&&(My(t.props,!0)||My(t.props.inputProps,!0))&&(e=!0)})),e})),[k,x]=Ma.useState(!1);s&&k&&x(!1);const C=void 0===c||s?k:c;let E;Ma.useRef(!1);const T=Ma.useCallback((()=>{S(!0)}),[]),P=Ma.useCallback((()=>{S(!1)}),[]),R=Ma.useMemo((()=>({adornedStart:b,setAdornedStart:w,color:i,disabled:s,error:l,filled:_,focused:C,fullWidth:u,hiddenLabel:d,size:p,onBlur:()=>{x(!1)},onFocus:()=>{x(!0)},onEmpty:P,onFilled:T,registerEffect:E,required:f,variant:m})),[b,i,s,l,_,C,u,d,E,P,T,f,p,m]);return(0,Nc.jsx)(Iy.Provider,{value:R,children:(0,Nc.jsx)(Cv,{as:a,ownerState:y,className:bc(v.root,o),ref:t,...g,children:r})})})),Tv=Ev;function Pv(e){return Kp("MuiFormHelperText",e)}const Rv=Yp("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Iv;const Nv=ap("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Ec(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(lp((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Rv.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Rv.error}`]:{color:(t.vars||t).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:e=>{let{ownerState:t}=e;return t.contained},style:{marginLeft:14,marginRight:14}}]}}))),Av=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:c,margin:u,required:d,variant:h,...f}=n,p=Ry({props:n,muiFormControl:Ny(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return wc({root:["root",o&&"disabled",i&&"error",r&&`size${Ec(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},Pv,t)})(m);return(0,Nc.jsx)(Nv,{as:i,className:bc(g.root,o),ref:t,...f,ownerState:m,children:" "===r?Iv||(Iv=(0,Nc.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200b"})):r})})),Ov=Av,Mv=Ic,Lv=Ma.createContext();const Dv=function(e){let{value:t,...n}=e;return(0,Nc.jsx)(Lv.Provider,{value:t??!0,...n})};const Fv=function(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:gp(n,r),{props:s,internalRef:l}=bp({...i,externalSlotProps:a}),c=Pc(l,a?.ref,e.additionalProps?.ref);return mp(t,{...s,ref:c},r)};const zv=Ma.createContext({});function jv(e){return Kp("MuiList",e)}Yp("MuiList",["root","padding","dense","subheader"]);const $v=ap("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:e=>{let{ownerState:t}=e;return!t.disablePadding},style:{paddingTop:8,paddingBottom:8}},{props:e=>{let{ownerState:t}=e;return t.subheader},style:{paddingTop:0}}]}),Bv=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:l,...c}=n,u=Ma.useMemo((()=>({dense:a})),[a]),d={...n,component:i,dense:a,disablePadding:s},h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return wc({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},jv,t)})(d);return(0,Nc.jsx)(zv.Provider,{value:u,children:(0,Nc.jsxs)($v,{as:i,className:bc(h.root,o),ref:t,ownerState:d,...c,children:[l,r]})})})),Wv=Bv,Uv=nm,qv=tm;function Hv(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Vv(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Kv(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function Yv(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Kv(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Gv=Ma.forwardRef((function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:c,variant:u="selectedMenu",...d}=e,h=Ma.useRef(null),f=Ma.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Ay((()=>{r&&h.current.focus()}),[r]),Ma.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!h.current.style.width;if(e.clientHeight{Ma.isValidElement(e)?(e.props.disabled||("selectedMenu"===u&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1))):m===t&&(m+=1,m>=i.length&&(m=-1))}));const g=Ma.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),Ma.cloneElement(e,t)}return e}));return(0,Nc.jsx)(Wv,{role:"menu",ref:p,className:a,onKeyDown:e=>{const t=h.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=Mv(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Yv(t,r,l,s,Hv);else if("ArrowUp"===n)e.preventDefault(),Yv(t,r,l,s,Vv);else if("Home"===n)e.preventDefault(),Yv(t,null,l,s,Hv);else if("End"===n)e.preventDefault(),Yv(t,null,l,s,Vv);else if(1===n.length){const o=f.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const l=r&&!o.repeating&&Kv(r,o);o.previousKeyMatched&&(l||Yv(t,r,!1,s,Hv,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...d,children:g})})),Qv=Gv,Xv=ky;function Jv(e){return`scale(${e}, ${e**2})`}const Zv={entering:{opacity:1,transform:Jv(1)},entered:{opacity:1,transform:"none"}},eb="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),tb=Ma.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:h,style:f,timeout:p="auto",TransitionComponent:m=Op,...g}=e,y=qm(),v=Ma.useRef(),b=Fp(),w=Ma.useRef(null),_=$p(w,Rc(o),t),S=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},k=S(c),x=S(((e,t)=>{zp(e);const{duration:n,delay:r,easing:o}=jp({style:f,timeout:p,easing:i},{mode:"enter"});let a;"auto"===p?(a=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:eb?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)})),C=S(l),E=S(h),T=S((e=>{const{duration:t,delay:n,easing:r}=jp({style:f,timeout:p,easing:i},{mode:"exit"});let o;"auto"===p?(o=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=o):o=t,e.style.transition=[b.transitions.create("opacity",{duration:o,delay:n}),b.transitions.create("transform",{duration:eb?o:.666*o,delay:eb?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=Jv(.75),u&&u(e)})),P=S(d);return(0,Nc.jsx)(m,{appear:r,in:a,nodeRef:w,onEnter:x,onEntered:C,onEntering:k,onExit:T,onExited:P,onExiting:E,addEndListener:e=>{"auto"===p&&y.start(v.current||0,e),n&&n(w.current,e)},timeout:"auto"===p?null:p,...g,children:(e,t)=>{let{ownerState:n,...r}=t;return Ma.cloneElement(o,{style:{opacity:0,transform:Jv(.75),visibility:"exited"!==e||a?void 0:"hidden",...Zv[e],...f,...o.props.style},ref:_,...r})}})}));tb&&(tb.muiSupportAuto=!0);const nb=tb;function rb(e){return Kp("MuiPopover",e)}Yp("MuiPopover",["root","paper"]);function ob(e,t){if(!e)return t;if("function"===typeof e||"function"===typeof t)return n=>{const r="function"===typeof t?t(n):t,o="function"===typeof e?e({...n,...r}):e,i=bc(n?.className,r?.className,o?.className);return{...r,...o,...!!i&&{className:i},...r?.style&&o?.style&&{style:{...r.style,...o.style}},...r?.sx&&o?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(o.sx)?o.sx:[o.sx]]}}};const n=t,r=bc(n?.className,e?.className);return{...t,...e,...!!r&&{className:r},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function ib(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function ab(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function sb(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?`${e}px`:e)).join(" ")}function lb(e){return"function"===typeof e?e():e}const cb=ap(mm,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ub=ap(bm,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),db=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:l,className:c,container:u,elevation:d=8,marginThreshold:h=16,open:f,PaperProps:p={},slots:m={},slotProps:g={},transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:v,transitionDuration:b="auto",TransitionProps:w={},disableScrollLock:_=!1,...S}=n,k=Ma.useRef(),x={...n,anchorOrigin:i,anchorReference:s,elevation:d,marginThreshold:h,transformOrigin:y,TransitionComponent:v,transitionDuration:b,TransitionProps:w},C=(e=>{const{classes:t}=e;return wc({root:["root"],paper:["paper"]},rb,t)})(x),E=Ma.useCallback((()=>{if("anchorPosition"===s)return a;const e=lb(o),t=(e&&1===e.nodeType?e:Mv(k.current).body).getBoundingClientRect();return{top:t.top+ib(t,i.vertical),left:t.left+ab(t,i.horizontal)}}),[o,i.horizontal,i.vertical,a,s]),T=Ma.useCallback((e=>({vertical:ib(e,y.vertical),horizontal:ab(e,y.horizontal)})),[y.horizontal,y.vertical]),P=Ma.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if("none"===s)return{top:null,left:null,transformOrigin:sb(n)};const r=E();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,c=a+t.width,u=qv(lb(o)),d=u.innerHeight-h,f=u.innerWidth-h;if(null!==h&&id){const e=l-d;i-=e,n.vertical+=e}if(null!==h&&af){const e=c-f;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:sb(n)}}),[o,s,E,T,h]),[R,I]=Ma.useState(f),N=Ma.useCallback((()=>{const e=k.current;if(!e)return;const t=P(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,I(!0)}),[P]);Ma.useEffect((()=>(_&&window.addEventListener("scroll",N),()=>window.removeEventListener("scroll",N))),[o,_,N]);Ma.useEffect((()=>{f&&N()})),Ma.useImperativeHandle(r,(()=>f?{updatePosition:()=>{N()}}:null),[f,N]),Ma.useEffect((()=>{if(!f)return;const e=Xv((()=>{N()})),t=qv(o);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[o,f,N]);let A=b;const O={slots:{transition:v,...m},slotProps:{transition:w,paper:p,...g}},[M,L]=wp("transition",{elementType:nb,externalForwardedProps:O,ownerState:x,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),N()},onExited:t=>{e.onExited?.(t),I(!1)}}),additionalProps:{appear:!0,in:f}});"auto"!==b||M.muiSupportAuto||(A=void 0);const D=u||(o?Mv(lb(o)).body:void 0),[F,{slots:z,slotProps:j,...$}]=wp("root",{ref:t,elementType:cb,externalForwardedProps:{...O,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:m.backdrop},slotProps:{backdrop:ob("function"===typeof g.backdrop?g.backdrop(x):g.backdrop,{invisible:!0})},container:D,open:f},ownerState:x,className:bc(C.root,c)}),[B,W]=wp("paper",{ref:k,className:C.paper,elementType:ub,externalForwardedProps:O,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:R?void 0:{opacity:0}},ownerState:x});return(0,Nc.jsx)(F,{...$,...!Py(F)&&{slots:z,slotProps:j,disableScrollLock:_},children:(0,Nc.jsx)(M,{...L,timeout:A,children:(0,Nc.jsx)(B,{...W,children:l})})})})),hb=db;function fb(e){return Kp("MuiMenu",e)}Yp("MuiMenu",["root","paper","list"]);const pb={vertical:"top",horizontal:"right"},mb={vertical:"top",horizontal:"left"},gb=ap(hb,{shouldForwardProp:e=>ip(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yb=ap(ub,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),vb=ap(Qv,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),bb=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:o,className:i,disableAutoFocusItem:a=!1,MenuListProps:s={},onClose:l,open:c,PaperProps:u={},PopoverClasses:d,transitionDuration:h="auto",TransitionProps:{onEntering:f,...p}={},variant:m="selectedMenu",slots:g={},slotProps:y={},...v}=n,b=Ma.useContext(Lv)??!1,w={...n,autoFocus:r,disableAutoFocusItem:a,MenuListProps:s,onEntering:f,PaperProps:u,transitionDuration:h,TransitionProps:p,variant:m},_=(e=>{const{classes:t}=e;return wc({root:["root"],paper:["paper"],list:["list"]},fb,t)})(w),S=r&&!a&&c,k=Ma.useRef(null);let x=-1;Ma.Children.map(o,((e,t)=>{Ma.isValidElement(e)&&(e.props.disabled||("selectedMenu"===m&&e.props.selected||-1===x)&&(x=t))}));const C={slots:g,slotProps:{list:s,transition:p,paper:u,...y}},E=Fv({elementType:g.root,externalSlotProps:y.root,ownerState:w,className:[_.root,i]}),[T,P]=wp("paper",{className:_.paper,elementType:yb,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:w}),[R,I]=wp("list",{className:bc(_.list,s.className),elementType:vb,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),l&&l(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:w}),N="function"===typeof C.slotProps.transition?C.slotProps.transition(w):C.slotProps.transition;return(0,Nc.jsx)(gb,{onClose:l,anchorOrigin:{vertical:"bottom",horizontal:b?"right":"left"},transformOrigin:b?pb:mb,slots:{root:g.root,paper:T,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:E,paper:P,backdrop:"function"===typeof y.backdrop?y.backdrop(w):y.backdrop,transition:{...N,onEntering:function(){for(var e=arguments.length,t=new Array(e),n=0;n{k.current&&k.current.adjustStyleForScrollbar(e,{direction:b?"rtl":"ltr"}),f&&f(e,t)})(...t),N?.onEntering?.(...t)}}},open:c,ref:t,transitionDuration:h,ownerState:w,...v,classes:d,children:(0,Nc.jsx)(R,{actions:k,autoFocus:r&&(-1===x||a),autoFocusItem:S,variant:m,...I,children:o})})})),wb=bb;function _b(e){return Kp("MuiNativeSelect",e)}const Sb=Yp("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),kb=ap("select")((e=>{let{theme:t}=e;return{MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Sb.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:e=>{let{ownerState:t}=e;return"filled"!==t.variant&&"outlined"!==t.variant},style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]}})),xb=ap(kb,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ip,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Sb.multiple}`]:t.multiple}]}})({}),Cb=ap("svg")((e=>{let{theme:t}=e;return{position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${Sb.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:e=>{let{ownerState:t}=e;return t.open},style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]}})),Eb=ap(Cb,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ec(n.variant)}`],n.open&&t.iconOpen]}})({}),Tb=Ma.forwardRef((function(e,t){const{className:n,disabled:r,error:o,IconComponent:i,inputRef:a,variant:s="standard",...l}=e,c={...e,disabled:r,variant:s,error:o},u=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return wc({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ec(n)}`,i&&"iconOpen",r&&"disabled"]},_b,t)})(c);return(0,Nc.jsxs)(Ma.Fragment,{children:[(0,Nc.jsx)(xb,{ownerState:c,className:bc(u.select,n),disabled:r,ref:a||t,...l}),e.multiple?null:(0,Nc.jsx)(Eb,{as:i,ownerState:c,className:u.icon})]})})),Pb=Tb;const Rb=function(e){let{controlled:t,default:n,name:r,state:o="value"}=e;const{current:i}=Ma.useRef(void 0!==t),[a,s]=Ma.useState(n);return[i?t:a,Ma.useCallback((e=>{i||s(e)}),[])]};function Ib(e){return Kp("MuiSelect",e)}const Nb=Yp("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Ab;const Ob=ap(kb,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Nb.select}`]:t.select},{[`&.${Nb.select}`]:t[n.variant]},{[`&.${Nb.error}`]:t.error},{[`&.${Nb.multiple}`]:t.multiple}]}})({[`&.${Nb.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Mb=ap(Cb,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ec(n.variant)}`],n.open&&t.iconOpen]}})({}),Lb=ap("input",{shouldForwardProp:e=>op(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Db(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function Fb(e){return null==e||"string"===typeof e&&!e.trim()}const zb=Ma.forwardRef((function(e,t){const{"aria-describedby":n,"aria-label":r,autoFocus:o,autoWidth:i,children:a,className:s,defaultOpen:l,defaultValue:c,disabled:u,displayEmpty:d,error:h=!1,IconComponent:f,inputRef:p,labelId:m,MenuProps:g={},multiple:y,name:v,onBlur:b,onChange:w,onClose:_,onFocus:S,onOpen:k,open:x,readOnly:C,renderValue:E,required:T,SelectDisplayProps:P={},tabIndex:R,type:I,value:N,variant:A="standard",...O}=e,[M,L]=Rb({controlled:N,default:c,name:"Select"}),[D,F]=Rb({controlled:x,default:l,name:"Select"}),z=Ma.useRef(null),j=Ma.useRef(null),[$,B]=Ma.useState(null),{current:W}=Ma.useRef(null!=x),[U,q]=Ma.useState(),H=$p(t,p),V=Ma.useCallback((e=>{j.current=e,e&&B(e)}),[]),K=$?.parentNode;Ma.useImperativeHandle(H,(()=>({focus:()=>{j.current.focus()},node:z.current,value:M})),[M]),Ma.useEffect((()=>{l&&D&&$&&!W&&(q(i?null:K.clientWidth),j.current.focus())}),[$,i]),Ma.useEffect((()=>{o&&j.current.focus()}),[o]),Ma.useEffect((()=>{if(!m)return;const e=Mv(j.current).getElementById(m);if(e){const t=()=>{getSelection().isCollapsed&&j.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[m]);const Y=(e,t)=>{e?k&&k(t):_&&_(t),W||(q(i?null:K.clientWidth),F(e))},G=Ma.Children.toArray(a),Q=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(M)?M.slice():[];const t=M.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),M!==n&&(L(n),w)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:v}}),w(o,e)}y||Y(!1,t)}},X=null!==$&&D;let J,Z;delete O["aria-invalid"];const ee=[];let te=!1,ne=!1;(My({value:M})||d)&&(E?J=E(M):te=!0);const re=G.map((e=>{if(!Ma.isValidElement(e))return null;let t;if(y){if(!Array.isArray(M))throw new Error(xc(2));t=M.some((t=>Db(t,e.props.value))),t&&te&&ee.push(e.props.children)}else t=Db(M,e.props.value),t&&te&&(Z=e.props.children);return t&&(ne=!0),Ma.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Q(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(J=y?0===ee.length?null:ee.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return wc({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ec(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Ib,t)})(se),ce={...g.PaperProps,...g.slotProps?.paper},ue=kc();return(0,Nc.jsxs)(Ma.Fragment,{children:[(0,Nc.jsx)(Ob,{as:"div",ref:V,tabIndex:oe,role:"combobox","aria-controls":X?ue:void 0,"aria-disabled":u?"true":void 0,"aria-expanded":X?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[m,ae].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":T?"true":void 0,"aria-invalid":h?"true":void 0,onKeyDown:e=>{if(!C){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:u||C?null:e=>{0===e.button&&(e.preventDefault(),j.current.focus(),Y(!0,e))},onBlur:e=>{!X&&b&&(Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:v}}),b(e))},onFocus:S,...P,ownerState:se,className:bc(P.className,le.select,s),id:ae,children:Fb(J)?Ab||(Ab=(0,Nc.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200b"})):J}),(0,Nc.jsx)(Lb,{"aria-invalid":h,value:Array.isArray(M)?M.join(","):M,name:v,ref:z,"aria-hidden":!0,onChange:e=>{const t=G.find((t=>t.props.value===e.target.value));void 0!==t&&(L(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:u,className:le.nativeInput,autoFocus:o,required:T,...O,ownerState:se}),(0,Nc.jsx)(Mb,{as:f,className:le.icon,ownerState:se}),(0,Nc.jsx)(wb,{id:`menu-${v||""}`,anchorEl:K,open:X,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":m,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ue,...g.MenuListProps},paper:{...ce,style:{minWidth:ie,...null!=ce?ce.style:null}}},children:re})]})})),jb=zb;function $b(e){return Kp("MuiSvgIcon",e)}Yp("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Bb=ap("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ec(n.color)}`],t[`fontSize${Ec(n.fontSize)}`]]}})(lp((e=>{let{theme:t}=e;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:t.transitions?.create?.("fill",{duration:(t.vars??t).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:t.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:t.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter((e=>{let[,t]=e;return t&&t.main})).map((e=>{let[n]=e;return{props:{color:n},style:{color:(t.vars??t).palette?.[n]?.main}}})),{props:{color:"action"},style:{color:(t.vars??t).palette?.action?.active}},{props:{color:"disabled"},style:{color:(t.vars??t).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}}))),Wb=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:i="inherit",component:a="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24",...h}=n,f=Ma.isValidElement(r)&&"svg"===r.type,p={...n,color:i,component:a,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:f},m={};c||(m.viewBox=d);const g=(e=>{const{color:t,fontSize:n,classes:r}=e;return wc({root:["root","inherit"!==t&&`color${Ec(t)}`,`fontSize${Ec(n)}`]},$b,r)})(p);return(0,Nc.jsxs)(Bb,{as:a,className:bc(g.root,o),focusable:"false",color:l,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t,...m,...h,...f&&r.props,ownerState:p,children:[f?r.props.children:r,u?(0,Nc.jsx)("title",{children:u}):null]})}));Wb.muiName="SvgIcon";const Ub=Wb;const qb=function(e,t){function n(n,r){return(0,Nc.jsx)(Ub,{"data-testid":`${t}Icon`,ref:r,...n,children:e})}return n.muiName=Ub.muiName,Ma.memo(Ma.forwardRef(n))}((0,Nc.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Hb={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ip(e)&&"variant"!==e,slot:"Root"},Vb=ap(Qy,Hb)(""),Kb=ap(hv,Hb)(""),Yb=ap(nv,Hb)(""),Gb=Ma.forwardRef((function(e,t){const n=fp({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:i={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:c=qb,id:u,input:d,inputProps:h,label:f,labelId:p,MenuProps:m,multiple:g=!1,native:y=!1,onClose:v,onOpen:b,open:w,renderValue:_,SelectDisplayProps:S,variant:k="outlined",...x}=n,C=y?Pb:jb,E=Ry({props:n,muiFormControl:Ny(),states:["variant","error"]}),T=E.variant||k,P={...n,variant:T,classes:i},R=(e=>{const{classes:t}=e,n=wc({root:["root"]},Ib,t);return{...t,...n}})(P),{root:I,...N}=R,A=d||{standard:(0,Nc.jsx)(Vb,{ownerState:P}),outlined:(0,Nc.jsx)(Kb,{label:f,ownerState:P}),filled:(0,Nc.jsx)(Yb,{ownerState:P})}[T],O=$p(t,Rc(A));return(0,Nc.jsx)(Ma.Fragment,{children:Ma.cloneElement(A,{inputComponent:C,inputProps:{children:o,error:E.error,IconComponent:c,variant:T,type:void 0,multiple:g,...y?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:p,MenuProps:m,onClose:v,onOpen:b,open:w,renderValue:_,SelectDisplayProps:{id:u,...S}},...h,classes:h?Rd(N,h.classes):N,...d?d.props.inputProps:{}},...(g&&y||l)&&"outlined"===T?{notched:!0}:{},ref:O,className:bc(A.props.className,a,R.root),...!d&&{variant:T},...x})})}));Gb.muiName="Select";const Qb=Gb;function Xb(e){return Kp("MuiTextField",e)}Yp("MuiTextField",["root"]);const Jb={standard:Qy,filled:nv,outlined:hv},Zb=ap(Tv,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ew=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:f,id:p,InputLabelProps:m,inputProps:g,InputProps:y,inputRef:v,label:b,maxRows:w,minRows:_,multiline:S=!1,name:k,onBlur:x,onChange:C,onFocus:E,placeholder:T,required:P=!1,rows:R,select:I=!1,SelectProps:N,slots:A={},slotProps:O={},type:M,value:L,variant:D="outlined",...F}=n,z={...n,autoFocus:o,color:s,disabled:c,error:u,fullWidth:h,multiline:S,required:P,select:I,variant:D},j=(e=>{const{classes:t}=e;return wc({root:["root"]},Xb,t)})(z);const $=kc(p),B=f&&$?`${$}-helper-text`:void 0,W=b&&$?`${$}-label`:void 0,U=Jb[D],q={slots:A,slotProps:{input:y,inputLabel:m,htmlInput:g,formHelperText:d,select:N,...O}},H={},V=q.slotProps.inputLabel;"outlined"===D&&(V&&"undefined"!==typeof V.shrink&&(H.notched=V.shrink),H.label=b),I&&(N&&N.native||(H.id=void 0),H["aria-describedby"]=void 0);const[K,Y]=wp("input",{elementType:U,externalForwardedProps:q,additionalProps:H,ownerState:z}),[G,Q]=wp("inputLabel",{elementType:Sv,externalForwardedProps:q,ownerState:z}),[X,J]=wp("htmlInput",{elementType:"input",externalForwardedProps:q,ownerState:z}),[Z,ee]=wp("formHelperText",{elementType:Ov,externalForwardedProps:q,ownerState:z}),[te,ne]=wp("select",{elementType:Qb,externalForwardedProps:q,ownerState:z}),re=(0,Nc.jsx)(K,{"aria-describedby":B,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:h,multiline:S,name:k,rows:R,maxRows:w,minRows:_,type:M,value:L,id:$,inputRef:v,onBlur:x,onChange:C,onFocus:E,placeholder:T,inputProps:J,slots:{input:A.htmlInput?X:void 0},...Y});return(0,Nc.jsxs)(Zb,{className:bc(j.root,a),disabled:c,error:u,fullWidth:h,ref:t,required:P,color:s,variant:D,ownerState:z,...F,children:[null!=b&&""!==b&&(0,Nc.jsx)(G,{htmlFor:$,id:W,...Q,children:b}),I?(0,Nc.jsx)(te,{"aria-describedby":B,id:$,labelId:W,value:L,input:re,...ne,children:i}):re,f&&(0,Nc.jsx)(Z,{id:B,...ee,children:f})]})})),tw=ew,nw=(e,t)=>{const n=(0,Ma.useCallback)((n=>{let{amount:r,numberOfTickets:o}=n;Pi.createPayment({amount:r,memo:`Purchase ${o} tickets to the Half-Pot`,metadata:{numberOfTickets:o,halfPotId:e}},{onReadyForServerApproval:e=>{console.log("onReadyForServerApproval",e),(async e=>{(await fc.post(`/payments/${e}/approve`)).data})(e)},onReadyForServerCompletion:(e,n)=>{console.log("onReadyForServerCompletion",e,n),pc(e,n).then((e=>{let{entries:n}=e;console.log("Payment committed"),t(n)})).catch((e=>{console.error("Error committing payment",e)}))},onCancel:e=>{},onError:(e,t)=>{console.log("onError",e,t)}})}),[e]);return{buyTicket:n}},rw=ap(Sy)({height:36,width:36,minWidth:36,borderRadius:18,".MuiButton-startIcon":{margin:0}}),ow=ap(tw)((e=>{let{theme:t}=e;return{"& .MuiInputLabel-root":{right:0,textAlign:"center",color:Jh(t.palette.secondary.main,.7),top:4},"& .MuiInputLabel-shrink":{color:t.palette.secondary.main,margin:"0 auto",position:"absolute",right:0,left:1,width:150,top:0},"& .MuiOutlinedInput-notchedOutline":{"& legend ":{margin:"0 auto"},"& fieldset":{borderColor:Jh(t.palette.secondary.main,.5)}},"& .Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Jh(t.palette.secondary.main,.5)},"& :hover .MuiOutlinedInput-notchedOutline":{borderColor:Jh(t.palette.secondary.main,.5)},"& input":{color:t.palette.secondary.main,textAlign:"center",fontSize:"1.4rem",padding:10,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none",appearance:"none",margin:0},"&[type=number]":{"-moz-appearance":"textfield",appearance:"textfield"}},"& fieldset":{borderColor:Jh(t.palette.secondary.main,.5)}}})),iw=ap(Pm)((e=>{let{theme:t}=e;return{"& .MuiDialog-paper":{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)"}}})),aw=e=>{let{halfPotId:t,onPurchase:n}=e;const[r,o]=(0,Ma.useState)(0),[i,a]=(0,Ma.useState)(!1),[s,l]=(0,Ma.useState)(!1),{buyTicket:c}=nw(t,(e=>{n(e),a(!1),o(0)})),u=.25*r-.25*Math.floor(r/5),d=(0,Ma.useCallback)((e=>()=>{o((t=>{let n=Math.max(0,t+e);const r=(n+1)%5===0;return e>0&&r?n++:e<0&&r&&n--,n}))}),[]);return(0,Nc.jsxs)(Nc.Fragment,{children:[(0,Nc.jsxs)(iw,{fullScreen:!0,open:i,onClose:(e,t)=>!t&&a(!1),children:[(0,Nc.jsx)(Kg,{sx:{fontWeight:"600",textAlign:"center"},children:"Purchase Tickets"}),(0,Nc.jsx)(ty,{sx:{position:"relative",paddingTop:8},children:(0,Nc.jsxs)(uy,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,paddingTop:1},children:[(0,Nc.jsxs)(uy,{sx:{display:"flex",justifyContent:"center",alignItems:"center",gap:2},children:[(0,Nc.jsx)(rw,{variant:"outlined",color:"secondary",startIcon:(0,Nc.jsx)(Ig,{children:"remove"}),onClick:d(-1)}),(0,Nc.jsx)(ow,{label:"# of Tickets",type:"number",value:r||"",onChange:e=>o(+e.target.value),onBlur:e=>{let t=+e.target.value;(t+1)%5===0&&t++,o(t)},sx:{textAlign:"center"},color:"secondary",size:"small"}),(0,Nc.jsx)(rw,{variant:"outlined",color:"secondary",startIcon:(0,Nc.jsx)(Ig,{children:"add"}),onClick:d(1)})]}),(0,Nc.jsxs)(uy,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,Nc.jsx)(Wg,{fontSize:"1.2rem",fontWeight:"400",children:"0.25 \u03c0 = 1 ticket"}),(0,Nc.jsx)(Wg,{fontSize:"1.2rem",fontWeight:"400",children:"1 \u03c0 = 5 tickets"}),(0,Nc.jsxs)(Wg,{variant:"h4",marginTop:2,sx:{fontWeight:"600"},children:["Total: ",u," \u03c0"]}),s&&(0,Nc.jsx)(Wg,{variant:"body2",color:"error",children:"Please enter a valid number of tickets"})]}),(0,Nc.jsxs)(Xg,{sx:{position:"absolute",bottom:0,width:"100%",padding:2,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:2},children:[(0,Nc.jsx)(Sy,{variant:"contained",color:"secondary",sx:{width:"100%"},onClick:()=>{u<=0||r<=0?l(!0):(l(!1),c({amount:u,numberOfTickets:r}))},children:"Continue"}),(0,Nc.jsx)(Sy,{variant:"outlined",color:"secondary",sx:{width:"100%"},onClick:()=>a(!1),children:"Cancel"})]})]})})]}),(0,Nc.jsx)(Xg,{style:{position:"fixed",bottom:0,padding:24,display:"flex",justifyContent:"center",width:"100%"},children:(0,Nc.jsx)(Sy,{size:"large",sx:{width:"100%",maxWidth:"450px",boxShadow:5},variant:"contained",onClick:()=>a(!0),children:"Buy Ticket(s)"})})]})};let sw;if("object"===typeof document){let e=document.querySelector('[name="emotion-insertion-point"]');if(!e){e=document.createElement("meta"),e.setAttribute("name","emotion-insertion-point"),e.setAttribute("content","");const t=document.querySelector("head");t&&t.prepend(e)}class t extends $c{insert(t,n){return this.key&&this.key.endsWith("global")&&(this.before=e),super.insert(t,n)}}sw=((e,t)=>{const n=Wu(e);return n.sheet=new t({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n})({key:"css",insertionPoint:e},t)}function lw(e){const{injectFirst:t,children:n}=e;return t&&sw?(0,Nc.jsx)(ld,{value:sw,children:n}):n}const cw=Ma.createContext(null);function uw(){return Ma.useContext(cw)}const dw="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const hw=function(e){const{children:t,theme:n}=e,r=uw(),o=Ma.useMemo((()=>{const e=null===r?{...n}:function(e,t){if("function"===typeof t)return t(e);return{...e,...t}}(r,n);return null!=e&&(e[dw]=null!==r),e}),[n,r]);return(0,Nc.jsx)(cw.Provider,{value:o,children:t})},fw={};function pw(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Ma.useMemo((()=>{const o=e&&t[e]||t;if("function"===typeof n){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}}),[e,t,n,r])}const mw=function(e){const{children:t,theme:n,themeId:r}=e,o=Mp(fw),i=uw()||fw,a=pw(r,o,n),s=pw(r,i,n,!0),l="rtl"===(r?a[r]:a).direction;return(0,Nc.jsx)(hw,{theme:s,children:(0,Nc.jsx)(ud.Provider,{value:a,children:(0,Nc.jsx)(Dv,{value:l,children:(0,Nc.jsx)(hp,{value:r?a[r].components:a.components,children:t})})})})};function gw(e){let{theme:t,...n}=e;const r=rp in t?t[rp]:void 0;return(0,Nc.jsx)(mw,{...n,themeId:r?rp:void 0,theme:r||t})}const yw="mode",vw="color-scheme",bw="data-color-scheme";function ww(){}const _w=e=>{let{key:t,storageWindow:n}=e;return n||"undefined"===typeof window||(n=window),{get(e){if("undefined"===typeof window)return;if(!n)return e;let r;try{r=n.localStorage.getItem(t)}catch{}return r||e},set:e=>{if(n)try{n.localStorage.setItem(t,e)}catch{}},subscribe:e=>{if(!n)return ww;const r=n=>{const r=n.newValue;n.key===t&&e(r)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}}};function Sw(){}function kw(e){if("undefined"!==typeof window&&"function"===typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function xw(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function Cw(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=yw,colorSchemeStorageKey:a=vw,storageWindow:s=("undefined"===typeof window?void 0:window),storageManager:l=_w,noSsr:c=!1}=e,u=o.join(","),d=o.length>1,h=Ma.useMemo((()=>l?.({key:i,storageWindow:s})),[l,i,s]),f=Ma.useMemo((()=>l?.({key:`${a}-light`,storageWindow:s})),[l,a,s]),p=Ma.useMemo((()=>l?.({key:`${a}-dark`,storageWindow:s})),[l,a,s]),[m,g]=Ma.useState((()=>{const e=h?.get(t)||t,o=f?.get(n)||n,i=p?.get(r)||r;return{mode:e,systemMode:kw(e),lightColorScheme:o,darkColorScheme:i}})),[y,v]=Ma.useState(c||!d);Ma.useEffect((()=>{v(!0)}),[]);const b=function(e){return xw(e,(t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0))}(m),w=Ma.useCallback((e=>{g((n=>{if(e===n.mode)return n;const r=e??t;return h?.set(r),{...n,mode:r,systemMode:kw(r)}}))}),[h,t]),_=Ma.useCallback((e=>{e?"string"===typeof e?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g((t=>{const n={...t};return xw(t,(t=>{"light"===t&&(f?.set(e),n.lightColorScheme=e),"dark"===t&&(p?.set(e),n.darkColorScheme=e)})),n})):g((t=>{const o={...t},i=null===e.light?n:e.light,a=null===e.dark?r:e.dark;return i&&(u.includes(i)?(o.lightColorScheme=i,f?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),a&&(u.includes(a)?(o.darkColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o})):g((e=>(f?.set(n),p?.set(r),{...e,lightColorScheme:n,darkColorScheme:r})))}),[u,f,p,n,r]),S=Ma.useCallback((e=>{"system"===m.mode&&g((t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}}))}),[m.mode]),k=Ma.useRef(S);return k.current=S,Ma.useEffect((()=>{if("function"!==typeof window.matchMedia||!d)return;const e=function(){return k.current(...arguments)},t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}}),[d]),Ma.useEffect((()=>{if(d){const e=h?.subscribe((e=>{e&&!["light","dark","system"].includes(e)||w(e||t)}))||Sw,n=f?.subscribe((e=>{e&&!u.match(e)||_({light:e})}))||Sw,r=p?.subscribe((e=>{e&&!u.match(e)||_({dark:e})}))||Sw;return()=>{e(),n(),r()}}}),[_,w,u,t,s,d,h,f,p]),{...m,mode:y?m.mode:void 0,systemMode:y?m.systemMode:void 0,colorScheme:y?b:void 0,setMode:w,setColorScheme:_}}const Ew={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:Tw,useColorScheme:Pw,getInitColorSchemeScript:Rw}=function(e){const{themeId:t,theme:n={},modeStorageKey:r=yw,colorSchemeStorageKey:o=vw,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=Ma.createContext(void 0),u={},d={},h="string"===typeof a?a:a.light,f="string"===typeof a?a:a.dark;return{CssVarsProvider:function(e){const{children:l,theme:h,modeStorageKey:f=r,colorSchemeStorageKey:p=o,disableTransitionOnChange:m=i,storageManager:g,storageWindow:y=("undefined"===typeof window?void 0:window),documentNode:v=("undefined"===typeof document?void 0:document),colorSchemeNode:b=("undefined"===typeof document?void 0:document.documentElement),disableNestedContext:w=!1,disableStyleSheetGeneration:_=!1,defaultMode:S="system",noSsr:k}=e,x=Ma.useRef(!1),C=uw(),E=Ma.useContext(c),T=!!E&&!w,P=Ma.useMemo((()=>h||("function"===typeof n?n():n)),[h]),R=P[t],I=R||P,{colorSchemes:N=u,components:A=d,cssVarPrefix:O}=I,M=Object.keys(N).filter((e=>!!N[e])).join(","),L=Ma.useMemo((()=>M.split(",")),[M]),D="string"===typeof a?a:a.light,F="string"===typeof a?a:a.dark,z=N[D]&&N[F]?S:N[I.defaultColorScheme]?.palette?.mode||I.palette?.mode,{mode:j,setMode:$,systemMode:B,lightColorScheme:W,darkColorScheme:U,colorScheme:q,setColorScheme:H}=Cw({supportedColorSchemes:L,defaultLightColorScheme:D,defaultDarkColorScheme:F,modeStorageKey:f,colorSchemeStorageKey:p,defaultMode:z,storageManager:g,storageWindow:y,noSsr:k});let V=j,K=q;T&&(V=E.mode,K=E.colorScheme);const Y=Ma.useMemo((()=>{const e=K||I.defaultColorScheme,t=I.generateThemeVars?.()||I.vars,n={...I,components:A,colorSchemes:N,cssVarPrefix:O,vars:t};if("function"===typeof n.generateSpacing&&(n.spacing=n.generateSpacing()),e){const t=N[e];t&&"object"===typeof t&&Object.keys(t).forEach((e=>{t[e]&&"object"===typeof t[e]?n[e]={...n[e],...t[e]}:n[e]=t[e]}))}return s?s(n):n}),[I,K,A,N,O]),G=I.colorSchemeSelector;Fc((()=>{if(K&&b&&G&&"media"!==G){const e=G;let t=G;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))b.classList.remove(...L.map((e=>t.substring(1).replace("%s",e)))),b.classList.add(t.substring(1).replace("%s",K));else{const e=t.replace("%s",K).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||L.forEach((e=>{b.removeAttribute(t.replace(K,e))})),b.setAttribute(t,n?n.replace(/"|'/g,""):"")}else b.setAttribute(t,K)}}}),[K,G,b,L]),Ma.useEffect((()=>{let e;if(m&&x.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout((()=>{v.head.removeChild(t)}),1)}return()=>{clearTimeout(e)}}),[K,m,v]),Ma.useEffect((()=>(x.current=!0,()=>{x.current=!1})),[]);const Q=Ma.useMemo((()=>({allColorSchemes:L,colorScheme:K,darkColorScheme:U,lightColorScheme:W,mode:V,setColorScheme:H,setMode:$,systemMode:B})),[L,K,U,W,V,H,$,B,Y.colorSchemeSelector]);let X=!0;(_||!1===I.cssVariables||T&&C?.cssVarPrefix===O)&&(X=!1);const J=(0,Nc.jsxs)(Ma.Fragment,{children:[(0,Nc.jsx)(mw,{themeId:R?t:void 0,theme:Y,children:l}),X&&(0,Nc.jsx)(Ag,{styles:Y.generateStyleSheets?.()||[]})]});return T?J:(0,Nc.jsx)(c.Provider,{value:Q,children:J})},useColorScheme:()=>Ma.useContext(c)||l,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=yw,colorSchemeStorageKey:i=vw,attribute:a=bw,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return(0,Nc.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"===typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${o}') || '${t}';\n const dark = localStorage.getItem('${i}-dark') || '${r}';\n const light = localStorage.getItem('${i}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:o,defaultLightColorScheme:h,defaultDarkColorScheme:f,modeStorageKey:r,...e})}}({themeId:rp,theme:()=>tp({cssVariables:!0}),colorSchemeStorageKey:Ew.colorSchemeStorageKey,modeStorageKey:Ew.modeStorageKey,defaultColorScheme:{light:Ew.defaultLightColorScheme,dark:Ew.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Pf(e.palette,e.typography)};return t.unstable_sx=function(e){return Oh({sx:e,theme:this})},t}});const Iw=Tw;function Nw(e){let{theme:t,...n}=e;if("function"===typeof t)return(0,Nc.jsx)(gw,{theme:t,...n});return"colorSchemes"in(rp in t?t[rp]:t)?(0,Nc.jsx)(Iw,{theme:t,...n}):(0,Nc.jsx)(gw,{theme:t,...n})}function Aw(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Ow(e){return parseFloat(e)}function Mw(e){return Kp("MuiSkeleton",e)}Yp("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Lw=Ym` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `,Dw=Ym` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `,Fw="string"!==typeof Lw?Km` animation: ${Lw} 2s ease-in-out 0.5s infinite; `:null,zw="string"!==typeof Dw?Km` &::after { animation: ${Dw} 2s linear 0.5s infinite; } `:null,jw=ap("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(lp((e=>{let{theme:t}=e;const n=Aw(t.shape.borderRadius)||"px",r=Ow(t.shape.borderRadius);return{display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:Jh(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:e=>{let{ownerState:t}=e;return t.hasChildren},style:{"& > *":{visibility:"hidden"}}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.width},style:{maxWidth:"fit-content"}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.height},style:{height:"auto"}},{props:{animation:"pulse"},style:Fw||{animation:`${Lw} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(t.vars||t).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:zw||{"&::after":{animation:`${Dw} 2s linear 0.5s infinite`}}}]}}))),$w=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:o,component:i="span",height:a,style:s,variant:l="text",width:c,...u}=n,d={...n,animation:r,component:i,variant:l,hasChildren:Boolean(u.children)},h=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return wc({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},Mw,t)})(d);return(0,Nc.jsx)(jw,{as:i,ref:t,className:bc(h.root,o),ownerState:d,...u,style:{width:c,height:a,...s}})})),Bw=$w,Ww="function"===typeof Lg({}),Uw=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),qw=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),Hw=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={};t&&e.colorSchemes&&"function"===typeof e.getColorSchemeSelector&&Object.entries(e.colorSchemes).forEach((t=>{let[r,o]=t;const i=e.getColorSchemeSelector(r);i.startsWith("@")?n[i]={":root":{colorScheme:o.palette?.mode}}:n[i.replace(/\s*&/,"")]={colorScheme:o.palette?.mode}}));let r={html:Uw(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...qw(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const o=e.components?.MuiCssBaseline?.styleOverrides;return o&&(r=[r,o]),r},Vw="mui-ecs",Kw=Lg(Ww?e=>{let{theme:t,enableColorScheme:n}=e;return Hw(t,n)}:e=>{let{theme:t}=e;return(e=>{const t=Hw(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${Vw})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach((t=>{let[r,o]=t;const i=e.getColorSchemeSelector(r);i.startsWith("@")?n[i]={[`:root:not(:has(.${Vw}))`]:{colorScheme:o.palette?.mode}}:n[i.replace(/\s*&/,"")]={[`&:not(:has(.${Vw}))`]:{colorScheme:o.palette?.mode}}})),t})(t)});const Yw=function(e){const t=fp({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,Nc.jsxs)(Ma.Fragment,{children:[Ww&&(0,Nc.jsx)(Kw,{enableColorScheme:r}),!Ww&&!r&&(0,Nc.jsx)("span",{className:Vw,style:{display:"none"}}),n]})};function Gw(e){return Kp("MuiCard",e)}Yp("MuiCard",["root"]);const Qw=ap(bm,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),Xw=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiCard"}),{className:r,raised:o=!1,...i}=n,a={...n,raised:o},s=(e=>{const{classes:t}=e;return wc({root:["root"]},Gw,t)})(a);return(0,Nc.jsx)(Qw,{className:bc(s.root,r),elevation:o?8:void 0,ref:t,ownerState:a,...i})})),Jw=Xw;function Zw(e){return Kp("MuiCardContent",e)}Yp("MuiCardContent",["root"]);const e_=ap("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),t_=Ma.forwardRef((function(e,t){const n=fp({props:e,name:"MuiCardContent"}),{className:r,component:o="div",...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return wc({root:["root"]},Zw,t)})(a);return(0,Nc.jsx)(e_,{as:o,className:bc(s.root,r),ownerState:a,ref:t,...i})})),n_=t_,r_=ap(Ig)({fontSize:"88px !important"}),o_={width:"calc(100% - 48px)",maxWidth:"600px"},i_=e=>{const[t,n]=(0,Ma.useState)(!1),{loading:r,icon:o,title:i,value:a,subValue:s,valueSize:l}=e;if(r)return(0,Nc.jsx)(Xg,{sx:o_,children:(0,Nc.jsx)(Bw,{variant:"rounded",width:"100%",height:"100px"})});const c=[];return Array.isArray(a)?c.push(...a):c.push(a),(0,Nc.jsx)(Jw,{sx:o_,elevation:6,children:(0,Nc.jsxs)(n_,{children:[(0,Nc.jsxs)(Xg,{display:"flex",alignItems:"flex-start",gap:1,children:[(0,Nc.jsx)(r_,{className:"material-symbols-outlined",children:o}),(0,Nc.jsxs)(Xg,{flexDirection:"column",children:[(0,Nc.jsx)(Wg,{variant:"caption",fontWeight:"bold",textTransform:"uppercase",children:i}),c.slice(0,t?c.length:4).map(((e,t)=>(0,Nc.jsx)(Wg,{marginTop:"-0.5rem",fontSize:l,component:"pre",children:e},t))),s&&(0,Nc.jsx)(Wg,{marginTop:"-0.5rem",children:s})]})]}),c.length>4&&(0,Nc.jsx)(Xg,{display:"flex",justifyContent:"center",marginY:"-0.25rem",children:(0,Nc.jsxs)(Sy,{onClick:()=>n(!t),children:["See ",t?"less":"more",(0,Nc.jsx)(Ig,{children:"keyboard_arrow_"+(t?"up":"down")})]})})]})})},a_=e=>{let{endtime:t}=e;const n=(e=>{const[t,n]=(0,Ma.useState)("");return(0,Ma.useEffect)((()=>{const t=setInterval((()=>{let t=(new Date).getTime(),r=e-t,o=Math.floor(r/864e5),i=Math.floor(r%864e5/36e5),a=Math.floor(r%36e5/6e4),s=Math.floor(r%6e4/1e3),l=o>0,c=i>0||l,u=a>0||c,d=[l?`${o}d`:"",c?`${i}h`:"",u?`${a}m`:"",s>0||u?`${s}s`:""].filter(Boolean);n(r>0?`Ends in ${d.join(" ")}`:"Ended")}),1e3);return()=>clearInterval(t)}),[e]),t})(null!==t&&void 0!==t?t:0);return t&&n?(0,Nc.jsx)(Wg,{variant:"h5",sx:{opacity:.75},children:n}):(0,Nc.jsx)(Bw,{variant:"text",width:"250px",height:"3rem"})},s_=tp({palette:{mode:"dark",primary:{main:"#d79c00"},secondary:{main:"#703d92"},background:{default:"#232323",paper:"#232323"}},typography:{fontFamily:"Mulish"},components:{MuiCard:{styleOverrides:{root:{padding:1,backgroundColor:"#eee",color:"#232323",borderRadius:"12px"}}},MuiCardContent:{styleOverrides:{root:{padding:8,"&:last-child":{paddingBottom:8}}}},MuiIcon:{defaultProps:{className:"material-symbols-outlined"}}}}),l_=()=>{var e;const[t]=(0,Ma.useState)("gold-half-pot"),[n,r]=Xa(t),{entries:o,loading:a,setEntries:s}=yc(t,null===n||void 0===n?void 0:n.slug),l=(0,Ma.useMemo)((()=>{if(null===n||void 0===n||!n.entries||!o)return{pctOdds:0,odds:"\u221e"};const e=1-Math.pow(1-o/(null===n||void 0===n?void 0:n.entries),10);return{pctOdds:Math.floor(1e4*e)/100,odds:`1:${Math.round(1/e)}`}}),[null===n||void 0===n?void 0:n.entries,o]),c=(0,Ma.useMemo)((()=>null!==n&&void 0!==n&&n.amount?new Array(10).fill(1).map(((e,t)=>`${t<9?" ":""}${t+1}: ${Math.floor(n.amount/Math.pow(2,t+1)*1e5)/1e5}\u03c0`)):[]),[null===n||void 0===n?void 0:n.amount]),u=(0,Ma.useMemo)((()=>{var e;const t=null===n||void 0===n||null===(e=n.amount)||void 0===e?void 0:e.toString();return t&&t.length>6?"48px":"72px"}),[null===n||void 0===n?void 0:n.amount]);return(0,Nc.jsx)(lw,{injectFirst:!0,children:(0,Nc.jsxs)(Nw,{theme:s_,children:[(0,Nc.jsx)(Yw,{}),(0,Nc.jsxs)(uy,{maxWidth:"xs",sx:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",gap:2,marginBottom:11},children:[(0,Nc.jsxs)(uy,{sx:{display:"flex",justifyContent:"center",alignItems:"center",paddingTop:2,position:"relative"},children:[(0,Nc.jsx)("div",{style:{width:"25px",overflow:"visible",paddingRight:"48px",lineHeight:"1"},children:(0,Nc.jsx)("img",{src:i,style:{height:"36px",marginLeft:"-12.5px"},className:"App-logo",alt:"logo"})}),(0,Nc.jsxs)(Wg,{variant:"h5",children:["Half-Pot for PI",(0,Nc.jsx)(ny,{})]}),(0,Nc.jsx)(ry,{})]}),(0,Nc.jsx)(Wg,{variant:"h1",lineHeight:"0.9",fontSize:u,color:"primary",fontWeight:"bold",children:r?(0,Nc.jsx)(Bw,{variant:"text",width:"100px"}):`${null!==(e=null===n||void 0===n?void 0:n.amount)&&void 0!==e?e:"0"}\u03c0`}),(0,Nc.jsx)(Wg,{marginTop:"-1rem",color:"primary",variant:"caption",children:"Current Pot"}),(0,Nc.jsx)(a_,{endtime:null===n||void 0===n?void 0:n.endtime}),(0,Nc.jsx)(i_,{loading:a,icon:"local_activity",title:"Entries",value:o,valueSize:"48px"}),(0,Nc.jsx)(i_,{loading:a,icon:"ifl",title:"Odds",value:`\u2248 ${l.odds}`,subValue:`\u2248 ${l.pctOdds}%`,valueSize:"28px"}),!(null===n||void 0===n||!n.amount)&&n.amount>0&&(0,Nc.jsx)(i_,{loading:a,icon:"money_bag",title:"Prizes",value:c,valueSize:"28px"})]}),(0,Nc.jsx)(aw,{halfPotId:t,onPurchase:s})]})})};o.createRoot(document.getElementById("root")).render((0,Nc.jsx)(l_,{}))})(); //# sourceMappingURL=main.f5fd3637.js.map