/*! For license information please see main.2a737b44.js.LICENSE.txt */
(()=>{var e={5712:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,s=Object.assign;function a(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function f(e){return e.length}function p(e,t){return t.push(e),e}var g=1,m=1,y=0,v=0,b=0,w="";function x(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:g,column:m,length:s,return:""}}function A(e,t){return s(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function E(){return b=v>0?u(w,--v):0,m--,10===b&&(m=1,g--),b}function S(){return b=v<y?u(w,v++):0,m++,10===b&&(m=1,g++),b}function k(){return u(w,v)}function C(){return v}function _(e,t){return d(w,e,t)}function T(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function P(e){return g=m=1,y=h(w=e),v=0,[]}function I(e){return w="",e}function O(e){return a(_(v-1,M(91===e?e+2:40===e?e+1:e)))}function R(e){for(;(b=k())&&b<33;)S();return T(e)>2||T(b)>3?"":" "}function N(e,t){for(;--t&&S()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return _(e,C()+(t<6&&32==k()&&32==S()))}function M(e){for(;S();)switch(b){case e:return v;case 34:case 39:34!==e&&39!==e&&M(b);break;case 40:41===e&&M(e);break;case 92:S()}return v}function D(e,t){for(;S()&&e+b!==57&&(e+b!==84||47!==k()););return"/*"+_(t,v-1)+"*"+o(47===e?e:S())}function L(e){for(;!T(k());)S();return _(e,v)}var B="-ms-",F="-moz-",j="-webkit-",U="comm",z="rule",V="decl",H="@keyframes";function $(e,t){for(var n="",r=f(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function W(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case V:return e.return=e.return||e.value;case U:return"";case H:return e.return=e.value+"{"+$(e.children,r)+"}";case z:e.value=e.props.join(",")}return h(n=$(e.children,r))?e.return=e.value+"{"+n+"}":""}function G(e){return I(q("",null,null,null,[""],e=P(e),0,[0],e))}function q(e,t,n,r,i,s,a,d,f){for(var g=0,m=0,y=a,v=0,b=0,w=0,x=1,A=1,_=1,T=0,P="",I=i,M=s,B=r,F=P;A;)switch(w=T,T=S()){case 40:if(108!=w&&58==u(F,y-1)){-1!=c(F+=l(O(T),"&","&\f"),"&\f")&&(_=-1);break}case 34:case 39:case 91:F+=O(T);break;case 9:case 10:case 13:case 32:F+=R(w);break;case 92:F+=N(C()-1,7);continue;case 47:switch(k()){case 42:case 47:p(Q(D(S(),C()),t,n),f);break;default:F+="/"}break;case 123*x:d[g++]=h(F)*_;case 125*x:case 59:case 0:switch(T){case 0:case 125:A=0;case 59+m:-1==_&&(F=l(F,/\f/g,"")),b>0&&h(F)-y&&p(b>32?X(F+";",r,n,y-1):X(l(F," ","")+";",r,n,y-2),f);break;case 59:F+=";";default:if(p(B=K(F,t,n,g,m,i,d,P,I=[],M=[],y),s),123===T)if(0===m)q(F,t,B,B,I,s,y,d,M);else switch(99===v&&110===u(F,3)?100:v){case 100:case 108:case 109:case 115:q(e,B,B,r&&p(K(e,B,B,0,0,i,d,P,i,I=[],y),M),i,M,y,d,r?I:M);break;default:q(F,B,B,B,[""],M,0,d,M)}}g=m=b=0,x=_=1,P=F="",y=a;break;case 58:y=1+h(F),b=w;default:if(x<1)if(123==T)--x;else if(125==T&&0==x++&&125==E())continue;switch(F+=o(T),T*x){case 38:_=m>0?1:(F+="\f",-1);break;case 44:d[g++]=(h(F)-1)*_,_=1;break;case 64:45===k()&&(F+=O(S())),v=k(),m=y=h(P=F+=L(C())),T++;break;case 45:45===w&&2==h(F)&&(x=0)}}return s}function K(e,t,n,r,o,s,c,u,h,p,g){for(var m=o-1,y=0===o?s:[""],v=f(y),b=0,w=0,A=0;b<r;++b)for(var E=0,S=d(e,m+1,m=i(w=c[b])),k=e;E<v;++E)(k=a(w>0?y[E]+" "+S:l(S,/&\f/g,y[E])))&&(h[A++]=k);return x(e,t,n,0===o?z:u,h,p,g)}function Q(e,t,n){return x(e,t,n,U,o(b),d(e,2,-2),0)}function X(e,t,n,r){return x(e,t,n,V,d(e,0,r),d(e,r+1,-1),r)}var J=function(e,t,n){for(var r=0,i=0;r=i,i=k(),38===r&&12===i&&(t[n]=1),!T(i);)S();return _(e,v)},Y=function(e,t){return I(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=J(v-1,t,n);break;case 2:e[n]+=O(r);break;case 4:if(44===r){e[++n]=58===k()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=S());return e}(P(e),t))},Z=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Z.get(n))&&!r){Z.set(e,!0);for(var i=[],o=Y(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[c]):s[c]+" "+o[a]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+F+e+B+e+e;case 6828:case 4268:return j+e+B+e+e;case 6165:return j+e+B+"flex-"+e+e;case 5187:return j+e+l(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+B+"flex-$1$2")+e;case 5443:return j+e+B+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return j+e+B+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+B+l(e,"shrink","negative")+e;case 5292:return j+e+B+l(e,"basis","preferred-size")+e;case 6060:return j+"box-"+l(e,"-grow","")+j+e+B+l(e,"grow","positive")+e;case 4554:return j+l(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+B+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+F+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+j)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===u(e,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+B+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return j+e+B+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+B+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+B+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+B+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case V:e.return=ne(e.value,e.length);break;case H:return $([A(e,{value:l(e.value,"@","@"+j)})],r);case z: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 $([A(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return $([A(e,{props:[l(t,/:(plac\w+)/,":"+j+"input-$1")]}),A(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[l(t,/:(plac\w+)/,B+"input-$1")]})],r)}return""}))}}],ie=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 i,o,s=e.stylisPlugins||re,a={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;l.push(e)}));var c,u,d=[W,(u=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],h=function(e){var t=f(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}([ee,te].concat(s,d));o=function(e,t,n,r){c=n,$(G(e?e+"{"+t.styles+"}":t.styles),h),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(l),p}},5208:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},8097:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,T:()=>l,w:()=>a});var r=n(7565),i=n(5712),o=(n(6935),n(6714),r.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null)),s=o.Provider,a=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(o);return e(t,i,n)}))},l=r.createContext({})},4304:(e,t,n)=>{"use strict";n.d(t,{AH:()=>c,i7:()=>u,mL:()=>l});var r=n(8097),i=n(7565),o=n(8592),s=n(6714),a=n(6935),l=(n(5712),n(2341),(0,r.w)((function(e,t){var n=e.styles,l=(0,a.J)([n],void 0,i.useContext(r.T)),c=i.useRef();return(0,s.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),c.current=[n,r],function(){n.flush()}}),[t]),(0,s.i)((function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,o.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}}),[t,l.name]),null})));function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.J)(t)}var u=function(){var e=c.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},6935:(e,t,n)=>{"use strict";n.d(t,{J:()=>m});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(5208),o=!1,s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=(0,i.A)((function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(a,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function f(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return p={name:i.name,styles:i.styles,next:p},i.name;var s=n;if(void 0!==s.styles){var a=s.next;if(void 0!==a)for(;void 0!==a;)p={name:a.name,styles:a.styles,next:p},a=a.next;return s.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=f(e,t,n[i])+";";else for(var s in n){var a=n[s];if("object"!==typeof a){var l=a;null!=t&&void 0!==t[l]?r+=s+"{"+t[l]+"}":c(l)&&(r+=u(s)+":"+d(s,l)+";")}else{if("NO_COMPONENT_SELECTOR"===s&&o)throw new Error(h);if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var p=f(e,t,a);switch(s){case"animation":case"animationName":r+=u(s)+":"+p+";";break;default:r+=s+"{"+p+"}"}}else for(var g=0;g<a.length;g++)c(a[g])&&(r+=u(s)+":"+d(s,a[g])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=p,g=n(e);return p=l,f(e,t,g)}}var m=n;if(null==t)return m;var y=t[m];return void 0!==y?y:m}var p,g=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function m(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";p=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=f(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++){if(i+=f(n,t,e[s]),r)i+=o[s]}g.lastIndex=0;for(var a,l="";null!==(a=g.exec(i));)l+="-"+a[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=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(i){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)}(i)+l;return{name:c,styles:i,next:p}}},6714:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>a,s:()=>s});var i=n(7565),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,s=o||function(e){return e()},a=o||i.useLayoutEffect},8592:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},6235:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case a:case s:case h:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case g:case p:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference")},367:(e,t,n)=>{"use strict";n(6235)},1087:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(7565);var r=n(4304),i=n(7929);function o(e){const{styles:t,defaultTheme:n={}}=e,o="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(r.mL,{styles:o})}},4163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>E.A,StyledEngineProvider:()=>A,ThemeContext:()=>l.T,css:()=>v.AH,default:()=>S,internal_processStyles:()=>k,keyframes:()=>v.i7});var r=n(8168),i=n(7565),o=n(5208),s=/^((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|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)-.*))$/,a=(0,o.A)((function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(8097),c=n(8592),u=n(6935),d=n(6714),h=a,f=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?h:f},g=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.SF)(t,n,r),(0,d.s)((function(){return(0,c.sk)(t,n,r)})),null},y=function e(t,n){var o,s,a=t.__emotion_real===t,d=a&&t.__emotion_base||t;void 0!==n&&(o=n.label,s=n.target);var h=g(t,n,a),f=h||p(d),y=!f("as");return function(){var v=arguments,b=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{b.push(v[0][0]);for(var w=v.length,x=1;x<w;x++)b.push(v[x],v[0][x])}var A=(0,l.w)((function(e,t,n){var r=y&&e.as||d,o="",a=[],g=e;if(null==e.theme){for(var v in g={},e)g[v]=e[v];g.theme=i.useContext(l.T)}"string"===typeof e.className?o=(0,c.Rk)(t.registered,a,e.className):null!=e.className&&(o=e.className+" ");var w=(0,u.J)(b.concat(a),t.registered,g);o+=t.key+"-"+w.name,void 0!==s&&(o+=" "+s);var x=y&&void 0===h?p(r):f,A={};for(var E in e)y&&"as"===E||x(E)&&(A[E]=e[E]);return A.className=o,n&&(A.ref=n),i.createElement(i.Fragment,null,i.createElement(m,{cache:t,serialized:w,isStringTag:"string"===typeof r}),i.createElement(r,A))}));return A.displayName=void 0!==o?o:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",A.defaultProps=t.defaultProps,A.__emotion_real=A,A.__emotion_base=d,A.__emotion_styles=b,A.__emotion_forwardProp=h,Object.defineProperty(A,"toString",{value:function(){return"."+s}}),A.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:g(A,i,!0)})).apply(void 0,b)},A}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){y[e]=y(e)}));var v=n(4304),b=n(5712),w=n(7929);let x;function A(e){const{injectFirst:t,children:n}=e;return t&&x?(0,w.jsx)(l.C,{value:x,children:n}):n}"object"===typeof document&&(x=(0,b.A)({key:"css",prepend:!0}));var E=n(1087);function S(e,t){return y(e,t)}const k=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},2388:(e,t,n)=>{"use strict";var r=n(4994);t.X4=f,t.e$=p,t.tL=m,t.eM=function(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=g;var i=r(n(8731)),o=r(n(2223));function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,o.default)(e,t,n)}function a(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(", ")})`:""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(a(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(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)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,i.default)(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e)).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function d(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let a="rgb";const c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(a+="a",c.push(t[3])),u({type:a,values:c})}function h(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(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 f(e,t){return e=l(e),t=s(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,u(e)}function p(e,t){if(e=l(e),t=s(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function g(e,t){if(e=l(e),t=s(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?p(e,t):g(e,t)}},8830:(e,t,n)=>{"use strict";var r=n(4994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=g,rootShouldForwardProp:r=p,slotShouldForwardProp:l=p}=e,u=e=>(0,c.default)((0,i.default)({},e,{theme:y((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:f,skipVariantsResolver:g,skipSx:w,overridesResolver:x=v(m(f))}=c,A=(0,o.default)(c,h),E=void 0!==g?g:f&&"Root"!==f&&"root"!==f||!1,S=w||!1;let k=p;"Root"===f||"root"===f?k=r:f?k=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const C=(0,s.default)(e,(0,i.default)({shouldForwardProp:k,label:undefined},A)),_=e=>"function"===typeof e&&e.__emotion_real!==e||(0,a.isPlainObject)(e)?r=>b(e,(0,i.default)({},r,{theme:y({theme:r.theme,defaultTheme:n,themeId:t})})):e,T=function(r){let o=_(r);for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];const c=a?a.map(_):[];d&&x&&c.push((e=>{const r=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const o=r.components[d].styleOverrides,s={};return Object.entries(o).forEach((t=>{let[n,o]=t;s[n]=b(o,(0,i.default)({},e,{theme:r}))})),x(e,s)})),d&&!E&&c.push((e=>{var r;const o=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==o||null==(r=o.components)||null==(r=r[d])?void 0:r.variants},(0,i.default)({},e,{theme:o}))})),S||c.push(u);const h=c.length-a.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const f=C(o,...c);return e.muiName&&(f.muiName=e.muiName),f};return C.withConfig&&(T.withConfig=C.withConfig),T}};var i=r(n(4634)),o=r(n(4893)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(4163)),a=n(9084),l=(r(n(7380)),r(n(3186)),r(n(7615))),c=r(n(5416));const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const g=(0,l.default)(),m=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function v(e){return e?(t,n)=>n[e]:null}function b(e,t){let{ownerState:n}=t,r=(0,o.default)(t,u);const s="function"===typeof e?e((0,i.default)({ownerState:n},r)):e;if(Array.isArray(s))return s.flatMap((e=>b(e,(0,i.default)({ownerState:n},r))));if(s&&"object"===typeof s&&Array.isArray(s.variants)){const{variants:e=[]}=s;let t=(0,o.default)(s,d);return e.forEach((e=>{let o=!0;"function"===typeof e.props?o=e.props((0,i.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,i.default)({ownerState:n},r,n)):e.style))})),t}return s}},129:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>o,vf:()=>a,zu:()=>r});const r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function o(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||i;return t.reduce(((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r)),{})}if("object"===typeof t){const e=o.breakpoints||i;return Object.keys(t).reduce(((i,o)=>{if(-1!==Object.keys(e.values||r).indexOf(o)){i[e.up(o)]=n(t[o],o)}else{const e=o;i[e]=t[e]}return i}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function a(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}},8389:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},9843:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(8587),i=n(8168);const o=["values","unit","step"],s=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)=>(0,i.A)({},e,{[t.key]:t.val})),{})};function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,l=(0,r.A)(e,o),c=s(t),u=Object.keys(c);function d(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function h(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-a/100}${n})`}function f(e,r){const i=u.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[u[i]]?t[u[i]]:r)-a/100}${n})`}return(0,i.A)({keys:u,values:c,up:d,down:h,between:f,only:function(e){return u.indexOf(e)+1<u.length?f(e,u[u.indexOf(e)+1]):d(e)},not:function(e){const t=u.indexOf(e);return 0===t?d(u[1]):t===u.length-1?h(u[t]):f(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},6325:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(8168),i=n(8587),o=n(7874),s=n(9843);const a={borderRadius:4};var l=n(3742);var c=n(5514),u=n(2346),d=n(8389);const h=["breakpoints","palette","spacing","shape"];const f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:f,shape:p={}}=e,g=(0,i.A)(e,h),m=(0,s.A)(t),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map((e=>{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}(f);let v=(0,o.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:y,shape:(0,r.A)({},a,p)},g);v.applyStyles=d.A;for(var b=arguments.length,w=new Array(b>1?b-1:0),x=1;x<b;x++)w[x-1]=arguments[x];return v=w.reduce(((e,t)=>(0,o.A)(e,t)),v),v.unstable_sxConfig=(0,r.A)({},u.A,null==g?void 0:g.unstable_sxConfig),v.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},v}},7615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>o.A});var r=n(6325),i=n(9843),o=n(8389)},4953:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7874);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},3742:(e,t,n)=>{"use strict";n.d(t,{LX:()=>p,MA:()=>f,_W:()=>g,Lc:()=>v,Ms:()=>b});var r=n(129),i=n(2256),o=n(4953);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=s[t],i=a[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function f(e,t,n,r){var o;const s=null!=(o=(0,i.Yn)(e,t,!1))?o:n;return"number"===typeof s?e=>"string"===typeof e?e:s*e:Array.isArray(s)?e=>"string"===typeof e?e:s[e]:"function"===typeof s?s:()=>{}}function p(e){return f(e,"spacing",8)}function g(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function m(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=g(t,n),e)),{})}(c(n),i),s=e[n];return(0,r.NI)(e,s,o)}function y(e,t){const n=p(e.theme);return Object.keys(e).map((r=>m(e,t,r,n))).reduce(o.A,{})}function v(e){return y(e,u)}function b(e){return y(e,d)}function w(e){return y(e,h)}v.propTypes={},v.filterProps=u,b.propTypes={},b.filterProps=d,w.propTypes={},w.filterProps=h},2256:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,BO:()=>s,Yn:()=>o});var r=n(1932),i=n(129);function o(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 s(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i,e)),r}const a=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=o(e.theme,a)||{};return(0,i.NI)(e,c,(e=>{let i=s(u,l,e);return e===i&&"string"===typeof e&&(i=s(u,l,`${t}${"default"===e?"":(0,r.A)(e)}`,e)),!1===n?i:{[n]:i}}))};return c.propTypes={},c.filterProps=[t],c}},2346:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(3742),i=n(2256),o=n(4953);const s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),i=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,o.A)(t,r[n](e)):t),{});return i.propTypes={},i.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),i};var a=n(129);function l(e){return"number"!==typeof e?e:`${e}px solid`}function c(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),f=c("borderBottom",l),p=c("borderLeft",l),g=c("borderColor"),m=c("borderTopColor"),y=c("borderRightColor"),v=c("borderBottomColor"),b=c("borderLeftColor"),w=c("outline",l),x=c("outlineColor"),A=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,a.NI)(e,e.borderRadius,n)}return null};A.propTypes={},A.filterProps=["borderRadius"];s(u,d,h,f,p,g,m,y,v,b,A,w,x);const E=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,a.NI)(e,e.gap,n)}return null};E.propTypes={},E.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,a.NI)(e,e.columnGap,n)}return null};S.propTypes={},S.filterProps=["columnGap"];const k=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,a.NI)(e,e.rowGap,n)}return null};k.propTypes={},k.filterProps=["rowGap"];s(E,S,k,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function C(e,t){return"grey"===t?t:e}s((0,i.Ay)({prop:"color",themeKey:"palette",transform:C}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:C}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:C}));function _(e){return e<=1&&0!==e?100*e+"%":e}const T=(0,i.Ay)({prop:"width",transform:_}),P=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||a.zu[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:_(t)}};return(0,a.NI)(e,e.maxWidth,t)}return null};P.filterProps=["maxWidth"];const I=(0,i.Ay)({prop:"minWidth",transform:_}),O=(0,i.Ay)({prop:"height",transform:_}),R=(0,i.Ay)({prop:"maxHeight",transform:_}),N=(0,i.Ay)({prop:"minHeight",transform:_}),M=((0,i.Ay)({prop:"size",cssProperty:"width",transform:_}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:_}),s(T,P,I,O,R,N,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:A},color:{themeKey:"palette",transform:C},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:C},backgroundColor:{themeKey:"palette",transform:C},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},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:E},rowGap:{style:k},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:_},maxWidth:{style:P},minWidth:{transform:_},height:{transform:_},maxHeight:{transform:_},minHeight:{transform:_},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},5800:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),i=n(8587),o=n(7874),s=n(2346);const a=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:s.A;return Object.keys(e).forEach((t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r};function c(e){const{sx:t}=e,n=(0,i.A)(e,a),{systemProps:s,otherProps:c}=l(n);let u;return u=Array.isArray(t)?[s,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,o.Q)(e)?(0,r.A)({},s,e):s}:(0,r.A)({},s,t),(0,r.A)({},c,{sx:u})}},5416:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>o.A});var r=n(5514),i=n(5800),o=n(2346)},5514:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,k:()=>l});var r=n(1932),i=n(4953),o=n(2256),s=n(129),a=n(2346);function l(){function e(e,t,n,i){const a={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const f=(0,o.Yn)(n,u)||{};if(h)return h(a);return(0,s.NI)(a,t,(t=>{let n=(0,o.BO)(f,d,t);return t===n&&"string"===typeof t&&(n=(0,o.BO)(f,d,`${e}${"default"===t?"":(0,r.A)(t)}`,t)),!1===c?n:{[c]:n}}))}return function t(n){var r;const{sx:o,theme:l={}}=n||{};if(!o)return null;const c=null!=(r=l.unstable_sxConfig)?r:a.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const o=(0,s.EU)(l.breakpoints),a=Object.keys(o);let u=o;return Object.keys(r).forEach((n=>{const o=(a=r[n],d=l,"function"===typeof a?a(d):a);var a,d;if(null!==o&&void 0!==o)if("object"===typeof o)if(c[n])u=(0,i.A)(u,e(n,o,l,c));else{const e=(0,s.NI)({theme:l},o,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>e.concat(Object.keys(t))),[]),i=new Set(r);return t.every((e=>i.size===Object.keys(e).length))}(e,o)?u=(0,i.A)(u,e):u[n]=t({sx:o,theme:l})}else u=(0,i.A)(u,e(n,o,l,c))})),(0,s.vf)(a,u)}return Array.isArray(o)?o.map(u):u(o)}}const c=l();c.filterProps=["sx"];const u=c},1932:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1098);function i(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},7380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(1932)},2223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){let t=arguments.length>1&&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))}},7874:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>i});var r=n(8168);function i(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function o(e){if(!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=o(e[n])})),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const a=n.clone?(0,r.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{i(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?a[r]=s(e[r],t[r],n):n.clone?a[r]=i(t[r])?o(t[r]):t[r]:a[r]=t[r]})),a}},9084:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(7874)},1098:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},8731:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(1098)},3186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>o});var r=n(107);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){const t=`${e}`.match(i);return t&&t[1]||""}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||o(e)||t}function a(e,t,n){const r=s(t);return e.displayName||(""!==r?`${n}(${r})`:n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return s(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.ForwardRef:return a(e,e.render,"ForwardRef");case r.Memo:return a(e,e.type,"memo");default:return}}}},431:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case a:case s:case h:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case g:case p:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.ForwardRef=d,t.Memo=p},107:(e,t,n)=>{"use strict";e.exports=n(431)},4566:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},6646:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(4566),s=n(6524);i(n(6524),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"===typeof t&&(n=t,t=a),"object"===typeof e&&(t=e,e=void 0),this.callback=null!==e&&void 0!==e?e:null,this.options=null!==t&&void 0!==t?t:a,this.elementCB=null!==n&&void 0!==n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"===typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6524:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var o=n(4566),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),x(this,e)},e}();t.Node=s;var a=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=a;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Text,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(a);t.Text=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Comment,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(a);t.Comment=c;var u=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=o.ElementType.Directive,r}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(a);t.ProcessingInstruction=u;var d=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var p=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var s=e.call(this,r)||this;return s.name=t,s.attribs=n,s.type=i,s}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,o.isTag)(e)}function m(e){return e.type===o.ElementType.CDATA}function y(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function b(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new l(e.data);else if(v(e))n=new c(e.data);else if(g(e)){var r=t?A(e.children):[],o=new p(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(m(e)){r=t?A(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),n=s}else if(w(e)){r=t?A(e.children):[];var a=new f(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var d=new u(e.name,e.data);null!=e["x-name"]&&(d["x-name"]=e["x-name"],d["x-publicId"]=e["x-publicId"],d["x-systemId"]=e["x-systemId"]),n=d}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function A(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=p,t.isTag=g,t.isCDATA=m,t.isText=y,t.isComment=v,t.isDirective=b,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=x},2341:(e,t,n)=>{"use strict";var r=n(325),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;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 i=f(n);i&&i!==p&&e(t,i,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),g=l(n),m=0;m<s.length;++m){var y=s[m];if(!o[y]&&(!r||!r[y])&&(!g||!g[y])&&(!a||!a[y])){var v=h(n,y);try{c(t,y,v)}catch(b){}}}}return t}},2329:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=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,g=n?Symbol.for("react.memo"):60115,m=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 x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case g:case l:return e;default:return t}}case i:return t}}}function A(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return A(e)||x(e)===u},t.isConcurrentMode=A,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===h},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===a||e===s||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=x},325:(e,t,n)=>{"use strict";e.exports=n(2329)},6129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},4647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(o),h=d&&d[1]?d[1].toLowerCase():"";switch(h){case n:var p=c(e);if(!s.test(e))null===(t=null===(m=p.querySelector(r))||void 0===m?void 0:m.parentNode)||void 0===t||t.removeChild(m);if(!a.test(e))null===(u=null===(m=p.querySelector(i))||void 0===m?void 0:m.parentNode)||void 0===u||u.removeChild(m);return p.querySelectorAll(n);case r:case i:var g=l(e).querySelectorAll(h);return a.test(e)&&s.test(e)?g[0].parentNode.childNodes:g;default:return f?f(e):(m=l(e,i).querySelector(i)).childNodes;var m}};var n="html",r="head",i="body",o=/<([a-zA-Z]+[0-9]?)/,s=/<head[^]*>/i,a=/<body[^]*>/i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"===typeof window&&window.DOMParser;if("function"===typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),d.parseFromString(e,"text/html")}}if("object"===typeof document&&document.implementation){var h=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=h.documentElement.querySelector(t);return n&&(n.innerHTML=e),h}return h.documentElement.innerHTML=e,h}}var f,p="object"===typeof document&&document.createElement("template");p&&p.content&&(f=function(e){return p.innerHTML=e,p.content.childNodes})},8628:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,o.formatDOM)((0,i.default)(e),null,n)};var i=r(n(4647)),o=n(304),s=/<(![a-zA-Z\s]+)>/},304:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=o,t.formatDOM=function e(t,n,i){void 0===n&&(n=null);for(var a,l=[],c=0,u=t.length;c<u;c++){var d=t[c];switch(d.nodeType){case 1:var h=s(d.nodeName);(a=new r.Element(h,o(d.attributes))).children=e("template"===h?d.content.childNodes:d.childNodes,a);break;case 3:a=new r.Text(d.nodeValue);break;case 8:a=new r.Comment(d.nodeValue);break;default:continue}var f=l[c-1]||null;f&&(f.next=a),a.parent=n,a.prev=f,a.next=null,l.push(a)}i&&((a=new r.ProcessingInstruction(i.substring(0,i.indexOf(" ")).toLowerCase(),i)).next=l[0]||null,a.parent=n,l.unshift(a),l[1]&&(l[1].prev=l[0]));return l};var r=n(6646),i=n(6129);function o(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function s(e){var t=function(e){return i.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}},8509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var h=u.toLowerCase(),f=l(h);if(f){var p=(0,r.getPropertyInfo)(f);switch(o.includes(f)&&s.includes(t)&&!c&&(f=l("default"+h)),n[f]=d,p&&p.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,i.setStyleProp)(e.style,n),n};var r=n(5441),i=n(967),o=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},4363:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],i="function"===typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||a,d=u.cloneElement,h=u.createElement,f=u.isValidElement,p=t.length,g=0;g<p;g++){var m=t[g];if(i){var y=n.replace(m,g);if(f(y)){p>1&&(y=d(y,{key:y.key||g})),r.push(c(y,m,g));continue}}if("text"!==m.type){var v=m,b={};l(v)?((0,s.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,o.default)(v.attribs,v.name));var w=void 0;switch(m.type){case"script":case"style":m.children[0]&&(b.dangerouslySetInnerHTML={__html:m.children[0].data});break;case"tag":"textarea"===m.name&&m.children[0]?b.defaultValue=m.children[0].data:m.children&&m.children.length&&(w=e(m.children,n));break;default:continue}p>1&&(b.key=g),r.push(c(h(m.name,b,w),m,g))}else{var x=!m.data.trim().length;if(x&&m.parent&&!(0,s.canTextBeChildOfNode)(m.parent))continue;if(n.trim&&x)continue;r.push(c(m.data,m,g))}}return 1===r.length?r[0]:r};var i=n(7565),o=r(n(8509)),s=n(967),a={cloneElement:i.cloneElement,createElement:i.createElement,isValidElement:i.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},2023:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,s.default)((0,i.default)(e,(null===t||void 0===t?void 0:t.htmlparser2)||l),t)};var i=r(n(8628));t.htmlToDOM=i.default;var o=r(n(8509));t.attributesToProps=o.default;var s=r(n(4363));t.domToReact=s.default;var a=n(6646);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},967:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){if(!e.includes("-"))return Boolean(t&&"string"===typeof t.is);if(s.has(e))return!1;return!0},t.setStyleProp=function(e,t){if("string"!==typeof e)return;if(!e.trim())return void(t.style={});try{t.style=(0,o.default)(e,a)}catch(n){t.style={}}};var i=n(7565),o=r(n(9168)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(i.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};t.returnFirstArg=function(e){return e}},165:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function p(){var e={line:d,column:h};return function(t){return t.position=new g(e),b(),t}}function g(e){this.start=e,this.end={line:d,column:h},this.source=l.source}g.prototype.content=e;var m=[];function y(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;m.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){v(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var r=e.slice(2,n-2);return h+=2,f(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function A(){var e=p(),n=v(i);if(n){if(x(),!v(o))return y("property missing ':'");var r=v(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),l}}return b(),function(){var e,t=[];for(w(t);e=A();)!1!==e&&(t.push(e),w(t));return t}()}},9147:(e,t,n)=>{"use strict";var r=n(876);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},8967:(e,t,n)=>{e.exports=n(9147)()},876:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=void 0;var r=n(5539);t.defaultProps={activeIndex:0,animationDuration:400,animationEasingFunction:"ease",animationType:r.AnimationType.SLIDE,autoHeight:!1,autoWidth:!1,autoPlay:!1,autoPlayControls:!1,autoPlayDirection:r.AutoplayDirection.LTR,autoPlayInterval:400,autoPlayStrategy:r.AutoPlayStrategy.DEFAULT,children:void 0,controlsStrategy:r.ControlsStrategy.DEFAULT,disableButtonsControls:!1,disableDotsControls:!1,disableSlideInfo:!0,infinite:!1,innerWidth:void 0,items:void 0,keyboardNavigation:!1,mouseTracking:!1,syncStateOnPropsUpdate:!0,name:"",paddingLeft:0,paddingRight:0,responsive:void 0,swipeDelta:20,swipeExtraPadding:200,ssrSilentMode:!0,touchTracking:!0,touchMoveDefaultEvents:!0,onInitialized:function(){},onResized:function(){},onUpdated:function(){},onResizeEvent:void 0,onSlideChange:function(){},onSlideChanged:function(){}}},4058:(e,t,n)=>{"use strict";var r=function(){var e=function(t,n){return(e=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]},s=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return s(t,e),t},l=function(e,t,n,r){return new(n=n||Promise)((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){var l=[s,a];if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,(l=i?[2&l[0],i.value]:l)[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=0<(i=o.trys).length&&i[i.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3]))o.label=l[1];else if(6===l[0]&&o.label<i[1])o.label=i[1],i=l;else{if(!(i&&o.label<i[2])){i[2]&&o.ops.pop(),o.trys.pop();continue}o.label=i[2],o.ops.push(l)}}l=t.call(e,o)}catch(a){l=[6,a],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},u=function(e){return e&&e.__esModule?e:{default:e}},d=(Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0,u(n(7565))),h=u(n(5130)),f=n(6748),p=u(n(7558)),g=(t.Link=p.default,a(n(1700))),m=a(n(2599)),y=n(5539),v=(function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)}(n(5539),t),function(e){function t(t){var n=e.call(this,t)||this;return n.swipeListener=null,n._handleKeyboardEvents=function(e){switch(e.code){case"Space":return n.props.autoPlay&&n._handlePlayPauseToggle();case"ArrowLeft":return n.slidePrev(e);case"ArrowRight":return n.slideNext(e)}},n._handleBeforeSlideEnd=function(e){return l(n,void 0,void 0,(function(){var t,n,r;return c(this,(function(i){switch(i.label){case 0:return n=this.state,r=n.activeIndex,t=n.itemsCount,n=n.fadeoutAnimationProcessing,m.shouldRecalculateSlideIndex(r,t)?(r=m.getUpdateSlidePositionIndex(r,t),[4,this._handleUpdateSlidePosition(r)]):[3,2];case 1:return i.sent(),[3,4];case 2:return n?[4,this.setState({fadeoutAnimationIndex:null,fadeoutAnimationPosition:null,fadeoutAnimationProcessing:!1})]:[3,4];case 3:i.sent(),i.label=4;case 4:return this._handleSlideChanged(e),[2]}}))}))},n._handleMouseEnter=function(){var e=n.props.autoPlayStrategy;m.shouldCancelAutoPlayOnHover(e)&&n.state.isAutoPlaying&&(n.isHovered=!0,n._handlePause())},n._handleMouseLeave=function(){n.state.isAutoPlaying&&(n.isHovered=!1,n._handlePlay())},n._handlePause=function(){n._clearAutoPlayTimeout()},n._handlePlayPauseToggle=function(){return l(n,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return e=this.state.isAutoPlaying,this.hasUserAction=!0,[4,this.setState({isAutoPlaying:!e,isAutoPlayCanceledOnAction:!0})];case 1:return t.sent(),e?this._handlePause():this._handlePlay(),[2]}}))}))},n._setRootComponentRef=function(e){return n.rootElement=e},n._setStageComponentRef=function(e){return n.stageComponent=e},n._renderStageItem=function(e,t){var r=m.getRenderStageItemStyles(t,n.state),i=m.getRenderStageItemClasses(t,n.state);return d.default.createElement(g.StageItem,{styles:r,className:i,key:"stage-item-".concat(t),item:e})},n._renderSlideInfo=function(){var e=n.props.renderSlideInfo,t=(r=n.state).activeIndex,r=r.itemsCount;return d.default.createElement(g.SlideInfo,{itemsCount:r,activeIndex:t,renderSlideInfo:e})},n.state=m.calculateInitialState(t,null),n.isHovered=!1,n.isAnimationDisabled=!1,n.isTouchMoveProcessStarted=!1,n.cancelTouchAnimations=!1,n.hasUserAction=!1,n.rootElement=null,n.rootComponentDimensions={},n.stageComponent=null,n.startTouchmovePosition=void 0,n.slideTo=n.slideTo.bind(n),n.slidePrev=n.slidePrev.bind(n),n.slideNext=n.slideNext.bind(n),n._handleTouchmove=n._handleTouchmove.bind(n),n._handleTouchend=n._handleTouchend.bind(n),n._handleDotClick=n._handleDotClick.bind(n),n._handleResize=n._handleResize.bind(n),t=m.debounce(n._handleResize,100),n._handleResizeDebounced=t[0],n._cancelResizeDebounced=t[1],n}return r(t,e),t.prototype.componentDidMount=function(){return l(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return[4,this._setInitialState()];case 1:return e.sent(),this._addEventListeners(),this._setupSwipeHandlers(),this.props.autoPlay&&this._handlePlay(),[2]}}))}))},t.prototype.componentDidUpdate=function(e){var t=(p=this.props).activeIndex,n=p.animationDuration,r=p.autoWidth,i=p.children,o=p.infinite,s=p.items,a=p.paddingLeft,l=p.paddingRight,c=p.responsive,u=p.swipeExtraPadding,d=p.mouseTracking,h=p.swipeDelta,f=p.touchTracking,p=p.touchMoveDefaultEvents;i&&e.children!==i||e.autoWidth!==r||e.infinite!==o||e.items!==s||e.paddingLeft!==a||e.paddingRight!==l||e.responsive!==c||e.swipeExtraPadding!==u?this._updateComponent():(e.animationDuration!==n&&this.setState({animationDuration:n}),e.activeIndex!==t&&this.slideTo(t,y.EventType.UPDATE)),e.swipeDelta===h&&e.mouseTracking===d&&e.touchTracking===f&&e.touchMoveDefaultEvents===p||this._updateSwipeProps(),this.props.keyboardNavigation!==e.keyboardNavigation&&this._updateEventListeners()},t.prototype.componentWillUnmount=function(){this._cancelResizeDebounced(),this._cancelTimeoutAnimations(),this._removeEventListeners()},Object.defineProperty(t.prototype,"eventObject",{get:function(){var e=(t=this.state).itemsInSlide,t=t.activeIndex,n=(r=m.getSlideItemInfo(this.state)).isNextSlideDisabled,r=r.isPrevSlideDisabled;return{item:t,slide:m.getActiveSlideIndex(n,this.state),itemsInSlide:e,isNextSlideDisabled:n,isPrevSlideDisabled:r,type:y.EventType.ACTION}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFadeoutAnimationAllowed",{get:function(){var e=this.state.itemsInSlide,t=(i=this.props).animationType,n=i.paddingLeft,r=i.paddingRight,i=i.autoWidth;return 1===e&&t===y.AnimationType.FADEOUT&&!(n||r||i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"touchmovePosition",{get:function(){return void 0!==this.startTouchmovePosition?this.startTouchmovePosition:this.state.translate3d},enumerable:!1,configurable:!0}),t.prototype.slideTo=function(e,t){var n,r,i;void 0===e&&(e=0),this._handlePause(),this.isFadeoutAnimationAllowed?(n=m.getUpdateSlidePositionIndex(e,this.state.itemsCount),r=m.getFadeoutAnimationPosition(n,this.state),i=m.getFadeoutAnimationIndex(this.state),this._handleSlideTo({activeIndex:n,fadeoutAnimationIndex:i,fadeoutAnimationPosition:r,eventType:t})):this._handleSlideTo({activeIndex:e,eventType:t})},t.prototype.slidePrev=function(e){this._handlePause(),e&&e.isTrusted&&(this.hasUserAction=!0);var t,n;e=this.state.activeIndex-1;this.isFadeoutAnimationAllowed?(t=-this.state.stageWidth,n=m.getFadeoutAnimationIndex(this.state),this._handleSlideTo({activeIndex:e,fadeoutAnimationIndex:n,fadeoutAnimationPosition:t})):this._handleSlideTo({activeIndex:e})},t.prototype.slideNext=function(e){this._handlePause(),e&&e.isTrusted&&(this.hasUserAction=!0);var t,n;e=this.state.activeIndex+1;this.isFadeoutAnimationAllowed?(t=this.state.stageWidth,n=m.getFadeoutAnimationIndex(this.state),this._handleSlideTo({activeIndex:e,fadeoutAnimationIndex:n,fadeoutAnimationPosition:t})):this._handleSlideTo({activeIndex:e})},t.prototype._addEventListeners=function(){window.addEventListener("resize",this._handleResizeDebounced),this.props.keyboardNavigation&&window.addEventListener("keyup",this._handleKeyboardEvents)},t.prototype._removeEventListeners=function(){this.swipeListener&&this.swipeListener.destroy(),window.removeEventListener("resize",this._handleResizeDebounced),window.removeEventListener("keyup",this._handleKeyboardEvents)},t.prototype._updateEventListeners=function(){this.props.keyboardNavigation?window.addEventListener("keyup",this._handleKeyboardEvents):window.removeEventListener("keyup",this._handleKeyboardEvents)},t.prototype._handleResize=function(e){return l(this,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(s){switch(s.label){case 0:return r=this.props.onResizeEvent,n=m.getElementDimensions(this.rootElement),(r||m.shouldHandleResizeEvent)(e,this.rootComponentDimensions,n)?(this._cancelTimeoutAnimations(),this.rootComponentDimensions=n,r=this.state,n=r.itemsCount,t=r.isAutoPlaying,r=m.getUpdateSlidePositionIndex(this.state.activeIndex,n),n=m.calculateInitialState(i(i({},this.props),{activeIndex:r}),this.stageComponent),r=m.getTranslate3dProperty(n.activeIndex,n),o=i(i({},n),{translate3d:r,isAutoPlaying:t}),m.animate(this.stageComponent,{position:-r}),[4,this.setState(o)]):[3,2];case 1:s.sent(),this._handleResized({itemsInSlide:o.itemsInSlide}),this.isAnimationDisabled=!1,t&&this._handlePlay(),s.label=2;case 2:return[2]}}))}))},t.prototype._handleTouchmove=function(e,t){var n=t.absY,r=t.absX,i=t.deltaX,o=(t=this.props.swipeDelta,(c=this.state).swipeShiftValue),s=c.swipeLimitMin,a=c.swipeLimitMax,l=c.infinite,c=c.fadeoutAnimationProcessing;if(this.hasUserAction=!0,!(c||!this.isTouchMoveProcessStarted&&m.isVerticalTouchmoveDetected(r,n,t))){this.isTouchMoveProcessStarted||(this._cancelTimeoutAnimations(),this._setTouchmovePosition(),this.isAnimationDisabled=!0,this.isTouchMoveProcessStarted=!0,this._handleSlideChange());var u=m.getTouchmoveTranslatePosition(i,this.touchmovePosition);if(!1===l)return s<u||u<-a?void 0:void m.animate(this.stageComponent,{position:u});if(m.shouldRecalculateSwipePosition(u,s,a))try{!function e(){m.getIsLeftDirection(i)?u+=o:u+=-o,m.shouldRecalculateSwipePosition(u,s,a)&&e()}()}catch(e){m.debug(e)}m.animate(this.stageComponent,{position:u})}},t.prototype._handleTouchend=function(e,t){var n,r,i;t=t.deltaX;this._clearTouchmovePosition(),this.isTouchMoveProcessStarted&&(this.isTouchMoveProcessStarted=!1,n=this.state.animationDuration,r=this.props.animationEasingFunction,i=m.getTranslateXProperty(this.stageComponent),t=m.getSwipeTouchendPosition(this.state,t,i),m.animate(this.stageComponent,{position:t,animationDuration:n,animationEasingFunction:r}),this._handleBeforeTouchEnd(t))},t.prototype._handleBeforeTouchEnd=function(e){var t=this,n=this.state.animationDuration;this.touchEndTimeoutId=window.setTimeout((function(){return l(t,void 0,void 0,(function(){var t,n,r,i=this;return c(this,(function(o){switch(o.label){case 0:return t=m.getSwipeTouchendIndex(e,this.state),n=m.getTranslate3dProperty(t,this.state),m.animate(this.stageComponent,{position:-n}),r=m.getTransitionProperty(),[4,this.setState({activeIndex:t,translate3d:n,transition:r})];case 1:return o.sent(),requestAnimationFrame((function(){return i._handleSlideChanged()})),[2]}}))}))}),n)},t.prototype._handleSlideTo=function(e){var t,n=void 0===(t=e.activeIndex)?0:t,r=void 0===(t=e.fadeoutAnimationIndex)?null:t,i=void 0===(t=e.fadeoutAnimationPosition)?null:t,o=e.eventType;return l(this,void 0,void 0,(function(){var e,t,s,a,l=this;return c(this,(function(c){switch(c.label){case 0:return t=this.props,s=t.infinite,t=t.animationEasingFunction,e=this.state,a=e.itemsCount,e=e.animationDuration,this.isAnimationDisabled||this.state.activeIndex===n||!s&&m.shouldCancelSlideAnimation(n,a)?[2]:(this.isAnimationDisabled=!0,this._cancelTimeoutAnimations(),this._handleSlideChange(o),s=!1,a=m.getTranslate3dProperty(n,this.state),t=null!==r&&null!==i?(s=!0,m.getTransitionProperty()):m.getTransitionProperty({animationDuration:e,animationEasingFunction:t}),[4,this.setState({activeIndex:n,transition:t,translate3d:a,animationDuration:e,fadeoutAnimationIndex:r,fadeoutAnimationPosition:i,fadeoutAnimationProcessing:s})]);case 1:return c.sent(),this.slideEndTimeoutId=window.setTimeout((function(){return l._handleBeforeSlideEnd(o)}),e),[2]}}))}))},t.prototype._handleUpdateSlidePosition=function(e){return l(this,void 0,void 0,(function(){var t,n,r;return c(this,(function(i){switch(i.label){case 0:return t=this.state.animationDuration,n=m.getTranslate3dProperty(e,this.state),r=m.getTransitionProperty({animationDuration:0}),[4,this.setState({activeIndex:e,translate3d:n,transition:r,animationDuration:t,fadeoutAnimationIndex:null,fadeoutAnimationPosition:null,fadeoutAnimationProcessing:!1})];case 1:return i.sent(),[2]}}))}))},t.prototype._handleUpdated=function(){this.props.onUpdated&&this.props.onUpdated(i(i({},this.eventObject),{type:y.EventType.UPDATE}))},t.prototype._handleResized=function(e){void 0===e&&(e={}),this.props.onResized&&this.props.onResized(i(i(i({},this.eventObject),e),{type:y.EventType.RESIZE}))},t.prototype._handleSlideChange=function(e){this.props.onSlideChange&&(e=e?i(i({},this.eventObject),{type:e}):this.eventObject,this.props.onSlideChange(e))},t.prototype._handleSlideChanged=function(e){return l(this,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(s){switch(s.label){case 0:return n=this.state,t=n.isAutoPlaying,n=n.isAutoPlayCanceledOnAction,r=this.props,o=r.autoPlayStrategy,r=r.onSlideChanged,m.shouldCancelAutoPlayOnAction(o)&&this.hasUserAction&&!n?[4,this.setState({isAutoPlayCanceledOnAction:!0,isAutoPlaying:!1})]:[3,2];case 1:return s.sent(),[3,3];case 2:t&&this._handlePlay(),s.label=3;case 3:return this.isAnimationDisabled=!1,r&&(o=e?i(i({},this.eventObject),{type:e}):this.eventObject,r(o)),e===y.EventType.UPDATE&&this._handleUpdated(),[2]}}))}))},t.prototype._handleDotClick=function(e){this.hasUserAction=!0,this.slideTo(e)},t.prototype._handlePlay=function(){this._setAutoPlayInterval()},t.prototype._cancelTimeoutAnimations=function(){this._clearAutoPlayTimeout(),this._clearSlideEndTimeout(),this.clearTouchendTimeout()},t.prototype._clearAutoPlayTimeout=function(){window.clearTimeout(this.autoPlayTimeoutId),this.autoPlayTimeoutId=void 0},t.prototype._clearSlideEndTimeout=function(){clearTimeout(this.slideEndTimeoutId),this.slideEndTimeoutId=void 0},t.prototype.clearTouchendTimeout=function(){clearTimeout(this.touchEndTimeoutId),this.touchEndTimeoutId=void 0},t.prototype._clearTouchmovePosition=function(){this.startTouchmovePosition=void 0},t.prototype._setTouchmovePosition=function(){var e=m.getTranslateXProperty(this.stageComponent);this.startTouchmovePosition=-e},t.prototype._setInitialState=function(){return l(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return e=m.calculateInitialState(this.props,this.stageComponent),this.rootComponentDimensions=m.getElementDimensions(this.rootElement),[4,this.setState(e)];case 1:return t.sent(),this.props.onInitialized&&this.props.onInitialized(i(i({},this.eventObject),{type:y.EventType.INIT})),[2]}}))}))},t.prototype._setAutoPlayInterval=function(){var e=this,t=(n=this.props).autoPlayDirection,n=n.autoPlayInterval;this.autoPlayTimeoutId=window.setTimeout((function(){e.isHovered||(t===y.AutoplayDirection.RTL?e.slidePrev():e.slideNext())}),n)},t.prototype._setupSwipeHandlers=function(){this.swipeListener=new h.default({element:this.rootElement,delta:this.props.swipeDelta,onSwiping:this._handleTouchmove,onSwiped:this._handleTouchend,rotationAngle:5,mouseTrackingEnabled:this.props.mouseTracking,touchTrackingEnabled:this.props.touchTracking,preventDefaultTouchmoveEvent:!this.props.touchMoveDefaultEvents,preventTrackingOnMouseleave:!0}),this.swipeListener.init()},t.prototype._updateComponent=function(){var e=this,t=(this.props.syncStateOnPropsUpdate?this.state:this.props).activeIndex,n=i(i({},this.props),{activeIndex:t});this._cancelTimeoutAnimations(),this.isAnimationDisabled=!1,this.state.isAutoPlaying&&this._handlePlay(),this.setState({clones:m.createClones(n)}),requestAnimationFrame((function(){e.setState(m.calculateInitialState(n,e.stageComponent),(function(){return e._handleUpdated()}))}))},t.prototype._updateSwipeProps=function(){this.swipeListener&&this.swipeListener.update({delta:this.props.swipeDelta,mouseTrackingEnabled:this.props.mouseTracking,touchTrackingEnabled:this.props.touchTracking,preventDefaultTouchmoveEvent:!this.props.touchMoveDefaultEvents})},t.prototype._renderDotsNavigation=function(){var e=(t=this.props).renderDotsItem,t=t.controlsStrategy;return d.default.createElement(g.DotsNavigation,{state:this.state,onClick:this._handleDotClick,renderDotsItem:e,controlsStrategy:t})},t.prototype._renderPrevButton=function(){var e=this.props.renderPrevButton,t=m.getSlideItemInfo(this.state).isPrevSlideDisabled;return d.default.createElement(g.PrevNextButton,{name:"prev",onClick:this.slidePrev,isDisabled:t,renderPrevButton:e})},t.prototype._renderNextButton=function(){var e=this.props.renderNextButton,t=m.getSlideItemInfo(this.state).isNextSlideDisabled;return d.default.createElement(g.PrevNextButton,{name:"next",onClick:this.slideNext,isDisabled:t,renderNextButton:e})},t.prototype._renderPlayPauseButton=function(){var e=this.props.renderPlayPauseButton,t=this.state.isAutoPlaying;return d.default.createElement(g.PlayPauseButton,{isPlaying:t,onClick:this._handlePlayPauseToggle,renderPlayPauseButton:e})},t.prototype.render=function(){var e=(r=this.state).translate3d,t=r.clones,n=r.transition,r=r.canUseDom,i=m.shouldDisableDots(this.props,this.state),o=m.shouldDisableButtons(this.props,this.state),s=m.getRenderWrapperStyles(this.props,this.state,this.stageComponent);e=m.getRenderStageStyles({translate3d:e},{transition:n}),n=this.props.ssrSilentMode||r?"":y.Modifiers.SSR,r=m.concatClassnames(y.Classnames.ROOT,n);return d.default.createElement("div",{className:r},d.default.createElement("div",{ref:this._setRootComponentRef},d.default.createElement("div",{style:s,className:y.Classnames.WRAPPER,onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave},d.default.createElement("ul",{style:e,className:y.Classnames.STAGE,ref:this._setStageComponentRef},t.map(this._renderStageItem)))),i?null:this._renderDotsNavigation(),o?null:this._renderPrevButton(),o?null:this._renderNextButton(),this.props.disableSlideInfo?null:this._renderSlideInfo(),this.props.autoPlayControls?this._renderPlayPauseButton():null)},t.defaultProps=f.defaultProps,t}(d.default.PureComponent));t.default=v},5539:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Modifiers=t.Classnames=t.AutoplayDirection=t.ControlsStrategy=t.AutoPlayStrategy=t.AnimationType=t.EventType=void 0,(n=t.EventType||(t.EventType={})).ACTION="action",n.INIT="init",n.RESIZE="resize",n.UPDATE="update",function(e){e.FADEOUT="fadeout",e.SLIDE="slide"}(t.AnimationType||(t.AnimationType={})),function(e){e.DEFAULT="default",e.ALL="all",e.ACTION="action",e.NONE="none"}(t.AutoPlayStrategy||(t.AutoPlayStrategy={})),function(e){e.DEFAULT="default",e.ALTERNATE="alternate",e.RESPONSIVE="responsive"}(t.ControlsStrategy||(t.ControlsStrategy={})),function(e){e.RTL="rtl",e.LTR="ltr"}(t.AutoplayDirection||(t.AutoplayDirection={})),function(e){e.ANIMATED="animated animated-out fadeOut",e.ROOT="alice-carousel",e.WRAPPER="alice-carousel__wrapper",e.STAGE="alice-carousel__stage",e.STAGE_ITEM="alice-carousel__stage-item",e.DOTS="alice-carousel__dots",e.DOTS_ITEM="alice-carousel__dots-item",e.PLAY_BTN="alice-carousel__play-btn",e.PLAY_BTN_ITEM="alice-carousel__play-btn-item",e.PLAY_BTN_WRAPPER="alice-carousel__play-btn-wrapper",e.SLIDE_INFO="alice-carousel__slide-info",e.SLIDE_INFO_ITEM="alice-carousel__slide-info-item",e.BUTTON_PREV="alice-carousel__prev-btn",e.BUTTON_PREV_WRAPPER="alice-carousel__prev-btn-wrapper",e.BUTTON_PREV_ITEM="alice-carousel__prev-btn-item",e.BUTTON_NEXT="alice-carousel__next-btn",e.BUTTON_NEXT_WRAPPER="alice-carousel__next-btn-wrapper",e.BUTTON_NEXT_ITEM="alice-carousel__next-btn-item"}(t.Classnames||(t.Classnames={})),function(e){e.ACTIVE="__active",e.INACTIVE="__inactive",e.CLONED="__cloned",e.CUSTOM="__custom",e.PAUSE="__pause",e.SEPARATOR="__separator",e.SSR="__ssr",e.TARGET="__target"}(t.Modifiers||(t.Modifiers={}))},1323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isClonedItem=t.isTargetItem=t.isActiveItem=t.getRenderStageItemClasses=void 0;var r=n(5539),i=n(7638),o=n(9981),s=(t.getRenderStageItemClasses=function(e,n){void 0===e&&(e=0);var o=n.fadeoutAnimationIndex,s=(0,t.isActiveItem)(e,n)?r.Modifiers.ACTIVE:"",a=(0,t.isClonedItem)(e,n)?r.Modifiers.CLONED:"";n=(0,t.isTargetItem)(e,n)?r.Modifiers.TARGET:"",e=e===o?r.Classnames.ANIMATED:"";return(0,i.concatClassnames)(r.Classnames.STAGE_ITEM,s,a,n,e)},function(e,t){void 0===e&&(e=0);var n=t.activeIndex,r=t.itemsInSlide,i=t.itemsOffset,s=t.infinite,a=(t=t.autoWidth,(0,o.getShiftIndex)(r,i));return t&&s?e-a===n+i:(t=n+a,s?t<=e&&e<t+r:n<=e&&e<t)}),a=(t.isActiveItem=s,function(e,t){void 0===e&&(e=0);var n=t.activeIndex,r=t.itemsInSlide,i=t.itemsOffset,s=t.infinite;t=t.autoWidth,r=(0,o.getShiftIndex)(r,i);return s?t&&s?e-r===n+i:e===n+r:e===n}),l=(t.isTargetItem=a,function(e,t){void 0===e&&(e=0);var n=t.itemsInSlide,r=t.itemsOffset,i=t.itemsCount,s=t.infinite;t=t.autoWidth;return!!s&&(t&&s?e<n||i-1+n<e:e<(t=(0,o.getShiftIndex)(n,r))||i-1+t<e)});t.isClonedItem=l},7638:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateInitialState=t.getIsStageContentPartial=t.concatClassnames=void 0;var r=n(7646),i=n(9981),o=(t.concatClassnames=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")},function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),!(e=void 0!==e&&e)&&n<=t}),s=(t.getIsStageContentPartial=o,function(e,t,n){void 0===n&&(n=(0,r.canUseDOM)());var o,s,a=void 0===(a=e.animationDuration)?0:a,l=void 0!==(l=e.infinite)&&l,c=void 0!==(c=e.autoPlay)&&c,u=void 0!==(u=e.autoWidth)&&u,d=(0,r.createClones)(e),h=(0,r.getTransitionProperty)(),f=(0,r.getItemsCount)(e),p=(0,r.getItemsOffset)(e),g=(0,r.getItemsInSlide)(f,e),m=(0,i.getStartIndex)(e.activeIndex,f),y=(m=(0,i.getActiveIndex)({startIndex:m,itemsCount:f,infinite:l}),(0,r.getElementDimensions)(t).width),v=(t=(u?(o=(t=(0,r.createAutowidthTransformationSet)(t,y,l)).coords,s=t.content,t):(o=(t=(0,r.createDefaultTransformationSet)(d,y,g,l)).coords,s=t.content,t)).partial,(0,i.getItemCoords)(-g,o).position),b=(0,i.getSwipeLimitMin)({itemsOffset:p,transformationSet:o},e),w=(e=(0,i.getSwipeLimitMax)({itemsCount:f,itemsOffset:p,itemsInSlide:g,transformationSet:o},e),(0,i.getSwipeShiftValue)(f,o));return{activeIndex:m,autoWidth:u,animationDuration:a,clones:d,infinite:l,itemsCount:f,itemsInSlide:g,itemsOffset:p,translate3d:(0,r.getTranslate3dProperty)(m,{itemsInSlide:g,itemsOffset:p,transformationSet:o,autoWidth:u,infinite:l}),stageWidth:y,stageContentWidth:s,initialStageHeight:0,isStageContentPartial:t,isAutoPlaying:c,isAutoPlayCanceledOnAction:!1,transformationSet:o,transition:h,fadeoutAnimationIndex:null,fadeoutAnimationPosition:null,fadeoutAnimationProcessing:!1,swipeLimitMin:b,swipeLimitMax:e,swipeAllowedPositionMax:v,swipeShiftValue:w,canUseDom:n}});t.calculateInitialState=s},5369:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldCancelAutoPlayOnHover=t.shouldCancelAutoPlayOnAction=t.getItemIndexForDotNavigation=t.checkIsTheLastDotIndex=t.getDotsNavigationLength=t.hasDotForEachSlide=t.isStrategy=t.shouldDisableButtons=t.shouldDisableDots=t.shouldDisableControls=void 0;var r=n(5539);function i(e,n){e=(e||{}).controlsStrategy;var i=(n=n||{}).itemsInSlide,o=n.itemsCount;n=n.autoWidth;if((0,t.isStrategy)(e,r.ControlsStrategy.RESPONSIVE))return!n&&i===o}t.shouldDisableControls=i,t.shouldDisableDots=function(e,t){return e.disableDotsControls||i(e,t)},t.shouldDisableButtons=function(e,t){return e.disableButtonsControls||!e.infinite&&i(e,t)};var o=(t.isStrategy=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),Boolean(e&&e.includes(t))},function(e,n){return e||(0,t.isStrategy)(n,r.ControlsStrategy.ALTERNATE)}),s=(t.hasDotForEachSlide=o,function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=1),(n=void 0!==n&&n)?e:0!==Number(t)&&Math.ceil(e/t)||0}),a=(t.getDotsNavigationLength=s,function(e,t,n){return!t&&e===n-1}),l=(t.checkIsTheLastDotIndex=a,function(e,t,n,r){return(t?n-r:e*r)||0}),c=(t.getItemIndexForDotNavigation=l,function(e){return(e=void 0===e?"":e)===r.AutoPlayStrategy.ACTION||e===r.AutoPlayStrategy.ALL}),u=(t.shouldCancelAutoPlayOnAction=c,function(e){return(e=void 0===e?"":e)===r.AutoPlayStrategy.DEFAULT||e===r.AutoPlayStrategy.ALL});t.shouldCancelAutoPlayOnHover=u},8632:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debug=void 0,t.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}},7646:(e,t,n)=>{"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.getItemsInSlide=t.canUseDOM=t.getTransformMatrix=t.getTranslateXProperty=t.getTouchmoveTranslatePosition=t.getTranslate3dProperty=t.getRenderStageItemStyles=t.getRenderStageStyles=t.getTransitionProperty=t.getRenderWrapperStyles=t.animate=t.shouldHandleResizeEvent=t.getElementFirstChild=t.getElementCursor=t.getAutoheightProperty=t.getElementDimensions=t.getItemWidth=t.createDefaultTransformationSet=t.createAutowidthTransformationSet=t.isElement=t.createClones=t.getItemsOffset=t.getItemsCount=t.getSlides=void 0,n(5977)),o=n(9981),s=(t.getSlides=function(e){var t=e.children;e=e.items;return t?t.length?t:[t]:void 0===e?[]:e},function(e){return(0,t.getSlides)(e).length}),a=(t.getItemsCount=s,function(e){var t=e.infinite,n=e.paddingRight;e=e.paddingLeft;return t&&(e||n)?1:0}),l=(t.getItemsOffset=a,function(e){var n,r,i,o,s=(0,t.getSlides)(e);return e.infinite?(n=(0,t.getItemsCount)(e),o=(0,t.getItemsOffset)(e),e=(0,t.getItemsInSlide)(n,e),i=Math.min(e,n)+o,r=s.slice(0,i),i=s.slice(-i),o&&e===n&&(o=s[0],e=s.slice(-1)[0],i.unshift(e),r.push(o)),i.concat(s,r)):s}),c=(t.createClones=l,function(e){try{return e instanceof Element||e instanceof HTMLDocument}catch(e){return!1}}),u=(t.isElement=c,function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=!1);var o=0,s=!0,a=[];return(0,t.isElement)(e)&&(a=Array.from((null==e?void 0:e.children)||[]).reduce((function(e,t,r){var i=0,a=e[r=r-1];t=f(null==t?void 0:t.firstChild).width;return s=(o+=t=void 0===t?0:t)<=n,a&&(i=0==r?a.width:a.width+a.position),e.push({position:i,width:t}),e}),[]),r||(a=s?(0,i.mapPartialCoords)(a):(e=o-n,(0,i.mapPositionCoords)(a,e)))),{coords:a,content:o,partial:s}}),d=(t.createAutowidthTransformationSet=u,function(e,n,r,o){void 0===o&&(o=!1);var s=0,a=!0,l=[],c=(0,t.getItemWidth)(n,r);return l=e.reduce((function(e,t,r){var i=0;r=e[r-1];return a=(s+=c)<=n,r&&(i=c+r.position||0),e.push({width:c,position:i}),e}),[]),{coords:l=o?l:a?(0,i.mapPartialCoords)(l):(r=s-n,(0,i.mapPositionCoords)(l,r)),content:s,partial:a}}),h=(t.createDefaultTransformationSet=d,function(e,t){return 0<t?e/t:e});function f(e){return e&&e.getBoundingClientRect?{width:(e=e.getBoundingClientRect()).width,height:e.height}:{width:0,height:0}}t.getItemWidth=h,t.getElementDimensions=f;var p=(t.getAutoheightProperty=function(e,n,r){n=(0,t.getElementCursor)(n,r),r=(0,t.getElementFirstChild)(e,n);if((0,t.isElement)(r))return e=window.getComputedStyle(r),n=parseFloat(e.marginTop),e=parseFloat(e.marginBottom),Math.ceil(r.offsetHeight+n+e)},function(e,n){var r=n.activeIndex;n=n.itemsInSlide;return e.infinite?r+n+(0,t.getItemsOffset)(e):r}),g=(t.getElementCursor=p,function(e,t){return(e=e&&e.children||[])[t]&&e[t].firstChild||null});t.getElementFirstChild=g,t.shouldHandleResizeEvent=function(e,t,n){return(t=void 0===t?{}:t).width!==(n=void 0===n?{}:n).width},t.animate=function(e,n){var r=void 0===(r=(n=n||{}).position)?0:r,i=void 0===(i=n.animationDuration)?0:i;return n=void 0===(n=n.animationEasingFunction)?"ease":n,e&&(0,t.isElement)(e)&&(e.style.transition="transform ".concat(i,"ms ").concat(n," 0ms"),e.style.transform="translate3d(".concat(r,"px, 0, 0)")),e};var m=(t.getRenderWrapperStyles=function(e,n,r){var i=(a=e||{}).paddingLeft,o=a.paddingRight,s=a.autoHeight,a=a.animationDuration;return{height:s=s?(0,t.getAutoheightProperty)(r,e,n):void 0,transition:s?"height ".concat(a,"ms"):void 0,paddingLeft:"".concat(i,"px"),paddingRight:"".concat(o,"px")}},function(e){var t=(e=e||{}).animationDuration;e=void 0===(e=e.animationEasingFunction)?"ease":e;return"transform ".concat(void 0===t?0:t,"ms ").concat(e," 0ms")}),y=(t.getTransitionProperty=m,function(e,t){return e=(e||{}).translate3d,e="translate3d(".concat(-(void 0===e?0:e),"px, 0, 0)"),r(r({},t),{transform:e})}),v=(t.getRenderStageStyles=y,function(e,t){var n=t.transformationSet,r=t.fadeoutAnimationIndex,i=t.fadeoutAnimationPosition,o=t.fadeoutAnimationProcessing;t=t.animationDuration,n=(n[e]||{}).width;return o&&r===e?{transform:"translateX(".concat(i,"px)"),animationDuration:"".concat(t,"ms"),width:"".concat(n,"px")}:{width:n}}),b=(t.getRenderStageItemStyles=v,function(e,t){var n=e,r=t.infinite,i=t.itemsOffset,s=t.itemsInSlide;return((void 0===(t=t.transformationSet)?[]:t)[n=r?e+(0,o.getShiftIndex)(void 0===s?0:s,void 0===i?0:i):n]||{}).position||0}),w=(t.getTranslate3dProperty=b,function(e,t){return-(t-Math.floor(e))});function x(e){return e&&(0,t.isElement)(e)&&window.getComputedStyle(e).transform.match(/(-?[0-9.]+)/g)||[]}t.getTouchmoveTranslatePosition=w,t.getTranslateXProperty=function(e){return e=(e=x(e))&&e[4]||"",Number(e)},t.getTransformMatrix=x;var A=(t.canUseDOM=function(){var e;try{return Boolean(null==(e=null===window||void 0===window?void 0:window.document)?void 0:e.createElement)}catch(e){return!1}},function(e,n){var r,i=1,o=n.responsive,s=n.autoWidth,a=n.infinite;n=n.innerWidth;return void 0!==s&&s?void 0!==a&&a?e:i:(o&&(s=Object.keys(o)).length&&(n||(0,t.canUseDOM)())&&(r=void 0===n?window.innerWidth:n,s.forEach((function(t){var n;Number(t)<=r&&(n=(t=o[t]).items,t=t.itemsFit,i="contain"===(void 0===t?"fill":t)?n:Math.min(n,e))}))),i||1)});t.getItemsInSlide=A},2599:(e,t,n)=>{"use strict";var r=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]},i=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(7638),t),i(n(7646),t),i(n(1323),t),i(n(6021),t),i(n(9981),t),i(n(8632),t),i(n(9667),t),i(n(5369),t),i(n(5977),t)},5977:(e,t)=>{"use strict";var n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},r=(Object.defineProperty(t,"__esModule",{value:!0}),t.mapPositionCoords=t.mapPartialCoords=void 0,function(e){return e.map((function(e){return{width:e.width,position:0}}))}),i=(t.mapPartialCoords=r,function(e,t){return void 0===t&&(t=0),e.map((function(e){return e.position>t?n(n({},e),{position:t}):e}))});t.mapPositionCoords=i},9981:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVerticalTouchmoveDetected=t.getFadeoutAnimationPosition=t.getFadeoutAnimationIndex=t.getSwipeTouchendIndex=t.getSwipeTouchendPosition=t.getSwipeTransformationCursor=t.getTransformationItemIndex=t.getSwipeShiftValue=t.getItemCoords=t.getIsLeftDirection=t.shouldRecalculateSwipePosition=t.getSwipeLimitMax=t.getSwipeLimitMin=t.shouldCancelSlideAnimation=t.shouldRecalculateSlideIndex=t.getUpdateSlidePositionIndex=t.getActiveIndex=t.getStartIndex=t.getShiftIndex=void 0;var n=(t.getShiftIndex=function(e,t){return(e=void 0===e?0:e)+(void 0===t?0:t)},function(e,t){if(void 0===e&&(e=0),t=void 0===t?0:t){if(t<=e)return t-1;if(0<e)return e}return 0}),r=(t.getStartIndex=n,function(e){var n=void 0===(n=e.startIndex)?0:n,r=e.itemsCount;return void 0!==(e=e.infinite)&&e?n:(0,t.getStartIndex)(n,void 0===r?0:r)}),i=(t.getActiveIndex=r,function(e,t){return e<0?t-1:t<=e?0:e}),o=(t.getUpdateSlidePositionIndex=i,function(e,t){return e<0||t<=e}),s=(t.shouldRecalculateSlideIndex=o,function(e,t){return e<0||t<=e}),a=(t.shouldCancelSlideAnimation=s,function(e,t){var n=e.itemsOffset,r=(e=void 0===(e=e.transformationSet)?[]:e,t.infinite);t=t.swipeExtraPadding;return r?(e[void 0===n?0:n]||{}).position:(r=(e[0]||{}).width,Math.min(void 0===t?0:t,void 0===r?0:r))}),l=(t.getSwipeLimitMin=a,function(e,n){var r=n.infinite,i=(n=void 0===(n=n.swipeExtraPadding)?0:n,e.itemsCount),o=e.itemsOffset,s=void 0===(s=e.itemsInSlide)?1:s;e=void 0===(e=e.transformationSet)?[]:e;return r?(e[(void 0===i?1:i)+(0,t.getShiftIndex)(s,void 0===o?0:o)]||{}).position||0:(0,t.getItemCoords)(-s,e).position+n}),c=(t.getSwipeLimitMax=l,function(e,t,n){return-t<=e||Math.abs(e)>=n}),u=(t.shouldRecalculateSwipePosition=c,function(e){return(e=void 0===e?0:e)<0}),d=(t.getIsLeftDirection=u,function(e,t){return(t=void 0===t?[]:t).slice(e=void 0===e?0:e)[0]||{position:0,width:0}}),h=(t.getItemCoords=d,function(e,n){return void 0===e&&(e=0),void 0===n&&(n=[]),(0,t.getItemCoords)(e,n).position}),f=(t.getSwipeShiftValue=h,function(e,t){return void 0===t&&(t=0),(e=void 0===e?[]:e).findIndex((function(e){return e.position>=Math.abs(t)}))}),p=(t.getTransformationItemIndex=f,function(e,n,r){return void 0===e&&(e=[]),void 0===n&&(n=0),void 0===r&&(r=0),e=(0,t.getTransformationItemIndex)(e,n),(0,t.getIsLeftDirection)(r)?e:e-1}),g=(t.getSwipeTransformationCursor=p,function(e,n,r){void 0===r&&(r=0);var i=e.infinite,o=e.autoWidth,s=e.isStageContentPartial,a=e.swipeAllowedPositionMax;e=e.transformationSet,r=(0,t.getSwipeTransformationCursor)(e,r,n),n=(0,t.getItemCoords)(r,e).position;if(!i){if(o&&s)return 0;if(a<n)return-a}return-n}),m=(t.getSwipeTouchendPosition=g,function(e,n){var r=n.transformationSet,i=n.itemsInSlide,o=n.itemsOffset,s=n.itemsCount,a=n.infinite,l=n.isStageContentPartial,c=n.activeIndex;n=n.translate3d;return a||!l&&n!==Math.abs(e)?(l=(0,t.getTransformationItemIndex)(r,e),a?l<(n=(0,t.getShiftIndex)(i,o))?s-i-o+l:n+s<=l?l-(n+s):l-n:l):c}),y=(t.getSwipeTouchendIndex=m,function(e){var t=e.infinite,n=e.activeIndex;e=e.itemsInSlide;return t?n+e:n}),v=(t.getFadeoutAnimationIndex=y,function(e,t){var n=t.activeIndex;t=t.stageWidth;return e<n?(n-e)*-t||0:(e-n)*t||0}),b=(t.getFadeoutAnimationPosition=v,function(e,t,n){return e<(n=void 0===n?0:n)||e<.1*t});t.isVerticalTouchmoveDetected=b},9667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSlideItemInfo=t.getSlideInfo=t.getSlideIndexForMultipleItems=t.getSlideIndexForNonMultipleItems=t.getActiveSlideDotsLength=t.getActiveSlideIndex=void 0;var n=(t.getActiveSlideIndex=function(e,n){var r=(n=n||{}).activeIndex,i=n.itemsInSlide;n=n.itemsCount,r+=i;return 1===i?(0,t.getSlideIndexForNonMultipleItems)(r,i,n):(0,t.getSlideIndexForMultipleItems)(r,i,n,e)},function(e,t){var n;return void 0===t&&(t=1),(e=void 0===e?0:e)&&t?(n=Math.floor(e/t),e%t==0?n-1:n):0}),r=(t.getActiveSlideDotsLength=n,function(e,t,n){return e<t?n-t:n<e?0:e-1}),i=(t.getSlideIndexForNonMultipleItems=r,function(e,n,r,i){var o=(0,t.getActiveSlideDotsLength)(r,n);return e===r+n?0:i||e<n&&0!==e?o:0===e?r%n==0?o:o-1:0<n?Math.floor(e/n)-1:0}),o=(t.getSlideIndexForMultipleItems=i,function(e,t){return void 0===t&&(t=0),(e=(e=void 0===e?0:e)+1)<1?e=t:t<e&&(e=1),{item:e,itemsCount:t}}),s=(t.getSlideInfo=o,function(e){var t=(e=e||{}).itemsInSlide,n=e.activeIndex,r=e.infinite,i=e.itemsCount;return e.isStageContentPartial?{isPrevSlideDisabled:!0,isNextSlideDisabled:!0}:{isPrevSlideDisabled:!1===r&&0===n,isNextSlideDisabled:!1===r&&i-t<=n}});t.getSlideItemInfo=s},6021:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0,t.debounce=function(e,t){function n(){r&&(clearTimeout(r),r=void 0)}void 0===t&&(t=0);var r=void 0;return[function(){for(var i=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];n(),r=window.setTimeout((function(){e.apply(i,o),r=void 0}),t)},n]}},7432:(e,t,n)=>{"use strict";var r,i=(Object.defineProperty(t,"__esModule",{value:!0}),t.DotsNavigation=void 0,(r=n(7565))&&r.__esModule?r:{default:r}),o=n(5539),s=n(2599);t.DotsNavigation=function(e){var t=e.state,n=e.onClick,r=e.onMouseEnter,a=e.onMouseLeave,l=e.controlsStrategy,c=e.renderDotsItem,u=t.itemsCount,d=t.itemsInSlide,h=t.infinite,f=(e=t.autoWidth,t.activeIndex),p=(0,s.getSlideItemInfo)(t).isNextSlideDisabled,g=(0,s.hasDotForEachSlide)(e,l),m=(0,s.getDotsNavigationLength)(u,d,g);return i.default.createElement("ul",{className:o.Classnames.DOTS},Array.from({length:u}).map((function(e,l){var y,v,b;if(l<m)return v=(0,s.checkIsTheLastDotIndex)(l,Boolean(h),m),y=(0,s.getItemIndexForDotNavigation)(l,v,u,d),v=(0,s.getActiveSlideIndex)(p,t),g&&((v=f)<0?v=u-1:u<=f&&(v=0),y=l),v=v===l?o.Modifiers.ACTIVE:"",b=c?o.Modifiers.CUSTOM:"",b=(0,s.concatClassnames)(o.Classnames.DOTS_ITEM,v,b),i.default.createElement("li",{key:"dot-item-".concat(l),onMouseEnter:r,onMouseLeave:a,onClick:function(){return n(y)},className:b},c&&c({isActive:Boolean(v),activeIndex:l}))})))}},7558:(e,t,n)=>{"use strict";var r,i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=(Object.defineProperty(t,"__esModule",{value:!0}),(r=n(7565))&&r.__esModule?r:{default:r});t.default=function(e){var t={xDown:null,xUp:null};return o.default.createElement("a",i({onClick:function(e){t.xDown!==t.xUp&&e.preventDefault()},onMouseDown:function(e){e.preventDefault(),t.xUp=null,t.xDown=e.clientX},onMouseUp:function(e){e.preventDefault(),t.xUp=e.clientX}},e),e.children)}},1804:(e,t,n)=>{"use strict";var r,i=(Object.defineProperty(t,"__esModule",{value:!0}),t.PlayPauseButton=void 0,(r=n(7565))&&r.__esModule?r:{default:r}),o=n(5539),s=n(2599);t.PlayPauseButton=function(e){var t=e.isPlaying,n=e.onClick;return"function"==typeof(e=e.renderPlayPauseButton)?i.default.createElement("div",{className:o.Classnames.PLAY_BTN,onClick:n},e({isPlaying:t})):(e=t?o.Modifiers.PAUSE:"",t=(0,s.concatClassnames)(o.Classnames.PLAY_BTN_ITEM,e),i.default.createElement("div",{className:o.Classnames.PLAY_BTN},i.default.createElement("div",{className:o.Classnames.PLAY_BTN_WRAPPER},i.default.createElement("div",{onClick:n,className:t}))))}},7978:(e,t,n)=>{"use strict";var r,i=(Object.defineProperty(t,"__esModule",{value:!0}),t.PrevNextButton=void 0,(r=n(7565))&&r.__esModule?r:{default:r}),o=n(5539),s=n(2599);t.PrevNextButton=function(e){var t,n=e.name,r=e.isDisabled,a=e.onClick,l=e.renderPrevButton;e=e.renderNextButton;return"function"==typeof l?i.default.createElement("div",{className:o.Classnames.BUTTON_PREV,onClick:a},l({isDisabled:r})):"function"==typeof e?i.default.createElement("div",{className:o.Classnames.BUTTON_NEXT,onClick:a},e({isDisabled:r})):(e=(l="prev"===n)?"<":">",n=l?o.Classnames.BUTTON_PREV:o.Classnames.BUTTON_NEXT,t=l?o.Classnames.BUTTON_PREV_WRAPPER:o.Classnames.BUTTON_NEXT_WRAPPER,l=l?o.Classnames.BUTTON_PREV_ITEM:o.Classnames.BUTTON_NEXT_ITEM,r=r?o.Modifiers.INACTIVE:"",l=(0,s.concatClassnames)(l,r),i.default.createElement("div",{className:n},i.default.createElement("div",{className:t},i.default.createElement("p",{className:l,onClick:function(e){return a(e)}},i.default.createElement("span",{"data-area":e})))))}},8293:(e,t,n)=>{"use strict";var r,i=(Object.defineProperty(t,"__esModule",{value:!0}),t.SlideInfo=void 0,(r=n(7565))&&r.__esModule?r:{default:r}),o=n(5539),s=n(2599);t.SlideInfo=function(e){var t=e.activeIndex,n=e.itemsCount;e=e.renderSlideInfo,t=(0,s.getSlideInfo)(t,n).item;return"function"==typeof e?i.default.createElement("div",{className:o.Classnames.SLIDE_INFO},e({item:t,itemsCount:n})):(e=(0,s.concatClassnames)(o.Classnames.SLIDE_INFO_ITEM,o.Modifiers.SEPARATOR),i.default.createElement("div",{className:o.Classnames.SLIDE_INFO},i.default.createElement("span",{className:o.Classnames.SLIDE_INFO_ITEM},t),i.default.createElement("span",{className:e},"/"),i.default.createElement("span",{className:o.Classnames.SLIDE_INFO_ITEM},n)))}},4605:(e,t,n)=>{"use strict";var r,i=(Object.defineProperty(t,"__esModule",{value:!0}),t.StageItem=void 0,(r=n(7565))&&r.__esModule?r:{default:r});t.StageItem=function(e){var t=e.item,n=e.className;e=e.styles;return i.default.createElement("li",{style:e,className:n},t)}},1700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrevNextButton=t.PlayPauseButton=t.DotsNavigation=t.StageItem=t.SlideInfo=void 0;var r=n(8293),i=(Object.defineProperty(t,"SlideInfo",{enumerable:!0,get:function(){return r.SlideInfo}}),n(4605)),o=(Object.defineProperty(t,"StageItem",{enumerable:!0,get:function(){return i.StageItem}}),n(7432)),s=(Object.defineProperty(t,"DotsNavigation",{enumerable:!0,get:function(){return o.DotsNavigation}}),n(1804)),a=(Object.defineProperty(t,"PlayPauseButton",{enumerable:!0,get:function(){return s.PlayPauseButton}}),n(7978));Object.defineProperty(t,"PrevNextButton",{enumerable:!0,get:function(){return a.PrevNextButton}})},5764:(e,t,n)=>{"use strict";var r=n(7565),i=n(9611);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function g(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),A=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function D(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var L,B=Object.assign;function F(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var j=!1;function U(e,t){if(!e||j)return"";j=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{j=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 1:return e=U(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case A:return"Portal";case k:return"Profiler";case S:return"StrictMode";case P:return"Suspense";case I:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function $(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=$(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Y(e,t){J(e,t);var n=$(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,$(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return B({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:$(n)}}function oe(e,t){var n=$(t.value),r=$(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,Ee=null,Se=null;function ke(e){if(e=bi(e)){if("function"!==typeof Ae)throw Error(o(280));var t=e.stateNode;t&&(t=xi(t),Ae(e.stateNode,e.type,t))}}function Ce(e){Ee?Se?Se.push(e):Se=[e]:Ee=e}function _e(){if(Ee){var e=Ee,t=Se;if(Se=Ee=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Te(e,t){return e(t)}function Pe(){}var Ie=!1;function Oe(e,t,n){if(Ie)return e(t,n);Ie=!0;try{return Te(e,t,n)}finally{Ie=!1,(null!==Ee||null!==Se)&&(Pe(),_e())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Ne=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ue){Ne=!1}function De(e,t,n,r,i,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Le=!1,Be=null,Fe=!1,je=null,Ue={onError:function(e){Le=!0,Be=e}};function ze(e,t,n,r,i,o,s,a,l){Le=!1,Be=null,De.apply(Ue,arguments)}function Ve(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 He(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 $e(e){if(Ve(e)!==e)throw Error(o(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return $e(i),e;if(s===r)return $e(i),t;s=s.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,Ke=i.unstable_cancelCallback,Qe=i.unstable_shouldYield,Xe=i.unstable_requestPaint,Je=i.unstable_now,Ye=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var st=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){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: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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=dt(a):0!==(o&=s)&&(r=dt(o))}else 0!==(s=n&~i)?r=dt(s):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-st(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8: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 pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var xt,At,Et,St,kt,Ct=!1,_t=[],Tt=null,Pt=null,It=null,Ot=new Map,Rt=new Map,Nt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Lt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&At(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Bt(e){var t=vi(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void kt(e.priority,(function(){Et(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&At(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function jt(e,t,n){Ft(e)&&n.delete(t)}function Ut(){Ct=!1,null!==Tt&&Ft(Tt)&&(Tt=null),null!==Pt&&Ft(Pt)&&(Pt=null),null!==It&&Ft(It)&&(It=null),Ot.forEach(jt),Rt.forEach(jt)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ut)))}function Vt(e){function t(t){return zt(t,e)}if(0<_t.length){zt(_t[0],e);for(var n=1;n<_t.length;n++){var r=_t[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&zt(Tt,e),null!==Pt&&zt(Pt,e),null!==It&&zt(It,e),Ot.forEach(t),Rt.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)Bt(n),null===n.blockedOn&&Nt.shift()}var Ht=w.ReactCurrentBatchConfig,$t=!0;function Wt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=1,qt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function Gt(e,t,n,r){var i=bt,o=Ht.transition;Ht.transition=null;try{bt=4,qt(e,t,n,r)}finally{bt=i,Ht.transition=o}}function qt(e,t,n,r){if($t){var i=Qt(e,t,n,r);if(null===i)$r(e,t,r,Kt,n),Dt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Lt(Tt,e,t,n,r,i),!0;case"dragenter":return Pt=Lt(Pt,e,t,n,r,i),!0;case"mouseover":return It=Lt(It,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ot.set(o,Lt(Ot.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Rt.set(o,Lt(Rt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&xt(o),null===(o=Qt(e,t,n,r))&&$r(e,t,r,Kt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else $r(e,t,r,null,n)}}var Kt=null;function Qt(e,t,n,r){if(Kt=null,null!==(e=vi(e=xe(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Xt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ye()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Yt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Yt,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return B(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=B({},cn,{view:0,detail:0}),hn=on(dn),fn=B({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:an}}),pn=on(fn),gn=on(B({},fn,{dataTransfer:0})),mn=on(B({},dn,{relatedTarget:0})),yn=on(B({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=B({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(vn),wn=on(B({},cn,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function kn(){return Sn}var Cn=B({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),_n=on(Cn),Tn=on(B({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=on(B({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),In=on(B({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=B({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=on(On),Nn=[9,13,27,32],Mn=u&&"CompositionEvent"in window,Dn=null;u&&"documentMode"in document&&(Dn=document.documentMode);var Ln=u&&"TextEvent"in window&&!Dn,Bn=u&&(!Mn||Dn&&8<Dn&&11>=Dn),Fn=String.fromCharCode(32),jn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var Hn={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 $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Wn(e,t,n,r){Ce(r),0<(t=Gr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,qn=null;function Kn(e){Fr(e,0)}function Qn(e){if(q(wi(e)))return e}function Xn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Yn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Yn=Zn}else Yn=!1;Jn=Yn&&(!document.documentMode||9<document.documentMode)}function tr(){Gn&&(Gn.detachEvent("onpropertychange",nr),qn=Gn=null)}function nr(e){if("value"===e.propertyName&&Qn(qn)){var t=[];Wn(t,qn,e,xe(e)),Oe(Kn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Gn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(qn)}function or(e,t){if("click"===e)return Qn(t)}function sr(e,t){if("input"===e||"change"===e)return Qn(t)}var ar="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(ar(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!ar(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=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=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function fr(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 pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var s=ur(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=u&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,vr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==K(r)||("selectionStart"in(r=mr)&&fr(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},vr&&lr(vr,r)||(vr=r,0<(r=Gr(yr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ar={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},Er={},Sr={};function kr(e){if(Er[e])return Er[e];if(!Ar[e])return e;var t,n=Ar[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return Er[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);var Cr=kr("animationend"),_r=kr("animationiteration"),Tr=kr("animationstart"),Pr=kr("transitionend"),Ir=new Map,Or="abort auxClick 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 toggle touchMove waiting wheel".split(" ");function Rr(e,t){Ir.set(e,t),l(t,[e])}for(var Nr=0;Nr<Or.length;Nr++){var Mr=Or[Nr];Rr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Rr(Cr,"onAnimationEnd"),Rr(_r,"onAnimationIteration"),Rr(Tr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Pr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function Br(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,s,a,l,c){if(ze.apply(this,arguments),Le){if(!Le)throw Error(o(198));var u=Be;Le=!1,Be=null,Fe||(Fe=!0,je=u)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Br(i,a,c),o=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Br(i,a,c),o=l}}}if(Fe)throw e=je,Fe=!1,je=null,e}function jr(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Vr(e){if(!e[zr]){e[zr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Lr.has(t)||Ur(t,!1,e),Ur(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Ur("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Xt(t)){case 1:var i=Wt;break;case 4:i=Gt;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function $r(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=vi(a)))return;if(5===(l=s.tag)||6===l){r=o=s;continue e}a=a.parentNode}}r=r.return}Oe((function(){var r=o,i=xe(n),s=[];e:{var a=Ir.get(e);if(void 0!==a){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=_n;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Pn;break;case Cr:case _r:case Tr:l=yn;break;case Pr:l=In;break;case"scroll":l=hn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==a?a+"Capture":null:a;u=[];for(var f,p=r;null!==p;){var g=(f=p).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==h&&(null!=(g=Re(p,h))&&u.push(Wr(p,g,f)))),d)break;p=p.return}0<u.length&&(a=new l(a,c,null,n,i),s.push({event:a,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!vi(c)&&!c[pi])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?vi(c):null)&&(c!==(d=Ve(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Tn,g="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?a:wi(l),f=null==c?a:wi(c),(a=new u(g,p+"leave",l,n,i)).target=d,a.relatedTarget=f,g=null,vi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,p=0,f=u=l;f;f=qr(f))p++;for(f=0,g=h;g;g=qr(g))f++;for(;0<p-f;)u=qr(u),p--;for(;0<f-p;)h=qr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=qr(u),h=qr(h)}u=null}else u=null;null!==l&&Kr(s,a,l,u,!1),null!==c&&null!==d&&Kr(s,d,c,u,!0)}if("select"===(l=(a=r?wi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=Xn;else if($n(a))if(Jn)m=sr;else{m=ir;var y=rr}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=or);switch(m&&(m=m(e,r))?Wn(s,m,n,i):(y&&y(e,a,r),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&ee(a,"number",a.value)),y=r?wi(r):window,e){case"focusin":($n(y)||"true"===y.contentEditable)&&(mr=y,yr=r,vr=null);break;case"focusout":vr=yr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(s,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":wr(s,n,i)}var v;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Bn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vn&&(v=en()):(Yt="value"in(Jt=i)?Jt.value:Jt.textContent,Vn=!0)),0<(y=Gr(r,b)).length&&(b=new wn(b,e,null,n,i),s.push({event:b,listeners:y}),v?b.data=v:null!==(v=zn(n))&&(b.data=v))),(v=Ln?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(jn=!0,Fn);case"textInput":return(e=t.data)===Fn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Mn&&Un(e,t)?(e=en(),Zt=Yt=Jt=null,Vn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Gr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=v))}Fr(s,t)}))}function Wr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Re(e,n))&&r.unshift(Wr(e,o,i)),null!=(o=Re(e,t))&&r.push(Wr(e,o,i))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==c&&(a=c,i?null!=(l=Re(n,o))&&s.unshift(Wr(n,l,a)):i||null!=(l=Re(n,o))&&s.push(Wr(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Qr=/\r\n?/g,Xr=/\u0000|\uFFFD/g;function Jr(e){return("string"===typeof e?e:""+e).replace(Qr,"\n").replace(Xr,"")}function Yr(e,t,n){if(t=Jr(t),Jr(e)!==t&&n)throw Error(o(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,si="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(e){return oi.resolve(null).then(e).catch(ai)}:ri;function ai(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Vt(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,fi="__reactProps$"+di,pi="__reactContainer$"+di,gi="__reactEvents$"+di,mi="__reactListeners$"+di,yi="__reactHandles$"+di;function vi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function xi(e){return e[fi]||null}var Ai=[],Ei=-1;function Si(e){return{current:e}}function ki(e){0>Ei||(e.current=Ai[Ei],Ai[Ei]=null,Ei--)}function Ci(e,t){Ei++,Ai[Ei]=e.current,e.current=t}var _i={},Ti=Si(_i),Pi=Si(!1),Ii=_i;function Oi(e,t){var n=e.type.contextTypes;if(!n)return _i;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ri(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ni(){ki(Pi),ki(Ti)}function Mi(e,t,n){if(Ti.current!==_i)throw Error(o(168));Ci(Ti,t),Ci(Pi,n)}function Di(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,H(e)||"Unknown",i));return B({},n,r)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_i,Ii=Ti.current,Ci(Ti,e),Ci(Pi,Pi.current),!0}function Bi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Di(e,t,Ii),r.__reactInternalMemoizedMergedChildContext=e,ki(Pi),ki(Ti),Ci(Ti,e)):ki(Pi),Ci(Pi,n)}var Fi=null,ji=!1,Ui=!1;function zi(e){null===Fi?Fi=[e]:Fi.push(e)}function Vi(){if(!Ui&&null!==Fi){Ui=!0;var e=0,t=bt;try{var n=Fi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fi=null,ji=!1}catch(i){throw null!==Fi&&(Fi=Fi.slice(e+1)),qe(Ze,Vi),i}finally{bt=t,Ui=!1}}return null}var Hi=[],$i=0,Wi=null,Gi=0,qi=[],Ki=0,Qi=null,Xi=1,Ji="";function Yi(e,t){Hi[$i++]=Gi,Hi[$i++]=Wi,Wi=e,Gi=t}function Zi(e,t,n){qi[Ki++]=Xi,qi[Ki++]=Ji,qi[Ki++]=Qi,Qi=e;var r=Xi;e=Ji;var i=32-st(r)-1;r&=~(1<<i),n+=1;var o=32-st(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Xi=1<<32-st(t)+i|n<<i|r,Ji=o+e}else Xi=1<<o|n<<i|r,Ji=e}function eo(e){null!==e.return&&(Yi(e,1),Zi(e,1,0))}function to(e){for(;e===Wi;)Wi=Hi[--$i],Hi[$i]=null,Gi=Hi[--$i],Hi[$i]=null;for(;e===Qi;)Qi=qi[--Ki],qi[Ki]=null,Ji=qi[--Ki],qi[Ki]=null,Xi=qi[--Ki],qi[Ki]=null}var no=null,ro=null,io=!1,oo=null;function so(e,t){var n=Oc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ao(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Qi?{id:Xi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Oc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!ao(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&ao(e,t)?so(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw fo(),Error(o(418));for(;t;)so(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=ro;e;)e=ci(e.nextSibling)}function po(){ro=no=null,io=!1}function go(e){null===oo?oo=[e]:oo.push(e)}var mo=w.ReactCurrentBatchConfig;function yo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,s=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=i.refs;null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function vo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Bc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===E?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===R&&bo(o)===t.type)?((r=i(t,n.props)).ref=yo(e,t,n),r.return=e,r):((r=Mc(n.type,n.key,n.props,null,e.mode,r)).ref=yo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Dc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Bc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Mc(t.type,t.key,t.props,null,e.mode,n)).ref=yo(e,null,t),n.return=e,n;case A:return(t=Fc(t,e.mode,n)).return=e,t;case R:return h(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Dc(t,e.mode,n,null)).return=e,t;vo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case R:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||D(n))return null!==i?null:d(e,t,n,r,null);vo(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case R:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||D(r))return d(t,e=e.get(n)||null,r,i,null);vo(t,r)}return null}function g(i,o,a,l){for(var c=null,u=null,d=o,g=o=0,m=null;null!==d&&g<a.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var y=f(i,d,a[g],l);if(null===y){null===d&&(d=m);break}e&&d&&null===y.alternate&&t(i,d),o=s(y,o,g),null===u?c=y:u.sibling=y,u=y,d=m}if(g===a.length)return n(i,d),io&&Yi(i,g),c;if(null===d){for(;g<a.length;g++)null!==(d=h(i,a[g],l))&&(o=s(d,o,g),null===u?c=d:u.sibling=d,u=d);return io&&Yi(i,g),c}for(d=r(i,d);g<a.length;g++)null!==(m=p(d,i,g,a[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),o=s(m,o,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach((function(e){return t(i,e)})),io&&Yi(i,g),c}function m(i,a,l,c){var u=D(l);if("function"!==typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,g=a,m=a=0,y=null,v=l.next();null!==g&&!v.done;m++,v=l.next()){g.index>m?(y=g,g=null):y=g.sibling;var b=f(i,g,v.value,c);if(null===b){null===g&&(g=y);break}e&&g&&null===b.alternate&&t(i,g),a=s(b,a,m),null===d?u=b:d.sibling=b,d=b,g=y}if(v.done)return n(i,g),io&&Yi(i,m),u;if(null===g){for(;!v.done;m++,v=l.next())null!==(v=h(i,v.value,c))&&(a=s(v,a,m),null===d?u=v:d.sibling=v,d=v);return io&&Yi(i,m),u}for(g=r(i,g);!v.done;m++,v=l.next())null!==(v=p(g,i,m,v.value,c))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),a=s(v,a,m),null===d?u=v:d.sibling=v,d=v);return e&&g.forEach((function(e){return t(i,e)})),io&&Yi(i,m),u}return function e(r,o,s,l){if("object"===typeof s&&null!==s&&s.type===E&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case x:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===E){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===R&&bo(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=yo(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===E?((o=Dc(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Mc(s.type,s.key,s.props,null,r.mode,l)).ref=yo(r,o,s),l.return=r,r=l)}return a(r);case A:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Fc(s,r.mode,l)).return=r,r=o}return a(r);case R:return e(r,o,(u=s._init)(s._payload),l)}if(te(s))return g(r,o,s,l);if(D(s))return m(r,o,s,l);vo(r,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Bc(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var xo=wo(!0),Ao=wo(!1),Eo=Si(null),So=null,ko=null,Co=null;function _o(){Co=ko=So=null}function To(e){var t=Eo.current;ki(Eo),e._currentValue=t}function Po(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Io(e,t){So=e,Co=ko=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ba=!0),e.firstContext=null)}function Oo(e){var t=e._currentValue;if(Co!==e)if(e={context:e,memoizedValue:t,next:null},null===ko){if(null===So)throw Error(o(308));ko=e,So.dependencies={lanes:0,firstContext:e}}else ko=ko.next=e;return t}var Ro=null;function No(e){null===Ro?Ro=[e]:Ro.push(e)}function Mo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,No(t)):(n.next=i.next,i.next=n),t.interleaved=n,Do(e,r)}function Do(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Lo=!1;function Bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Uo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Tl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Do(e,n)}return null===(i=r.interleaved)?(t.next=t,No(r)):(t.next=i.next,i.next=t),r.interleaved=t,Do(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Vo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var i=e.updateQueue;Lo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(s=0,u=c=l=null,a=o;;){var h=a.lane,f=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(h=t,f=n,g.tag){case 1:if("function"===typeof(p=g.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=g.payload)?p.call(f,d,h):p)||void 0===h)break e;d=B({},d,h);break e;case 2:Lo=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ll|=s,e.lanes=s,e.memoizedState=d}}function $o(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var Wo={},Go=Si(Wo),qo=Si(Wo),Ko=Si(Wo);function Qo(e){if(e===Wo)throw Error(o(174));return e}function Xo(e,t){switch(Ci(Ko,t),Ci(qo,e),Ci(Go,Wo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ki(Go),Ci(Go,t)}function Jo(){ki(Go),ki(qo),ki(Ko)}function Yo(e){Qo(Ko.current);var t=Qo(Go.current),n=le(t,e.type);t!==n&&(Ci(qo,e),Ci(Go,n))}function Zo(e){qo.current===e&&(ki(Go),ki(qo))}var es=Si(0);function ts(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 ns=[];function rs(){for(var e=0;e<ns.length;e++)ns[e]._workInProgressVersionPrimary=null;ns.length=0}var is=w.ReactCurrentDispatcher,os=w.ReactCurrentBatchConfig,ss=0,as=null,ls=null,cs=null,us=!1,ds=!1,hs=0,fs=0;function ps(){throw Error(o(321))}function gs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ar(e[n],t[n]))return!1;return!0}function ms(e,t,n,r,i,s){if(ss=s,as=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,is.current=null===e||null===e.memoizedState?Zs:ea,e=n(r,i),ds){s=0;do{if(ds=!1,hs=0,25<=s)throw Error(o(301));s+=1,cs=ls=null,t.updateQueue=null,is.current=ta,e=n(r,i)}while(ds)}if(is.current=Ys,t=null!==ls&&null!==ls.next,ss=0,cs=ls=as=null,us=!1,t)throw Error(o(300));return e}function ys(){var e=0!==hs;return hs=0,e}function vs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===cs?as.memoizedState=cs=e:cs=cs.next=e,cs}function bs(){if(null===ls){var e=as.alternate;e=null!==e?e.memoizedState:null}else e=ls.next;var t=null===cs?as.memoizedState:cs.next;if(null!==t)cs=t,ls=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ls=e).memoizedState,baseState:ls.baseState,baseQueue:ls.baseQueue,queue:ls.queue,next:null},null===cs?as.memoizedState=cs=e:cs=cs.next=e}return cs}function ws(e,t){return"function"===typeof t?t(e):t}function xs(e){var t=bs(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=ls,i=r.baseQueue,s=n.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(null!==i){s=i.next,r=r.baseState;var l=a=null,c=null,u=s;do{var d=u.lane;if((ss&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,a=r):c=c.next=h,as.lanes|=d,Ll|=d}u=u.next}while(null!==u&&u!==s);null===c?a=r:c.next=l,ar(r,t.memoizedState)||(ba=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{s=i.lane,as.lanes|=s,Ll|=s,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function As(e){var t=bs(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);ar(s,t.memoizedState)||(ba=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Es(){}function Ss(e,t){var n=as,r=bs(),i=t(),s=!ar(r.memoizedState,i);if(s&&(r.memoizedState=i,ba=!0),r=r.queue,Ls(_s.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==cs&&1&cs.memoizedState.tag){if(n.flags|=2048,Os(9,Cs.bind(null,n,r,i,t),void 0,null),null===Pl)throw Error(o(349));0!==(30&ss)||ks(n,t,i)}return i}function ks(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=as.updateQueue)?(t={lastEffect:null,stores:null},as.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Cs(e,t,n,r){t.value=n,t.getSnapshot=r,Ts(t)&&Ps(e)}function _s(e,t,n){return n((function(){Ts(t)&&Ps(e)}))}function Ts(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ar(e,n)}catch(r){return!0}}function Ps(e){var t=Do(e,1);null!==t&&nc(t,e,1,-1)}function Is(e){var t=vs();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=Ks.bind(null,as,e),[t.memoizedState,e]}function Os(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=as.updateQueue)?(t={lastEffect:null,stores:null},as.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Rs(){return bs().memoizedState}function Ns(e,t,n,r){var i=vs();as.flags|=e,i.memoizedState=Os(1|t,n,void 0,void 0===r?null:r)}function Ms(e,t,n,r){var i=bs();r=void 0===r?null:r;var o=void 0;if(null!==ls){var s=ls.memoizedState;if(o=s.destroy,null!==r&&gs(r,s.deps))return void(i.memoizedState=Os(t,n,o,r))}as.flags|=e,i.memoizedState=Os(1|t,n,o,r)}function Ds(e,t){return Ns(8390656,8,e,t)}function Ls(e,t){return Ms(2048,8,e,t)}function Bs(e,t){return Ms(4,2,e,t)}function Fs(e,t){return Ms(4,4,e,t)}function js(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Us(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ms(4,4,js.bind(null,t,e),n)}function zs(){}function Vs(e,t){var n=bs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hs(e,t){var n=bs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $s(e,t,n){return 0===(21&ss)?(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n):(ar(n,t)||(n=gt(),as.lanes|=n,Ll|=n,e.baseState=!0),t)}function Ws(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=os.transition;os.transition={};try{e(!1),t()}finally{bt=n,os.transition=r}}function Gs(){return bs().memoizedState}function qs(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qs(e))Xs(t,n);else if(null!==(n=Mo(e,t,n,r))){nc(n,e,r,ec()),Js(n,t,r)}}function Ks(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qs(e))Xs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ar(a,s)){var l=t.interleaved;return null===l?(i.next=i,No(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Mo(e,t,i,r))&&(nc(n,e,r,i=ec()),Js(n,t,r))}}function Qs(e){var t=e.alternate;return e===as||null!==t&&t===as}function Xs(e,t){ds=us=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Js(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var Ys={readContext:Oo,useCallback:ps,useContext:ps,useEffect:ps,useImperativeHandle:ps,useInsertionEffect:ps,useLayoutEffect:ps,useMemo:ps,useReducer:ps,useRef:ps,useState:ps,useDebugValue:ps,useDeferredValue:ps,useTransition:ps,useMutableSource:ps,useSyncExternalStore:ps,useId:ps,unstable_isNewReconciler:!1},Zs={readContext:Oo,useCallback:function(e,t){return vs().memoizedState=[e,void 0===t?null:t],e},useContext:Oo,useEffect:Ds,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ns(4194308,4,js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ns(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ns(4,2,e,t)},useMemo:function(e,t){var n=vs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qs.bind(null,as,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vs().memoizedState=e},useState:Is,useDebugValue:zs,useDeferredValue:function(e){return vs().memoizedState=e},useTransition:function(){var e=Is(!1),t=e[0];return e=Ws.bind(null,e[1]),vs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=as,i=vs();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Pl)throw Error(o(349));0!==(30&ss)||ks(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ds(_s.bind(null,r,s,e),[e]),r.flags|=2048,Os(9,Cs.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=vs(),t=Pl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=(Xi&~(1<<32-st(Xi)-1)).toString(32)+n),0<(n=hs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Oo,useCallback:Vs,useContext:Oo,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Bs,useLayoutEffect:Fs,useMemo:Hs,useReducer:xs,useRef:Rs,useState:function(){return xs(ws)},useDebugValue:zs,useDeferredValue:function(e){return $s(bs(),ls.memoizedState,e)},useTransition:function(){return[xs(ws)[0],bs().memoizedState]},useMutableSource:Es,useSyncExternalStore:Ss,useId:Gs,unstable_isNewReconciler:!1},ta={readContext:Oo,useCallback:Vs,useContext:Oo,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Bs,useLayoutEffect:Fs,useMemo:Hs,useReducer:As,useRef:Rs,useState:function(){return As(ws)},useDebugValue:zs,useDeferredValue:function(e){var t=bs();return null===ls?t.memoizedState=e:$s(t,ls.memoizedState,e)},useTransition:function(){return[As(ws)[0],bs().memoizedState]},useMutableSource:Es,useSyncExternalStore:Ss,useId:Gs,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=B({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ra(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:B({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ia={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=jo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Uo(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=jo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Uo(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=jo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Uo(e,i,r))&&(nc(t,e,r,n),zo(t,e,r))}};function oa(e,t,n,r,i,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function sa(e,t,n){var r=!1,i=_i,o=t.contextType;return"object"===typeof o&&null!==o?o=Oo(o):(i=Ri(t)?Ii:Ti.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Oi(e,i):_i),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ia,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function aa(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ia.enqueueReplaceState(t,t.state,null)}function la(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Bo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Oo(o):(o=Ri(t)?Ii:Ti.current,i.context=Oi(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(ra(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ia.enqueueReplaceState(i,i.state,null),Ho(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ha="function"===typeof WeakMap?WeakMap:Map;function fa(e,t,n){(n=jo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$l||($l=!0,Wl=r),da(0,t)},n}function pa(e,t,n){(n=jo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!==typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ga(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ha;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ma(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=jo(-1,1)).tag=2,Uo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var va=w.ReactCurrentOwner,ba=!1;function wa(e,t,n,r){t.child=null===e?Ao(t,null,n,r):xo(t,e.child,n,r)}function xa(e,t,n,r,i){n=n.render;var o=t.ref;return Io(t,i),r=ms(e,t,n,r,o,i),n=ys(),null===e||ba?(io&&n&&eo(t),t.flags|=1,wa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,$a(e,t,i))}function Aa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Rc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Mc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ea(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return $a(e,t,i)}return t.flags|=1,(e=Nc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ea(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(ba=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,$a(e,t,i);0!==(131072&e.flags)&&(ba=!0)}}return Ca(e,t,n,r,i)}function Sa(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Nl,Rl),Rl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Nl,Rl),Rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ci(Nl,Rl),Rl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ci(Nl,Rl),Rl|=r;return wa(e,t,i,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ca(e,t,n,r,i){var o=Ri(n)?Ii:Ti.current;return o=Oi(t,o),Io(t,i),n=ms(e,t,n,r,o,i),r=ys(),null===e||ba?(io&&r&&eo(t),t.flags|=1,wa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,$a(e,t,i))}function _a(e,t,n,r,i){if(Ri(n)){var o=!0;Li(t)}else o=!1;if(Io(t,i),null===t.stateNode)Ha(e,t),sa(t,n,r),la(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"===typeof c&&null!==c?c=Oo(c):c=Oi(t,c=Ri(n)?Ii:Ti.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof s.getSnapshotBeforeUpdate;d||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==r||l!==c)&&aa(t,s,r,c),Lo=!1;var h=t.memoizedState;s.state=h,Ho(t,r,s,i),l=t.memoizedState,a!==r||h!==l||Pi.current||Lo?("function"===typeof u&&(ra(t,n,u,r),l=t.memoizedState),(a=Lo||oa(t,n,a,r,h,l,c))?(d||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Fo(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"===typeof(l=n.contextType)&&null!==l?l=Oo(l):l=Oi(t,l=Ri(n)?Ii:Ti.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==d||h!==l)&&aa(t,s,r,l),Lo=!1,h=t.memoizedState,s.state=h,Ho(t,r,s,i);var p=t.memoizedState;a!==d||h!==p||Pi.current||Lo?("function"===typeof f&&(ra(t,n,f,r),p=t.memoizedState),(c=Lo||oa(t,n,c,r,h,p,l)||!1)?(u||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=c):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ta(e,t,n,r,o,i)}function Ta(e,t,n,r,i,o){ka(e,t);var s=0!==(128&t.flags);if(!r&&!s)return i&&Bi(t,n,!1),$a(e,t,o);r=t.stateNode,va.current=t;var a=s&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=xo(t,e.child,null,o),t.child=xo(t,null,a,o)):wa(e,t,a,o),t.memoizedState=r.state,i&&Bi(t,n,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?Mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mi(0,t.context,!1),Xo(e,t.containerInfo)}function Ia(e,t,n,r,i){return po(),go(i),t.flags|=256,wa(e,t,n,r),t.child}var Oa,Ra,Na,Ma,Da={dehydrated:null,treeContext:null,retryLane:0};function La(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ba(e,t,n){var r,i=t.pendingProps,s=es.current,a=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Ci(es,1&s),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Lc(l,i,0,null),e=Dc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=La(n),t.memoizedState=Da,e):Fa(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,ja(e,t,a,r=ua(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lc({mode:"visible",children:r.children},i,0,null),(s=Dc(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!==(1&t.mode)&&xo(t,e.child,null,a),t.child.memoizedState=La(a),t.memoizedState=Da,s);if(0===(1&t.mode))return ja(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,ja(e,t,a,r=ua(s=Error(o(419)),r,void 0))}if(l=0!==(a&e.childLanes),ba||l){if(null!==(r=Pl)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Do(e,i),nc(r,e,i,-1))}return gc(),ja(e,t,a,r=ua(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=_c.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(qi[Ki++]=Xi,qi[Ki++]=Ji,qi[Ki++]=Qi,Xi=e.id,Ji=e.overflow,Qi=t),t=Fa(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Nc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Nc(r,a):(a=Dc(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?La(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Da,i}return e=(a=e.child).sibling,i=Nc(a,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fa(e,t){return(t=Lc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ja(e,t,n,r){return null!==r&&go(r),xo(t,e.child,null,n),(e=Fa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ua(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Po(e.return,t,n)}function za(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Va(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(wa(e,t,r.children,n),0!==(2&(r=es.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ua(e,n,t);else if(19===e.tag)Ua(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ci(es,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ts(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),za(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ts(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}za(t,!0,n,null,o);break;case"together":za(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ha(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $a(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ll|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Wa(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ga(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qa(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ga(t),null;case 1:case 17:return Ri(t.type)&&Ni(),Ga(t),null;case 3:return r=t.stateNode,Jo(),ki(Pi),ki(Ti),rs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(sc(oo),oo=null))),Ra(e,t),Ga(t),null;case 5:Zo(t);var i=Qo(Ko.current);if(n=t.type,null!==e&&null!=t.stateNode)Na(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ga(t),null}if(e=Qo(Go.current),ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[hi]=t,r[fi]=s,e=0!==(1&t.mode),n){case"dialog":jr("cancel",r),jr("close",r);break;case"iframe":case"object":case"embed":jr("load",r);break;case"video":case"audio":for(i=0;i<Dr.length;i++)jr(Dr[i],r);break;case"source":jr("error",r);break;case"img":case"image":case"link":jr("error",r),jr("load",r);break;case"details":jr("toggle",r);break;case"input":X(r,s),jr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},jr("invalid",r);break;case"textarea":ie(r,s),jr("invalid",r)}for(var l in ve(n,s),i=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==s.suppressHydrationWarning&&Yr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Yr(r.textContent,c,e),i=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&jr("scroll",r)}switch(n){case"input":G(r),Z(r,s,!0);break;case"textarea":G(r),se(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Oa(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":jr("cancel",e),jr("close",e),i=r;break;case"iframe":case"object":case"embed":jr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Dr.length;i++)jr(Dr[i],e);i=r;break;case"source":jr("error",e),i=r;break;case"img":case"image":case"link":jr("error",e),jr("load",e),i=r;break;case"details":jr("toggle",e),i=r;break;case"input":X(e,r),i=Q(e,r),jr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=B({},r,{value:void 0}),jr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),jr("invalid",e)}for(s in ve(n,i),c=i)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?me(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===s?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&jr("scroll",e):null!=u&&b(e,s,u,l))}switch(n){case"input":G(e),Z(e,r,!1);break;case"textarea":G(e),se(e);break;case"option":null!=r.value&&e.setAttribute("value",""+$(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ne(e,!!r.multiple,s,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ga(t),null;case 6:if(e&&null!=t.stateNode)Ma(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(n=Qo(Ko.current),Qo(Go.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(s=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Yr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Yr(r.nodeValue,n,0!==(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Ga(t),null;case 13:if(ki(es),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!==(1&t.mode)&&0===(128&t.flags))fo(),po(),t.flags|=98560,s=!1;else if(s=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[hi]=t}else po(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ga(t),s=!1}else null!==oo&&(sc(oo),oo=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&es.current)?0===Ml&&(Ml=3):gc())),null!==t.updateQueue&&(t.flags|=4),Ga(t),null);case 4:return Jo(),Ra(e,t),null===e&&Vr(t.stateNode.containerInfo),Ga(t),null;case 10:return To(t.type._context),Ga(t),null;case 19:if(ki(es),null===(s=t.memoizedState))return Ga(t),null;if(r=0!==(128&t.flags),null===(l=s.rendering))if(r)Wa(s,!1);else{if(0!==Ml||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ts(e))){for(t.flags|=128,Wa(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(es,1&es.current|2),t.child}e=e.sibling}null!==s.tail&&Je()>Vl&&(t.flags|=128,r=!0,Wa(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ts(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Wa(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!io)return Ga(t),null}else 2*Je()-s.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,Wa(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=es.current,Ci(es,r?1&n|2:1&n),t):(Ga(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Rl)&&(Ga(t),6&t.subtreeFlags&&(t.flags|=8192)):Ga(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ka(e,t){switch(to(t),t.tag){case 1:return Ri(t.type)&&Ni(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),ki(Pi),ki(Ti),rs(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(ki(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ki(es),null;case 4:return Jo(),null;case 10:return To(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Oa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ra=function(){},Na=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Qo(Go.current);var o,s=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),s=[];break;case"select":i=B({},i,{value:void 0}),r=B({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&jr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Ma=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qa=!1,Xa=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Ya=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Sc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Sc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[gi],delete t[mi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(a){}switch(n.tag){case 5:Xa||Za(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Vt(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Xa&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!==(2&o)||0!==(4&o))&&el(n,t,s),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Xa&&(Za(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Sc(n,t,a)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Xa=(r=Xa)||null!==n.memoizedState,hl(e,t,n),Xa=r):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=Tc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(o(160));fl(s,a,i),ul=null,dl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(u){Sc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(m){Sc(e,e.return,m)}try{nl(5,e,e.return)}catch(m){Sc(e,e.return,m)}}break;case 1:gl(t,e),yl(e),512&r&&null!==n&&Za(n,n.return);break;case 5:if(gl(t,e),yl(e),512&r&&null!==n&&Za(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(m){Sc(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&J(i,s),be(l,a);var u=be(l,s);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];"style"===d?me(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Y(i,s);break;case"textarea":oe(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?ne(i,!!s.multiple,p,!1):f!==!!s.multiple&&(null!=s.defaultValue?ne(i,!!s.multiple,s.defaultValue,!0):ne(i,!!s.multiple,s.multiple?[]:"",!1))}i[fi]=s}catch(m){Sc(e,e.return,m)}}break;case 6:if(gl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Sc(e,e.return,m)}}break;case 3:if(gl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(m){Sc(e,e.return,m)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(i=e.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||(zl=Je())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Xa=(u=Xa)||d,gl(t,e),Xa=u):gl(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Ya=e,d=e.child;null!==d;){for(h=Ya=d;null!==Ya;){switch(p=(f=Ya).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Za(f,f.return);var g=f.stateNode;if("function"===typeof g.componentWillUnmount){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Sc(r,n,m)}}break;case 5:Za(f,f.return);break;case 22:if(null!==f.memoizedState){xl(h);continue}}null!==p?(p.return=f,Ya=p):xl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"===typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=h.stateNode,a=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",a))}catch(m){Sc(e,e.return,m)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){Sc(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),yl(e),4&r&&pl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,al(e),i);break;case 3:case 4:var s=r.stateNode.containerInfo;ll(e,al(e),s);break;default:throw Error(o(161))}}catch(a){Sc(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Ya=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!==(1&e.mode);null!==Ya;){var i=Ya,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||Qa;if(!s){var a=i.alternate,l=null!==a&&null!==a.memoizedState||Xa;a=Qa;var c=Xa;if(Qa=s,(Xa=l)&&!c)for(Ya=i;null!==Ya;)l=(s=Ya).child,22===s.tag&&null!==s.memoizedState?Al(i):null!==l?(l.return=s,Ya=l):Al(i);for(;null!==o;)Ya=o,bl(o,t,n),o=o.sibling;Ya=i,Qa=a,Xa=c}wl(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Ya=o):wl(e)}}function wl(e){for(;null!==Ya;){var t=Ya;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xa||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xa)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:na(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&$o(t,s,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}$o(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Vt(h)}}}break;default:throw Error(o(163))}Xa||512&t.flags&&il(t)}catch(f){Sc(t,t.return,f)}}if(t===e){Ya=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ya=n;break}Ya=t.return}}function xl(e){for(;null!==Ya;){var t=Ya;if(t===e){Ya=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ya=n;break}Ya=t.return}}function Al(e){for(;null!==Ya;){var t=Ya;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Sc(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){Sc(t,i,l)}}var o=t.return;try{il(t)}catch(l){Sc(t,o,l)}break;case 5:var s=t.return;try{il(t)}catch(l){Sc(t,s,l)}}}catch(l){Sc(t,t.return,l)}if(t===e){Ya=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Ya=a;break}Ya=t.return}}var El,Sl=Math.ceil,kl=w.ReactCurrentDispatcher,Cl=w.ReactCurrentOwner,_l=w.ReactCurrentBatchConfig,Tl=0,Pl=null,Il=null,Ol=0,Rl=0,Nl=Si(0),Ml=0,Dl=null,Ll=0,Bl=0,Fl=0,jl=null,Ul=null,zl=0,Vl=1/0,Hl=null,$l=!1,Wl=null,Gl=null,ql=!1,Kl=null,Ql=0,Xl=0,Jl=null,Yl=-1,Zl=0;function ec(){return 0!==(6&Tl)?Je():-1!==Yl?Yl:Yl=Je()}function tc(e){return 0===(1&e.mode)?1:0!==(2&Tl)&&0!==Ol?Ol&-Ol:null!==mo.transition?(0===Zl&&(Zl=gt()),Zl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Xt(e.type)}function nc(e,t,n,r){if(50<Xl)throw Xl=0,Jl=null,Error(o(185));yt(e,n,r),0!==(2&Tl)&&e===Pl||(e===Pl&&(0===(2&Tl)&&(Bl|=n),4===Ml&&ac(e,Ol)),rc(e,r),1===n&&0===Tl&&0===(1&t.mode)&&(Vl=Je()+500,ji&&Vi()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-st(o),a=1<<s,l=i[s];-1===l?0!==(a&n)&&0===(a&r)||(i[s]=ft(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=ht(e,e===Pl?Ol:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){ji=!0,zi(e)}(lc.bind(null,e)):zi(lc.bind(null,e)),si((function(){0===(6&Tl)&&Vi()})),n=null;else{switch(wt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Pc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Yl=-1,Zl=0,0!==(6&Tl))throw Error(o(327));var n=e.callbackNode;if(Ac()&&e.callbackNode!==n)return null;var r=ht(e,e===Pl?Ol:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=mc(e,r);else{t=r;var i=Tl;Tl|=2;var s=pc();for(Pl===e&&Ol===t||(Hl=null,Vl=Je()+500,hc(e,t));;)try{vc();break}catch(l){fc(e,l)}_o(),kl.current=s,Tl=i,null!==Il?t=0:(Pl=null,Ol=0,t=Ml)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=oc(e,i))),1===t)throw n=Dl,hc(e,0),ac(e,r),rc(e,Je()),n;if(6===t)ac(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ar(o(),i))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=mc(e,r))&&(0!==(s=pt(e))&&(r=s,t=oc(e,s))),1===t))throw n=Dl,hc(e,0),ac(e,r),rc(e,Je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:xc(e,Ul,Hl);break;case 3:if(ac(e,r),(130023424&r)===r&&10<(t=zl+500-Je())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(xc.bind(null,e,Ul,Hl),t);break}xc(e,Ul,Hl);break;case 4:if(ac(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-st(r);s=1<<a,(a=t[a])>i&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(xc.bind(null,e,Ul,Hl),r);break}xc(e,Ul,Hl);break;default:throw Error(o(329))}}}return rc(e,Je()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=jl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=Ul,Ul=n,null!==t&&sc(t)),e}function sc(e){null===Ul?Ul=e:Ul.push.apply(Ul,e)}function ac(e,t){for(t&=~Fl,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&Tl))throw Error(o(327));Ac();var t=ht(e,0);if(0===(1&t))return rc(e,Je()),null;var n=mc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Dl,hc(e,0),ac(e,t),rc(e,Je()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xc(e,Ul,Hl),rc(e,Je()),null}function cc(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Vl=Je()+500,ji&&Vi())}}function uc(e){null!==Kl&&0===Kl.tag&&0===(6&Tl)&&Ac();var t=Tl;Tl|=1;var n=_l.transition,r=bt;try{if(_l.transition=null,bt=1,e)return e()}finally{bt=r,_l.transition=n,0===(6&(Tl=t))&&Vi()}}function dc(){Rl=Nl.current,ki(Nl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ni();break;case 3:Jo(),ki(Pi),ki(Ti),rs();break;case 5:Zo(r);break;case 4:Jo();break;case 13:case 19:ki(es);break;case 10:To(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Pl=e,Il=e=Nc(e.current,null),Ol=Rl=t,Ml=0,Dl=null,Fl=Bl=Ll=0,Ul=jl=null,null!==Ro){for(t=0;t<Ro.length;t++)if(null!==(r=(n=Ro[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}Ro=null}return e}function fc(e,t){for(;;){var n=Il;try{if(_o(),is.current=Ys,us){for(var r=as.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}us=!1}if(ss=0,cs=ls=as=null,ds=!1,hs=0,Cl.current=null,null===n||null===n.return){Ml=1,Dl=t,Il=null;break}e:{var s=e,a=n.return,l=n,c=t;if(t=Ol,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=ma(a);if(null!==p){p.flags&=-257,ya(p,a,l,0,t),1&p.mode&&ga(s,u,t),c=u;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(0===(1&t)){ga(s,u,t),gc();break e}c=Error(o(426))}else if(io&&1&l.mode){var y=ma(a);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),ya(y,a,l,0,t),go(ca(c,l));break e}}s=c=ca(c,l),4!==Ml&&(Ml=2),null===jl?jl=[s]:jl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Vo(s,fa(0,c,t));break e;case 1:l=c;var v=s.type,b=s.stateNode;if(0===(128&s.flags)&&("function"===typeof v.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Gl||!Gl.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t,Vo(s,pa(s,l,t));break e}}s=s.return}while(null!==s)}wc(n)}catch(w){t=w,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function pc(){var e=kl.current;return kl.current=Ys,null===e?Ys:e}function gc(){0!==Ml&&3!==Ml&&2!==Ml||(Ml=4),null===Pl||0===(268435455&Ll)&&0===(268435455&Bl)||ac(Pl,Ol)}function mc(e,t){var n=Tl;Tl|=2;var r=pc();for(Pl===e&&Ol===t||(Hl=null,hc(e,t));;)try{yc();break}catch(i){fc(e,i)}if(_o(),Tl=n,kl.current=r,null!==Il)throw Error(o(261));return Pl=null,Ol=0,Ml}function yc(){for(;null!==Il;)bc(Il)}function vc(){for(;null!==Il&&!Qe();)bc(Il)}function bc(e){var t=El(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?wc(e):Il=t,Cl.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=qa(n,t,Rl)))return void(Il=n)}else{if(null!==(n=Ka(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Ml=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Ml&&(Ml=5)}function xc(e,t,n){var r=bt,i=_l.transition;try{_l.transition=null,bt=1,function(e,t,n,r){do{Ac()}while(null!==Kl);if(0!==(6&Tl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-st(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===Pl&&(Il=Pl=null,Ol=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||ql||(ql=!0,Pc(tt,(function(){return Ac(),null}))),s=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||s){s=_l.transition,_l.transition=null;var a=bt;bt=1;var l=Tl;Tl|=4,Cl.current=null,function(e,t){if(ei=$t,fr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(x){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=a+i),h!==s||0!==r&&3!==h.nodeType||(c=a+r),3===h.nodeType&&(a+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=a),f===s&&++d===r&&(c=a),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},$t=!1,Ya=t;null!==Ya;)if(e=(t=Ya).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Ya=e;else for(;null!==Ya;){t=Ya;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:na(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(x){Sc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Ya=e;break}Ya=t.return}g=tl,tl=!1}(e,n),ml(n,e),pr(ti),$t=!!ei,ti=ei=null,e.current=n,vl(n,e,i),Xe(),Tl=l,bt=a,_l.transition=s}else e.current=n;if(ql&&(ql=!1,Kl=e,Ql=i),s=e.pendingLanes,0===s&&(Gl=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Je()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if($l)throw $l=!1,e=Wl,Wl=null,e;0!==(1&Ql)&&0!==e.tag&&Ac(),s=e.pendingLanes,0!==(1&s)?e===Jl?Xl++:(Xl=0,Jl=e):Xl=0,Vi()}(e,t,n,r)}finally{_l.transition=i,bt=r}return null}function Ac(){if(null!==Kl){var e=wt(Ql),t=_l.transition,n=bt;try{if(_l.transition=null,bt=16>e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,Ql=0,0!==(6&Tl))throw Error(o(331));var i=Tl;for(Tl|=4,Ya=e.current;null!==Ya;){var s=Ya,a=s.child;if(0!==(16&Ya.flags)){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Ya=u;null!==Ya;){var d=Ya;switch(d.tag){case 0:case 11:case 15:nl(8,d,s)}var h=d.child;if(null!==h)h.return=d,Ya=h;else for(;null!==Ya;){var f=(d=Ya).sibling,p=d.return;if(ol(d),d===u){Ya=null;break}if(null!==f){f.return=p,Ya=f;break}Ya=p}}}var g=s.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Ya=s}}if(0!==(2064&s.subtreeFlags)&&null!==a)a.return=s,Ya=a;else e:for(;null!==Ya;){if(0!==(2048&(s=Ya).flags))switch(s.tag){case 0:case 11:case 15:nl(9,s,s.return)}var v=s.sibling;if(null!==v){v.return=s.return,Ya=v;break e}Ya=s.return}}var b=e.current;for(Ya=b;null!==Ya;){var w=(a=Ya).child;if(0!==(2064&a.subtreeFlags)&&null!==w)w.return=a,Ya=w;else e:for(a=b;null!==Ya;){if(0!==(2048&(l=Ya).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(A){Sc(l,l.return,A)}if(l===a){Ya=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Ya=x;break e}Ya=l.return}}if(Tl=i,Vi(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(A){}r=!0}return r}finally{bt=n,_l.transition=t}}return!1}function Ec(e,t,n){e=Uo(e,t=fa(0,t=ca(n,t),1),1),t=ec(),null!==e&&(yt(e,1,t),rc(e,t))}function Sc(e,t,n){if(3===e.tag)Ec(e,e,n);else for(;null!==t;){if(3===t.tag){Ec(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gl||!Gl.has(r))){t=Uo(t,e=pa(t,e=ca(n,e),1),1),e=ec(),null!==t&&(yt(t,1,e),rc(t,e));break}}t=t.return}}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Pl===e&&(Ol&n)===n&&(4===Ml||3===Ml&&(130023424&Ol)===Ol&&500>Je()-zl?hc(e,0):Fl|=n),rc(e,t)}function Cc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Do(e,t))&&(yt(e,t,n),rc(e,n))}function _c(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Cc(e,n)}function Pc(e,t){return qe(e,t)}function Ic(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oc(e,t,n,r){return new Ic(e,t,n,r)}function Rc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Oc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mc(e,t,n,r,i,s){var a=2;if(r=e,"function"===typeof e)Rc(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case E:return Dc(n.children,i,s,t);case S:a=8,i|=8;break;case k:return(e=Oc(12,n,t,2|i)).elementType=k,e.lanes=s,e;case P:return(e=Oc(13,n,t,i)).elementType=P,e.lanes=s,e;case I:return(e=Oc(19,n,t,i)).elementType=I,e.lanes=s,e;case N:return Lc(n,i,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:a=10;break e;case _:a=9;break e;case T:a=11;break e;case O:a=14;break e;case R:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Oc(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Dc(e,t,n,r){return(e=Oc(7,e,r,t)).lanes=n,e}function Lc(e,t,n,r){return(e=Oc(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function Bc(e,t,n){return(e=Oc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Oc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uc(e,t,n,r,i,o,s,a,l){return e=new jc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Oc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bo(o),e}function zc(e){if(!e)return _i;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ri(n))return Di(e,n,t)}return t}function Vc(e,t,n,r,i,o,s,a,l){return(e=Uc(n,r,!0,e,0,o,0,a,l)).context=zc(null),n=e.current,(o=jo(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,Uo(n,o,i),e.current.lanes=i,yt(e,i,r),rc(e,r),e}function Hc(e,t,n,r){var i=t.current,o=ec(),s=tc(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=jo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Uo(i,t,s))&&(nc(e,i,s,o),zo(e,i,s)),s}function $c(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Wc(e,t),(e=e.alternate)&&Wc(e,t)}El=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Pi.current)ba=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:Pa(t),po();break;case 5:Yo(t);break;case 1:Ri(t.type)&&Li(t);break;case 4:Xo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(Eo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(es,1&es.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ba(e,t,n):(Ci(es,1&es.current),null!==(e=$a(e,t,n))?e.sibling:null);Ci(es,1&es.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Va(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(es,es.current),r)break;return null;case 22:case 23:return t.lanes=0,Sa(e,t,n)}return $a(e,t,n)}(e,t,n);ba=0!==(131072&e.flags)}else ba=!1,io&&0!==(1048576&t.flags)&&Zi(t,Gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ha(e,t),e=t.pendingProps;var i=Oi(t,Ti.current);Io(t,n),i=ms(null,t,r,e,i,n);var s=ys();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(s=!0,Li(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Bo(t),i.updater=ia,t.stateNode=i,i._reactInternals=t,la(t,r,e,n),t=Ta(null,t,r,!0,s,n)):(t.tag=0,io&&s&&eo(t),wa(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ha(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Rc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===T)return 11;if(e===O)return 14}return 2}(r),e=na(r,e),i){case 0:t=Ca(null,t,r,e,n);break e;case 1:t=_a(null,t,r,e,n);break e;case 11:t=xa(null,t,r,e,n);break e;case 14:t=Aa(null,t,r,na(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ca(e,t,r,i=t.elementType===r?i:na(r,i),n);case 1:return r=t.type,i=t.pendingProps,_a(e,t,r,i=t.elementType===r?i:na(r,i),n);case 3:e:{if(Pa(t),null===e)throw Error(o(387));r=t.pendingProps,i=(s=t.memoizedState).element,Fo(e,t),Ho(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Ia(e,t,r,n,i=ca(Error(o(423)),t));break e}if(r!==i){t=Ia(e,t,r,n,i=ca(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),r===i){t=$a(e,t,n);break e}wa(e,t,r,n)}t=t.child}return t;case 5:return Yo(t),null===e&&co(t),r=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,a=i.children,ni(r,i)?a=null:null!==s&&ni(r,s)&&(t.flags|=32),ka(e,t),wa(e,t,a,n),t.child;case 6:return null===e&&co(t),null;case 13:return Ba(e,t,n);case 4:return Xo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xo(t,null,r,n):wa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,xa(e,t,r,i=t.elementType===r?i:na(r,i),n);case 7:return wa(e,t,t.pendingProps,n),t.child;case 8:case 12:return wa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Ci(Eo,r._currentValue),r._currentValue=a,null!==s)if(ar(s.value,a)){if(s.children===i.children&&!Pi.current){t=$a(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===s.tag){(c=jo(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),Po(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Po(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}wa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Io(t,n),r=r(i=Oo(i)),t.flags|=1,wa(e,t,r,n),t.child;case 14:return i=na(r=t.type,t.pendingProps),Aa(e,t,r,i=na(r.type,i),n);case 15:return Ea(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:na(r,i),Ha(e,t),t.tag=1,Ri(r)?(e=!0,Li(t)):e=!1,Io(t,n),sa(t,r,i),la(t,r,i,n),Ta(null,t,r,!0,e,n);case 19:return Va(e,t,n);case 22:return Sa(e,t,n)}throw Error(o(156,t.tag))};var qc="function"===typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function Qc(e){this._internalRoot=e}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Yc(){}function Zc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"===typeof i){var a=i;i=function(){var e=$c(s);a.call(e)}}Hc(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"===typeof r){var o=r;r=function(){var e=$c(s);o.call(e)}}var s=Vc(t,r,e,0,null,!1,0,"",Yc);return e._reactRootContainer=s,e[pi]=s.current,Vr(8===e.nodeType?e.parentNode:e),uc(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var a=r;r=function(){var e=$c(l);a.call(e)}}var l=Uc(e,0,!1,null,0,!1,0,"",Yc);return e._reactRootContainer=l,e[pi]=l.current,Vr(8===e.nodeType?e.parentNode:e),uc((function(){Hc(t,l,n,r)})),l}(n,t,e,i,r);return $c(s)}Qc.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Hc(e,t,null,null)},Qc.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Hc(null,e,null,null)})),t[pi]=null}},Qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&Bt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(vt(t,1|n),rc(t,Je()),0===(6&Tl)&&(Vl=Je()+500,Vi()))}break;case 13:uc((function(){var t=Do(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Gc(e,1)}},At=function(e){if(13===e.tag){var t=Do(e,134217728);if(null!==t)nc(t,e,134217728,ec());Gc(e,134217728)}},Et=function(e){if(13===e.tag){var t=tc(e),n=Do(e,t);if(null!==n)nc(n,e,t,ec());Gc(e,t)}},St=function(){return bt},kt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ae=function(e,t,n){switch(t){case"input":if(Y(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xi(r);if(!i)throw Error(o(90));q(r),Y(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=cc,Pe=uc;var eu={usingClientEntryPoint:!1,Events:[bi,wi,xi,Ce,_e,cc]},tu={findFiberByHostInstance:vi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{it=ru.inject(nu),ot=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xc(e))throw Error(o(299));var n=!1,r="",i=qc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Uc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Vr(8===e.nodeType?e.parentNode:e),new Kc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Jc(t))throw Error(o(200));return Zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",a=qc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Vc(t,null,e,1,null!=n?n:null,i,0,s,a),e[pi]=t.current,Vr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Qc(t)},t.render=function(e,t,n){if(!Jc(t))throw Error(o(200));return Zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(o(40));return!!e._reactRootContainer&&(uc((function(){Zc(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},6501:(e,t,n)=>{"use strict";var r=n(6396);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},6396:(e,t,n)=>{"use strict";!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(5764)},720:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var i,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}(n(7565)),s=(i=n(8967))&&i.__esModule?i:{default:i},a=n(7765),l=n(6537);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){var t=e.label,n=void 0===t?"Sign in with Google":t,r=e.disabled,i=void 0!==r&&r,s=e.tabIndex,c=void 0===s?0:s,u=e.onClick,h=void 0===u?function(){}:u,p=e.type,g=void 0===p?"dark":p,m=e.style,y=f((0,o.useState)(!1),2),v=y[0],b=y[1];return o.default.createElement("div",{disabled:i,tabIndex:c,onClick:function(e){i||h(e)},role:"button",style:function(){var e="dark"===g?l.darkStyle:l.lightStyle;return d(v?d(d({},e),l.hoverStyle):i?d(d({},e),l.disabledStyle):d({},e),m)}(),onMouseOver:function(){i||b(!0)},onMouseOut:function(){i||b(!1)}},o.default.createElement(a.GoogleIcon,{disabled:i,type:g}),o.default.createElement("span",null,n))}g.propTypes={label:s.default.string,disabled:s.default.bool,tabIndex:s.default.number,onClick:s.default.func,type:s.default.oneOf(["light","dark"]),style:s.default.object}},7765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleIcon=void 0;var r=s(n(7565)),i=s(n(8967)),o=n(6537);function s(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=r.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"46px",height:"46px",viewBox:"0 0 46 46",style:o.svgStyle},r.default.createElement("defs",null,r.default.createElement("filter",{x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"objectBoundingBox",id:"filter-1"},r.default.createElement("feOffset",{dx:"0",dy:"1",in:"SourceAlpha",result:"shadowOffsetOuter1"}),r.default.createElement("feGaussianBlur",{stdDeviation:"0.5",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r.default.createElement("feColorMatrix",{values:"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.168 0",in:"shadowBlurOuter1",type:"matrix",result:"shadowMatrixOuter1"}),r.default.createElement("feOffset",{dx:"0",dy:"0",in:"SourceAlpha",result:"shadowOffsetOuter2"}),r.default.createElement("feGaussianBlur",{stdDeviation:"0.5",in:"shadowOffsetOuter2",result:"shadowBlurOuter2"}),r.default.createElement("feColorMatrix",{values:"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.084 0",in:"shadowBlurOuter2",type:"matrix",result:"shadowMatrixOuter2"}),r.default.createElement("feMerge",null,r.default.createElement("feMergeNode",{in:"shadowMatrixOuter1"}),r.default.createElement("feMergeNode",{in:"shadowMatrixOuter2"}),r.default.createElement("feMergeNode",{in:"SourceGraphic"}))),r.default.createElement("rect",{id:"path-2",x:"0",y:"0",width:"40",height:"40",rx:"2"}),r.default.createElement("rect",{id:"path-3",x:"5",y:"5",width:"38",height:"38",rx:"1"})),r.default.createElement("g",{id:"Google-Button",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.default.createElement("g",{id:"9-PATCH",transform:"translate(-608.000000, -219.000000)"}),r.default.createElement("g",{id:"btn_google_dark_normal",transform:"translate(-1.000000, -1.000000)"},r.default.createElement("g",{id:"button",transform:"translate(4.000000, 4.000000)",filter:"url(#filter-1)"},r.default.createElement("g",{id:"button-bg"},r.default.createElement("use",{fill:"#4285F4",fillRule:"evenodd"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}))),r.default.createElement("g",{id:"button-bg-copy"},r.default.createElement("use",{fill:"#FFFFFF",fillRule:"evenodd"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"})),r.default.createElement("g",{id:"logo_googleg_48dp",transform:"translate(15.000000, 15.000000)"},r.default.createElement("path",{d:"M17.64,9.20454545 C17.64,8.56636364 17.5827273,7.95272727 17.4763636,7.36363636 L9,7.36363636 L9,10.845 L13.8436364,10.845 C13.635,11.97 13.0009091,12.9231818 12.0477273,13.5613636 L12.0477273,15.8195455 L14.9563636,15.8195455 C16.6581818,14.2527273 17.64,11.9454545 17.64,9.20454545 L17.64,9.20454545 Z",id:"Shape",fill:"#4285F4"}),r.default.createElement("path",{d:"M9,18 C11.43,18 13.4672727,17.1940909 14.9563636,15.8195455 L12.0477273,13.5613636 C11.2418182,14.1013636 10.2109091,14.4204545 9,14.4204545 C6.65590909,14.4204545 4.67181818,12.8372727 3.96409091,10.71 L0.957272727,10.71 L0.957272727,13.0418182 C2.43818182,15.9831818 5.48181818,18 9,18 L9,18 Z",id:"Shape",fill:"#34A853"}),r.default.createElement("path",{d:"M3.96409091,10.71 C3.78409091,10.17 3.68181818,9.59318182 3.68181818,9 C3.68181818,8.40681818 3.78409091,7.83 3.96409091,7.29 L3.96409091,4.95818182 L0.957272727,4.95818182 C0.347727273,6.17318182 0,7.54772727 0,9 C0,10.4522727 0.347727273,11.8268182 0.957272727,13.0418182 L3.96409091,10.71 L3.96409091,10.71 Z",id:"Shape",fill:"#FBBC05"}),r.default.createElement("path",{d:"M9,3.57954545 C10.3213636,3.57954545 11.5077273,4.03363636 12.4404545,4.92545455 L15.0218182,2.34409091 C13.4631818,0.891818182 11.4259091,0 9,0 C5.48181818,0 2.43818182,2.01681818 0.957272727,4.95818182 L3.96409091,7.29 C4.67181818,5.16272727 6.65590909,3.57954545 9,3.57954545 L9,3.57954545 Z",id:"Shape",fill:"#EA4335"}),r.default.createElement("path",{d:"M0,0 L18,0 L18,18 L0,18 L0,0 Z",id:"Shape"})),r.default.createElement("g",{id:"handles_square"})))),h=r.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"46px",height:"46px",viewBox:"0 0 46 46",style:o.svgStyle},r.default.createElement("defs",null,r.default.createElement("filter",{x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"objectBoundingBox",id:"filter-1"},r.default.createElement("feOffset",{dx:"0",dy:"1",in:"SourceAlpha",result:"shadowOffsetOuter1"}),r.default.createElement("feGaussianBlur",{stdDeviation:"0.5",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r.default.createElement("feColorMatrix",{values:"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.168 0",in:"shadowBlurOuter1",type:"matrix",result:"shadowMatrixOuter1"}),r.default.createElement("feOffset",{dx:"0",dy:"0",in:"SourceAlpha",result:"shadowOffsetOuter2"}),r.default.createElement("feGaussianBlur",{stdDeviation:"0.5",in:"shadowOffsetOuter2",result:"shadowBlurOuter2"}),r.default.createElement("feColorMatrix",{values:"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.084 0",in:"shadowBlurOuter2",type:"matrix",result:"shadowMatrixOuter2"}),r.default.createElement("feMerge",null,r.default.createElement("feMergeNode",{in:"shadowMatrixOuter1"}),r.default.createElement("feMergeNode",{in:"shadowMatrixOuter2"}),r.default.createElement("feMergeNode",{in:"SourceGraphic"}))),r.default.createElement("rect",{id:"path-2",x:"0",y:"0",width:"40",height:"40",rx:"2"})),r.default.createElement("g",{id:"Google-Button",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.default.createElement("g",{id:"9-PATCH",transform:"translate(-608.000000, -160.000000)"}),r.default.createElement("g",{id:"btn_google_light_normal",transform:"translate(-1.000000, -1.000000)"},r.default.createElement("g",{id:"button",transform:"translate(4.000000, 4.000000)",filter:"url(#filter-1)"},r.default.createElement("g",{id:"button-bg"},r.default.createElement("use",{fill:"#FFFFFF",fillRule:"evenodd"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}))),r.default.createElement("g",{id:"logo_googleg_48dp",transform:"translate(15.000000, 15.000000)"},r.default.createElement("path",{d:"M17.64,9.20454545 C17.64,8.56636364 17.5827273,7.95272727 17.4763636,7.36363636 L9,7.36363636 L9,10.845 L13.8436364,10.845 C13.635,11.97 13.0009091,12.9231818 12.0477273,13.5613636 L12.0477273,15.8195455 L14.9563636,15.8195455 C16.6581818,14.2527273 17.64,11.9454545 17.64,9.20454545 L17.64,9.20454545 Z",id:"Shape",fill:"#4285F4"}),r.default.createElement("path",{d:"M9,18 C11.43,18 13.4672727,17.1940909 14.9563636,15.8195455 L12.0477273,13.5613636 C11.2418182,14.1013636 10.2109091,14.4204545 9,14.4204545 C6.65590909,14.4204545 4.67181818,12.8372727 3.96409091,10.71 L0.957272727,10.71 L0.957272727,13.0418182 C2.43818182,15.9831818 5.48181818,18 9,18 L9,18 Z",id:"Shape",fill:"#34A853"}),r.default.createElement("path",{d:"M3.96409091,10.71 C3.78409091,10.17 3.68181818,9.59318182 3.68181818,9 C3.68181818,8.40681818 3.78409091,7.83 3.96409091,7.29 L3.96409091,4.95818182 L0.957272727,4.95818182 C0.347727273,6.17318182 0,7.54772727 0,9 C0,10.4522727 0.347727273,11.8268182 0.957272727,13.0418182 L3.96409091,10.71 L3.96409091,10.71 Z",id:"Shape",fill:"#FBBC05"}),r.default.createElement("path",{d:"M9,3.57954545 C10.3213636,3.57954545 11.5077273,4.03363636 12.4404545,4.92545455 L15.0218182,2.34409091 C13.4631818,0.891818182 11.4259091,0 9,0 C5.48181818,0 2.43818182,2.01681818 0.957272727,4.95818182 L3.96409091,7.29 C4.67181818,5.16272727 6.65590909,3.57954545 9,3.57954545 L9,3.57954545 Z",id:"Shape",fill:"#EA4335"}),r.default.createElement("path",{d:"M0,0 L18,0 L18,18 L0,18 L0,0 Z",id:"Shape"})),r.default.createElement("g",{id:"handles_square"})))),f=r.default.createElement("svg",{width:"46px",height:"46px",viewBox:"0 0 46 46",version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:o.svgStyle},r.default.createElement("defs",null,r.default.createElement("rect",{id:"path-1",x:"0",y:"0",width:"40",height:"40",rx:"2"})),r.default.createElement("g",{id:"Google-Button",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.default.createElement("g",{id:"9-PATCH",transform:"translate(-788.000000, -219.000000)"}),r.default.createElement("g",{id:"btn_google_dark_disabled",transform:"translate(-1.000000, -1.000000)"},r.default.createElement("g",{id:"button",transform:"translate(4.000000, 4.000000)"},r.default.createElement("g",{id:"button-bg"},r.default.createElement("use",{fillOpacity:"0.08",fill:"#000000",fillRule:"evenodd"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}),r.default.createElement("use",{fill:"none"}))),r.default.createElement("path",{d:"M24.001,25.71 L24.001,22.362 L32.425,22.362 C32.551,22.929 32.65,23.46 32.65,24.207 C32.65,29.346 29.203,33 24.01,33 C19.042,33 15.01,28.968 15.01,24 C15.01,19.032 19.042,15 24.01,15 C26.44,15 28.474,15.891 30.031,17.349 L27.475,19.833 C26.827,19.221 25.693,18.501 24.01,18.501 C21.031,18.501 18.601,20.976 18.601,24.009 C18.601,27.042 21.031,29.517 24.01,29.517 C27.457,29.517 28.726,27.132 28.96,25.719 L24.001,25.719 L24.001,25.71 Z",id:"Shape-Copy",fillOpacity:"0.4",fill:"#000000"}),r.default.createElement("g",{id:"handles_square"}))));(t.GoogleIcon=function(e){var t=e.disabled,n=e.type,i=void 0===n?"dark":n;return r.default.createElement("div",{style:t?c(c({},o.iconStyle),o.disabledIconStyle):o.iconStyle},t?f:"dark"===i?d:h)}).propTypes={disabled:i.default.bool,type:i.default.oneOf(["light","dark"])}},5351:(e,t,n)=>{"use strict";Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return i.default}});var r,i=(r=n(720))&&r.__esModule?r:{default:r}},6537:(e,t)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.svgStyle=t.lightStyle=t.iconStyle=t.hoverStyle=t.disabledStyle=t.disabledIconStyle=t.darkStyle=void 0;var s={height:"50px",width:"240px",border:"none",textAlign:"center",verticalAlign:"center",boxShadow:"0 2px 4px 0 rgba(0,0,0,.25)",fontSize:"16px",lineHeight:"48px",display:"block",borderRadius:"1px",transition:"background-color .218s, border-color .218s, box-shadow .218s",fontFamily:"Roboto,arial,sans-serif",cursor:"pointer",userSelect:"none"};t.darkStyle=i({backgroundColor:"#4285f4",color:"#fff"},s),t.lightStyle=i({backgroundColor:"#fff",color:"rgba(0,0,0,.54)"},s),t.iconStyle={width:"48px",height:"48px",textAlign:"center",verticalAlign:"center",display:"block",marginTop:"1px",marginLeft:"1px",float:"left",backgroundColor:"#fff",borderRadius:"1px",whiteSpace:"nowrap"},t.svgStyle={width:"48px",height:"48px",display:"block"},t.hoverStyle={boxShadow:"0 0 3px 3px rgba(66,133,244,.3)",transition:"background-color .218s, border-color .218s, box-shadow .218s"},t.disabledStyle={backgroundColor:"rgba(37, 5, 5, .08)",color:"rgba(0, 0, 0, .40)",cursor:"not-allowed"},t.disabledIconStyle={backgroundColor:"transparent"}},5441:(e,t,n)=>{"use strict";function r(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}const i={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{i[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((e=>{let[t,n]=e;i[t]=new r(t,1,!1,n,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{i[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{i[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{i[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{i[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{i[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{i[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{i[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const o=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(o,s);i[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(o,s);i[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(o,s);i[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{i[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)}));i.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{i[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(758),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return i.hasOwnProperty(e)?i[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},758:(e,t)=>{t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},7643:(e,t,n)=>{"use strict";var r=n(7565),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},8540:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),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(){}},g=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): 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,g(w,y.prototype),w.isPureReactComponent=!0;var x=Array.isArray,A=Object.prototype.hasOwnProperty,E={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)A.call(t,i)&&!S.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:s,ref:a,props:o,_owner:E.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var _=/\/+/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(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return s=s(l=e),e=""===o?"."+T(l,0):o,x(s)?(i="",null!=e&&(i=e.replace(_,"$&/")+"/"),P(s,t,i,"",(function(e){return e}))):null!=s&&(C(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,i+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(_,"$&/")+"/")+e)),t.push(s)),1;if(l=0,o=""===o?".":o+":",x(e))for(var c=0;c<e.length;c++){var u=o+T(a=e[c],c);l+=P(a,t,i,u,s)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(a=e.next()).done;)l+=P(a=a.value,t,i,u=o+T(a,c++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function I(e,t,n){if(null==e)return e;var r=[],i=0;return P(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},N={transition:null},M={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:N,ReactCurrentOwner:E};function D(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=s,t.PureComponent=b,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.act=D,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=E.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)A.call(t,c)&&!S.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:s,props:i,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=D,t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.3.1"},7565:(e,t,n)=>{"use strict";e.exports=n(8540)},7929:(e,t,n)=>{"use strict";e.exports=n(7643)},7508:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,g=!1,m=!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)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(m=!1,w(e),!g)if(null!==r(c))g=!0,N(A);else{var t=r(u);null!==t&&M(x,t.startTime-e)}}function A(e,n){g=!1,m&&(m=!1,v(C),C=-1),p=!0;var o=f;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!P());){var s=h.callback;if("function"===typeof s){h.callback=null,f=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?h.callback=a:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&M(x,d.startTime-n),l=!1}return l}finally{h=null,f=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,k=null,C=-1,_=5,T=-1;function P(){return!(t.unstable_now()-T<_)}function I(){if(null!==k){var e=t.unstable_now();T=e;var n=!0;try{n=k(!0,e)}finally{n?E():(S=!1,k=null)}}else S=!1}if("function"===typeof b)E=function(){b(I)};else if("undefined"!==typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=I,E=function(){R.postMessage(null)}}else E=function(){y(I,0)};function N(e){k=e,S||(S=!0,E())}function M(e,n){C=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(){g||p||(g=!0,N(A))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(m?(v(C),C=-1):m=!0,M(x,o-s))):(e.sortIndex=a,n(c,e),g||p||(g=!0,N(A))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},9611:(e,t,n)=>{"use strict";e.exports=n(7508)},9168:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1536)),i=n(9140);function o(e,t){var n={};return e&&"string"===typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)})),n):n}o.default=o,e.exports=o},9140:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(o,l)).replace(r,a))}},1536:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(165));t.default=function(e,t){var n=null;if(!e||"string"!==typeof e)return n;var r=(0,i.default)(e),o="function"===typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}})),n}},5130:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={};t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=o?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(i,s,l):i[s]=e[s]}i.default=e,n&&n.set(e,i);return i}(n(5316)),s=n(3424);function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"state",void 0),c(this,"props",void 0),this.state=o.getInitialState(),this.props=o.getInitialProps(t),this.handleSwipeStart=this.handleSwipeStart.bind(this),this.handleSwipeMove=this.handleSwipeMove.bind(this),this.handleSwipeEnd=this.handleSwipeEnd.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this)}var t,n,r;return t=e,n=[{key:"init",value:function(){this.setupTouchListeners(),this.setupMouseListeners()}},{key:"update",value:function(e){var t=this.props,n=Object.assign({},t,e);if(t.element!==n.element||t.target!==n.target)return this.destroy(),this.props=n,void this.init();this.props=n,t.mouseTrackingEnabled===n.mouseTrackingEnabled&&t.preventTrackingOnMouseleave===n.preventTrackingOnMouseleave||(this.cleanupMouseListeners(),n.mouseTrackingEnabled?this.setupMouseListeners():this.cleanupMouseListeners()),t.touchTrackingEnabled!==n.touchTrackingEnabled&&(this.cleanupTouchListeners(),n.touchTrackingEnabled?this.setupTouchListeners():this.cleanupTouchListeners())}},{key:"destroy",value:function(){this.cleanupMouseListeners(),this.cleanupTouchListeners(),this.state=o.getInitialState(),this.props=o.getInitialProps()}},{key:"setupTouchListeners",value:function(){var e=this.props,t=e.element,n=e.target,r=e.touchTrackingEnabled;if(t&&r){var i=n||t,s=o.checkIsPassiveSupported(),a=o.getOptions(s);i.addEventListener("touchstart",this.handleSwipeStart,a),i.addEventListener("touchmove",this.handleSwipeMove,a),i.addEventListener("touchend",this.handleSwipeEnd,a)}}},{key:"cleanupTouchListeners",value:function(){var e=this.props,t=e.element,n=e.target||t;n&&(n.removeEventListener("touchstart",this.handleSwipeStart),n.removeEventListener("touchmove",this.handleSwipeMove),n.removeEventListener("touchend",this.handleSwipeEnd))}},{key:"setupMouseListeners",value:function(){var e=this.props,t=e.element,n=e.mouseTrackingEnabled,r=e.preventTrackingOnMouseleave;n&&t&&(t.addEventListener("mousedown",this.handleMouseDown),t.addEventListener("mousemove",this.handleMouseMove),t.addEventListener("mouseup",this.handleMouseUp),r&&t.addEventListener("mouseleave",this.handleMouseLeave))}},{key:"cleanupMouseListeners",value:function(){var e=this.props.element;e&&(e.removeEventListener("mousedown",this.handleMouseDown),e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mouseup",this.handleMouseUp),e.removeEventListener("mouseleave",this.handleMouseLeave))}},{key:"getEventData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{directionDelta:0},n=this.props.rotationAngle,r=t.directionDelta,i=o.calculateMovingPosition(e),s=o.rotateByAngle(i,n);return o.calculatePosition(this.state,{rotatePosition:s,directionDelta:r})}},{key:"handleSwipeStart",value:function(e){if(!o.checkIsMoreThanSingleTouches(e)){var t=this.props.rotationAngle,n=o.calculateMovingPosition(e),r=o.rotateByAngle(n,t),i=r.x,s=r.y;this.state=o.getInitialState({isSwiping:!1,start:Date.now(),x:i,y:s})}}},{key:"handleSwipeMove",value:function(e){var t=this.state,n=t.x,r=t.y,i=t.isSwiping;if(n&&r&&!o.checkIsMoreThanSingleTouches(e)){var s=this.props.directionDelta||0,a=this.getEventData(e,{directionDelta:s}),l=a.absX,c=a.absY,u=a.deltaX,d=a.deltaY,h=a.directionX,f=a.directionY,p=a.duration,g=a.velocity,m=this.props,y=m.delta,v=m.preventDefaultTouchmoveEvent,b=m.onSwipeStart,w=m.onSwiping;e.cancelable&&v&&e.preventDefault(),l<Number(y)&&c<Number(y)&&!i||(b&&!i&&b(e,{deltaX:u,deltaY:d,absX:l,absY:c,directionX:h,directionY:f,duration:p,velocity:g}),this.state.isSwiping=!0,w&&w(e,{deltaX:u,deltaY:d,absX:l,absY:c,directionX:h,directionY:f,duration:p,velocity:g}))}}},{key:"handleSwipeEnd",value:function(e){var t=this.props,n=t.onSwiped,r=t.onTap;if(this.state.isSwiping){var i=this.props.directionDelta||0,s=this.getEventData(e,{directionDelta:i});n&&n(e,s)}else{var a=this.getEventData(e);r&&r(e,a)}this.state=o.getInitialState()}},{key:"handleMouseDown",value:function(e){var t=this.props.target;t?t===e.target&&this.handleSwipeStart(e):this.handleSwipeStart(e)}},{key:"handleMouseMove",value:function(e){this.handleSwipeMove(e)}},{key:"handleMouseUp",value:function(e){var t=this.state.isSwiping,n=this.props.target;n?(n===e.target||t)&&this.handleSwipeEnd(e):this.handleSwipeEnd(e)}},{key:"handleMouseLeave",value:function(e){this.state.isSwiping&&this.handleSwipeEnd(e)}}],r=[{key:"isTouchEventsSupported",value:function(){return o.checkIsTouchEventsSupported()}}],n&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u},3424:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.TraceDirectionKey=t.Direction=t.Axis=void 0,t.TraceDirectionKey=n,function(e){e.NEGATIVE="NEGATIVE",e.POSITIVE="POSITIVE",e.NONE="NONE"}(n||(t.TraceDirectionKey=n={})),t.Direction=r,function(e){e.TOP="TOP",e.LEFT="LEFT",e.RIGHT="RIGHT",e.BOTTOM="BOTTOM",e.NONE="NONE"}(r||(t.Direction=r={})),t.Axis=i,function(e){e.X="x",e.Y="y"}(i||(t.Axis=i={}))},6347:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDirection=function(e){var t,n=r.TraceDirectionKey.NEGATIVE,i=r.TraceDirectionKey.POSITIVE,o=e[e.length-1],s=e[e.length-2]||0;if(e.every((function(e){return 0===e})))return r.TraceDirectionKey.NONE;t=o>s?i:n,0===o&&(t=s<0?i:n);return t};var r=n(3424)},2861:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDirectionDelta=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.length-1,o=r.TraceDirectionKey.NONE;n>=0;n--){var s=e[n],a=(0,i.getDirectionKey)(s),l=(0,i.getDirectionValue)(s[a]),c=e[n-1]||{},u=(0,i.getDirectionKey)(c),d=(0,i.getDirectionValue)(c[u]);if((0,i.getDifference)(l,d)>=t){o=a;break}o=u}return o};var r=n(3424),i=n(4719)},7316:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDuration=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e?t-e:0}},37:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateMovingPosition=function(e){if("changedTouches"in e){var t=e.changedTouches&&e.changedTouches[0];return{x:t&&t.clientX,y:t&&t.clientY}}return{x:e.clientX,y:e.clientY}}},2791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePosition=function(e,t){var n=e.start,l=e.x,c=e.y,u=e.traceX,d=e.traceY,h=t.rotatePosition,f=t.directionDelta,p=h.x-l,g=c-h.y,m=Math.abs(p),y=Math.abs(g);(0,r.updateTrace)(u,p),(0,r.updateTrace)(d,g);var v=(0,i.resolveDirection)(u,a.Axis.X,f),b=(0,i.resolveDirection)(d,a.Axis.Y,f),w=(0,o.calculateDuration)(n,Date.now()),x=(0,s.calculateVelocity)(m,y,w);return{absX:m,absY:y,deltaX:p,deltaY:g,directionX:v,directionY:b,duration:w,positionX:h.x,positionY:h.y,velocity:x}};var r=n(3546),i=n(4247),o=n(7316),s=n(3947),a=n(3424)},6993:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateTraceDirections=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=r.TraceDirectionKey.POSITIVE,o=r.TraceDirectionKey.NEGATIVE,s=0,a=[],l=r.TraceDirectionKey.NONE;s<e.length;s++){var c=e[s],u=e[s-1];if(a.length){var d=c>u?n:o;l===r.TraceDirectionKey.NONE&&(l=d),d===l?a.push(c):(t.push(i({},l,a.slice())),(a=[]).push(c),l=d)}else 0!==c&&(l=c>0?n:o),a.push(c)}a.length&&t.push(i({},l,a));return t};var r=n(3424);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},3947:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateVelocity=function(e,t,n){return Math.sqrt(e*e+t*t)/(n||1)}},8859:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsMoreThanSingleTouches=void 0;t.checkIsMoreThanSingleTouches=function(e){return Boolean(e.touches&&e.touches.length>1)}},3889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsPassiveSupported=function(e){if("boolean"===typeof e)return e;var t={isPassiveSupported:e};try{var n=(0,r.createOptions)(t);window.addEventListener("checkIsPassiveSupported",i,n),window.removeEventListener("checkIsPassiveSupported",i,n)}catch(o){}return t.isPassiveSupported},t.noop=void 0;var r=n(5218);var i=function(){};t.noop=i},2476:(e,t)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsTouchEventsSupported=void 0;t.checkIsTouchEventsSupported=function(){return"object"===("undefined"===typeof window?"undefined":n(window))&&("ontouchstart"in window||Boolean(window.navigator.maxTouchPoints))}},4719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAxisDirection=t.getDirectionValue=t.getDirectionKey=t.getDifference=void 0;var r=n(3424);t.getDirectionKey=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(Object.keys(e).toString()){case r.TraceDirectionKey.POSITIVE:return r.TraceDirectionKey.POSITIVE;case r.TraceDirectionKey.NEGATIVE:return r.TraceDirectionKey.NEGATIVE;default:return r.TraceDirectionKey.NONE}};t.getDirectionValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e[e.length-1]||0};t.getDifference=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.abs(e-t)};t.resolveAxisDirection=function(e,t){var n=r.Direction.LEFT,i=r.Direction.RIGHT,o=r.Direction.NONE;return e===r.Axis.Y&&(n=r.Direction.BOTTOM,i=r.Direction.TOP),t===r.TraceDirectionKey.NEGATIVE&&(o=n),t===r.TraceDirectionKey.POSITIVE&&(o=i),o}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.defineProperty(e,"passive",{get:function(){return this.isPassiveSupported=!0,!0},enumerable:!0}),e}},9902:(e,t)=>{"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialProps=void 0;t.getInitialProps=function(){return function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({element:null,target:null,delta:10,directionDelta:0,rotationAngle:0,mouseTrackingEnabled:!1,touchTrackingEnabled:!0,preventDefaultTouchmoveEvent:!1,preventTrackingOnMouseleave:!1},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},213:(e,t)=>{"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialState=void 0;t.getInitialState=function(){return function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({x:0,y:0,start:0,isSwiping:!1,traceX:[],traceY:[]},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},4700:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOptions=function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return{passive:!1};return{}}},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6347);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var i=n(2861);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=n(7316);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var s=n(37);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var a=n(2791);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var l=n(6993);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=n(3947);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=n(8859);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var d=n(3889);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=n(2476);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var f=n(4719);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var p=n(5218);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var g=n(213);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var m=n(9902);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===m[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}));var y=n(4700);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var v=n(4247);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var b=n(6521);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var w=n(3546);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))}))},4247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDirection=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Axis.X,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(n){var l=(0,i.calculateTraceDirections)(e),c=(0,o.calculateDirectionDelta)(l,n);return(0,s.resolveAxisDirection)(t,c)}var u=(0,r.calculateDirection)(e);return(0,s.resolveAxisDirection)(t,u)};var r=n(6347),i=n(6993),o=n(2861),s=n(4719),a=n(3424)},6521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rotateByAngle=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===t)return e;var n=e.x,r=e.y,i=Math.PI/180*t,o=n*Math.cos(i)+r*Math.sin(i),s=r*Math.cos(i)-n*Math.sin(i);return{x:o,y:s}}},3546:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTrace=function(e,t){e[e.length-1]!==t&&e.push(t);return e}},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},4893:e=>{e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,n.d(o,s),o}})(),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="/",(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>Rd,hasStandardBrowserEnv:()=>Nd,hasStandardBrowserWebWorkerEnv:()=>Dd,origin:()=>Ld});var t={};n.r(t),n.d(t,{OG:()=>N$,My:()=>S$,Ph:()=>_$,lX:()=>T$,Id:()=>R$,fg:()=>L$,qj:()=>O$,aT:()=>C$,lq:()=>P$,z:()=>I$,Q5:()=>F$});var r,i=n(7565),o=n.t(i,2),s=n(6501),a=n(6396),l=n.t(a,2);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));const u="popstate";function d(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function h(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,n,r){return void 0===n&&(n=null),c({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?m(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function g(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function m(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(e,t,n,i){void 0===i&&(i={});let{window:o=document.defaultView,v5Compat:s=!1}=i,a=o.history,l=r.Pop,h=null,m=y();function y(){return(a.state||{idx:null}).idx}function v(){l=r.Pop;let e=y(),t=null==e?null:e-m;m=e,h&&h({action:l,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),d(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,a.replaceState(c({},a.state,{idx:m}),""));let w={get action(){return l},get location(){return e(o,a)},listen(e){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(u,v),h=e,()=>{o.removeEventListener(u,v),h=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=r.Push;let i=p(w.location,e,t);n&&n(i,e),m=y()+1;let c=f(i,m),u=w.createHref(i);try{a.pushState(c,"",u)}catch(d){if(d instanceof DOMException&&"DataCloneError"===d.name)throw d;o.location.assign(u)}s&&h&&h({action:l,location:w.location,delta:1})},replace:function(e,t){l=r.Replace;let i=p(w.location,e,t);n&&n(i,e),m=y();let o=f(i,m),c=w.createHref(i);a.replaceState(o,"",c),s&&h&&h({action:l,location:w.location,delta:0})},go:e=>a.go(e)};return w}var v;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(v||(v={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function b(e,t,n){return void 0===n&&(n="/"),w(e,t,n,!1)}function w(e,t,n,r){let i=M(("string"===typeof t?m(t):t).pathname||"/",n);if(null==i)return null;let o=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let s=null;for(let a=0;null==s&&a<o.length;++a){let e=N(i);s=O(o[a],e,r)}return s}function x(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(d(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=j([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(d(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),x(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:I(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of A(e.path))i(e,t,r);else i(e,t)})),t}function A(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=A(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const E=/^:[\w-]+$/,S=3,k=2,C=1,_=10,T=-2,P=e=>"*"===e;function I(e,t){let n=e.split("/"),r=n.length;return n.some(P)&&(r+=T),t&&(r+=k),n.filter((e=>!P(e))).reduce(((e,t)=>e+(E.test(t)?S:""===t?C:_)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,c="/"===o?t:t.slice(o.length)||"/",u=R({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=R({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),s.push({params:i,pathname:j([o,u.pathname]),pathnameBase:U(j([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=j([o,u.pathnameBase]))}return s}function R(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);h("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:o,pathnameBase:s,pattern:e}}function N(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return h(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function D(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function L(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function B(e,t){let n=L(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=m(e):(i=c({},e),d(!i.pathname||!i.pathname.includes("?"),D("?","pathname","search",i)),d(!i.pathname||!i.pathname.includes("#"),D("#","pathname","hash",i)),d(!i.search||!i.search.includes("#"),D("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?m(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:z(r),hash:V(i)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),h=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!h||(l.pathname+="/"),l}const j=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",V=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function H(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const $=["post","put","patch","delete"],W=(new Set($),["get",...$]);new Set(W),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}const q=i.createContext(null);const K=i.createContext(null);const Q=i.createContext(null);const X=i.createContext(null);const J=i.createContext({outlet:null,matches:[],isDataRoute:!1});const Y=i.createContext(null);function Z(){return null!=i.useContext(X)}function ee(){return Z()||d(!1),i.useContext(X).location}function te(e){i.useContext(Q).static||i.useLayoutEffect(e)}function ne(){let{isDataRoute:e}=i.useContext(J);return e?function(){let{router:e}=de(ce.UseNavigateStable),t=fe(ue.UseNavigateStable),n=i.useRef(!1);te((()=>{n.current=!0}));let r=i.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,G({fromRouteId:t},i)))}),[e,t]);return r}():function(){Z()||d(!1);let e=i.useContext(q),{basename:t,future:n,navigator:r}=i.useContext(Q),{matches:o}=i.useContext(J),{pathname:s}=ee(),a=JSON.stringify(B(o,n.v7_relativeSplatPath)),l=i.useRef(!1);te((()=>{l.current=!0}));let c=i.useCallback((function(n,i){if(void 0===i&&(i={}),!l.current)return;if("number"===typeof n)return void r.go(n);let o=F(n,JSON.parse(a),s,"path"===i.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:j([t,o.pathname])),(i.replace?r.replace:r.push)(o,i.state,i)}),[t,r,a,s,e]);return c}()}function re(e,t,n,o){Z()||d(!1);let{navigator:s}=i.useContext(Q),{matches:a}=i.useContext(J),l=a[a.length-1],c=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let h,f=ee();if(t){var p;let e="string"===typeof t?m(t):t;"/"===u||(null==(p=e.pathname)?void 0:p.startsWith(u))||d(!1),h=e}else h=f;let g=h.pathname||"/",y=g;if("/"!==u){let e=u.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=b(e,{pathname:y});let w=le(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:j([u,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:j([u,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,n,o);return t&&w?i.createElement(X.Provider,{value:{location:G({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:r.Pop}},w):w}function ie(){let e=function(){var e;let t=i.useContext(Y),n=he(ue.UseRouteError),r=fe(ue.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=H(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,null)}const oe=i.createElement(ie,null);class se extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(J.Provider,{value:this.props.routeContext},i.createElement(Y.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ae(e){let{routeContext:t,match:n,children:r}=e,o=i.useContext(q);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i.createElement(J.Provider,{value:t},r)}function le(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(s=r)&&s.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,l=null==(o=n)?void 0:o.errors;if(null!=l){let e=a.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||d(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let i=0;i<a.length;i++){let e=a[i];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=i),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight(((e,r,o)=>{let s,d=!1,h=null,f=null;n&&(s=l&&r.route.id?l[r.route.id]:void 0,h=r.route.errorElement||oe,c&&(u<0&&0===o?(!function(e,t){t||pe[e]||(pe[e]=!0)}("route-fallback",!1),d=!0,f=null):u===o&&(d=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=s?h:d?f:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(ae,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(se,{location:n.location,revalidation:n.revalidation,component:h,error:s,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()}),null)}var ce=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ce||{}),ue=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ue||{});function de(e){let t=i.useContext(q);return t||d(!1),t}function he(e){let t=i.useContext(K);return t||d(!1),t}function fe(e){let t=function(){let e=i.useContext(J);return e||d(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||d(!1),n.route.id}const pe={};o.startTransition;function ge(e){d(!1)}function me(e){let{basename:t="/",children:n=null,location:o,navigationType:s=r.Pop,navigator:a,static:l=!1,future:c}=e;Z()&&d(!1);let u=t.replace(/^\/*/,"/"),h=i.useMemo((()=>({basename:u,navigator:a,static:l,future:G({v7_relativeSplatPath:!1},c)})),[u,c,a,l]);"string"===typeof o&&(o=m(o));let{pathname:f="/",search:p="",hash:g="",state:y=null,key:v="default"}=o,b=i.useMemo((()=>{let e=M(f,u);return null==e?null:{location:{pathname:e,search:p,hash:g,state:y,key:v},navigationType:s}}),[u,f,p,g,y,v,s]);return null==b?null:i.createElement(Q.Provider,{value:h},i.createElement(X.Provider,{children:n,value:b}))}function ye(e){let{children:t,location:n}=e;return re(ve(t),n)}new Promise((()=>{}));i.Component;function ve(e,t){void 0===t&&(t=[]);let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,ve(e.props.children,o));e.type!==ge&&d(!1),e.props.index&&e.props.children&&d(!1);let s={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=ve(e.props.children,o)),n.push(s)})),n}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(gK){}new Map;const be=o.startTransition;l.flushSync,o.useId;function we(e){let{basename:t,children:n,future:r,window:o}=e,s=i.useRef();var a;null==s.current&&(s.current=(void 0===(a={window:o,v5Compat:!0})&&(a={}),y((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return p("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:g(t)}),null,a)));let l=s.current,[c,u]=i.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=i.useCallback((e=>{d&&be?be((()=>u(e))):u(e)}),[u,d]);return i.useLayoutEffect((()=>l.listen(h)),[l,h]),i.createElement(me,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:l,future:r})}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var xe,Ae;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xe||(xe={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Ae||(Ae={}));var Ee=n(8587),Se=n(8168);function ke(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ke(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const Ce=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ke(e))&&(r&&(r+=" "),r+=t);return r};function _e(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((i=>{r[i]=e[i].reduce(((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}var Te=n(8830),Pe=n(1098),Ie=n(7874),Oe=n(2346),Re=n(5514),Ne=n(6325);var Me=n(2388);const De={black:"#000",white:"#fff"},Le={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"},Be={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"},Fe={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"},je={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"},Ue={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"},ze={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"},Ve={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"},He=["mode","contrastThreshold","tonalOffset"],$e={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:De.white,default:De.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}},We={text:{primary:De.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:De.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}};function Ge(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,Me.a)(e.main,i):"dark"===t&&(e.dark=(0,Me.e$)(e.main,o)))}function qe(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=(0,Ee.A)(e,He),o=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Ue[200],light:Ue[50],dark:Ue[400]}:{main:Ue[700],light:Ue[400],dark:Ue[800]}}(t),s=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Be[200],light:Be[50],dark:Be[400]}:{main:Be[500],light:Be[300],dark:Be[700]}}(t),a=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Fe[500],light:Fe[300],dark:Fe[700]}:{main:Fe[700],light:Fe[400],dark:Fe[800]}}(t),l=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:ze[400],light:ze[300],dark:ze[700]}:{main:ze[700],light:ze[500],dark:ze[900]}}(t),c=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:Ve[400],light:Ve[300],dark:Ve[700]}:{main:Ve[800],light:Ve[500],dark:Ve[900]}}(t),u=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:je[400],light:je[300],dark:je[700]}:{main:"#ed6c02",light:je[500],dark:je[900]}}(t);function d(e){return(0,Me.eM)(e,We.text.primary)>=n?We.text.primary:$e.text.primary}const h=e=>{let{color:t,name:n,mainShade:i=500,lightShade:o=300,darkShade:s=700}=e;if(t=(0,Se.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,Pe.A)(11,n?` (${n})`:"",i));if("string"!==typeof t.main)throw new Error((0,Pe.A)(12,n?` (${n})`:"",JSON.stringify(t.main)));return Ge(t,"light",o,r),Ge(t,"dark",s,r),t.contrastText||(t.contrastText=d(t.main)),t},f={dark:We,light:$e};return(0,Ie.A)((0,Se.A)({common:(0,Se.A)({},De),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:Le,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},f[t]),i)}const Ke=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const Qe={textTransform:"uppercase"},Xe='"Roboto", "Helvetica", "Arial", sans-serif';function Je(e,t){const n="function"===typeof t?t(e):t,{fontFamily:r=Xe,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,h=(0,Ee.A)(n,Ke);const f=i/14,p=d||(e=>e/c*f+"rem"),g=(e,t,n,i,o)=>{return(0,Se.A)({fontFamily:r,fontWeight:e,fontSize:p(t),lineHeight:n},r===Xe?{letterSpacing:(s=i/t,Math.round(1e5*s)/1e5)+"em"}:{},o,u);var s},m={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,Qe),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,Qe),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,Ie.A)((0,Se.A)({htmlFontSize:c,pxToRem:p,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},m),h,{clone:!1})}function Ye(){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 Ze=["none",Ye(0,2,1,-1,0,1,1,0,0,1,3,0),Ye(0,3,1,-2,0,2,2,0,0,1,5,0),Ye(0,3,3,-2,0,3,4,0,0,1,8,0),Ye(0,2,4,-1,0,4,5,0,0,1,10,0),Ye(0,3,5,-1,0,5,8,0,0,1,14,0),Ye(0,3,5,-1,0,6,10,0,0,1,18,0),Ye(0,4,5,-2,0,7,10,1,0,2,16,1),Ye(0,5,5,-3,0,8,10,1,0,3,14,2),Ye(0,5,6,-3,0,9,12,1,0,3,16,2),Ye(0,6,6,-3,0,10,14,1,0,4,18,3),Ye(0,6,7,-4,0,11,15,1,0,4,20,3),Ye(0,7,8,-4,0,12,17,2,0,5,22,4),Ye(0,7,8,-4,0,13,19,2,0,5,24,4),Ye(0,7,9,-4,0,14,21,2,0,5,26,4),Ye(0,8,9,-5,0,15,22,2,0,6,28,5),Ye(0,8,10,-5,0,16,24,2,0,6,30,5),Ye(0,8,11,-5,0,17,26,2,0,6,32,5),Ye(0,9,11,-5,0,18,28,2,0,7,34,6),Ye(0,9,12,-6,0,19,29,2,0,7,36,6),Ye(0,10,13,-6,0,20,31,3,0,8,38,7),Ye(0,10,13,-6,0,21,33,3,0,8,40,7),Ye(0,10,14,-6,0,22,35,3,0,8,42,7),Ye(0,11,14,-7,0,23,36,3,0,9,44,8),Ye(0,11,15,-7,0,24,38,3,0,9,46,8)],et=["duration","easing","delay"],tt={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)"},nt={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function rt(e){return`${Math.round(e)}ms`}function it(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function ot(e){const t=(0,Se.A)({},tt,e.easing),n=(0,Se.A)({},nt,e.duration);return(0,Se.A)({getAutoHeightDuration:it,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:i=n.standard,easing:o=t.easeInOut,delay:s=0}=r;(0,Ee.A)(r,et);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof i?i:rt(i)} ${o} ${"string"===typeof s?s:rt(s)}`)).join(",")}},e,{easing:t,duration:n})}const st={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},at=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function lt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:r={},typography:i={}}=e,o=(0,Ee.A)(e,at);if(e.vars)throw new Error((0,Pe.A)(18));const s=qe(n),a=(0,Ne.A)(e);let l=(0,Ie.A)(a,{mixins:(c=a.breakpoints,u=t,(0,Se.A)({toolbar:{minHeight:56,[c.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[c.up("sm")]:{minHeight:64}}},u)),palette:s,shadows:Ze.slice(),typography:Je(s,i),transitions:ot(r),zIndex:(0,Se.A)({},st)});var c,u;l=(0,Ie.A)(l,o);for(var d=arguments.length,h=new Array(d>1?d-1:0),f=1;f<d;f++)h[f-1]=arguments[f];return l=h.reduce(((e,t)=>(0,Ie.A)(e,t)),l),l.unstable_sxConfig=(0,Se.A)({},Oe.A,null==o?void 0:o.unstable_sxConfig),l.unstable_sx=function(e){return(0,Re.A)({sx:e,theme:this})},l}const ct=lt,ut=ct(),dt="$$material";const ht=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e},ft=e=>ht(e)&&"classes"!==e,pt=(0,Te.Ay)({themeId:dt,defaultTheme:ut,rootShouldForwardProp:ft});function gt(e,t){const n=(0,Se.A)({},t);return Object.keys(e).forEach((r=>{if(r.toString().match(/^(components|slots)$/))n[r]=(0,Se.A)({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},o&&Object.keys(o)?i&&Object.keys(i)?(n[r]=(0,Se.A)({},o),Object.keys(i).forEach((e=>{n[r][e]=gt(i[e],o[e])}))):n[r]=o:n[r]=i}else void 0===n[r]&&(n[r]=e[r])})),n}var mt=n(7929);const yt=i.createContext(void 0);function vt(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 i=t.components[n];return i.defaultProps?gt(i.defaultProps,r):i.styleOverrides||i.variants?r:gt(i,r)}({props:t,name:n,theme:{components:i.useContext(yt)}})}const bt=function(e){let{value:t,children:n}=e;return(0,mt.jsx)(yt.Provider,{value:t,children:n})};function wt(e){return vt(e)}var xt=n(1932);const At=xt.A,Et=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)},St=e=>e,kt=(()=>{let e=St;return{configure(t){e=t},generate:t=>e(t),reset(){e=St}}})(),Ct={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 _t(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r=Ct[t];return r?`${n}-${r}`:`${kt.generate(e)}-${t}`}function Tt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const r={};return t.forEach((t=>{r[t]=_t(e,t,n)})),r}function Pt(e){return _t("MuiPaper",e)}Tt("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 It=["className","component","elevation","square","variant"],Ot=pt("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}`]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,Se.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.divider}`},"elevation"===n.variant&&(0,Se.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${(0,Me.X4)("#fff",Et(n.elevation))}, ${(0,Me.X4)("#fff",Et(n.elevation))})`},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),Rt=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:s=!1,variant:a="elevation"}=n,l=(0,Ee.A)(n,It),c=(0,Se.A)({},n,{component:i,elevation:o,square:s,variant:a}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return _e({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Pt,i)})(c);return(0,mt.jsx)(Ot,(0,Se.A)({as:i,ownerState:c,className:Ce(u.root,r),ref:t},l))})),Nt=Rt;function Mt(e){return _t("MuiAppBar",e)}Tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Dt=["className","color","enableColorOnDark","position"],Lt=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,Bt=pt(Nt,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${At(n.position)}`],t[`color${At(n.color)}`]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,Se.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,Se.A)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,Se.A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,Se.A)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Lt(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:Lt(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:Lt(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:Lt(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),Ft=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiAppBar"}),{className:r,color:i="primary",enableColorOnDark:o=!1,position:s="fixed"}=n,a=(0,Ee.A)(n,Dt),l=(0,Se.A)({},n,{color:i,position:s,enableColorOnDark:o}),c=(e=>{const{color:t,position:n,classes:r}=e;return _e({root:["root",`color${At(t)}`,`position${At(n)}`]},Mt,r)})(l);return(0,mt.jsx)(Bt,(0,Se.A)({square:!0,component:"header",ownerState:l,elevation:4,className:Ce(c.root,r,"fixed"===s&&"mui-fixed"),ref:t},a))})),jt=Ft;function Ut(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ut(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const zt=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ut(e))&&(r&&(r+=" "),r+=t);return r};var Vt=n(8097);const Ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=i.useContext(Vt.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},$t=(0,Ne.A)();const Wt=function(){return Ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:$t)};function Gt(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=Wt(r);i&&(o=o[i]||o);const s=function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?gt(t.components[n].defaultProps,r):r}({theme:o,name:n,props:t});return s}var qt=n(4163);const Kt=["ownerState"],Qt=["variants"],Xt=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Jt(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const Yt=(0,Ne.A)(),Zt=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function en(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function tn(e){return e?(t,n)=>n[e]:null}function nn(e,t){let{ownerState:n}=t,r=(0,Ee.A)(t,Kt);const i="function"===typeof e?e((0,Se.A)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap((e=>nn(e,(0,Se.A)({ownerState:n},r))));if(i&&"object"===typeof i&&Array.isArray(i.variants)){const{variants:e=[]}=i;let t=(0,Ee.A)(i,Qt);return e.forEach((e=>{let i=!0;"function"===typeof e.props?i=e.props((0,Se.A)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,Se.A)({ownerState:n},r,n)):e.style))})),t}return i}const rn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=Yt,rootShouldForwardProp:r=Jt,slotShouldForwardProp:i=Jt}=e,o=e=>(0,Re.A)((0,Se.A)({},e,{theme:en((0,Se.A)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,qt.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:a,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=tn(Zt(l))}=s,h=(0,Ee.A)(s,Xt),f=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,p=u||!1;let g=Jt;"Root"===l||"root"===l?g=r:l?g=i:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(g=void 0);const m=(0,qt.default)(e,(0,Se.A)({shouldForwardProp:g,label:undefined},h)),y=e=>"function"===typeof e&&e.__emotion_real!==e||(0,Ie.Q)(e)?r=>nn(e,(0,Se.A)({},r,{theme:en({theme:r.theme,defaultTheme:n,themeId:t})})):e,v=function(r){let i=y(r);for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];const u=l?l.map(y):[];a&&d&&u.push((e=>{const r=en((0,Se.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[a]||!r.components[a].styleOverrides)return null;const i=r.components[a].styleOverrides,o={};return Object.entries(i).forEach((t=>{let[n,i]=t;o[n]=nn(i,(0,Se.A)({},e,{theme:r}))})),d(e,o)})),a&&!f&&u.push((e=>{var r;const i=en((0,Se.A)({},e,{defaultTheme:n,themeId:t}));return nn({variants:null==i||null==(r=i.components)||null==(r=r[a])?void 0:r.variants},(0,Se.A)({},e,{theme:i}))})),p||u.push(o);const h=u.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const g=m(i,...u);return e.muiName&&(g.muiName=e.muiName),g};return m.withConfig&&(v.withConfig=m.withConfig),v}}(),on=rn,sn=["className","component","disableGutters","fixed","maxWidth","classes"],an=(0,Ne.A)(),ln=on("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${(0,xt.A)(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),cn=e=>Gt({props:e,name:"MuiContainer",defaultTheme:an});const un=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=ln,useThemeProps:n=cn,componentName:r="MuiContainer"}=e,o=t((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!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,i=t.breakpoints.values[r];return 0!==i&&(e[t.breakpoints.up(r)]={maxWidth:`${i}${t.breakpoints.unit}`}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},"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}`}})})),s=i.forwardRef((function(e,t){const i=n(e),{className:s,component:a="div",disableGutters:l=!1,fixed:c=!1,maxWidth:u="lg"}=i,d=(0,Ee.A)(i,sn),h=(0,Se.A)({},i,{component:a,disableGutters:l,fixed:c,maxWidth:u}),f=((e,t)=>{const{classes:n,fixed:r,disableGutters:i,maxWidth:o}=e;return _e({root:["root",o&&`maxWidth${(0,xt.A)(String(o))}`,r&&"fixed",i&&"disableGutters"]},(e=>_t(t,e)),n)})(h,r);return(0,mt.jsx)(o,(0,Se.A)({as:a,ownerState:h,className:zt(f.root,s),ref:t},d))}));return s}({createStyledComponent:pt("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${At(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>wt({props:e,name:"MuiContainer"})}),dn=un;function hn(e){return _t("MuiToolbar",e)}Tt("MuiToolbar",["root","gutters","regular","dense"]);const fn=["className","component","disableGutters","variant"],pn=pt("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})}),(e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar})),gn=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:o=!1,variant:s="regular"}=n,a=(0,Ee.A)(n,fn),l=(0,Se.A)({},n,{component:i,disableGutters:o,variant:s}),c=(e=>{const{classes:t,disableGutters:n,variant:r}=e;return _e({root:["root",!n&&"gutters",r]},hn,t)})(l);return(0,mt.jsx)(pn,(0,Se.A)({as:i,className:Ce(c.root,r),ref:t,ownerState:l},a))})),mn=gn;var yn=n(5800);function vn(e){return _t("MuiTypography",e)}Tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const bn=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],wn=pt("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${At(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),xn={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},An={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},En=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTypography"}),r=(e=>An[e]||e)(n.color),i=(0,yn.A)((0,Se.A)({},n,{color:r})),{align:o="inherit",className:s,component:a,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=xn}=i,f=(0,Ee.A)(i,bn),p=(0,Se.A)({},i,{align:o,color:r,className:s,component:a,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),g=a||(u?"p":h[d]||xn[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e;return _e({root:["root",o,"inherit"!==e.align&&`align${At(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},vn,s)})(p);return(0,mt.jsx)(wn,(0,Se.A)({as:g,ref:t,ownerState:p,className:Ce(m.root,s)},f))})),Sn=En;n(367);let kn=0;const Cn=o["useId".toString()];function _n(e){if(void 0!==Cn){const t=Cn();return null!=e?e:t}return function(e){const[t,n]=i.useState(e),r=e||t;return i.useEffect((()=>{null==t&&(kn+=1,n(`mui-${kn}`))}),[t]),r}(e)}function Tn(e){return e&&e.ownerDocument||document}const Pn=Tn,In=["value"],On=i.createContext();const Rn=()=>{const e=i.useContext(On);return null!=e&&e},Nn=function(e){let{value:t}=e,n=(0,Ee.A)(e,In);return(0,mt.jsx)(On.Provider,(0,Se.A)({value:null==t||t},n))};function Mn(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function Dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{Mn(t,e)}))}),t)}const Ln=function(e){return"string"===typeof e};const Bn=function(e,t,n){return void 0===e||Ln(e)?t:(0,Se.A)({},t,{ownerState:(0,Se.A)({},t.ownerState,n)})};function Fn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Fn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const jn=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Fn(e))&&(r&&(r+=" "),r+=t);return r};const Un=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 zn=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 Vn=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=jn(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,Se.A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),s=(0,Se.A)({},n,i,r);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=Un((0,Se.A)({},i,r)),a=zn(r),l=zn(i),c=t(s),u=jn(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=(0,Se.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),h=(0,Se.A)({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}};const Hn=function(e,t,n){return"function"===typeof e?e(t,n):e},$n=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const Wn=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=(0,Ee.A)(e,$n),a=o?{}:Hn(r,i),{props:l,internalRef:c}=Vn((0,Se.A)({},s,{externalSlotProps:a})),u=Dn(c,null==a?void 0:a.ref,null==(t=e.additionalProps)?void 0:t.ref);return Bn(n,(0,Se.A)({},l,{ref:u}),i)};const Gn=i.createContext({});function qn(e){return _t("MuiList",e)}Tt("MuiList",["root","padding","dense","subheader"]);const Kn=["children","className","component","dense","disablePadding","subheader"],Qn=pt("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]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),Xn=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiList"}),{children:r,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=n,u=(0,Ee.A)(n,Kn),d=i.useMemo((()=>({dense:a})),[a]),h=(0,Se.A)({},n,{component:s,dense:a,disablePadding:l}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return _e({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},qn,t)})(h);return(0,mt.jsx)(Gn.Provider,{value:d,children:(0,mt.jsxs)(Qn,(0,Se.A)({as:s,className:Ce(f.root,o),ref:t,ownerState:h},u,{children:[c,r]}))})}));function Jn(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const Yn=Jn,Zn=Dn,er="undefined"!==typeof window?i.useLayoutEffect:i.useEffect,tr=er,nr=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function rr(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ir(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function or(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]:0===n.indexOf(t.keys.join("")))}function sr(e,t,n,r,i,o){let s=!1,a=i(e,t,!!t&&n);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const t=!r&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&or(a,o)&&!t)return a.focus(),!0;a=i(e,a,n)}return!1}const ar=i.forwardRef((function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,h=(0,Ee.A)(e,nr),f=i.useRef(null),p=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});tr((()=>{r&&f.current.focus()}),[r]),i.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&r){const t=`${Yn(Pn(e))}px`;f.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,f.current.style.width=`calc(100% + ${t})`}return f.current}})),[]);const g=Zn(f,t);let m=-1;i.Children.forEach(s,((e,t)=>{i.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=s.length&&(m=-1))):m===t&&(m+=1,m>=s.length&&(m=-1))}));const y=i.Children.map(s,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),i.cloneElement(e,t)}return e}));return(0,mt.jsx)(Xn,(0,Se.A)({role:"menu",ref:g,className:a,onKeyDown:e=>{const t=f.current,n=e.key,r=Pn(t).activeElement;if("ArrowDown"===n)e.preventDefault(),sr(t,r,c,l,rr);else if("ArrowUp"===n)e.preventDefault(),sr(t,r,c,l,ir);else if("Home"===n)e.preventDefault(),sr(t,null,c,l,rr);else if("End"===n)e.preventDefault(),sr(t,null,c,l,ir);else if(1===n.length){const i=p.current,o=n.toLowerCase(),s=performance.now();i.keys.length>0&&(s-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=s,i.keys.push(o);const a=r&&!i.repeating&&or(r,i);i.previousKeyMatched&&(a||sr(t,r,!1,l,rr,i))?e.preventDefault():i.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},h,{children:y}))})),lr=ar;function cr(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((()=>{e.apply(this,i)}),n)}return r.clear=()=>{clearTimeout(t)},r}const ur=cr;function dr(e){return Tn(e).defaultView||window}const hr=dr,fr={};const pr=[];class gr{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new gr}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function mr(){const e=function(e,t){const n=i.useRef(fr);return n.current===fr&&(n.current=e(t)),n}(gr.create).current;var t;return t=e.disposeEffect,i.useEffect(t,pr),e}function yr(e,t){return yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yr(e,t)}function vr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yr(e,t)}const br=!1,wr=i.createContext(null);var xr="unmounted",Ar="exited",Er="entering",Sr="entered",kr="exiting",Cr=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Ar,r.appearStatus=Er):i=Sr:i=t.unmountOnExit||t.mountOnEnter?xr:Ar,r.state={status:i},r.nextCallback=null,r}vr(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===xr?{status:Ar}: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!==Er&&n!==Sr&&(t=Er):n!==Er&&n!==Sr||(t=kr)}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===Er){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:a.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ar&&this.setState({status:xr})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[a.findDOMNode(this),r],o=i[0],s=i[1],l=this.getTimeouts(),c=r?l.appear:l.enter;!e&&!n||br?this.safeSetState({status:Sr},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,s),this.safeSetState({status:Er},(function(){t.props.onEntering(o,s),t.onTransitionEnd(c,(function(){t.safeSetState({status:Sr},(function(){t.props.onEntered(o,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:a.findDOMNode(this);t&&!br?(this.props.onExit(r),this.safeSetState({status:kr},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Ar},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Ar},(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:a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===xr)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,(0,Ee.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(wr.Provider,{value:null},"function"===typeof n?n(e,r):i.cloneElement(i.Children.only(n),r))},t}(i.Component);function _r(){}Cr.contextType=wr,Cr.propTypes={},Cr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:_r,onEntering:_r,onEntered:_r,onExit:_r,onExiting:_r,onExited:_r},Cr.UNMOUNTED=xr,Cr.EXITED=Ar,Cr.ENTERING=Er,Cr.ENTERED=Sr,Cr.EXITING=kr;const Tr=Cr;function Pr(){const e=Wt(ut);return e[dt]||e}const Ir=e=>e.scrollTop;function Or(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:null!=(n=s.transitionDuration)?n:"number"===typeof i?i:i[t.mode]||0,easing:null!=(r=s.transitionTimingFunction)?r:"object"===typeof o?o[t.mode]:o,delay:s.transitionDelay}}const Rr=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Nr(e){return`scale(${e}, ${e**2})`}const Mr={entering:{opacity:1,transform:Nr(1)},entered:{opacity:1,transform:"none"}},Dr="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Lr=i.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:h,onExiting:f,style:p,timeout:g="auto",TransitionComponent:m=Tr}=e,y=(0,Ee.A)(e,Rr),v=mr(),b=i.useRef(),w=Pr(),x=i.useRef(null),A=Zn(x,o.ref,t),E=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=E(u),k=E(((e,t)=>{Ir(e);const{duration:n,delay:r,easing:i}=Or({style:p,timeout:g,easing:s},{mode:"enter"});let o;"auto"===g?(o=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=n,e.style.transition=[w.transitions.create("opacity",{duration:o,delay:r}),w.transitions.create("transform",{duration:Dr?o:.666*o,delay:r,easing:i})].join(","),l&&l(e,t)})),C=E(c),_=E(f),T=E((e=>{const{duration:t,delay:n,easing:r}=Or({style:p,timeout:g,easing:s},{mode:"exit"});let i;"auto"===g?(i=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=i):i=t,e.style.transition=[w.transitions.create("opacity",{duration:i,delay:n}),w.transitions.create("transform",{duration:Dr?i:.666*i,delay:Dr?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=Nr(.75),d&&d(e)})),P=E(h);return(0,mt.jsx)(m,(0,Se.A)({appear:r,in:a,nodeRef:x,onEnter:k,onEntered:C,onEntering:S,onExit:T,onExited:P,onExiting:_,addEndListener:e=>{"auto"===g&&v.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===g?null:g},y,{children:(e,t)=>i.cloneElement(o,(0,Se.A)({style:(0,Se.A)({opacity:0,transform:Nr(.75),visibility:"exited"!==e||a?void 0:"hidden"},Mr[e],p,o.props.style),ref:A},t))}))}));Lr.muiSupportAuto=!0;const Br=Lr,Fr=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function jr(e){const t=[],n=[];return Array.from(e.querySelectorAll(Fr)).forEach(((e,r)=>{const i=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!==i&&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===i?t.push(e):n.push({documentOrder:r,tabIndex:i,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 Ur(){return!0}const zr=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=jr,isEnabled:a=Ur,open:l}=e,c=i.useRef(!1),u=i.useRef(null),d=i.useRef(null),h=i.useRef(null),f=i.useRef(null),p=i.useRef(!1),g=i.useRef(null),m=Dn(t.ref,g),y=i.useRef(null);i.useEffect((()=>{l&&g.current&&(p.current=!n)}),[n,l]),i.useEffect((()=>{if(!l||!g.current)return;const e=Tn(g.current);return g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),p.current&&g.current.focus()),()=>{o||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}}),[l]),i.useEffect((()=>{if(!l||!g.current)return;const e=Tn(g.current),t=t=>{y.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===g.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=g.current;if(null===t)return;if(!e.hasFocus()||!a()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!p.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=s(g.current)),n.length>0){var i,o;const e=Boolean((null==(i=y.current)?void 0:i.shiftKey)&&"Tab"===(null==(o=y.current)?void 0:o.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 i=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,l,s]);const v=e=>{null===h.current&&(h.current=e.relatedTarget),p.current=!0};return(0,mt.jsxs)(i.Fragment,{children:[(0,mt.jsx)("div",{tabIndex:l?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),i.cloneElement(t,{ref:m,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),p.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,mt.jsx)("div",{tabIndex:l?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})};const Vr=i.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[s,l]=i.useState(null),c=Dn(i.isValidElement(n)?n.ref:null,t);if(er((()=>{o||l(function(e){return"function"===typeof e?e():e}(r)||document.body)}),[r,o]),er((()=>{if(s&&!o)return Mn(t,s),()=>{Mn(t,null)}}),[t,s,o]),o){if(i.isValidElement(n)){const e={ref:c};return i.cloneElement(n,e)}return(0,mt.jsx)(i.Fragment,{children:n})}return(0,mt.jsx)(i.Fragment,{children:s?a.createPortal(n,s):s})})),Hr=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],$r={entering:{opacity:1},entered:{opacity:1}},Wr=i.forwardRef((function(e,t){const n=Pr(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:d,onEntering:h,onExit:f,onExited:p,onExiting:g,style:m,timeout:y=r,TransitionComponent:v=Tr}=e,b=(0,Ee.A)(e,Hr),w=i.useRef(null),x=Zn(w,a.ref,t),A=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},E=A(h),S=A(((e,t)=>{Ir(e);const r=Or({style:m,timeout:y,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),k=A(d),C=A(g),_=A((e=>{const t=Or({style:m,timeout:y,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)})),T=A(p);return(0,mt.jsx)(v,(0,Se.A)({appear:s,in:c,nodeRef:w,onEnter:S,onEntered:k,onEntering:E,onExit:_,onExited:T,onExiting:C,addEndListener:e=>{o&&o(w.current,e)},timeout:y},b,{children:(e,t)=>i.cloneElement(a,(0,Se.A)({style:(0,Se.A)({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},$r[e],m,a.props.style),ref:x},t))}))})),Gr=Wr;function qr(e){return _t("MuiBackdrop",e)}Tt("MuiBackdrop",["root","invisible"]);const Kr=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Qr=pt("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({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"},t.invisible&&{backgroundColor:"transparent"})})),Xr=i.forwardRef((function(e,t){var n,r,i;const o=wt({props:e,name:"MuiBackdrop"}),{children:s,className:a,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:h,slotProps:f={},slots:p={},TransitionComponent:g=Gr,transitionDuration:m}=o,y=(0,Ee.A)(o,Kr),v=(0,Se.A)({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e;return _e({root:["root",n&&"invisible"]},qr,t)})(v),w=null!=(n=f.root)?n:u.root;return(0,mt.jsx)(g,(0,Se.A)({in:h,timeout:m},y,{children:(0,mt.jsx)(Qr,(0,Se.A)({"aria-hidden":!0},w,{as:null!=(r=null!=(i=p.root)?i:c.Root)?r:l,className:Ce(b.root,a,null==w?void 0:w.className),ownerState:(0,Se.A)({},v,null==w?void 0:w.ownerState),classes:b,ref:t,children:s}))}))}));const Jr=function(e){const t=i.useRef(e);return er((()=>{t.current=e})),i.useRef((function(){return(0,t.current)(...arguments)})).current};function Yr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}),(()=>{}))}function Zr(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ei(e){return parseInt(dr(e).getComputedStyle(e).paddingRight,10)||0}function ti(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Zr(e,i)}))}function ni(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function ri(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Tn(e);return t.body===e?dr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Jn(Tn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ei(r)+e}px`;const t=Tn(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${ei(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=Tn(r).body;else{const t=r.parentElement,n=dr(r);e="HTML"===(null==t?void 0: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 ii=new class{constructor(){this.containers=void 0,this.modals=void 0,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&&Zr(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);ti(t,e.mount,e.modalRef,r,!0);const i=ni(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=ni(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=ri(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=ni(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&Zr(e.modalRef,t),ti(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&Zr(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const oi=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=ii,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:h}=e,f=i.useRef({}),p=i.useRef(null),g=i.useRef(null),m=Dn(g,h),[y,v]=i.useState(!d),b=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let w=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(w=!1);const x=()=>(f.current.modalRef=g.current,f.current.mount=p.current,f.current),A=()=>{o.mount(x(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},E=Jr((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||Tn(p.current).body;o.add(x(),e),g.current&&A()})),S=i.useCallback((()=>o.isTopModal(x())),[o]),k=Jr((e=>{p.current=e,e&&(d&&S()?A():g.current&&Zr(g.current,w))})),C=i.useCallback((()=>{o.remove(x(),w)}),[w,o]);i.useEffect((()=>()=>{C()}),[C]),i.useEffect((()=>{d?E():b&&s||C()}),[d,C,b,s,E]);const _=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},T=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Un(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,Se.A)({},n,t);return(0,Se.A)({role:"presentation"},r,{onKeyDown:_(r),ref:m})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Se.A)({"aria-hidden":!0},e,{onClick:T(e),open:d})},getTransitionProps:()=>({onEnter:Yr((()=>{v(!1),a&&a()}),null==c?void 0:c.props.onEnter),onExited:Yr((()=>{v(!0),l&&l(),s&&C()}),null==c?void 0:c.props.onExited)}),rootRef:m,portalRef:k,isTopModal:S,exited:y,hasTransition:b}};function si(e){return _t("MuiModal",e)}Tt("MuiModal",["root","hidden","backdrop"]);const ai=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],li=pt("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),ci=pt(Xr,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ui=i.forwardRef((function(e,t){var n,r,o,s,a,l;const c=wt({name:"MuiModal",props:e}),{BackdropComponent:u=ci,BackdropProps:d,className:h,closeAfterTransition:f=!1,children:p,container:g,component:m,components:y={},componentsProps:v={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:x=!1,disablePortal:A=!1,disableRestoreFocus:E=!1,disableScrollLock:S=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:_,open:T,slotProps:P,slots:I}=c,O=(0,Ee.A)(c,ai),R=(0,Se.A)({},c,{closeAfterTransition:f,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:x,disablePortal:A,disableRestoreFocus:E,disableScrollLock:S,hideBackdrop:k,keepMounted:C}),{getRootProps:N,getBackdropProps:M,getTransitionProps:D,portalRef:L,isTopModal:B,exited:F,hasTransition:j}=oi((0,Se.A)({},R,{rootRef:t})),U=(0,Se.A)({},R,{exited:F}),z=(e=>{const{open:t,exited:n,classes:r}=e;return _e({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},si,r)})(U),V={};if(void 0===p.props.tabIndex&&(V.tabIndex="-1"),j){const{onEnter:e,onExited:t}=D();V.onEnter=e,V.onExited=t}const H=null!=(n=null!=(r=null==I?void 0:I.root)?r:y.Root)?n:li,$=null!=(o=null!=(s=null==I?void 0:I.backdrop)?s:y.Backdrop)?o:u,W=null!=(a=null==P?void 0:P.root)?a:v.root,G=null!=(l=null==P?void 0:P.backdrop)?l:v.backdrop,q=Wn({elementType:H,externalSlotProps:W,externalForwardedProps:O,getSlotProps:N,additionalProps:{ref:t,as:m},ownerState:U,className:Ce(h,null==W?void 0:W.className,null==z?void 0:z.root,!U.open&&U.exited&&(null==z?void 0:z.hidden))}),K=Wn({elementType:$,externalSlotProps:G,additionalProps:d,getSlotProps:e=>M((0,Se.A)({},e,{onClick:t=>{_&&_(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ce(null==G?void 0:G.className,null==d?void 0:d.className,null==z?void 0:z.backdrop),ownerState:U});return C||T||j&&!F?(0,mt.jsx)(Vr,{ref:L,container:g,disablePortal:A,children:(0,mt.jsxs)(H,(0,Se.A)({},q,{children:[!k&&u?(0,mt.jsx)($,(0,Se.A)({},K)):null,(0,mt.jsx)(zr,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:E,isEnabled:B,open:T,children:i.cloneElement(p,V)})]}))}):null})),di=ui;function hi(e){return _t("MuiPopover",e)}Tt("MuiPopover",["root","paper"]);const fi=["onEntering"],pi=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],gi=["slotProps"];function mi(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function yi(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function vi(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?`${e}px`:e)).join(" ")}function bi(e){return"function"===typeof e?e():e}const wi=pt(di,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xi=pt(Nt,{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}),Ai=i.forwardRef((function(e,t){var n,r,o;const s=wt({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:h,className:f,container:p,elevation:g=8,marginThreshold:m=16,open:y,PaperProps:v={},slots:b,slotProps:w,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:A=Br,transitionDuration:E="auto",TransitionProps:{onEntering:S}={},disableScrollLock:k=!1}=s,C=(0,Ee.A)(s.TransitionProps,fi),_=(0,Ee.A)(s,pi),T=null!=(n=null==w?void 0:w.paper)?n:v,P=i.useRef(),I=Zn(P,T.ref),O=(0,Se.A)({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:T,transformOrigin:x,TransitionComponent:A,transitionDuration:E,TransitionProps:C}),R=(e=>{const{classes:t}=e;return _e({root:["root"],paper:["paper"]},hi,t)})(O),N=i.useCallback((()=>{if("anchorPosition"===d)return u;const e=bi(l),t=(e&&1===e.nodeType?e:Pn(P.current).body).getBoundingClientRect();return{top:t.top+mi(t,c.vertical),left:t.left+yi(t,c.horizontal)}}),[l,c.horizontal,c.vertical,u,d]),M=i.useCallback((e=>({vertical:mi(e,x.vertical),horizontal:yi(e,x.horizontal)})),[x.horizontal,x.vertical]),D=i.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=M(t);if("none"===d)return{top:null,left:null,transformOrigin:vi(n)};const r=N();let i=r.top-n.vertical,o=r.left-n.horizontal;const s=i+t.height,a=o+t.width,c=hr(bi(l)),u=c.innerHeight-m,h=c.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&s>u){const e=s-u;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;o-=e,n.horizontal+=e}else if(a>h){const e=a-h;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:vi(n)}}),[l,d,N,M,m]),[L,B]=i.useState(y),F=i.useCallback((()=>{const e=P.current;if(!e)return;const t=D(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,B(!0)}),[D]);i.useEffect((()=>(k&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F))),[l,k,F]);i.useEffect((()=>{y&&F()})),i.useImperativeHandle(a,(()=>y?{updatePosition:()=>{F()}}:null),[y,F]),i.useEffect((()=>{if(!y)return;const e=ur((()=>{F()})),t=hr(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,y,F]);let j=E;"auto"!==E||A.muiSupportAuto||(j=void 0);const U=p||(l?Pn(bi(l)).body:void 0),z=null!=(r=null==b?void 0:b.root)?r:wi,V=null!=(o=null==b?void 0:b.paper)?o:xi,H=Wn({elementType:V,externalSlotProps:(0,Se.A)({},T,{style:L?T.style:(0,Se.A)({},T.style,{opacity:0})}),additionalProps:{elevation:g,ref:I},ownerState:O,className:Ce(R.paper,null==T?void 0:T.className)}),$=Wn({elementType:z,externalSlotProps:(null==w?void 0:w.root)||{},externalForwardedProps:_,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:U,open:y},ownerState:O,className:Ce(R.root,f)}),{slotProps:W}=$,G=(0,Ee.A)($,gi);return(0,mt.jsx)(z,(0,Se.A)({},G,!Ln(z)&&{slotProps:W,disableScrollLock:k},{children:(0,mt.jsx)(A,(0,Se.A)({appear:!0,in:y,onEntering:(e,t)=>{S&&S(e,t),F()},onExited:()=>{B(!1)},timeout:j},C,{children:(0,mt.jsx)(V,(0,Se.A)({},H,{children:h}))}))}))}));function Ei(e){return _t("MuiMenu",e)}Tt("MuiMenu",["root","paper","list"]);const Si=["onEntering"],ki=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Ci={vertical:"top",horizontal:"right"},_i={vertical:"top",horizontal:"left"},Ti=pt(Ai,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Pi=pt(xi,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ii=pt(lr,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Oi=i.forwardRef((function(e,t){var n,r;const o=wt({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:h,PaperProps:f={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:y="selectedMenu",slots:v={},slotProps:b={}}=o,w=(0,Ee.A)(o.TransitionProps,Si),x=(0,Ee.A)(o,ki),A=Rn(),E=(0,Se.A)({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:m,PaperProps:f,transitionDuration:g,TransitionProps:w,variant:y}),S=(e=>{const{classes:t}=e;return _e({root:["root"],paper:["paper"],list:["list"]},Ei,t)})(E),k=s&&!c&&h,C=i.useRef(null);let _=-1;i.Children.map(a,((e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===y&&e.props.selected||-1===_)&&(_=t))}));const T=null!=(n=v.paper)?n:Pi,P=null!=(r=b.paper)?r:f,I=Wn({elementType:v.root,externalSlotProps:b.root,ownerState:E,className:[S.root,l]}),O=Wn({elementType:T,externalSlotProps:P,ownerState:E,className:S.paper});return(0,mt.jsx)(Ti,(0,Se.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?Ci:_i,slots:{paper:T,root:v.root},slotProps:{root:I,paper:O},open:h,ref:t,transitionDuration:g,TransitionProps:(0,Se.A)({onEntering:(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:A?"rtl":"ltr"}),m&&m(e,t)}},w),ownerState:E},x,{classes:p,children:(0,mt.jsx)(Ii,(0,Se.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:C,autoFocus:s&&(-1===_||c),autoFocusItem:k,variant:y},u,{className:Ce(S.list,u.className),children:a}))}))})),Ri=Oi;function Ni(e){return _t("MuiNativeSelect",e)}const Mi=Tt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Di=["className","disabled","error","IconComponent","inputRef","variant"],Li=e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,Se.A)({},n.vars?{backgroundColor:`rgba(${n.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Mi.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},Bi=pt("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ft,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Mi.multiple}`]:t.multiple}]}})(Li),Fi=e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,[`&.${Mi.disabled}`]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},ji=pt("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${At(n.variant)}`],n.open&&t.iconOpen]}})(Fi),Ui=i.forwardRef((function(e,t){const{className:n,disabled:r,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=(0,Ee.A)(e,Di),u=(0,Se.A)({},e,{disabled:r,variant:l,error:o}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e;return _e({select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${At(n)}`,o&&"iconOpen",r&&"disabled"]},Ni,t)})(u);return(0,mt.jsxs)(i.Fragment,{children:[(0,mt.jsx)(Bi,(0,Se.A)({ownerState:u,className:Ce(d.select,n),disabled:r,ref:a||t},c)),e.multiple?null:(0,mt.jsx)(ji,{as:s,ownerState:u,className:d.icon})]})})),zi=Ui;function Vi(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Hi(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Vi(e.value)&&""!==e.value||t&&Vi(e.defaultValue)&&""!==e.defaultValue)}function $i(e){let{controlled:t,default:n,name:r,state:o="value"}=e;const{current:s}=i.useRef(void 0!==t),[a,l]=i.useState(n);return[s?t:a,i.useCallback((e=>{s||l(e)}),[])]}const Wi=$i;function Gi(e){return _t("MuiSelect",e)}const qi=Tt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Ki;const Qi=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Xi=pt("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${qi.select}`]:t.select},{[`&.${qi.select}`]:t[n.variant]},{[`&.${qi.error}`]:t.error},{[`&.${qi.multiple}`]:t.multiple}]}})(Li,{[`&.${qi.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Ji=pt("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${At(n.variant)}`],n.open&&t.iconOpen]}})(Fi),Yi=pt("input",{shouldForwardProp:e=>ht(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 Zi(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function eo(e){return null==e||"string"===typeof e&&!e.trim()}const to=i.forwardRef((function(e,t){var n;const{"aria-describedby":r,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:h,displayEmpty:f,error:p=!1,IconComponent:g,inputRef:m,labelId:y,MenuProps:v={},multiple:b,name:w,onBlur:x,onChange:A,onClose:E,onFocus:S,onOpen:k,open:C,readOnly:_,renderValue:T,SelectDisplayProps:P={},tabIndex:I,value:O,variant:R="standard"}=e,N=(0,Ee.A)(e,Qi),[M,D]=Wi({controlled:O,default:d,name:"Select"}),[L,B]=Wi({controlled:C,default:u,name:"Select"}),F=i.useRef(null),j=i.useRef(null),[U,z]=i.useState(null),{current:V}=i.useRef(null!=C),[H,$]=i.useState(),W=Zn(t,m),G=i.useCallback((e=>{j.current=e,e&&z(e)}),[]),q=null==U?void 0:U.parentNode;i.useImperativeHandle(W,(()=>({focus:()=>{j.current.focus()},node:F.current,value:M})),[M]),i.useEffect((()=>{u&&L&&U&&!V&&($(a?null:q.clientWidth),j.current.focus())}),[U,a]),i.useEffect((()=>{s&&j.current.focus()}),[s]),i.useEffect((()=>{if(!y)return;const e=Pn(j.current).getElementById(y);if(e){const t=()=>{getSelection().isCollapsed&&j.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[y]);const K=(e,t)=>{e?k&&k(t):E&&E(t),V||($(a?null:q.clientWidth),B(e))},Q=i.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(b){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&&(D(n),A)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:w}}),A(i,e)}b||K(!1,t)}},J=null!==U&&L;let Y,Z;delete N["aria-invalid"];const ee=[];let te=!1,ne=!1;(Hi({value:M})||f)&&(T?Y=T(M):te=!0);const re=Q.map((e=>{if(!i.isValidElement(e))return null;let t;if(b){if(!Array.isArray(M))throw new Error((0,Pe.A)(2));t=M.some((t=>Zi(t,e.props.value))),t&&te&&ee.push(e.props.children)}else t=Zi(M,e.props.value),t&&te&&(Z=e.props.children);return t&&(ne=!0),i.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(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&&(Y=b?0===ee.length?null:ee.reduce(((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e)),[]):Z);let ie,oe=H;!a&&V&&U&&(oe=q.clientWidth),ie="undefined"!==typeof I?I:h?null:0;const se=P.id||(w?`mui-component-select-${w}`:void 0),ae=(0,Se.A)({},e,{variant:R,value:M,open:J,error:p}),le=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e;return _e({select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${At(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Gi,t)})(ae),ce=(0,Se.A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ue=_n();return(0,mt.jsxs)(i.Fragment,{children:[(0,mt.jsx)(Xi,(0,Se.A)({ref:G,tabIndex:ie,role:"combobox","aria-controls":ue,"aria-disabled":h?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[y,se].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!_){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),K(!0,e))}},onMouseDown:h||_?null:e=>{0===e.button&&(e.preventDefault(),j.current.focus(),K(!0,e))},onBlur:e=>{!J&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:w}}),x(e))},onFocus:S},P,{ownerState:ae,className:Ce(P.className,le.select,c),id:se,children:eo(Y)?Ki||(Ki=(0,mt.jsx)("span",{className:"notranslate",children:"\u200b"})):Y})),(0,mt.jsx)(Yi,(0,Se.A)({"aria-invalid":p,value:Array.isArray(M)?M.join(","):M,name:w,ref:F,"aria-hidden":!0,onChange:e=>{const t=Q.find((t=>t.props.value===e.target.value));void 0!==t&&(D(t.props.value),A&&A(e,t))},tabIndex:-1,disabled:h,className:le.nativeInput,autoFocus:s,ownerState:ae},N)),(0,mt.jsx)(Ji,{as:g,className:le.icon,ownerState:ae}),(0,mt.jsx)(Ri,(0,Se.A)({id:`menu-${w||""}`,anchorEl:q,open:J,onClose:e=>{K(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,Se.A)({"aria-labelledby":y,role:"listbox","aria-multiselectable":b?"true":void 0,disableListWrap:!0,id:ue},v.MenuListProps),slotProps:(0,Se.A)({},v.slotProps,{paper:(0,Se.A)({},ce,{style:(0,Se.A)({minWidth:oe},null!=ce?ce.style:null)})}),children:re}))]})})),no=to;function ro(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 io=i.createContext(void 0);function oo(){return i.useContext(io)}function so(e){return _t("MuiSvgIcon",e)}Tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ao=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],lo=pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${At(n.color)}`],t[`fontSize${At(n.fontSize)}`]]}})((e=>{let{theme:t,ownerState:n}=e;var r,i,o,s,a,l,c,u,d,h,f,p,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(s=t.typography)||null==(a=s.pxToRem)?void 0:a.call(s,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(f=(t.vars||t).palette)||null==(f=f[n.color])?void 0:f.main)?h:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(g=(t.vars||t).palette)||null==(g=g.action)?void 0:g.disabled,inherit:void 0}[n.color]}})),co=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24"}=n,f=(0,Ee.A)(n,ao),p=i.isValidElement(r)&&"svg"===r.type,g=(0,Se.A)({},n,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:p}),m={};u||(m.viewBox=h);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return _e({root:["root","inherit"!==t&&`color${At(t)}`,`fontSize${At(n)}`]},so,r)})(g);return(0,mt.jsxs)(lo,(0,Se.A)({as:a,className:Ce(y.root,o),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t},m,f,p&&r.props,{ownerState:g,children:[p?r.props.children:r,d?(0,mt.jsx)("title",{children:d}):null]}))}));co.muiName="SvgIcon";const uo=co;function ho(e,t){function n(n,r){return(0,mt.jsx)(uo,(0,Se.A)({"data-testid":`${t}Icon`,ref:r},n,{children:e}))}return n.muiName=uo.muiName,i.memo(i.forwardRef(n))}const fo=ho((0,mt.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),po=["onChange","maxRows","minRows","style","value"];function go(e){return parseInt(e,10)||0}const mo={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const yo=i.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:s,value:a}=e,l=(0,Ee.A)(e,po),{current:c}=i.useRef(null!=a),u=i.useRef(null),d=Dn(t,u),h=i.useRef(null),f=i.useRef(null),p=i.useCallback((()=>{const t=u.current,n=dr(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};const i=f.current;i.style.width=n.width,i.value=t.value||e.placeholder||"x","\n"===i.value.slice(-1)&&(i.value+=" ");const s=n.boxSizing,a=go(n.paddingBottom)+go(n.paddingTop),l=go(n.borderBottomWidth)+go(n.borderTopWidth),c=i.scrollHeight;i.value="x";const d=i.scrollHeight;let h=c;o&&(h=Math.max(Number(o)*d,h)),r&&(h=Math.min(Number(r)*d,h)),h=Math.max(h,d);return{outerHeightStyle:h+("border-box"===s?a+l:0),overflowing:Math.abs(h-c)<=1}}),[r,o,e.placeholder]),g=i.useCallback((()=>{const e=p();if(void 0===(t=e)||null===t||0===Object.keys(t).length||0===t.outerHeightStyle&&!t.overflowing)return;var t;const n=e.outerHeightStyle,r=u.current;h.current!==n&&(h.current=n,r.style.height=`${n}px`),r.style.overflow=e.overflowing?"hidden":""}),[p]);er((()=>{const e=()=>{g()};let t;const n=cr(e),r=u.current,i=dr(r);let o;return i.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(o=new ResizeObserver(e),o.observe(r)),()=>{n.clear(),cancelAnimationFrame(t),i.removeEventListener("resize",n),o&&o.disconnect()}}),[p,g]),er((()=>{g()}));return(0,mt.jsxs)(i.Fragment,{children:[(0,mt.jsx)("textarea",(0,Se.A)({value:a,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:o,style:s},l)),(0,mt.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:(0,Se.A)({},mo,s,{paddingTop:0,paddingBottom:0})})]})})),vo=yo;var bo=n(1087);const wo=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=Wt(r),o="function"===typeof t?t(n&&i[n]||i):t;return(0,mt.jsx)(bo.A,{styles:o})};const xo=function(e){return(0,mt.jsx)(wo,(0,Se.A)({},e,{defaultTheme:ut,themeId:dt}))};function Ao(e){return _t("MuiInputBase",e)}const Eo=Tt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),So=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],ko=(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${At(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Co=(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]},_o=pt("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ko})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},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",[`&.${Eo.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,Se.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),To=pt("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Co})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,Se.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},s=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,Se.A)({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%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Eo.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus:-ms-input-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${Eo.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),Po=(0,mt.jsx)(xo,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Io=i.forwardRef((function(e,t){var n;const r=wt({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:h,disableInjectingGlobalStyles:f,endAdornment:p,fullWidth:g=!1,id:m,inputComponent:y="input",inputProps:v={},inputRef:b,maxRows:w,minRows:x,multiline:A=!1,name:E,onBlur:S,onChange:k,onClick:C,onFocus:_,onKeyDown:T,onKeyUp:P,placeholder:I,readOnly:O,renderSuffix:R,rows:N,slotProps:M={},slots:D={},startAdornment:L,type:B="text",value:F}=r,j=(0,Ee.A)(r,So),U=null!=v.value?v.value:F,{current:z}=i.useRef(null!=U),V=i.useRef(),H=i.useCallback((e=>{0}),[]),$=Zn(V,b,v.ref,H),[W,G]=i.useState(!1),q=oo();const K=ro({props:r,muiFormControl:q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});K.focused=q?q.focused:W,i.useEffect((()=>{!q&&h&&W&&(G(!1),S&&S())}),[q,h,W,S]);const Q=q&&q.onFilled,X=q&&q.onEmpty,J=i.useCallback((e=>{Hi(e)?Q&&Q():X&&X()}),[Q,X]);tr((()=>{z&&J({value:U})}),[U,J,z]);i.useEffect((()=>{J(V.current)}),[]);let Y=y,Z=v;A&&"input"===Y&&(Z=N?(0,Se.A)({type:void 0,minRows:N,maxRows:N},Z):(0,Se.A)({type:void 0,maxRows:w,minRows:x},Z),Y=vo);i.useEffect((()=>{q&&q.setAdornedStart(Boolean(L))}),[q,L]);const ee=(0,Se.A)({},r,{color:K.color||"primary",disabled:K.disabled,endAdornment:p,error:K.error,focused:K.focused,formControl:q,fullWidth:g,hiddenLabel:K.hiddenLabel,multiline:A,size:K.size,startAdornment:L,type:B}),te=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:f,type:p}=e;return _e({root:["root",`color${At(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&"medium"!==h&&`size${At(h)}`,u&&"multiline",f&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===p&&"inputTypeSearch",u&&"inputMultiline","small"===h&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]},Ao,t)})(ee),ne=D.root||c.Root||_o,re=M.root||u.root||{},ie=D.input||c.Input||To;return Z=(0,Se.A)({},Z,null!=(n=M.input)?n:u.input),(0,mt.jsxs)(i.Fragment,{children:[!f&&Po,(0,mt.jsxs)(ne,(0,Se.A)({},re,!Ln(ne)&&{ownerState:(0,Se.A)({},ee,re.ownerState)},{ref:t,onClick:e=>{V.current&&e.currentTarget===e.target&&V.current.focus(),C&&C(e)}},j,{className:Ce(te.root,re.className,l,O&&"MuiInputBase-readOnly"),children:[L,(0,mt.jsx)(io.Provider,{value:null,children:(0,mt.jsx)(ie,(0,Se.A)({ownerState:ee,"aria-invalid":K.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:d,disabled:K.disabled,id:m,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?V.current:{value:"x"})},name:E,placeholder:I,readOnly:O,required:K.required,rows:N,value:U,onKeyDown:T,onKeyUp:P,type:B},Z,!Ln(ie)&&{as:Y,ownerState:(0,Se.A)({},ee,Z.ownerState)},{ref:$,className:Ce(te.input,Z.className,O&&"MuiInputBase-readOnly"),onBlur:e=>{S&&S(e),v.onBlur&&v.onBlur(e),q&&q.onBlur?q.onBlur(e):G(!1)},onChange:function(e){if(!z){const t=e.target||V.current;if(null==t)throw new Error((0,Pe.A)(1));J({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.onChange&&v.onChange(e,...n),k&&k(e,...n)},onFocus:e=>{K.disabled?e.stopPropagation():(_&&_(e),v.onFocus&&v.onFocus(e),q&&q.onFocus?q.onFocus(e):G(!0))}}))}),p,R?R((0,Se.A)({},K,{startAdornment:L})):null]}))]})})),Oo=Io;function Ro(e){return _t("MuiInput",e)}const No=(0,Se.A)({},Eo,Tt("MuiInput",["root","underline","input"])),Mo=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Do=pt(_o,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ko(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),(0,Se.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[n.color].main}`,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"},[`&.${No.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${No.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${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(.${No.disabled}, .${No.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${No.disabled}:before`]:{borderBottomStyle:"dotted"}})})),Lo=pt(To,{name:"MuiInput",slot:"Input",overridesResolver:Co})({}),Bo=i.forwardRef((function(e,t){var n,r,i,o;const s=wt({props:e,name:"MuiInput"}),{disableUnderline:a,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:h=!1,slotProps:f,slots:p={},type:g="text"}=s,m=(0,Ee.A)(s,Mo),y=(e=>{const{classes:t,disableUnderline:n}=e,r=_e({root:["root",!n&&"underline"],input:["input"]},Ro,t);return(0,Se.A)({},t,r)})(s),v={root:{ownerState:{disableUnderline:a}}},b=(null!=f?f:c)?(0,Ie.A)(null!=f?f:c,v):v,w=null!=(n=null!=(r=p.root)?r:l.Root)?n:Do,x=null!=(i=null!=(o=p.input)?o:l.Input)?i:Lo;return(0,mt.jsx)(Oo,(0,Se.A)({slots:{root:w,input:x},slotProps:b,fullWidth:u,inputComponent:d,multiline:h,ref:t,type:g},m,{classes:y}))}));Bo.muiName="Input";const Fo=Bo;function jo(e){return _t("MuiFilledInput",e)}const Uo=(0,Se.A)({},Eo,Tt("MuiFilledInput",["root","underline","input"])),zo=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Vo=pt(_o,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ko(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;var r;const i="light"===t.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",s=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,Se.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s,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:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s}},[`&.${Uo.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:s},[`&.${Uo.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main}`,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"},[`&.${Uo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Uo.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})`:o}`,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(.${Uo.disabled}, .${Uo.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Uo.disabled}:before`]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,Se.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))})),Ho=pt(To,{name:"MuiFilledInput",slot:"Input",overridesResolver:Co})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({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"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})})),$o=i.forwardRef((function(e,t){var n,r,i,o;const s=wt({props:e,name:"MuiFilledInput"}),{components:a={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:h,slots:f={},type:p="text"}=s,g=(0,Ee.A)(s,zo),m=(0,Se.A)({},s,{fullWidth:c,inputComponent:u,multiline:d,type:p}),y=(e=>{const{classes:t,disableUnderline:n}=e,r=_e({root:["root",!n&&"underline"],input:["input"]},jo,t);return(0,Se.A)({},t,r)})(s),v={root:{ownerState:m},input:{ownerState:m}},b=(null!=h?h:l)?(0,Ie.A)(v,null!=h?h:l):v,w=null!=(n=null!=(r=f.root)?r:a.Root)?n:Vo,x=null!=(i=null!=(o=f.input)?o:a.Input)?i:Ho;return(0,mt.jsx)(Oo,(0,Se.A)({slots:{root:w,input:x},componentsProps:b,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:p},g,{classes:y}))}));$o.muiName="Input";const Wo=$o;var Go;const qo=["children","classes","className","label","notched"],Ko=pt("fieldset",{shouldForwardProp:ft})({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%"}),Qo=pt("legend",{shouldForwardProp:ft})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,Se.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));function Xo(e){return _t("MuiOutlinedInput",e)}const Jo=(0,Se.A)({},Eo,Tt("MuiOutlinedInput",["root","notchedOutline","input"])),Yo=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Zo=pt(_o,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:ko})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,Se.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Jo.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Jo.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${Jo.focused} .${Jo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},[`&.${Jo.error} .${Jo.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Jo.disabled} .${Jo.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,Se.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))})),es=pt((function(e){const{className:t,label:n,notched:r}=e,i=(0,Ee.A)(e,qo),o=null!=n&&""!==n,s=(0,Se.A)({},e,{notched:r,withLabel:o});return(0,mt.jsx)(Ko,(0,Se.A)({"aria-hidden":!0,className:t,ownerState:s},i,{children:(0,mt.jsx)(Qo,{ownerState:s,children:o?(0,mt.jsx)("span",{children:n}):Go||(Go=(0,mt.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((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}})),ts=pt(To,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Co})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({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"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),ns=i.forwardRef((function(e,t){var n,r,o,s,a;const l=wt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:h,multiline:f=!1,notched:p,slots:g={},type:m="text"}=l,y=(0,Ee.A)(l,Yo),v=(e=>{const{classes:t}=e,n=_e({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Xo,t);return(0,Se.A)({},t,n)})(l),b=oo(),w=ro({props:l,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x=(0,Se.A)({},l,{color:w.color||"primary",disabled:w.disabled,error:w.error,focused:w.focused,formControl:b,fullWidth:u,hiddenLabel:w.hiddenLabel,multiline:f,size:w.size,type:m}),A=null!=(n=null!=(r=g.root)?r:c.Root)?n:Zo,E=null!=(o=null!=(s=g.input)?s:c.Input)?o:ts;return(0,mt.jsx)(Oo,(0,Se.A)({slots:{root:A,input:E},renderSuffix:e=>(0,mt.jsx)(es,{ownerState:x,className:v.notchedOutline,label:null!=h&&""!==h&&w.required?a||(a=(0,mt.jsxs)(i.Fragment,{children:[h,"\u2009","*"]})):h,notched:"undefined"!==typeof p?p:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:t,type:m},y,{classes:(0,Se.A)({},v,{notchedOutline:null})}))}));ns.muiName="Input";const rs=ns,is=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],os=["root"],ss={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ft(e)&&"variant"!==e,slot:"Root"},as=pt(Fo,ss)(""),ls=pt(rs,ss)(""),cs=pt(Wo,ss)(""),us=i.forwardRef((function(e,t){const n=wt({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=fo,id:d,input:h,inputProps:f,label:p,labelId:g,MenuProps:m,multiple:y=!1,native:v=!1,onClose:b,onOpen:w,open:x,renderValue:A,SelectDisplayProps:E,variant:S="outlined"}=n,k=(0,Ee.A)(n,is),C=v?zi:no,_=ro({props:n,muiFormControl:oo(),states:["variant","error"]}),T=_.variant||S,P=(0,Se.A)({},n,{variant:T,classes:s}),I=(e=>{const{classes:t}=e;return t})(P),O=(0,Ee.A)(I,os),R=h||{standard:(0,mt.jsx)(as,{ownerState:P}),outlined:(0,mt.jsx)(ls,{label:p,ownerState:P}),filled:(0,mt.jsx)(cs,{ownerState:P})}[T],N=Zn(t,R.ref);return(0,mt.jsx)(i.Fragment,{children:i.cloneElement(R,(0,Se.A)({inputComponent:C,inputProps:(0,Se.A)({children:o,error:_.error,IconComponent:u,variant:T,type:void 0,multiple:y},v?{id:d}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:m,onClose:b,onOpen:w,open:x,renderValue:A,SelectDisplayProps:(0,Se.A)({id:d},E)},f,{classes:f?(0,Ie.A)(O,f.classes):O},h?h.props.inputProps:{})},(y&&v||c)&&"outlined"===T?{notched:!0}:{},{ref:N,className:Ce(R.props.className,a,I.root)},!h&&{variant:T},k))})}));us.muiName="Select";const ds=us,hs=Jr;let fs=!0,ps=!1;const gs=new gr,ms={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function ys(e){e.metaKey||e.altKey||e.ctrlKey||(fs=!0)}function vs(){fs=!1}function bs(){"hidden"===this.visibilityState&&ps&&(fs=!0)}function ws(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return fs||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!ms[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}const xs=function(){const e=i.useCallback((e=>{null!=e&&function(e){e.addEventListener("keydown",ys,!0),e.addEventListener("mousedown",vs,!0),e.addEventListener("pointerdown",vs,!0),e.addEventListener("touchstart",vs,!0),e.addEventListener("visibilitychange",bs,!0)}(e.ownerDocument)}),[]),t=i.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!ws(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(ps=!0,gs.start(100,(()=>{ps=!1})),t.current=!1,!0)},ref:e}};function As(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Es(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function Ss(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ks(e,t,n){var r=Es(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var s in e)s in t?o.length&&(i[s]=o,o=[]):o.push(s);var a={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];a[i[l][r]]=n(c)}a[l]=n(l)}for(r=0;r<o.length;r++)a[o[r]]=n(o[r]);return a}(t,r);return Object.keys(o).forEach((function(s){var a=o[s];if((0,i.isValidElement)(a)){var l=s in t,c=s in r,u=t[s],d=(0,i.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,i.isValidElement)(u)&&(o[s]=(0,i.cloneElement)(a,{onExited:n.bind(null,a),in:u.props.in,exit:Ss(a,"exit",e),enter:Ss(a,"enter",e)})):o[s]=(0,i.cloneElement)(a,{in:!1}):o[s]=(0,i.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Ss(a,"exit",e),enter:Ss(a,"enter",e)})}})),o}var Cs=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},_s=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(As(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}vr(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,s=t.handleExited;return{children:t.firstRender?(n=e,r=s,Es(n.children,(function(e){return(0,i.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:Ss(e,"appear",n),enter:Ss(e,"enter",n),exit:Ss(e,"exit",n)})}))):ks(e,o,s),firstRender:!1}},n.handleExited=function(e,t){var n=Es(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,Se.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,Ee.A)(e,["component","childFactory"]),o=this.state.contextValue,s=Cs(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i.createElement(wr.Provider,{value:o},s):i.createElement(wr.Provider,{value:o},i.createElement(t,r,s))},t}(i.Component);_s.propTypes={},_s.defaultProps={component:"div",childFactory:function(e){return e}};const Ts=_s;var Ps=n(4304);const Is=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:a,in:l,onExited:c,timeout:u}=e,[d,h]=i.useState(!1),f=Ce(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+s,left:-a/2+o},g=Ce(n.child,d&&n.childLeaving,r&&n.childPulsate);return l||d||h(!0),i.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),(0,mt.jsx)("span",{className:f,style:p,children:(0,mt.jsx)("span",{className:g})})};const Os=Tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Rs=["center","classes","className"];let Ns,Ms,Ds,Ls,Bs=e=>e;const Fs=(0,Ps.i7)(Ns||(Ns=Bs`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),js=(0,Ps.i7)(Ms||(Ms=Bs`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),Us=(0,Ps.i7)(Ds||(Ds=Bs`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),zs=pt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Vs=pt(Is,{name:"MuiTouchRipple",slot:"Ripple"})(Ls||(Ls=Bs`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),Os.rippleVisible,Fs,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),Os.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),Os.child,Os.childLeaving,js,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),Os.childPulsate,Us,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),Hs=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:s}=n,a=(0,Ee.A)(n,Rs),[l,c]=i.useState([]),u=i.useRef(0),d=i.useRef(null);i.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const h=i.useRef(!1),f=mr(),p=i.useRef(null),g=i.useRef(null),m=i.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:s}=e;c((e=>[...e,(0,mt.jsx)(Vs,{classes:{ripple:Ce(o.ripple,Os.ripple),rippleVisible:Ce(o.rippleVisible,Os.rippleVisible),ripplePulsate:Ce(o.ripplePulsate,Os.ripplePulsate),child:Ce(o.child,Os.child),childLeaving:Ce(o.childLeaving,Os.childLeaving),childPulsate:Ce(o.childPulsate,Os.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},u.current)])),u.current+=1,d.current=s}),[o]),y=i.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:i=!1,center:o=r||t.pulsate,fakeElement:s=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const a=s?null:g.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||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(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{m({pulsate:i,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,(()=>{p.current&&(p.current(),p.current=null)}))):m({pulsate:i,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,m,f]),v=i.useCallback((()=>{y({},{pulsate:!0})}),[y]),b=i.useCallback(((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&p.current)return p.current(),p.current=null,void f.start(0,(()=>{b(e,t)}));p.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[f]);return i.useImperativeHandle(t,(()=>({pulsate:v,start:y,stop:b})),[v,y,b]),(0,mt.jsx)(zs,(0,Se.A)({className:Ce(Os.root,o.root,s),ref:g},a,{children:(0,mt.jsx)(Ts,{component:null,exit:!0,children:l})}))}));function $s(e){return _t("MuiButtonBase",e)}const Ws=Tt("MuiButtonBase",["root","disabled","focusVisible"]),Gs=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],qs=pt("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"},[`&.${Ws.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ks=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:f="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:y,onFocus:v,onFocusVisible:b,onKeyDown:w,onKeyUp:x,onMouseDown:A,onMouseLeave:E,onMouseUp:S,onTouchEnd:k,onTouchMove:C,onTouchStart:_,tabIndex:T=0,TouchRippleProps:P,touchRippleRef:I,type:O}=n,R=(0,Ee.A)(n,Gs),N=i.useRef(null),M=i.useRef(null),D=Zn(M,I),{isFocusVisibleRef:L,onFocus:B,onBlur:F,ref:j}=xs(),[U,z]=i.useState(!1);c&&U&&z(!1),i.useImperativeHandle(r,(()=>({focusVisible:()=>{z(!0),N.current.focus()}})),[]);const[V,H]=i.useState(!1);i.useEffect((()=>{H(!0)}),[]);const $=V&&!u&&!c;function W(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;return hs((r=>{t&&t(r);return!n&&M.current&&M.current[e](r),!0}))}i.useEffect((()=>{U&&h&&!u&&V&&M.current.pulsate()}),[u,h,U,V]);const G=W("start",A),q=W("stop",m),K=W("stop",y),Q=W("stop",S),X=W("stop",(e=>{U&&e.preventDefault(),E&&E(e)})),J=W("start",_),Y=W("stop",k),Z=W("stop",C),ee=W("stop",(e=>{F(e),!1===L.current&&z(!1),p&&p(e)}),!1),te=hs((e=>{N.current||(N.current=e.currentTarget),B(e),!0===L.current&&(z(!0),b&&b(e)),v&&v(e)})),ne=()=>{const e=N.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=i.useRef(!1),ie=hs((e=>{h&&!re.current&&U&&M.current&&" "===e.key&&(re.current=!0,M.current.stop(e,(()=>{M.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),w&&w(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),oe=hs((e=>{h&&" "===e.key&&M.current&&U&&!e.defaultPrevented&&(re.current=!1,M.current.stop(e,(()=>{M.current.pulsate(e)}))),x&&x(e),g&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let se=l;"button"===se&&(R.href||R.to)&&(se=f);const ae={};"button"===se?(ae.type=void 0===O?"button":O,ae.disabled=c):(R.href||R.to||(ae.role="button"),c&&(ae["aria-disabled"]=c));const le=Zn(t,j,N);const ce=(0,Se.A)({},n,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:h,tabIndex:T,focusVisible:U}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=_e({root:["root",t&&"disabled",n&&"focusVisible"]},$s,i);return n&&r&&(o.root+=` ${r}`),o})(ce);return(0,mt.jsxs)(qs,(0,Se.A)({as:se,className:Ce(ue.root,a),ownerState:ce,onBlur:ee,onClick:g,onContextMenu:q,onFocus:te,onKeyDown:ie,onKeyUp:oe,onMouseDown:G,onMouseLeave:X,onMouseUp:Q,onDragLeave:K,onTouchEnd:Y,onTouchMove:Z,onTouchStart:J,ref:le,tabIndex:c?-1:T,type:O},ae,R,{children:[s,$?(0,mt.jsx)(Hs,(0,Se.A)({ref:D,center:o},P)):null]}))})),Qs=Ks;const Xs=Tt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const Js=Tt("MuiListItemIcon",["root","alignItemsFlexStart"]);const Ys=Tt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Zs(e){return _t("MuiMenuItem",e)}const ea=Tt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ta=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],na=pt(Qs,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ea.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,Me.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${ea.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,Me.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${ea.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,Me.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,Me.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${ea.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${ea.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${Xs.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${Xs.inset}`]:{marginLeft:52},[`& .${Ys.root}`]:{marginTop:0,marginBottom:0},[`& .${Ys.inset}`]:{paddingLeft:36},[`& .${Js.root}`]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,Se.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${Js.root} svg`]:{fontSize:"1.25rem"}}))})),ra=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:h}=n,f=(0,Ee.A)(n,ta),p=i.useContext(Gn),g=i.useMemo((()=>({dense:s||p.dense||!1,disableGutters:l})),[p.dense,s,l]),m=i.useRef(null);tr((()=>{r&&m.current&&m.current.focus()}),[r]);const y=(0,Se.A)({},n,{dense:g.dense,divider:a,disableGutters:l}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,a=_e({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Zs,s);return(0,Se.A)({},s,a)})(n),b=Zn(m,t);let w;return n.disabled||(w=void 0!==d?d:-1),(0,mt.jsx)(Gn.Provider,{value:g,children:(0,mt.jsx)(na,(0,Se.A)({ref:b,role:u,tabIndex:w,component:o,focusVisibleClassName:Ce(v.focusVisible,c),className:Ce(v.root,h)},f,{ownerState:y,classes:v}))})}));function ia(e){return _t("MuiButton",e)}const oa=Tt("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"]);const sa=i.createContext({});const aa=i.createContext(void 0),la=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ca=e=>(0,Se.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),ua=pt(Qs,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${At(n.color)}`],t[`size${At(n.size)}`],t[`${n.variant}Size${At(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,i;const o="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],s="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,Se.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,Se.A)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Me.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Me.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:`1px solid ${(t.vars||t).palette[n.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Me.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,Se.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${oa.focusVisible}`]:(0,Se.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${oa.disabled}`]:(0,Se.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:`1px solid ${(0,Me.X4)(t.palette[n.color].main,.5)}`},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${oa.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oa.disabled}`]:{boxShadow:"none"}}})),da=pt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${At(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},ca(t))})),ha=pt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${At(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},ca(t))})),fa=i.forwardRef((function(e,t){const n=i.useContext(sa),r=i.useContext(aa),o=wt({props:gt(n,e),name:"MuiButton"}),{children:s,color:a="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:f,focusVisibleClassName:p,fullWidth:g=!1,size:m="medium",startIcon:y,type:v,variant:b="text"}=o,w=(0,Ee.A)(o,la),x=(0,Se.A)({},o,{color:a,component:l,disabled:u,disableElevation:d,disableFocusRipple:h,fullWidth:g,size:m,type:v,variant:b}),A=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a=_e({root:["root",o,`${o}${At(t)}`,`size${At(i)}`,`${o}Size${At(i)}`,`color${At(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${At(i)}`],endIcon:["icon","endIcon",`iconSize${At(i)}`]},ia,s);return(0,Se.A)({},s,a)})(x),E=y&&(0,mt.jsx)(da,{className:A.startIcon,ownerState:x,children:y}),S=f&&(0,mt.jsx)(ha,{className:A.endIcon,ownerState:x,children:f}),k=r||"";return(0,mt.jsxs)(ua,(0,Se.A)({ownerState:x,className:Ce(n.className,A.root,c,k),component:l,disabled:u,focusRipple:!h,focusVisibleClassName:Ce(A.focusVisible,p),ref:t,type:v},w,{classes:A,children:[E,s,S]}))})),pa=fa;var ga="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const ma="object"===("undefined"===typeof window?"undefined":ga(window))&&"object"===("undefined"===typeof document?"undefined":ga(document))&&9===document.nodeType;function ya(e){return ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(e)}function va(e){var t=function(e,t){if("object"!=ya(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ya(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ya(t)?t:t+""}function ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,va(r.key),r)}}function wa(e,t,n){return t&&ba(e.prototype,t),n&&ba(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var xa={}.constructor;function Aa(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(Aa);if(e.constructor!==xa)return e;var t={};for(var n in e)t[n]=Aa(e[n]);return t}function Ea(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Aa(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var Sa=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},ka=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Sa(e[n]," ");else t=Sa(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Ca(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function _a(e,t){for(var n="",r=0;r<t;r++)n+="  ";return n+e}function Ta(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,s=t.fallbacks;!1===n.format&&(o=-1/0);var a=Ca(n),l=a.linebreak,c=a.space;if(e&&o++,s)if(Array.isArray(s))for(var u=0;u<s.length;u++){var d=s[u];for(var h in d){var f=d[h];null!=f&&(r&&(r+=l),r+=_a(h+":"+c+ka(f)+";",o))}}else for(var p in s){var g=s[p];null!=g&&(r&&(r+=l),r+=_a(p+":"+c+ka(g)+";",o))}for(var m in t){var y=t[m];null!=y&&"fallbacks"!==m&&(r&&(r+=l),r+=_a(m+":"+c+ka(y)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),_a(""+e+c+"{"+r,--o)+_a("}",o)):r}var Pa=/([[\].#*$><+~=|^:(),"'`\s])/g,Ia="undefined"!==typeof CSS&&CSS.escape,Oa=function(e){return Ia?Ia(e):e.replace(Pa,"\\$1")},Ra=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,s=e in this.style;if(o&&!s&&!r)return this;var a=o&&s;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),Na=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,s=r.scoped,a=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==s&&(i.id=l(As(As(i)),a),i.selectorText="."+Oa(i.id)),i}vr(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=ka(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,Se.A)({},e,{allowEmpty:!0}):e;return Ta(this.selectorText,this.style,n)},wa(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Ra),Ma={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new Na(e,t,n)}},Da={indent:1,children:!0},La=/@([\w-]+)/,Ba=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(La);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new al((0,Se.A)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=Da);var t=Ca(e).linebreak;if(null==e.indent&&(e.indent=Da.indent),null==e.children&&(e.children=Da.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),Fa=/@container|@media|@supports\s+/,ja={onCreateRule:function(e,t,n){return Fa.test(e)?new Ba(e,t,n):null}},Ua={indent:1,children:!0},za=/@keyframes\s+([\w-]+)/,Va=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(za);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,s=n.generateId;for(var a in this.id=!1===i?this.name:Oa(s(this,o)),this.rules=new al((0,Se.A)({},n,{parent:this})),t)this.rules.add(a,t[a],(0,Se.A)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=Ua);var t=Ca(e).linebreak;if(null==e.indent&&(e.indent=Ua.indent),null==e.children&&(e.children=Ua.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),Ha=/@keyframes\s+/,$a=/\$([\w-]+)/g,Wa=function(e,t){return"string"===typeof e?e.replace($a,(function(e,n){return n in t?t[n]:e})):e},Ga=function(e,t,n){var r=e[t],i=Wa(r,n);i!==r&&(e[t]=i)},qa={onCreateRule:function(e,t,n){return"string"===typeof e&&Ha.test(e)?new Va(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&Ga(e,"animation-name",n.keyframes),"animation"in e&&Ga(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return Wa(e,r.keyframes);default:return e}}},Ka=function(e){function t(){return e.apply(this,arguments)||this}return vr(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,Se.A)({},e,{allowEmpty:!0}):e;return Ta(this.key,this.style,n)},t}(Ra),Qa={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new Ka(e,t,n):null}},Xa=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Ca(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=Ta(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return Ta(this.at,this.style,e)},e}(),Ja=/@font-face/,Ya={onCreateRule:function(e,t,n){return Ja.test(e)?new Xa(e,t,n):null}},Za=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Ta(this.key,this.style,e)},e}(),el={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Za(e,t,n):null}},tl=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),nl={"@charset":!0,"@import":!0,"@namespace":!0},rl={onCreateRule:function(e,t,n){return e in nl?new tl(e,t,n):null}},il=[Ma,ja,qa,Qa,Ya,el,rl],ol={process:!0},sl={force:!0,process:!0},al=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,s=r.jss,a=r.Renderer,l=r.generateId,c=r.scoped,u=(0,Se.A)({classes:this.classes,parent:i,sheet:o,jss:s,Renderer:a,generateId:l,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(u.selector="."+Oa(this.classes[d]));var h=Ea(d,t,u);if(!h)return null;this.register(h);var f=void 0===u.index?this.index.length:u.index;return this.index.splice(f,0,h),h},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=(0,Se.A)({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof Na?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Va&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof Na?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Va&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=ol);var i=this.options,o=i.jss.plugins,s=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var a=t.style;if(o.onUpdate(n,t,s,r),r.process&&a&&a!==t.style){for(var l in o.onProcessStyle(t.style,t,s),t.style){var c=t.style[l];c!==a[l]&&t.prop(l,c,sl)}for(var u in a){var d=t.style[u],h=a[u];null==d&&d!==h&&t.prop(u,null,sl)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=Ca(e).linebreak,o=0;o<this.index.length;o++){var s=this.index[o].toString(e);(s||r)&&(t&&(t+=i),t+=s)}return t},e}(),ll=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,Se.A)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new al(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),cl=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),ul=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,Ee.A)(t,["attached"]),i=Ca(r).linebreak,o="",s=0;s<this.registry.length;s++){var a=this.registry[s];null!=n&&a.attached!==n||(o&&(o+=i),o+=a.toString(r))}return o},wa(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),dl=new ul,hl="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),fl="2f1acc6c3a606b082e5eef5e54414ffb";null==hl[fl]&&(hl[fl]=0);var pl=hl[fl]++,gl=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+pl+i+t:o+n.key+"-"+pl+(i?"-"+i:"")+"-"+t}},ml=function(e){var t;return function(){return t||(t=e()),t}},yl=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},vl=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=ka(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(s){return!1}return!0},bl=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},wl=function(e,t){return e.selectorText=t,e.selectorText===t},xl=ml((function(){return document.querySelector("head")}));function Al(e){var t=dl.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=xl(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var El=ml((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Sl=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(r){return!1}return e.cssRules[n]},kl=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Cl=function(){function e(e){this.getPropertyValue=yl,this.setProperty=vl,this.removeProperty=bl,this.setSelector=wl,this.hasInsertedRules=!1,this.cssRules=[],e&&dl.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=El();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Al(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else xl().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=kl(n,t);if(!1===(i=Sl(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var s=e.toString();if(!s)return!1;var a=kl(n,t),l=Sl(n,s,a);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,a,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof ll&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),_l=0,Tl=function(){function e(e){this.id=_l++,this.version="10.10.0",this.plugins=new cl,this.options={id:{minify:!1},createGenerateId:gl,Renderer:ma?Cl:null,plugins:[]},this.generateId=gl({minify:!1});for(var t=0;t<il.length;t++)this.plugins.use(il[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,Se.A)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===dl.index?0:dl.index+1);var r=new ll(e,(0,Se.A)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),dl.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=(0,Se.A)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=Ea(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Pl=function(e){return new Tl(e)},Il="object"===typeof CSS&&null!=CSS&&"number"in CSS;function Ol(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=Ol(r);o&&(t||(t={}),t[n]=o)}}return t}Pl();function Rl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const i=(0,Se.A)({},t);return Object.keys(n).forEach((e=>{n[e]&&(i[e]=`${t[e]} ${n[e]}`)})),i}const Nl={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}},Ml=Nl;const Dl=i.createContext(null);function Ll(){return i.useContext(Dl)}const Bl="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Fl=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var jl=Date.now(),Ul="fnValues"+jl,zl="fnStyle"+ ++jl;const Vl=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=Ea(e,{},n);return r[zl]=t,r},onProcessStyle:function(e,t){if(Ul in t||zl in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[Ul]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[zl];o&&(i.style=o(e)||{});var s=i[Ul];if(s)for(var a in s)i.prop(a,s[a](e),r)}}};var Hl="@global",$l="@global ",Wl=function(){function e(e,t,n){for(var r in this.type="global",this.at=Hl,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new al((0,Se.A)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Gl=function(){function e(e,t,n){this.type="global",this.at=Hl,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,(0,Se.A)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ql=/\s*,\s*/g;function Kl(e,t){for(var n=e.split(ql),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}const Ql=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Hl)return new Wl(e,t,n);if("@"===e[0]&&e.substr(0,8)===$l)return new Gl(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[Hl]:null;if(i){for(var o in i)t.addRule(o,i[o],(0,Se.A)({},n,{selector:Kl(o,e.selector)}));delete r[Hl]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,Hl.length)===Hl){var o=Kl(i.substr(Hl.length),e.selector);t.addRule(o,r[i],(0,Se.A)({},n,{selector:o})),delete r[i]}}(e,t))}}};var Xl=/\s*,\s*/g,Jl=/&/g,Yl=/\$([\w-]+)/g;const Zl=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(Xl),r=e.split(Xl),i="",o=0;o<n.length;o++)for(var s=n[o],a=0;a<r.length;a++){var l=r[a];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(Jl,s):s+" "+l}return i}function n(e,t,n){if(n)return(0,Se.A)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=(0,Se.A)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var s,a,l=i,c=l.options.parent;for(var u in r){var d=-1!==u.indexOf("&"),h="@"===u[0];if(d||h){if(s=n(l,c,s),d){var f=t(u,l.selector);a||(a=e(c,o)),f=f.replace(Yl,a);var p=l.key+"-"+u;"replaceRule"in c?c.replaceRule(p,r[u],(0,Se.A)({},s,{selector:f})):c.addRule(p,r[u],(0,Se.A)({},s,{selector:f}))}else h&&c.addRule(u,{},s).addRule(l.key,r[u],{selector:l.selector});delete r[u]}}return r}}};var ec=/[A-Z]/g,tc=/^ms-/,nc={};function rc(e){return"-"+e.toLowerCase()}const ic=function(e){if(nc.hasOwnProperty(e))return nc[e];var t=e.replace(ec,rc);return nc[e]=tc.test(t)?"-"+t:t};function oc(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:ic(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(oc):t.fallbacks=oc(e.fallbacks)),t}const sc=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=oc(e[t]);return e}return oc(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=ic(t);return t===r?e:(n.prop(r,e),null)}}};var ac=Il&&CSS?CSS.px:"px",lc=Il&&CSS?CSS.ms:"ms",cc=Il&&CSS?CSS.percent:"%";function uc(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var dc=uc({"animation-delay":lc,"animation-duration":lc,"background-position":ac,"background-position-x":ac,"background-position-y":ac,"background-size":ac,border:ac,"border-bottom":ac,"border-bottom-left-radius":ac,"border-bottom-right-radius":ac,"border-bottom-width":ac,"border-left":ac,"border-left-width":ac,"border-radius":ac,"border-right":ac,"border-right-width":ac,"border-top":ac,"border-top-left-radius":ac,"border-top-right-radius":ac,"border-top-width":ac,"border-width":ac,"border-block":ac,"border-block-end":ac,"border-block-end-width":ac,"border-block-start":ac,"border-block-start-width":ac,"border-block-width":ac,"border-inline":ac,"border-inline-end":ac,"border-inline-end-width":ac,"border-inline-start":ac,"border-inline-start-width":ac,"border-inline-width":ac,"border-start-start-radius":ac,"border-start-end-radius":ac,"border-end-start-radius":ac,"border-end-end-radius":ac,margin:ac,"margin-bottom":ac,"margin-left":ac,"margin-right":ac,"margin-top":ac,"margin-block":ac,"margin-block-end":ac,"margin-block-start":ac,"margin-inline":ac,"margin-inline-end":ac,"margin-inline-start":ac,padding:ac,"padding-bottom":ac,"padding-left":ac,"padding-right":ac,"padding-top":ac,"padding-block":ac,"padding-block-end":ac,"padding-block-start":ac,"padding-inline":ac,"padding-inline-end":ac,"padding-inline-start":ac,"mask-position-x":ac,"mask-position-y":ac,"mask-size":ac,height:ac,width:ac,"min-height":ac,"max-height":ac,"min-width":ac,"max-width":ac,bottom:ac,left:ac,top:ac,right:ac,inset:ac,"inset-block":ac,"inset-block-end":ac,"inset-block-start":ac,"inset-inline":ac,"inset-inline-end":ac,"inset-inline-start":ac,"box-shadow":ac,"text-shadow":ac,"column-gap":ac,"column-rule":ac,"column-rule-width":ac,"column-width":ac,"font-size":ac,"font-size-delta":ac,"letter-spacing":ac,"text-decoration-thickness":ac,"text-indent":ac,"text-stroke":ac,"text-stroke-width":ac,"word-spacing":ac,motion:ac,"motion-offset":ac,outline:ac,"outline-offset":ac,"outline-width":ac,perspective:ac,"perspective-origin-x":cc,"perspective-origin-y":cc,"transform-origin":cc,"transform-origin-x":cc,"transform-origin-y":cc,"transform-origin-z":cc,"transition-delay":lc,"transition-duration":lc,"vertical-align":ac,"flex-basis":ac,"shape-margin":ac,size:ac,gap:ac,grid:ac,"grid-gap":ac,"row-gap":ac,"grid-row-gap":ac,"grid-column-gap":ac,"grid-template-rows":ac,"grid-template-columns":ac,"grid-auto-rows":ac,"grid-auto-columns":ac,"box-shadow-x":ac,"box-shadow-y":ac,"box-shadow-blur":ac,"box-shadow-spread":ac,"font-line-height":ac,"text-shadow-x":ac,"text-shadow-y":ac,"text-shadow-blur":ac});function hc(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=hc(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=hc(i,t[i],n);else for(var o in t)t[o]=hc(e+"-"+o,t[o],n);else if("number"===typeof t&&!1===isNaN(t)){var s=n[e]||dc[e];return!s||0===t&&s===ac?t.toString():"function"===typeof s?s(t).toString():""+t+s}return t}const fc=function(e){void 0===e&&(e={});var t=uc(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=hc(r,e[r],t);return e},onChangeValue:function(e,n){return hc(n,e,t)}}};function pc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gc(e){return function(e){if(Array.isArray(e))return pc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var mc="",yc="",vc="",bc="",wc=ma&&"ontouchstart"in document.documentElement;if(ma){var xc={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Ac=document.createElement("p").style;for(var Ec in xc)if(Ec+"Transform"in Ac){mc=Ec,yc=xc[Ec];break}"Webkit"===mc&&"msHyphens"in Ac&&(mc="ms",yc=xc.ms,bc="edge"),"Webkit"===mc&&"-apple-trailing-word"in Ac&&(vc="apple")}var Sc={js:mc,css:yc,vendor:vc,browser:bc,isTouch:wc};var kc={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Sc.js?"-webkit-"+e:Sc.css+e)}},Cc={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Sc.js?Sc.css+"print-"+e:e)}},_c=/[-\s]+(.)?/g;function Tc(e,t){return t?t.toUpperCase():""}function Pc(e){return e.replace(_c,Tc)}function Ic(e){return Pc("-"+e)}var Oc,Rc={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Sc.js){var n="mask-image";if(Pc(n)in t)return e;if(Sc.js+Ic(n)in t)return Sc.css+e}return e}},Nc={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Sc.vendor||Sc.isTouch?e:Sc.css+e)}},Mc={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Sc.css+e)}},Dc={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Sc.css+e)}},Lc={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Sc.js||"ms"===Sc.js&&"edge"!==Sc.browser?Sc.css+e:e)}},Bc={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Sc.js||"ms"===Sc.js||"apple"===Sc.vendor?Sc.css+e:e)}},Fc={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Sc.js?"WebkitColumn"+Ic(e)in t&&Sc.css+"column-"+e:"Moz"===Sc.js&&("page"+Ic(e)in t&&"page-"+e))}},jc={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Sc.js)return e;var n=e.replace("-inline","");return Sc.js+Ic(n)in t&&Sc.css+n}},Uc={supportedProperty:function(e,t){return Pc(e)in t&&e}},zc={supportedProperty:function(e,t){var n=Ic(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Sc.js+n in t?Sc.css+e:"Webkit"!==Sc.js&&"Webkit"+n in t&&"-webkit-"+e}},Vc={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Sc.js?""+Sc.css+e:e)}},Hc={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Sc.js?Sc.css+"scroll-chaining":e)}},$c={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Wc={supportedProperty:function(e,t){var n=$c[e];return!!n&&(Sc.js+Ic(n)in t&&Sc.css+n)}},Gc={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},qc=Object.keys(Gc),Kc=function(e){return Sc.css+e},Qc={supportedProperty:function(e,t,n){var r=n.multiple;if(qc.indexOf(e)>-1){var i=Gc[e];if(!Array.isArray(i))return Sc.js+Ic(i)in t&&Sc.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Sc.js+Ic(i[0])in t))return!1;return i.map(Kc)}return!1}},Xc=[kc,Cc,Rc,Nc,Mc,Dc,Lc,Bc,Fc,jc,Uc,zc,Vc,Hc,Wc,Qc],Jc=Xc.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Yc=Xc.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,gc(t.noPrefill)),e}),[]),Zc={};if(ma){Oc=document.createElement("p");var eu=window.getComputedStyle(document.documentElement,"");for(var tu in eu)isNaN(tu)||(Zc[eu[tu]]=eu[tu]);Yc.forEach((function(e){return delete Zc[e]}))}function nu(e,t){if(void 0===t&&(t={}),!Oc)return e;if(null!=Zc[e])return Zc[e];"transition"!==e&&"transform"!==e||(t[e]=e in Oc.style);for(var n=0;n<Jc.length&&(Zc[e]=Jc[n](e,Oc.style,t),!Zc[e]);n++);try{Oc.style[e]=""}catch(r){return!1}return Zc[e]}var ru,iu={},ou={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},su=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function au(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?nu(t):", "+nu(n);return r||(t||n)}function lu(e,t){var n=t;if(!ru||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=iu[r])return iu[r];try{ru.style[e]=n}catch(i){return iu[r]=!1,!1}if(ou[e])n=n.replace(su,au);else if(""===ru.style[e]&&("-ms-flex"===(n=Sc.css+n)&&(ru.style[e]="-ms-flexbox"),ru.style[e]=n,""===ru.style[e]))return iu[r]=!1,!1;return ru.style[e]="",iu[r]=n,iu[r]}ma&&(ru=document.createElement("p"));const cu=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=nu(n);o&&o!==n&&(i=!0);var s=!1,a=lu(o,ka(r));a&&a!==r&&(s=!0),(i||s)&&(i&&delete t[n],t[o||n]=a||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Sc.js?e:"@"+Sc.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return lu(t,ka(e))||e}}};const uu=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};const du=Pl({plugins:[Vl(),Ql(),Zl(),sc(),fc(),"undefined"===typeof window?null:cu(),uu()]}),hu={disableGeneration:!1,generateClassName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,i=""===r?"":`${r}-`;let o=0;const s=()=>(o+=1,o);return(e,o)=>{const a=o.options.name;if(a&&0===a.indexOf("Mui")&&!o.options.link&&!t){if(-1!==Fl.indexOf(e.key))return`Mui-${e.key}`;const t=`${i}${a}-${e.key}`;return o.options.theme[Bl]&&""===r?`${t}-${s()}`:t}return`${i}${n}${s()}`}}(),jss:du,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},fu=i.createContext(hu);let pu=-1e9;const gu=["variant"];function mu(e){return 0===e.length}function yu(e){const t="function"===typeof e;return{create:(n,r)=>{let i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},s=n.components[r].variants||[],a=(0,Se.A)({},i);return Object.keys(o).forEach((e=>{a[e]=(0,Ie.A)(a[e]||{},o[e])})),s.forEach((e=>{const t=function(e){const{variant:t}=e,n=(0,Ee.A)(e,gu);let r=t||"";return Object.keys(n).sort().forEach((t=>{r+="color"===t?mu(r)?e[t]:(0,xt.A)(e[t]):`${mu(r)?t:(0,xt.A)(t)}${(0,xt.A)(e[t].toString())}`})),r}(e.props);a[t]=(0,Ie.A)(a[t]||{},e.style)})),a},options:{}}}const vu={},bu=["name","classNamePrefix","Component","defaultTheme"];function wu(e,t){let{state:n,theme:r,stylesOptions:i,stylesCreator:o,name:s}=e;if(i.disableGeneration)return;let a=Ml.get(i.sheetsManager,o,r);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Ml.set(i.sheetsManager,o,r,a));const l=(0,Se.A)({},o.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=i.sheetsRegistry;if(0===a.refs){let e;i.sheetsCache&&(e=Ml.get(i.sheetsCache,o,r));const t=o.create(r,s);e||(e=i.jss.createStyleSheet(t,(0,Se.A)({link:!1},l)),e.attach(),i.sheetsCache&&Ml.set(i.sheetsCache,o,r,e)),c&&c.add(e),a.staticSheet=e,a.dynamicStyles=Ol(t)}if(a.dynamicStyles){const e=i.jss.createStyleSheet(a.dynamicStyles,(0,Se.A)({link:!0},l));e.update(t),e.attach(),n.dynamicSheet=e,n.classes=Rl({baseClasses:a.staticSheet.classes,newClasses:e.classes}),c&&c.add(e)}else n.classes=a.staticSheet.classes;a.refs+=1}function xu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:n,classNamePrefix:r,Component:o,defaultTheme:s=vu}=t,a=(0,Ee.A)(t,bu),l=yu(e),c=n||r||"makeStyles";l.options={index:(pu+=1,pu),name:n,meta:c,classNamePrefix:c};return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=function(){var e;const t=Ll();return null!=(e=null==t?void 0:t.$$material)?e:t}()||s,r=(0,Se.A)({},i.useContext(fu),a),c=i.useRef(),u=i.useRef();!function(e,t){const n=i.useRef([]);let r;const o=i.useMemo((()=>({})),t);n.current!==o&&(n.current=o,r=e()),i.useEffect((()=>()=>{r&&r()}),[o])}((()=>{const i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return wu(i,e),u.current=!1,c.current=i,()=>{!function(e){let{state:t,theme:n,stylesOptions:r,stylesCreator:i}=e;if(r.disableGeneration)return;const o=Ml.get(r.sheetsManager,i,n);o.refs-=1;const s=r.sheetsRegistry;0===o.refs&&(Ml.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),s&&s.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),s&&s.remove(t.dynamicSheet))}(i)}}),[t,l]),i.useEffect((()=>{u.current&&function(e,t){let{state:n}=e;n.dynamicSheet&&n.dynamicSheet.update(t)}(c.current,e),u.current=!0}));const d=function(e,t,n){let{state:r,stylesOptions:i}=e;if(i.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=Rl({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(c.current,e.classes,o);return d}}const Au=function(e){const{children:t,theme:n}=e,r=Ll(),o=i.useMemo((()=>{const e=null===r?n:function(e,t){if("function"===typeof t)return t(e);return(0,Se.A)({},e,t)}(r,n);return null!=e&&(e[Bl]=null!==r),e}),[n,r]);return(0,mt.jsx)(Dl.Provider,{value:o,children:t})},Eu={};function Su(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return i.useMemo((()=>{const i=e&&t[e]||t;if("function"===typeof n){const o=n(i),s=e?(0,Se.A)({},t,{[e]:o}):o;return r?()=>s:s}return e?(0,Se.A)({},t,{[e]:n}):(0,Se.A)({},t,n)}),[e,t,n,r])}const ku=function(e){const{children:t,theme:n,themeId:r}=e,i=Ht(Eu),o=Ll()||Eu,s=Su(r,i,n),a=Su(r,o,n,!0),l="rtl"===s.direction;return(0,mt.jsx)(Au,{theme:a,children:(0,mt.jsx)(Vt.T.Provider,{value:s,children:(0,mt.jsx)(Nn,{value:l,children:(0,mt.jsx)(bt,{value:null==s?void 0:s.components,children:t})})})})},Cu=["theme"];function _u(e){let{theme:t}=e,n=(0,Ee.A)(e,Cu);const r=t[dt];return(0,mt.jsx)(ku,(0,Se.A)({},n,{themeId:r?dt:void 0,theme:r||t}))}function Tu(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pu}=Object.prototype,{getPrototypeOf:Iu}=Object,Ou=(e=>t=>{const n=Pu.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ru=e=>(e=e.toLowerCase(),t=>Ou(t)===e),Nu=e=>t=>typeof t===e,{isArray:Mu}=Array,Du=Nu("undefined");const Lu=Ru("ArrayBuffer");const Bu=Nu("string"),Fu=Nu("function"),ju=Nu("number"),Uu=e=>null!==e&&"object"===typeof e,zu=e=>{if("object"!==Ou(e))return!1;const t=Iu(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Vu=Ru("Date"),Hu=Ru("File"),$u=Ru("Blob"),Wu=Ru("FileList"),Gu=Ru("URLSearchParams"),[qu,Ku,Qu,Xu]=["ReadableStream","Request","Response","Headers"].map(Ru);function Ju(e,t){let n,r,{allOwnKeys:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),Mu(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{const r=i?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(n=0;n<o;n++)s=r[n],t.call(null,e[s],s,e)}}function Yu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const Zu="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,ed=e=>!Du(e)&&e!==Zu;const td=(nd="undefined"!==typeof Uint8Array&&Iu(Uint8Array),e=>nd&&e instanceof nd);var nd;const rd=Ru("HTMLFormElement"),id=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),od=Ru("RegExp"),sd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ju(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},ad="abcdefghijklmnopqrstuvwxyz",ld="0123456789",cd={DIGIT:ld,ALPHA:ad,ALPHA_DIGIT:ad+ad.toUpperCase()+ld};const ud=Ru("AsyncFunction"),dd=((e,t)=>{return e?setImmediate:t?(n=`axios@${Math.random()}`,r=[],Zu.addEventListener("message",(e=>{let{source:t,data:i}=e;t===Zu&&i===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),Zu.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,Fu(Zu.postMessage)),hd="undefined"!==typeof queueMicrotask?queueMicrotask.bind(Zu):"undefined"!==typeof process&&process.nextTick||dd,fd={isArray:Mu,isArrayBuffer:Lu,isBuffer:function(e){return null!==e&&!Du(e)&&null!==e.constructor&&!Du(e.constructor)&&Fu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||Fu(e.append)&&("formdata"===(t=Ou(e))||"object"===t&&Fu(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Lu(e.buffer),t},isString:Bu,isNumber:ju,isBoolean:e=>!0===e||!1===e,isObject:Uu,isPlainObject:zu,isReadableStream:qu,isRequest:Ku,isResponse:Qu,isHeaders:Xu,isUndefined:Du,isDate:Vu,isFile:Hu,isBlob:$u,isRegExp:od,isFunction:Fu,isStream:e=>Uu(e)&&Fu(e.pipe),isURLSearchParams:Gu,isTypedArray:td,isFileList:Wu,forEach:Ju,merge:function e(){const{caseless:t}=ed(this)&&this||{},n={},r=(r,i)=>{const o=t&&Yu(n,i)||i;zu(n[o])&&zu(r)?n[o]=e(n[o],r):zu(r)?n[o]=e({},r):Mu(r)?n[o]=r.slice():n[o]=r};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Ju(arguments[i],r);return n},extend:function(e,t,n){let{allOwnKeys:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Ju(t,((t,r)=>{n&&Fu(t)?e[r]=Tu(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 i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&Iu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Ou,kindOfTest:Ru,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(Mu(e))return e;let t=e.length;if(!ju(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:rd,hasOwnProperty:id,hasOwnProp:id,reduceDescriptors:sd,freezeMethods:e=>{sd(e,((t,n)=>{if(Fu(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Fu(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 Mu(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:Yu,global:Zu,isContextDefined:ed,ALPHABET:cd,generateString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cd.ALPHA_DIGIT,n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Fu(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Uu(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=Mu(e)?[]:{};return Ju(e,((e,t)=>{const o=n(e,r+1);!Du(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:ud,isThenable:e=>e&&(Uu(e)||Fu(e))&&Fu(e.then)&&Fu(e.catch),setImmediate:dd,asap:hd};function pd(e,t,n,r,i){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),i&&(this.response=i)}fd.inherits(pd,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:fd.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const gd=pd.prototype,md={};["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=>{md[e]={value:e}})),Object.defineProperties(pd,md),Object.defineProperty(gd,"isAxiosError",{value:!0}),pd.from=(e,t,n,r,i,o)=>{const s=Object.create(gd);return fd.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),pd.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const yd=pd;function vd(e){return fd.isPlainObject(e)||fd.isArray(e)}function bd(e){return fd.endsWith(e,"[]")?e.slice(0,-2):e}function wd(e,t,n){return e?e.concat(t).map((function(e,t){return e=bd(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const xd=fd.toFlatObject(fd,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Ad=function(e,t,n){if(!fd.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=fd.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!fd.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!==typeof Blob&&Blob)&&fd.isSpecCompliantForm(t);if(!fd.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(fd.isDate(e))return e.toISOString();if(!a&&fd.isBlob(e))throw new yd("Blob is not supported. Use a Buffer instead.");return fd.isArrayBuffer(e)||fd.isTypedArray(e)?a&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let a=e;if(e&&!i&&"object"===typeof e)if(fd.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(fd.isArray(e)&&function(e){return fd.isArray(e)&&!e.some(vd)}(e)||(fd.isFileList(e)||fd.endsWith(n,"[]"))&&(a=fd.toArray(e)))return n=bd(n),a.forEach((function(e,r){!fd.isUndefined(e)&&null!==e&&t.append(!0===s?wd([n],r,o):null===s?n:n+"[]",l(e))})),!1;return!!vd(e)||(t.append(wd(i,n,o),l(e)),!1)}const u=[],d=Object.assign(xd,{defaultVisitor:c,convertValue:l,isVisitable:vd});if(!fd.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!fd.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),fd.forEach(n,(function(n,o){!0===(!(fd.isUndefined(n)||null===n)&&i.call(t,n,fd.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function Ed(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Sd(e,t){this._pairs=[],e&&Ad(e,this,t)}const kd=Sd.prototype;kd.append=function(e,t){this._pairs.push([e,t])},kd.toString=function(e){const t=e?function(t){return e.call(this,t,Ed)}:Ed;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Cd=Sd;function _d(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Td(e,t,n){if(!t)return e;const r=n&&n.encode||_d,i=n&&n.serialize;let o;if(o=i?i(t,n):fd.isURLSearchParams(t)?t.toString():new Cd(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const Pd=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){fd.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Od={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Cd,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Rd="undefined"!==typeof window&&"undefined"!==typeof document,Nd=(Md="undefined"!==typeof navigator&&navigator.product,Rd&&["ReactNative","NativeScript","NS"].indexOf(Md)<0);var Md;const Dd="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,Ld=Rd&&window.location.href||"http://localhost",Bd={...e,...Od};const Fd=function(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&fd.isArray(r)?r.length:o,a)return fd.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&fd.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&fd.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}(r[o])),!s}if(fd.isFormData(e)&&fd.isFunction(e.entries)){const n={};return fd.forEachEntry(e,((e,r)=>{t(function(e){return fd.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const jd={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=fd.isObject(e);i&&fd.isHTMLForm(e)&&(e=new FormData(e));if(fd.isFormData(e))return r?JSON.stringify(Fd(e)):e;if(fd.isArrayBuffer(e)||fd.isBuffer(e)||fd.isStream(e)||fd.isFile(e)||fd.isBlob(e)||fd.isReadableStream(e))return e;if(fd.isArrayBufferView(e))return e.buffer;if(fd.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ad(e,new Bd.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Bd.isNode&&fd.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=fd.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ad(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(fd.isString(e))try{return(t||JSON.parse)(e),fd.trim(e)}catch(gK){if("SyntaxError"!==gK.name)throw gK}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||jd.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(fd.isResponse(e)||fd.isReadableStream(e))return e;if(e&&fd.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(gK){if(n){if("SyntaxError"===gK.name)throw yd.from(gK,yd.ERR_BAD_RESPONSE,this,null,this.response);throw gK}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bd.classes.FormData,Blob:Bd.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fd.forEach(["delete","get","head","post","put","patch"],(e=>{jd.headers[e]={}}));const Ud=jd,zd=fd.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"]),Vd=Symbol("internals");function Hd(e){return e&&String(e).trim().toLowerCase()}function $d(e){return!1===e||null==e?e:fd.isArray(e)?e.map($d):String(e)}function Wd(e,t,n,r,i){return fd.isFunction(r)?r.call(this,t,n):(i&&(t=n),fd.isString(t)?fd.isString(r)?-1!==t.indexOf(r):fd.isRegExp(r)?r.test(t):void 0:void 0)}class Gd{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=Hd(t);if(!i)throw new Error("header name must be a non-empty string");const o=fd.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=$d(e))}const o=(e,t)=>fd.forEach(e,((e,n)=>i(e,n,t)));if(fd.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(fd.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&zd[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(fd.isHeaders(e))for(const[s,a]of e.entries())i(a,s,n);else null!=e&&i(t,e,n);return this}get(e,t){if(e=Hd(e)){const n=fd.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(fd.isFunction(t))return t.call(this,e,n);if(fd.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Hd(e)){const n=fd.findKey(this,e);return!(!n||void 0===this[n]||t&&!Wd(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=Hd(e)){const i=fd.findKey(n,e);!i||t&&!Wd(0,n[i],i,t)||(delete n[i],r=!0)}}return fd.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!Wd(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return fd.forEach(this,((r,i)=>{const o=fd.findKey(n,i);if(o)return t[o]=$d(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete t[i],t[s]=$d(r),n[s]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return fd.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&fd.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),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((e=>t.set(e))),t}static accessor(e){const t=(this[Vd]=this[Vd]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Hd(e);t[r]||(!function(e,t){const n=fd.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return fd.isArray(e)?e.forEach(r):r(e),this}}Gd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fd.reduceDescriptors(Gd.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),fd.freezeMethods(Gd);const qd=Gd;function Kd(e,t){const n=this||Ud,r=t||n,i=qd.from(r.headers);let o=r.data;return fd.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function Qd(e){return!(!e||!e.__CANCEL__)}function Xd(e,t,n){yd.call(this,null==e?"canceled":e,yd.ERR_CANCELED,t,n),this.name="CanceledError"}fd.inherits(Xd,yd,{__CANCEL__:!0});const Jd=Xd;function Yd(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new yd("Request failed with status code "+n.status,[yd.ERR_BAD_REQUEST,yd.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Zd=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[s];i||(i=l),n[o]=a,r[o]=l;let u=s,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}};const eh=function(e,t){let n,r,i=0,o=1e3/t;const s=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-i;for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];t>=o?s(l,e):(n=l,r||(r=setTimeout((()=>{r=null,s(n)}),o-t)))},()=>n&&s(n)]},th=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const i=Zd(50,250);return eh((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-r,l=i(a);r=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},nh=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rh=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fd.asap((()=>e(...n)))},ih=Bd.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=fd.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},oh=Bd.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];fd.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),fd.isString(r)&&s.push("path="+r),fd.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.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 sh(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ah=e=>e instanceof qd?{...e}:e;function lh(e,t){t=t||{};const n={};function r(e,t,n){return fd.isPlainObject(e)&&fd.isPlainObject(t)?fd.merge.call({caseless:n},e,t):fd.isPlainObject(t)?fd.merge({},t):fd.isArray(t)?t.slice():t}function i(e,t,n){return fd.isUndefined(t)?fd.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!fd.isUndefined(t))return r(void 0,t)}function s(e,t){return fd.isUndefined(t)?fd.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(ah(e),ah(t),!0)};return fd.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||i,s=o(e[r],t[r],r);fd.isUndefined(s)&&o!==a||(n[r]=s)})),n}const ch=e=>{const t=lh({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=t;if(t.headers=a=qd.from(a),t.url=Td(sh(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),fd.isFormData(r))if(Bd.hasStandardBrowserEnv||Bd.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Bd.hasStandardBrowserEnv&&(i&&fd.isFunction(i)&&(i=i(t)),i||!1!==i&&ih(t.url))){const e=o&&s&&oh.read(s);e&&a.set(o,e)}return t},uh="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=ch(e);let i=r.data;const o=qd.from(r.headers).normalize();let s,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=qd.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Yd((function(e){t(e),p()}),(function(e){n(e),p()}),{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new yd("Request aborted",yd.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new yd("Network Error",yd.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Id;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new yd(t,i.clarifyTimeoutError?yd.ETIMEDOUT:yd.ECONNABORTED,e,g)),g=null},void 0===i&&o.setContentType(null),"setRequestHeader"in g&&fd.forEach(o.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),fd.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),f&&([l,u]=th(f,!0),g.addEventListener("progress",l)),h&&g.upload&&([a,c]=th(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=t=>{g&&(n(!t||t.type?new Jd(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Bd.protocols.indexOf(y)?n(new yd("Unsupported protocol "+y+":",yd.ERR_BAD_REQUEST,e)):g.send(i||null)}))},dh=(e,t)=>{let n,r=new AbortController;const i=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof yd?t:new Jd(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{i(new yd(`timeout ${t} of ms exceeded`,yd.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",i):e.unsubscribe(i))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",i)));const{signal:a}=r;return a.unsubscribe=s,[a,()=>{o&&clearTimeout(o),o=null}]},hh=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},fh=(e,t,n,r,i)=>{const o=async function*(e,t,n){for await(const r of e)yield*hh(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,i);let s,a=0,l=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return l(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw l(t),t}},cancel:e=>(l(e),o.return())},{highWaterMark:2})},ph="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,gh=ph&&"function"===typeof ReadableStream,mh=ph&&("function"===typeof TextEncoder?(yh=new TextEncoder,e=>yh.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var yh;const vh=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return!!e(...n)}catch(gK){return!1}},bh=gh&&vh((()=>{let e=!1;const t=new Request(Bd.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),wh=gh&&vh((()=>fd.isReadableStream(new Response("").body))),xh={stream:wh&&(e=>e.body)};var Ah;ph&&(Ah=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!xh[e]&&(xh[e]=fd.isFunction(Ah[e])?t=>t[e]():(t,n)=>{throw new yd(`Response type '${e}' is not supported`,yd.ERR_NOT_SUPPORT,n)})})));const Eh=async(e,t)=>{const n=fd.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:fd.isBlob(e)?e.size:fd.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:fd.isArrayBufferView(e)||fd.isArrayBuffer(e)?e.byteLength:(fd.isURLSearchParams(e)&&(e+=""),fd.isString(e)?(await mh(e)).byteLength:void 0))(t):n},Sh=ph&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=ch(e);c=c?(c+"").toLowerCase():"text";let f,p,[g,m]=i||o||s?dh([i,o],s):[];const y=()=>{!f&&setTimeout((()=>{g&&g.unsubscribe()})),f=!0};let v;try{if(l&&bh&&"get"!==n&&"head"!==n&&0!==(v=await Eh(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(fd.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=nh(v,th(rh(l)));r=fh(n.body,65536,e,t,mh)}}fd.isString(d)||(d=d?"include":"omit"),p=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:d});let i=await fetch(p);const o=wh&&("stream"===c||"response"===c);if(wh&&(a||o)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=fd.toFiniteNumber(i.headers.get("content-length")),[n,r]=a&&nh(t,th(rh(a),!0))||[];i=new Response(fh(i.body,65536,n,(()=>{r&&r(),o&&y()}),mh),e)}c=c||"text";let s=await xh[fd.findKey(xh,c)||"text"](i,e);return!o&&y(),m&&m(),await new Promise(((t,n)=>{Yd(t,n,{data:s,headers:qd.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(b){if(y(),b&&"TypeError"===b.name&&/fetch/i.test(b.message))throw Object.assign(new yd("Network Error",yd.ERR_NETWORK,e,p),{cause:b.cause||b});throw yd.from(b,b&&b.code,e,p)}}),kh={http:null,xhr:uh,fetch:Sh};fd.forEach(kh,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(gK){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ch=e=>`- ${e}`,_h=e=>fd.isFunction(e)||null===e||!1===e,Th=e=>{e=fd.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!_h(n)&&(r=kh[(t=String(n)).toLowerCase()],void 0===r))throw new yd(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+o]=r}if(!r){const e=Object.entries(i).map((e=>{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(Ch).join("\n"):" "+Ch(e[0]):"as no adapter specified";throw new yd("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ph(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jd(null,e)}function Ih(e){Ph(e),e.headers=qd.from(e.headers),e.data=Kd.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Th(e.adapter||Ud.adapter)(e).then((function(t){return Ph(e),t.data=Kd.call(e,e.transformResponse,t),t.headers=qd.from(t.headers),t}),(function(t){return Qd(t)||(Ph(e),t&&t.response&&(t.response.data=Kd.call(e,e.transformResponse,t.response),t.response.headers=qd.from(t.response.headers))),Promise.reject(t)}))}const Oh="1.7.4",Rh={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Rh[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Nh={};Rh.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new yd(r(i," has been removed"+(t?" in "+t:"")),yd.ERR_DEPRECATED);return t&&!Nh[i]&&(Nh[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const Mh={assertOptions:function(e,t,n){if("object"!==typeof e)throw new yd("options must be an object",yd.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new yd("option "+o+" must be "+n,yd.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new yd("Unknown option "+o,yd.ERR_BAD_OPTION)}},validators:Rh},Dh=Mh.validators;class Lh{constructor(e){this.defaults=e,this.interceptors={request:new Pd,response:new Pd}}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(gK){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=lh(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&Mh.assertOptions(n,{silentJSONParsing:Dh.transitional(Dh.boolean),forcedJSONParsing:Dh.transitional(Dh.boolean),clarifyTimeoutError:Dh.transitional(Dh.boolean)},!1),null!=r&&(fd.isFunction(r)?t.paramsSerializer={serialize:r}:Mh.assertOptions(r,{encode:Dh.function,serialize:Dh.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&fd.merge(i.common,i[t.method]);i&&fd.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=qd.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.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(!a){const e=[Ih.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let h=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(f){t.call(this,f);break}}try{c=Ih.call(this,h)}catch(f){return Promise.reject(f)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Td(sh((e=lh(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}fd.forEach(["delete","get","head","options"],(function(e){Lh.prototype[e]=function(t,n){return this.request(lh(n||{},{method:e,url:t,data:(n||{}).data}))}})),fd.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(lh(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Lh.prototype[e]=t(),Lh.prototype[e+"Form"]=t(!0)}));const Bh=Lh;class Fh{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{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,i){n.reason||(n.reason=new Jd(e,r,i),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)}static source(){let e;return{token:new Fh((function(t){e=t})),cancel:e}}}const jh=Fh;const Uh={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(Uh).forEach((e=>{let[t,n]=e;Uh[n]=t}));const zh=Uh;const Vh=function e(t){const n=new Bh(t),r=Tu(Bh.prototype.request,n);return fd.extend(r,Bh.prototype,n,{allOwnKeys:!0}),fd.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(lh(t,n))},r}(Ud);Vh.Axios=Bh,Vh.CanceledError=Jd,Vh.CancelToken=jh,Vh.isCancel=Qd,Vh.VERSION=Oh,Vh.toFormData=Ad,Vh.AxiosError=yd,Vh.Cancel=Vh.CanceledError,Vh.all=function(e){return Promise.all(e)},Vh.spread=function(e){return function(t){return e.apply(null,t)}},Vh.isAxiosError=function(e){return fd.isObject(e)&&!0===e.isAxiosError},Vh.mergeConfig=lh,Vh.AxiosHeaders=qd,Vh.formToJSON=e=>Fd(fd.isHTMLForm(e)?new FormData(e):e),Vh.getAdapter=Th,Vh.HttpStatusCode=zh,Vh.default=Vh;const Hh=Vh,$h=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},Wh={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 i=0;i<e.length;i+=3){const t=e[i],o=i+1<e.length,s=o?e[i+1]:0,a=i+2<e.length,l=a?e[i+2]:0,c=t>>2,u=(3&t)<<4|s>>4;let d=(15&s)<<2|l>>6,h=63&l;a||(h=64,o||(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($h(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const t=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0;++i;const s=i<e.length?n[e.charAt(i)]:64;++i;const a=i<e.length?n[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==a)throw new Gh;const l=t<<2|o>>4;if(r.push(l),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==a){const e=s<<6&192|a;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.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Gh extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const qh=function(e){return function(e){const t=$h(e);return Wh.encodeByteArray(t,!0)}(e).replace(/\./g,"")},Kh=function(e){try{return Wh.decodeString(e,!0)}catch(gK){console.error("base64Decode failed: ",gK)}return null};const Qh=()=>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__,Xh=()=>{try{return Qh()||(()=>{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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Jeevan Kumar Korra",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_BRANCH_URL:"crypto-portfolio-app-git-master-jeevan10017s-projects.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"Update README.md",REACT_APP_VERCEL_GIT_REPO_SLUG:"Crypto-Portfolio-App",REACT_APP_VERCEL_GIT_COMMIT_SHA:"05df0eb8941a350972bdb46a2a008539d2cfd56f",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"master",REACT_APP_VERCEL_URL:"crypto-portfolio-2w6zcbkxd-jeevan10017s-projects.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"crypto-portfolio-app-olive.vercel.app",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"842148022",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"jeevan10017",REACT_APP_VERCEL_GIT_REPO_OWNER:"jeevan10017"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"===typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(gK){return}const t=e&&Kh(e[1]);return t&&JSON.parse(t)})()}catch(gK){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${gK}`)}},Jh=e=>{var t,n;return null===(n=null===(t=Xh())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},Yh=()=>{var e;return null===(e=Xh())||void 0===e?void 0:e.config},Zh=e=>{var t;return null===(t=Xh())||void 0===t?void 0:t[`_${e}`]};class ef{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 tf(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function nf(){return!function(){var e;const t=null===(e=Xh())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(gK){return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function rf(){try{return"object"===typeof indexedDB}catch(gK){return!1}}class of extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,of.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,sf.prototype.create)}}class sf{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],i=r?function(e,t){return e.replace(af,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(r,t):"Error",o=`${this.serviceName}: ${i} (${n}).`;return new of(n,o,t)}}const af=/\{\$([^}]+)}/g;function lf(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],o=t[i];if(cf(n)&&cf(o)){if(!lf(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function cf(e){return null!==e&&"object"===typeof e}function uf(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("&"):""}function df(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function hf(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class ff{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!==typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"===typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=pf),void 0===r.error&&(r.error=pf),void 0===r.complete&&(r.complete=pf);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(gK){}})),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(gK){"undefined"!==typeof console&&console.error&&console.error(gK)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function pf(){}function gf(e){return e&&e._delegate?e._delegate:e}class mf{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 yf="[DEFAULT]";class vf{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 ef;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(gK){}}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(gK){if(r)return null;throw gK}}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:yf})}catch(gK){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(gK){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yf;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]:yf;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yf;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[i,o]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&o.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(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:bf(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(i){}return r||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yf;return this.component?this.component.multipleInstances?e:yf:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}function bf(e){return e===yf?void 0:e}class wf{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 vf(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const xf=[];var Af;!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"}(Af||(Af={}));const Ef={debug:Af.DEBUG,verbose:Af.VERBOSE,info:Af.INFO,warn:Af.WARN,error:Af.ERROR,silent:Af.SILENT},Sf=Af.INFO,kf={[Af.DEBUG]:"log",[Af.VERBOSE]:"log",[Af.INFO]:"info",[Af.WARN]:"warn",[Af.ERROR]:"error"},Cf=function(e,t){if(t<e.logLevel)return;const n=(new Date).toISOString(),r=kf[t];if(!r)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];console[r](`[${n}]  ${e.name}:`,...o)};class _f{constructor(e){this.name=e,this._logLevel=Sf,this._logHandler=Cf,this._userLogHandler=null,xf.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Af))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"===typeof e?Ef[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Af.DEBUG,...t),this._logHandler(this,Af.DEBUG,...t)}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Af.VERBOSE,...t),this._logHandler(this,Af.VERBOSE,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Af.INFO,...t),this._logHandler(this,Af.INFO,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Af.WARN,...t),this._logHandler(this,Af.WARN,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,Af.ERROR,...t),this._logHandler(this,Af.ERROR,...t)}}const Tf=(e,t)=>t.some((t=>e instanceof t));let Pf,If;const Of=new WeakMap,Rf=new WeakMap,Nf=new WeakMap,Mf=new WeakMap,Df=new WeakMap;let Lf={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Rf.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Nf.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return jf(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Bf(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(If||(If=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(Uf(this),n),jf(Of.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return jf(e.apply(Uf(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const o=e.call(Uf(this),t,...r);return Nf.set(o,t.sort?t.sort():[t]),jf(o)}}function Ff(e){return"function"===typeof e?Bf(e):(e instanceof IDBTransaction&&function(e){if(Rf.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)}));Rf.set(e,t)}(e),Tf(e,Pf||(Pf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Lf):e)}function jf(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(jf(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&Of.set(t,e)})).catch((()=>{})),Df.set(t,e),t}(e);if(Mf.has(e))return Mf.get(e);const t=Ff(e);return t!==e&&(Mf.set(e,t),Df.set(t,e)),t}const Uf=e=>Df.get(e);const zf=["get","getKey","getAll","getAllKeys","count"],Vf=["put","add","delete","clear"],Hf=new Map;function $f(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(Hf.get(t))return Hf.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Vf.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!zf.includes(n))return;const o=async function(e){const t=this.transaction(e,i?"readwrite":"readonly");let o=t.store;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];return r&&(o=o.index(a.shift())),(await Promise.all([o[n](...a),i&&t.done]))[0]};return Hf.set(t,o),o}!function(e){Lf=e(Lf)}((e=>({...e,get:(t,n,r)=>$f(t,n)||e.get(t,n,r),has:(t,n)=>!!$f(t,n)||e.has(t,n)})));class Wf{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 Gf="@firebase/app",qf="0.10.9",Kf=new _f("@firebase/app"),Qf="@firebase/app-compat",Xf="@firebase/analytics-compat",Jf="@firebase/analytics",Yf="@firebase/app-check-compat",Zf="@firebase/app-check",ep="@firebase/auth",tp="@firebase/auth-compat",np="@firebase/database",rp="@firebase/database-compat",ip="@firebase/functions",op="@firebase/functions-compat",sp="@firebase/installations",ap="@firebase/installations-compat",lp="@firebase/messaging",cp="@firebase/messaging-compat",up="@firebase/performance",dp="@firebase/performance-compat",hp="@firebase/remote-config",fp="@firebase/remote-config-compat",pp="@firebase/storage",gp="@firebase/storage-compat",mp="@firebase/firestore",yp="@firebase/vertexai-preview",vp="@firebase/firestore-compat",bp="firebase",wp="[DEFAULT]",xp={[Gf]:"fire-core",[Qf]:"fire-core-compat",[Jf]:"fire-analytics",[Xf]:"fire-analytics-compat",[Zf]:"fire-app-check",[Yf]:"fire-app-check-compat",[ep]:"fire-auth",[tp]:"fire-auth-compat",[np]:"fire-rtdb",[rp]:"fire-rtdb-compat",[ip]:"fire-fn",[op]:"fire-fn-compat",[sp]:"fire-iid",[ap]:"fire-iid-compat",[lp]:"fire-fcm",[cp]:"fire-fcm-compat",[up]:"fire-perf",[dp]:"fire-perf-compat",[hp]:"fire-rc",[fp]:"fire-rc-compat",[pp]:"fire-gcs",[gp]:"fire-gcs-compat",[mp]:"fire-fst",[vp]:"fire-fst-compat",[yp]:"fire-vertex","fire-js":"fire-js",[bp]:"fire-js-all"},Ap=new Map,Ep=new Map,Sp=new Map;function kp(e,t){try{e.container.addComponent(t)}catch(gK){Kf.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,gK)}}function Cp(e){const t=e.name;if(Sp.has(t))return Kf.debug(`There were multiple attempts to register component ${t}.`),!1;Sp.set(t,e);for(const n of Ap.values())kp(n,e);for(const n of Ep.values())kp(n,e);return!0}function _p(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Tp(e){return void 0!==e.settings}const Pp=new sf("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 Ip{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 mf("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 Pp.create("app-deleted",{appName:this._name})}}const Op="10.13.0";function Rp(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:wp,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw Pp.create("bad-app-name",{appName:String(i)});if(n||(n=Yh()),!n)throw Pp.create("no-options");const o=Ap.get(i);if(o){if(lf(n,o.options)&&lf(r,o.config))return o;throw Pp.create("duplicate-app",{appName:i})}const s=new wf(i);for(const l of Sp.values())s.addComponent(l);const a=new Ip(n,r,s);return Ap.set(i,a),a}function Np(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wp;const t=Ap.get(e);if(!t&&e===wp&&Yh())return Rp();if(!t)throw Pp.create("no-app",{appName:e});return t}function Mp(e,t,n){var r;let i=null!==(r=xp[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Kf.warn(e.join(" "))}Cp(new mf(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}const Dp="firebase-heartbeat-database",Lp=1,Bp="firebase-heartbeat-store";let Fp=null;function jp(){return Fp||(Fp=function(e,t){let{blocked:n,upgrade:r,blocking:i,terminated:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=indexedDB.open(e,t),a=jf(s);return r&&s.addEventListener("upgradeneeded",(e=>{r(jf(s.result),e.oldVersion,e.newVersion,jf(s.transaction),e)})),n&&s.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}(Dp,Lp,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(Bp)}catch(gK){console.warn(gK)}}}).catch((e=>{throw Pp.create("idb-open",{originalErrorMessage:e.message})}))),Fp}async function Up(e,t){try{const n=(await jp()).transaction(Bp,"readwrite"),r=n.objectStore(Bp);await r.put(t,zp(e)),await n.done}catch(gK){if(gK instanceof of)Kf.warn(gK.message);else{const t=Pp.create("idb-set",{originalErrorMessage:null===gK||void 0===gK?void 0:gK.message});Kf.warn(t.message)}}}function zp(e){return`${e.name}!${e.options.appId}`}class Vp{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new $p(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t,n;try{const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=Hp();if(console.log("heartbeats",null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats),null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(n=this._heartbeatsCache)||void 0===n?void 0:n.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some((e=>e.date===i)))return;return this._heartbeatsCache.heartbeats.push({date:i,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}catch(gK){Kf.warn(gK)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=Hp(),{heartbeatsToSend:n,unsentEntries:r}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Wp(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Wp(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=qh(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)),i}catch(gK){return Kf.warn(gK),""}}}function Hp(){return(new Date).toISOString().substring(0,10)}class $p{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!rf()&&new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(n){t(n)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await jp()).transaction(Bp),n=await t.objectStore(Bp).get(zp(e));return await t.done,n}catch(gK){if(gK instanceof of)Kf.warn(gK.message);else{const t=Pp.create("idb-get",{originalErrorMessage:null===gK||void 0===gK?void 0:gK.message});Kf.warn(t.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 Up(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 Up(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Wp(e){return qh(JSON.stringify({version:2,heartbeats:e})).length}var Gp;Gp="",Cp(new mf("platform-logger",(e=>new Wf(e)),"PRIVATE")),Cp(new mf("heartbeat",(e=>new Vp(e)),"PRIVATE")),Mp(Gf,qf,Gp),Mp(Gf,qf,"esm2017"),Mp("fire-js","");function qp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;function Kp(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const Qp=Kp,Xp=new sf("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),Jp=new _f("@firebase/auth");function Yp(e){if(Jp.logLevel<=Af.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Jp.error(`Auth (${Op}): ${e}`,...n)}}function Zp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw ig(e,...n)}function eg(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ig(e,...n)}function tg(e,t,n){const r=Object.assign(Object.assign({},Qp()),{[t]:n});return new sf("auth","Firebase",r).create(t,{appName:e.name})}function ng(e){return tg(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function rg(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&Zp(e,"argument-error"),tg(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function ig(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){const t=n[0],r=[...n.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(t,...r)}return Xp.create(e,...n)}function og(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw ig(t,...r)}}function sg(e){const t="INTERNAL ASSERTION FAILED: "+e;throw Yp(t),new Error(t)}function ag(e,t){e||sg(t)}function lg(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function cg(){return"http:"===ug()||"https:"===ug()}function ug(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}function dg(){return!("undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(cg()||function(){const e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}()||"connection"in navigator))||navigator.onLine}class hg{constructor(e,t){this.shortDelay=e,this.longDelay=t,ag(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(tf())||"object"===typeof navigator&&"ReactNative"===navigator.product}get(){return dg()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function fg(e,t){ag(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class pg{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:"undefined"!==typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!==typeof fetch?fetch:void sg("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:"undefined"!==typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!==typeof Headers?Headers:void sg("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:"undefined"!==typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!==typeof Response?Response:void sg("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const gg={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},mg=new hg(3e4,6e4);function yg(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function vg(e,t,n,r){return bg(e,arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},(async()=>{let i={},o={};r&&("GET"===t?o=r:i={body:JSON.stringify(r)});const s=uf(Object.assign({key:e.config.apiKey},o)).slice(1),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/json",e.languageCode&&(a["X-Firebase-Locale"]=e.languageCode),pg.fetch()(xg(e,e.config.apiHost,n,s),Object.assign({method:t,headers:a,referrerPolicy:"no-referrer"},i))}))}async function bg(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},gg),t);try{const t=new Eg(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw Sg(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[n,s]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw Sg(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw Sg(e,"email-already-in-use",o);if("USER_DISABLED"===n)throw Sg(e,"user-disabled",o);const a=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(s)throw tg(e,a,s);Zp(e,a)}}catch(gK){if(gK instanceof of)throw gK;Zp(e,"network-request-failed",{message:String(gK)})}}async function wg(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=await vg(e,t,n,r,i);return"mfaPendingCredential"in o&&Zp(e,"multi-factor-auth-required",{_serverResponse:o}),o}function xg(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?fg(e.config,i):`${e.config.apiScheme}://${i}`}function Ag(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class Eg{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(eg(this.auth,"network-request-failed"))),mg.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function Sg(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=eg(e,t,r);return i.customData._tokenResponse=n,i}function kg(e){return void 0!==e&&void 0!==e.enterprise}class Cg{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return Ag(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function _g(e,t){return vg(e,"GET","/v2/recaptchaConfig",yg(e,t))}async function Tg(e,t){return vg(e,"POST","/v1/accounts:lookup",t)}function Pg(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(gK){}}function Ig(e){return 1e3*Number(e)}function Og(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return Yp("JWT malformed, contained fewer than 3 sections"),null;try{const e=Kh(n);return e?JSON.parse(e):(Yp("Failed to decode base64 JWT payload"),null)}catch(gK){return Yp("Caught error parsing JWT payload as JSON",null===gK||void 0===gK?void 0:gK.toString()),null}}function Rg(e){const t=Og(e);return og(t,"internal-error"),og("undefined"!==typeof t.exp,"internal-error"),og("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function Ng(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return t;try{return await t}catch(gK){throw gK instanceof of&&function(e){let{code:t}=e;return"auth/user-disabled"===t||"auth/user-token-expired"===t}(gK)&&e.auth.currentUser===e&&await e.auth.signOut(),gK}}class Mg{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(gK){return void("auth/network-request-failed"===(null===gK||void 0===gK?void 0:gK.code)&&this.schedule(!0))}this.schedule()}}class Dg{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Pg(this.lastLoginAt),this.creationTime=Pg(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Lg(e){var t;const n=e.auth,r=await e.getIdToken(),i=await Ng(e,Tg(n,{idToken:r}));og(null===i||void 0===i?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?Bg(o.providerUserInfo):[],a=function(e,t){const n=e.filter((e=>!t.some((t=>t.providerId===e.providerId))));return[...n,...t]}(e.providerData,s),l=e.isAnonymous,c=!(e.email&&o.passwordHash)&&!(null===a||void 0===a?void 0:a.length),u=!!l&&c,d={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Dg(o.createdAt,o.lastLoginAt),isAnonymous:u};Object.assign(e,d)}function Bg(e){return e.map((e=>{var{providerId:t}=e,n=qp(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}class Fg{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){og(e.idToken,"internal-error"),og("undefined"!==typeof e.idToken,"internal-error"),og("undefined"!==typeof e.refreshToken,"internal-error");const t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):Rg(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){og(0!==e.length,"internal-error");const t=Rg(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this.accessToken||this.isExpired?(og(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:i}=await async function(e,t){const n=await bg(e,{},(async()=>{const n=uf({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,o=xg(e,r,"/v1/token",`key=${i}`),s=await e._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",pg.fetch()(o,{method:"POST",headers:s,body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new Fg;return n&&(og("string"===typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(og("string"===typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(og("number"===typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Fg,this.toJSON())}_performRefresh(){return sg("not implemented")}}function jg(e,t){og("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}class Ug{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=qp(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Mg(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Dg(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await Ng(this,this.stsTokenManager.getToken(this.auth,e));return og(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=gf(e),r=await n.getIdToken(t),i=Og(r);og(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o="object"===typeof i.firebase?i.firebase:void 0,s=null===o||void 0===o?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:Pg(Ig(i.auth_time)),issuedAtTime:Pg(Ig(i.iat)),expirationTime:Pg(Ig(i.exp)),signInProvider:s||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=gf(e);await Lg(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(og(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Ug(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){og(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Lg(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Tp(this.auth.app))return Promise.reject(ng(this.auth));const e=await this.getIdToken();return await Ng(this,async function(e,t){return vg(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,o,s,a,l,c;const u=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(s=t.tenantId)&&void 0!==s?s:void 0,g=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,m=null!==(l=t.createdAt)&&void 0!==l?l:void 0,y=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:v,emailVerified:b,isAnonymous:w,providerData:x,stsTokenManager:A}=t;og(v&&A,e,"internal-error");const E=Fg.fromJSON(this.name,A);og("string"===typeof v,e,"internal-error"),jg(u,e.name),jg(d,e.name),og("boolean"===typeof b,e,"internal-error"),og("boolean"===typeof w,e,"internal-error"),jg(h,e.name),jg(f,e.name),jg(p,e.name),jg(g,e.name),jg(m,e.name),jg(y,e.name);const S=new Ug({uid:v,auth:e,email:d,emailVerified:b,displayName:u,isAnonymous:w,photoURL:f,phoneNumber:h,tenantId:p,stsTokenManager:E,createdAt:m,lastLoginAt:y});return x&&Array.isArray(x)&&(S.providerData=x.map((e=>Object.assign({},e)))),g&&(S._redirectEventId=g),S}static async _fromIdTokenResponse(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new Fg;r.updateFromServerResponse(t);const i=new Ug({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Lg(i),i}static async _fromGetAccountInfoResponse(e,t,n){const r=t.users[0];og(void 0!==r.localId,"internal-error");const i=void 0!==r.providerUserInfo?Bg(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length),s=new Fg;s.updateFromIdToken(n);const a=new Ug({uid:r.localId,auth:e,stsTokenManager:s,isAnonymous:o}),l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:i,metadata:new Dg(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length)};return Object.assign(a,l),a}}const zg=new Map;function Vg(e){ag(e instanceof Function,"Expected a class definition");let t=zg.get(e);return t?(ag(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,zg.set(e,t),t)}class Hg{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}Hg.type="NONE";const $g=Hg;function Wg(e,t,n){return`firebase:${e}:${t}:${n}`}class Gg{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=Wg(this.userKey,r.apiKey,i),this.fullPersistenceKey=Wg("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Ug._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authUser";if(!t.length)return new Gg(Vg($g),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||Vg($g);const o=Wg(n,e.config.apiKey,e.name);let s=null;for(const c of t)try{const t=await c._get(o);if(t){const n=Ug._fromJSON(e,t);c!==i&&(s=n),i=c;break}}catch(l){}const a=r.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],s&&await i._set(o,s.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(o)}catch(l){}}))),new Gg(i,e,n)):new Gg(i,e,n)}}function qg(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Jg(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Kg(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Zg(t))return"Blackberry";if(em(t))return"Webos";if(Qg(t))return"Safari";if((t.includes("chrome/")||Xg(t))&&!t.includes("edge/"))return"Chrome";if(Yg(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null===n||void 0===n?void 0:n.length))return n[1]}return"Other"}function Kg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/firefox\//i.test(e)}function Qg(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Xg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/crios\//i.test(e)}function Jg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/iemobile/i.test(e)}function Yg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/android/i.test(e)}function Zg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/blackberry/i.test(e)}function em(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/webos/i.test(e)}function tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function nm(){return function(){const e=tf();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function rm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf();return tm(e)||Yg(e)||em(e)||Zg(e)||/windows phone/i.test(e)||Jg(e)}function im(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=qg(tf());break;case"Worker":t=`${qg(tf())}-${e}`;break;default:t=e}const r=n.length?n.join(","):"FirebaseCore-web";return`${t}/JsCore/${Op}/${r}`}class om{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(gK){r(gK)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(gK){t.reverse();for(const n of t)try{n()}catch(Bs){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===gK||void 0===gK?void 0:gK.message})}}}class sm{constructor(e){var t,n,r,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(n=e.allowedNonAlphanumericCharacters)||void 0===n?void 0:n.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,i,o,s;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(n=a.meetsMaxPasswordLength)||void 0===n||n),a.isValid&&(a.isValid=null===(r=a.containsLowercaseLetter)||void 0===r||r),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(o=a.containsNumericCharacter)||void 0===o||o),a.isValid&&(a.isValid=null===(s=a.containsNonAlphanumericCharacter)||void 0===s||s),a}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class am{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new cm(this),this.idTokenSubscription=new cm(this),this.beforeStateQueue=new om(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Xp,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=Vg(t)),this._initializationPromise=this.queue((async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await Gg.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(gK){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUserFromIdToken(e){try{const t=await Tg(this,{idToken:e}),n=await Ug._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(t){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",t),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if(Tp(this.app)){const e=this.app.settings.authIdToken;return e?new Promise((t=>{setTimeout((()=>this.initializeCurrentUserFromIdToken(e).then(t,t)))})):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,o=null===r||void 0===r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);n&&n!==o||!(null===s||void 0===s?void 0:s.user)||(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(gK){r=n,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(gK)))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return og(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(gK){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Lg(e)}catch(gK){if("auth/network-request-failed"!==(null===gK||void 0===gK?void 0:gK.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"===typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(Tp(this.app))return Promise.reject(ng(this));const t=e?gf(e):null;return t&&og(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._deleted)return e&&og(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return Tp(this.app)?Promise.reject(ng(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return Tp(this.app)?Promise.reject(ng(this)):this.queue((async()=>{await this.assertedPersistence.setPersistence(Vg(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e){return vg(e,"GET","/v2/passwordPolicy",yg(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}(this),t=new sm(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new sf("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged((()=>{n(),e()}),t)}}))}async revokeAccessToken(e){if(this.currentUser){const t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await async function(e,t){return vg(e,"POST","/v2/accounts:revokeToken",yg(e,t))}(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&Vg(e)||this._popupRedirectResolver;og(t,this,"argument-error"),this.redirectPersistenceManager=await Gg.create(this,[Vg(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"===typeof t?t:t.next.bind(t);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(og(s,this,"internal-error"),s.then((()=>{o||i(this.currentUser)})),"function"===typeof t){const i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{const n=e.addObserver(t);return()=>{o=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return og(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=im(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null===t||void 0===t?void 0:t.error)&&function(e){if(Jp.logLevel<=Af.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Jp.warn(`Auth (${Op}): ${e}`,...n)}}(`Error while retrieving App Check token: ${t.error}`),null===t||void 0===t?void 0:t.token}}function lm(e){return gf(e)}class cm{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const n=new ff(e,t);return n.subscribe.bind(n)}((e=>this.observer=e))}get next(){return og(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let um={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function dm(e){return um.loadJS(e)}function hm(e){return`__${e}${Math.floor(1e6*Math.random())}`}class fm{constructor(e){this.type="recaptcha-enterprise",this.auth=lm(e)}async verify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"verify",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(t,n,r){const i=window.grecaptcha;kg(i)?i.enterprise.ready((()=>{i.enterprise.execute(t,{action:e}).then((e=>{n(e)})).catch((()=>{n("NO_RECAPTCHA")}))})):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise(((e,r)=>{(async function(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise((async(t,n)=>{_g(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then((r=>{if(void 0!==r.recaptchaKey){const n=new Cg(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}n(new Error("recaptcha Enterprise site key undefined"))})).catch((e=>{n(e)}))}))})(this.auth).then((i=>{if(!t&&kg(window.grecaptcha))n(i,e,r);else{if("undefined"===typeof window)return void r(new Error("RecaptchaVerifier is only supported in browser"));let t=um.recaptchaEnterpriseScript;0!==t.length&&(t+=i),dm(t).then((()=>{n(i,e,r)})).catch((e=>{r(e)}))}})).catch((e=>{r(e)}))}))}}async function pm(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new fm(e);let o;try{o=await i.verify(n)}catch(a){o=await i.verify(n,!0)}const s=Object.assign({},t);return r?Object.assign(s,{captchaResp:o}):Object.assign(s,{captchaResponse:o}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function gm(e,t,n,r){var i;if(null===(i=e._getRecaptchaConfig())||void 0===i?void 0:i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await pm(e,t,n,"getOobCode"===n);return r(e,i)}return r(e,t).catch((async i=>{if("auth/missing-recaptcha-token"===i.code){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const i=await pm(e,t,n,"getOobCode"===n);return r(e,i)}return Promise.reject(i)}))}function mm(e,t,n){const r=lm(e);og(r._canInitEmulator,r,"emulator-config-failed"),og(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(null===n||void 0===n?void 0:n.disableWarnings),o=ym(t),{host:s,port:a}=function(e){const t=ym(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:vm(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:vm(t)}}}(t),l=null===a?"":`:${a}`;r.config.emulator={url:`${o}//${s}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function ym(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function vm(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class bm{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return sg("not implemented")}_getIdTokenResponse(e){return sg("not implemented")}_linkToIdToken(e,t){return sg("not implemented")}_getReauthenticationResolver(e){return sg("not implemented")}}async function wm(e,t){return vg(e,"POST","/v1/accounts:signUp",t)}async function xm(e,t){return wg(e,"POST","/v1/accounts:signInWithPassword",yg(e,t))}class Am extends bm{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new Am(e,t,"password")}static _fromEmailAndCode(e,t){return new Am(e,t,"emailLink",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e;if((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return gm(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",xm);case"emailLink":return async function(e,t){return wg(e,"POST","/v1/accounts:signInWithEmailLink",yg(e,t))}(e,{email:this._email,oobCode:this._password});default:Zp(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return gm(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",wm);case"emailLink":return async function(e,t){return wg(e,"POST","/v1/accounts:signInWithEmailLink",yg(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:Zp(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function Em(e,t){return wg(e,"POST","/v1/accounts:signInWithIdp",yg(e,t))}class Sm extends bm{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Sm(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):Zp("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=qp(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new Sm(n,r);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return Em(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,Em(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Em(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=uf(t)}return e}}const km={USER_NOT_FOUND:"user-not-found"};class Cm extends bm{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Cm({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Cm({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return wg(e,"POST","/v1/accounts:signInWithPhoneNumber",yg(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await wg(e,"POST","/v1/accounts:signInWithPhoneNumber",yg(e,t));if(n.temporaryProof)throw Sg(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return wg(e,"POST","/v1/accounts:signInWithPhoneNumber",yg(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),km)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"===typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new Cm({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class _m{constructor(e){var t,n,r,i,o,s;const a=df(hf(e)),l=null!==(t=a.apiKey)&&void 0!==t?t:null,c=null!==(n=a.oobCode)&&void 0!==n?n:null,u=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=a.mode)&&void 0!==r?r:null);og(l&&c&&u,"argument-error"),this.apiKey=l,this.operation=u,this.code=c,this.continueUrl=null!==(i=a.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(o=a.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(s=a.tenantId)&&void 0!==s?s:null}static parseLink(e){const t=function(e){const t=df(hf(e)).link,n=t?df(hf(t)).deep_link_id:null,r=df(hf(e)).deep_link_id;return(r?df(hf(r)).link:null)||r||n||t||e}(e);try{return new _m(t)}catch(n){return null}}}class Tm{constructor(){this.providerId=Tm.PROVIDER_ID}static credential(e,t){return Am._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=_m.parseLink(t);return og(n,"argument-error"),Am._fromEmailAndCode(e,n.code,n.tenantId)}}Tm.PROVIDER_ID="password",Tm.EMAIL_PASSWORD_SIGN_IN_METHOD="password",Tm.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class Pm{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class Im extends Pm{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Om extends Im{constructor(){super("facebook.com")}static credential(e){return Sm._fromParams({providerId:Om.PROVIDER_ID,signInMethod:Om.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Om.credentialFromTaggedObject(e)}static credentialFromError(e){return Om.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Om.credential(t.oauthAccessToken)}catch(n){return null}}}Om.FACEBOOK_SIGN_IN_METHOD="facebook.com",Om.PROVIDER_ID="facebook.com";class Rm extends Im{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Sm._fromParams({providerId:Rm.PROVIDER_ID,signInMethod:Rm.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Rm.credentialFromTaggedObject(e)}static credentialFromError(e){return Rm.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return Rm.credential(n,r)}catch(i){return null}}}Rm.GOOGLE_SIGN_IN_METHOD="google.com",Rm.PROVIDER_ID="google.com";class Nm extends Im{constructor(){super("github.com")}static credential(e){return Sm._fromParams({providerId:Nm.PROVIDER_ID,signInMethod:Nm.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Nm.credentialFromTaggedObject(e)}static credentialFromError(e){return Nm.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Nm.credential(t.oauthAccessToken)}catch(n){return null}}}Nm.GITHUB_SIGN_IN_METHOD="github.com",Nm.PROVIDER_ID="github.com";class Mm extends Im{constructor(){super("twitter.com")}static credential(e,t){return Sm._fromParams({providerId:Mm.PROVIDER_ID,signInMethod:Mm.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Mm.credentialFromTaggedObject(e)}static credentialFromError(e){return Mm.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return Mm.credential(n,r)}catch(i){return null}}}async function Dm(e,t){return wg(e,"POST","/v1/accounts:signUp",yg(e,t))}Mm.TWITTER_SIGN_IN_METHOD="twitter.com",Mm.PROVIDER_ID="twitter.com";class Lm{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=await Ug._fromIdTokenResponse(e,n,r),o=Bm(n);return new Lm({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=Bm(n);return new Lm({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function Bm(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class Fm extends of{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,Fm.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new Fm(e,t,n,r)}}function jm(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw Fm._fromErrorAndOperation(e,n,t,r);throw n}))}async function Um(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await Ng(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Lm._forOperation(e,"link",r)}async function zm(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{auth:r}=e;if(Tp(r.app))return Promise.reject(ng(r));const i="reauthenticate";try{const o=await Ng(e,jm(r,i,t,e),n);og(o.idToken,r,"internal-error");const s=Og(o.idToken);og(s,r,"internal-error");const{sub:a}=s;return og(e.uid===a,r,"user-mismatch"),Lm._forOperation(e,i,o)}catch(gK){throw"auth/user-not-found"===(null===gK||void 0===gK?void 0:gK.code)&&Zp(r,"user-mismatch"),gK}}async function Vm(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Tp(e.app))return Promise.reject(ng(e));const r="signIn",i=await jm(e,r,t),o=await Lm._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}async function Hm(e,t){return Vm(lm(e),t)}async function $m(e){const t=lm(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}new WeakMap;const Wm="__sak";class Gm{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Wm,"1"),this.storage.removeItem(Wm),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class qm extends Gm{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=rm(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;t?this.detachListener():this.stopPolling();const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);nm()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}qm.type="LOCAL";const Km=qm;class Qm extends Gm{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Qm.type="SESSION";const Xm=Qm;class Jm{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new Jm(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(!(null===o||void 0===o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const s=Array.from(o).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(s);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function Ym(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}Jm.receivers=[];class Zm{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;const r="undefined"!==typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,o;return new Promise(((s,a)=>{const l=Ym("",20);r.port1.start();const c=setTimeout((()=>{a(new Error("unsupported_event"))}),n);o={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===l)switch(t.data.status){case"ack":clearTimeout(c),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),s(t.data.response);break;default:clearTimeout(c),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[r.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}function ey(){return window}function ty(){return"undefined"!==typeof ey().WorkerGlobalScope&&"function"===typeof ey().importScripts}const ny="firebaseLocalStorageDb",ry="firebaseLocalStorage",iy="fbase_key";class oy{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function sy(e,t){return e.transaction([ry],t?"readwrite":"readonly").objectStore(ry)}function ay(){const e=indexedDB.open(ny,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(ry,{keyPath:iy})}catch(gK){n(gK)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(ry)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(ny);return new oy(e).toPromise()}(),t(await ay()))}))}))}async function ly(e,t,n){const r=sy(e,!0).put({[iy]:t,value:n});return new oy(r).toPromise()}function cy(e,t){const n=sy(e,!0).delete(t);return new oy(n).toPromise()}class uy{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await ay()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(gK){if(t++>3)throw gK;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ty()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Jm._getInstance(ty()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Zm(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&function(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}()===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await ay();return await ly(e,Wm,"1"),await cy(e,Wm),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((n=>ly(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=sy(e,!1).get(t),r=await new oy(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>cy(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=sy(e,!1).getAll();return new oy(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}uy.type="LOCAL";const dy=uy;hm("rcb"),new hg(3e4,6e4);const hy="recaptcha";async function fy(e,t,n){var r;const i=await n.verify();try{let o;if(og("string"===typeof i,e,"argument-error"),og(n.type===hy,e,"argument-error"),o="string"===typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o){og("enroll"===t.type,e,"internal-error");const n=await function(e,t){return vg(e,"POST","/v2/accounts/mfaEnrollment:start",yg(e,t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}});return n.phoneSessionInfo.sessionInfo}{og("signin"===t.type,e,"internal-error");const n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;og(n,e,"missing-multi-factor-info");const s=await function(e,t){return vg(e,"POST","/v2/accounts/mfaSignIn:start",yg(e,t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:i}});return s.phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return vg(e,"POST","/v1/accounts:sendVerificationCode",yg(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{n._reset()}}class py{constructor(e){this.providerId=py.PROVIDER_ID,this.auth=lm(e)}verifyPhoneNumber(e,t){return fy(this.auth,e,gf(t))}static credential(e,t){return Cm._fromVerification(e,t)}static credentialFromResult(e){const t=e;return py.credentialFromTaggedObject(t)}static credentialFromError(e){return py.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{phoneNumber:n,temporaryProof:r}=t;return n&&r?Cm._fromTokenResponse(n,r):null}}function gy(e,t){return t?Vg(t):(og(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}py.PROVIDER_ID="phone",py.PHONE_SIGN_IN_METHOD="phone";class my extends bm{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Em(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Em(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Em(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function yy(e){return Vm(e.auth,new my(e),e.bypassAuthState)}function vy(e){const{auth:t,user:n}=e;return og(n,t,"internal-error"),zm(n,new my(e),e.bypassAuthState)}async function by(e){const{auth:t,user:n}=e;return og(n,t,"internal-error"),Um(n,new my(e),e.bypassAuthState)}class wy{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(gK){this.reject(gK)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o)return void this.reject(o);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(a))}catch(gK){this.reject(gK)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return yy;case"linkViaPopup":case"linkViaRedirect":return by;case"reauthViaPopup":case"reauthViaRedirect":return vy;default:Zp(this.auth,"internal-error")}}resolve(e){ag(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){ag(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const xy=new hg(2e3,1e4);class Ay extends wy{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,Ay.currentPopupAction&&Ay.currentPopupAction.cancel(),Ay.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return og(e,this.auth,"internal-error"),e}async onExecution(){ag(1===this.filter.length,"Popup operations only handle one event");const e=Ym();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(eg(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(eg(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Ay.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(eg(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,xy.get())};e()}}Ay.currentPopupAction=null;const Ey="pendingRedirect",Sy=new Map;class ky extends wy{constructor(e,t){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,arguments.length>2&&void 0!==arguments[2]&&arguments[2]),this.eventId=null}async execute(){let e=Sy.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=Ty(t),r=_y(e);if(!await r._isAvailable())return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth),n=t?await super.execute():null;e=()=>Promise.resolve(n)}catch(gK){e=()=>Promise.reject(gK)}Sy.set(this.auth._key(),e)}return this.bypassAuthState||Sy.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Cy(e,t){Sy.set(e._key(),t)}function _y(e){return Vg(e._redirectPersistence)}function Ty(e){return Wg(Ey,e.config.apiKey,e.name)}async function Py(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Tp(e.app))return Promise.reject(ng(e));const r=lm(e),i=gy(r,t),o=new ky(r,i,n),s=await o.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}class Iy{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Ry(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!Ry(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(eg(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(Oy(e))}saveEventToCache(e){this.cachedEventUids.add(Oy(e)),this.lastProcessedEventTime=Date.now()}}function Oy(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function Ry(e){let{type:t,error:n}=e;return"unknown"===t&&"auth/no-auth-event"===(null===n||void 0===n?void 0:n.code)}const Ny=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,My=/^https?/;async function Dy(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e){return vg(e,"GET","/v1/projects",arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e);for(const r of t)try{if(Ly(r))return}catch(n){}Zp(e,"unauthorized-domain")}function Ly(e){const t=lg(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!My.test(n))return!1;if(Ny.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}const By=new hg(3e4,6e4);function Fy(){const e=ey().___jsl;if(null===e||void 0===e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}function jy(e){return new Promise(((t,n)=>{var r,i,o;function s(){Fy(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Fy(),n(eg(e,"network-request-failed"))},timeout:By.get()})}if(null===(i=null===(r=ey().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=ey().gapi)||void 0===o?void 0:o.load)){const t=hm("iframefcb");return ey()[t]=()=>{gapi.load?s():n(eg(e,"network-request-failed"))},dm(`${um.gapiScript}?onload=${t}`).catch((e=>n(e)))}s()}})).catch((e=>{throw Uy=null,e}))}let Uy=null;const zy=new hg(5e3,15e3),Vy="__/auth/iframe",Hy="emulator/auth/iframe",$y={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Wy=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Gy(e){const t=e.config;og(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?fg(t,Hy):`https://${e.config.authDomain}/${Vy}`,r={apiKey:t.apiKey,appName:e.name,v:Op},i=Wy.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${uf(r).slice(1)}`}async function qy(e){const t=await function(e){return Uy=Uy||jy(e),Uy}(e),n=ey().gapi;return og(n,e,"internal-error"),t.open({where:document.body,url:Gy(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:$y,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=eg(e,"network-request-failed"),o=ey().setTimeout((()=>{r(i)}),zy.get());function s(){ey().clearTimeout(o),n(t)}t.ping(s).then(s,(()=>{r(i)}))}))))}const Ky={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Qy{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(gK){}}}function Xy(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600;const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},Ky),{width:r.toString(),height:i.toString(),top:o,left:s}),c=tf().toLowerCase();n&&(a=Xg(c)?"_blank":n),Kg(c)&&(t=t||"http://localhost",l.scrollbars="yes");const u=Object.entries(l).reduce(((e,t)=>{let[n,r]=t;return`${e}${n}=${r},`}),"");if(function(){var e;return tm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:tf())&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}(c)&&"_self"!==a)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",a),new Qy(null);const d=window.open(t||"",a,u);og(d,e,"popup-blocked");try{d.focus()}catch(gK){}return new Qy(d)}const Jy="__/auth/handler",Yy="emulator/auth/handler",Zy=encodeURIComponent("fac");async function ev(e,t,n,r,i,o){og(e.config.authDomain,e,"auth-domain-config-required"),og(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Op,eventId:i};if(t instanceof Pm){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))s[e]=t}if(t instanceof Im){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(s.scopes=e.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const u of Object.keys(a))void 0===a[u]&&delete a[u];const l=await e._getAppCheckToken(),c=l?`#${Zy}=${encodeURIComponent(l)}`:"";return`${function(e){let{config:t}=e;if(!t.emulator)return`https://${t.authDomain}/${Jy}`;return fg(t,Yy)}(e)}?${uf(a).slice(1)}${c}`}const tv="webStorageSupport";const nv=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Xm,this._completeRedirectFn=Py,this._overrideRedirectResult=Cy}async _openPopup(e,t,n,r){var i;ag(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Xy(e,await ev(e,t,n,lg(),r),Ym())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){ey().location.href=e}(await ev(e,t,n,lg(),r)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(ag(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const t=await qy(e),n=new Iy(e);return t.register("authEvent",(t=>{og(null===t||void 0===t?void 0:t.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(tv,{type:tv},(n=>{var r;const i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r[tv];void 0!==i&&t(!!i),Zp(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Dy(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return rm()||Qg()||tm()}};var rv="@firebase/auth",iv="1.7.7";class ov{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null===t||void 0===t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){og(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const sv=Zh("authIdTokenMaxAge")||300;let av=null;var lv,cv;lv={loadJS:e=>new Promise(((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=eg("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)})),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},um=lv,cv="Browser",Cp(new mf("auth",((e,t)=>{let{options:n}=t;const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;og(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:s,authDomain:a,clientPlatform:cv,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:im(cv)},c=new am(r,i,o,l);return function(e,t){const n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Vg);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(c,n),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),Cp(new mf("auth-internal",(e=>(e=>new ov(e))(lm(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),Mp(rv,iv,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(cv)),Mp(rv,iv,"esm2017");Mp("firebase","10.13.0","app");var uv,dv,hv="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},fv={};(function(){var e;function t(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function n(e,t,n){n||(n=0);var r=Array(16);if("string"===typeof t)for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];var o=e.g[3],s=t+(o^n&(i^o))+r[0]+3614090360&4294967295;s=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=n+(s<<7&4294967295|s>>>25))+((s=o+(i^t&(n^i))+r[1]+3905402710&4294967295)<<12&4294967295|s>>>20))+((s=i+(n^o&(t^n))+r[2]+606105819&4294967295)<<17&4294967295|s>>>15))+((s=n+(t^i&(o^t))+r[3]+3250441966&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^n&(i^o))+r[4]+4118548399&4294967295)<<7&4294967295|s>>>25))+((s=o+(i^t&(n^i))+r[5]+1200080426&4294967295)<<12&4294967295|s>>>20))+((s=i+(n^o&(t^n))+r[6]+2821735955&4294967295)<<17&4294967295|s>>>15))+((s=n+(t^i&(o^t))+r[7]+4249261313&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^n&(i^o))+r[8]+1770035416&4294967295)<<7&4294967295|s>>>25))+((s=o+(i^t&(n^i))+r[9]+2336552879&4294967295)<<12&4294967295|s>>>20))+((s=i+(n^o&(t^n))+r[10]+4294925233&4294967295)<<17&4294967295|s>>>15))+((s=n+(t^i&(o^t))+r[11]+2304563134&4294967295)<<22&4294967295|s>>>10))+((s=t+(o^n&(i^o))+r[12]+1804603682&4294967295)<<7&4294967295|s>>>25))+((s=o+(i^t&(n^i))+r[13]+4254626195&4294967295)<<12&4294967295|s>>>20))+((s=i+(n^o&(t^n))+r[14]+2792965006&4294967295)<<17&4294967295|s>>>15))+((s=n+(t^i&(o^t))+r[15]+1236535329&4294967295)<<22&4294967295|s>>>10))+((s=t+(i^o&(n^i))+r[1]+4129170786&4294967295)<<5&4294967295|s>>>27))+((s=o+(n^i&(t^n))+r[6]+3225465664&4294967295)<<9&4294967295|s>>>23))+((s=i+(t^n&(o^t))+r[11]+643717713&4294967295)<<14&4294967295|s>>>18))+((s=n+(o^t&(i^o))+r[0]+3921069994&4294967295)<<20&4294967295|s>>>12))+((s=t+(i^o&(n^i))+r[5]+3593408605&4294967295)<<5&4294967295|s>>>27))+((s=o+(n^i&(t^n))+r[10]+38016083&4294967295)<<9&4294967295|s>>>23))+((s=i+(t^n&(o^t))+r[15]+3634488961&4294967295)<<14&4294967295|s>>>18))+((s=n+(o^t&(i^o))+r[4]+3889429448&4294967295)<<20&4294967295|s>>>12))+((s=t+(i^o&(n^i))+r[9]+568446438&4294967295)<<5&4294967295|s>>>27))+((s=o+(n^i&(t^n))+r[14]+3275163606&4294967295)<<9&4294967295|s>>>23))+((s=i+(t^n&(o^t))+r[3]+4107603335&4294967295)<<14&4294967295|s>>>18))+((s=n+(o^t&(i^o))+r[8]+1163531501&4294967295)<<20&4294967295|s>>>12))+((s=t+(i^o&(n^i))+r[13]+2850285829&4294967295)<<5&4294967295|s>>>27))+((s=o+(n^i&(t^n))+r[2]+4243563512&4294967295)<<9&4294967295|s>>>23))+((s=i+(t^n&(o^t))+r[7]+1735328473&4294967295)<<14&4294967295|s>>>18))+((s=n+(o^t&(i^o))+r[12]+2368359562&4294967295)<<20&4294967295|s>>>12))+((s=t+(n^i^o)+r[5]+4294588738&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^n^i)+r[8]+2272392833&4294967295)<<11&4294967295|s>>>21))+((s=i+(o^t^n)+r[11]+1839030562&4294967295)<<16&4294967295|s>>>16))+((s=n+(i^o^t)+r[14]+4259657740&4294967295)<<23&4294967295|s>>>9))+((s=t+(n^i^o)+r[1]+2763975236&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^n^i)+r[4]+1272893353&4294967295)<<11&4294967295|s>>>21))+((s=i+(o^t^n)+r[7]+4139469664&4294967295)<<16&4294967295|s>>>16))+((s=n+(i^o^t)+r[10]+3200236656&4294967295)<<23&4294967295|s>>>9))+((s=t+(n^i^o)+r[13]+681279174&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^n^i)+r[0]+3936430074&4294967295)<<11&4294967295|s>>>21))+((s=i+(o^t^n)+r[3]+3572445317&4294967295)<<16&4294967295|s>>>16))+((s=n+(i^o^t)+r[6]+76029189&4294967295)<<23&4294967295|s>>>9))+((s=t+(n^i^o)+r[9]+3654602809&4294967295)<<4&4294967295|s>>>28))+((s=o+(t^n^i)+r[12]+3873151461&4294967295)<<11&4294967295|s>>>21))+((s=i+(o^t^n)+r[15]+530742520&4294967295)<<16&4294967295|s>>>16))+((s=n+(i^o^t)+r[2]+3299628645&4294967295)<<23&4294967295|s>>>9))+((s=t+(i^(n|~o))+r[0]+4096336452&4294967295)<<6&4294967295|s>>>26))+((s=o+(n^(t|~i))+r[7]+1126891415&4294967295)<<10&4294967295|s>>>22))+((s=i+(t^(o|~n))+r[14]+2878612391&4294967295)<<15&4294967295|s>>>17))+((s=n+(o^(i|~t))+r[5]+4237533241&4294967295)<<21&4294967295|s>>>11))+((s=t+(i^(n|~o))+r[12]+1700485571&4294967295)<<6&4294967295|s>>>26))+((s=o+(n^(t|~i))+r[3]+2399980690&4294967295)<<10&4294967295|s>>>22))+((s=i+(t^(o|~n))+r[10]+4293915773&4294967295)<<15&4294967295|s>>>17))+((s=n+(o^(i|~t))+r[1]+2240044497&4294967295)<<21&4294967295|s>>>11))+((s=t+(i^(n|~o))+r[8]+1873313359&4294967295)<<6&4294967295|s>>>26))+((s=o+(n^(t|~i))+r[15]+4264355552&4294967295)<<10&4294967295|s>>>22))+((s=i+(t^(o|~n))+r[6]+2734768916&4294967295)<<15&4294967295|s>>>17))+((s=n+(o^(i|~t))+r[13]+1309151649&4294967295)<<21&4294967295|s>>>11))+((o=(t=n+((s=t+(i^(n|~o))+r[4]+4149444226&4294967295)<<6&4294967295|s>>>26))+((s=o+(n^(t|~i))+r[11]+3174756917&4294967295)<<10&4294967295|s>>>22))^((i=o+((s=i+(t^(o|~n))+r[2]+718787259&4294967295)<<15&4294967295|s>>>17))|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(s<<21&4294967295|s>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+o&4294967295}function r(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var o=0|e[i];r&&o==t||(n[i]=o,r=!1)}this.g=n}!function(e,t){function n(){}n.prototype=t.prototype,e.D=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.C=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}(t,(function(){this.blockSize=-1})),t.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0},t.prototype.u=function(e,t){void 0===t&&(t=e.length);for(var r=t-this.blockSize,i=this.B,o=this.h,s=0;s<t;){if(0==o)for(;s<=r;)n(this,e,s),s+=this.blockSize;if("string"===typeof e){for(;s<t;)if(i[o++]=e.charCodeAt(s++),o==this.blockSize){n(this,i),o=0;break}}else for(;s<t;)if(i[o++]=e[s++],o==this.blockSize){n(this,i),o=0;break}}this.h=o,this.o+=t},t.prototype.v=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.o;for(t=e.length-8;t<e.length;++t)e[t]=255&n,n/=256;for(this.u(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};var i={};function o(e){return-128<=e&&128>e?function(e,t){var n=i;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(e){return new r([0|e],0>e?-1:0)})):new r([0|e],0>e?-1:0)}function s(e){if(isNaN(e)||!isFinite(e))return a;if(0>e)return h(s(-e));for(var t=[],n=1,i=0;e>=n;i++)t[i]=e/n|0,n*=4294967296;return new r(t,0)}var a=o(0),l=o(1),c=o(16777216);function u(e){if(0!=e.h)return!1;for(var t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function d(e){return-1==e.h}function h(e){for(var t=e.g.length,n=[],i=0;i<t;i++)n[i]=~e.g[i];return new r(n,~e.h).add(l)}function f(e,t){return e.add(h(t))}function p(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function g(e,t){this.g=e,this.h=t}function m(e,t){if(u(t))throw Error("division by zero");if(u(e))return new g(a,a);if(d(e))return t=m(h(e),t),new g(h(t.g),h(t.h));if(d(t))return t=m(e,h(t)),new g(h(t.g),t.h);if(30<e.g.length){if(d(e)||d(t))throw Error("slowDivide_ only works with positive integers.");for(var n=l,r=t;0>=r.l(e);)n=y(n),r=y(r);var i=v(n,1),o=v(r,1);for(r=v(r,2),n=v(n,2);!u(r);){var c=o.add(r);0>=c.l(e)&&(i=i.add(n),o=c),r=v(r,1),n=v(n,1)}return t=f(e,i.j(t)),new g(i,t)}for(i=a;0<=e.l(t);){for(n=Math.max(1,Math.floor(e.m()/t.m())),r=48>=(r=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,r-48),c=(o=s(n)).j(t);d(c)||0<c.l(e);)c=(o=s(n-=r)).j(t);u(o)&&(o=l),i=i.add(o),e=f(e,c)}return new g(i,e)}function y(e){for(var t=e.g.length+1,n=[],i=0;i<t;i++)n[i]=e.i(i)<<1|e.i(i-1)>>>31;return new r(n,e.h)}function v(e,t){var n=t>>5;t%=32;for(var i=e.g.length-n,o=[],s=0;s<i;s++)o[s]=0<t?e.i(s+n)>>>t|e.i(s+n+1)<<32-t:e.i(s+n);return new r(o,e.h)}(e=r.prototype).m=function(){if(d(this))return-h(this).m();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.i(n);e+=(0<=r?r:4294967296+r)*t,t*=4294967296}return e},e.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(u(this))return"0";if(d(this))return"-"+h(this).toString(e);for(var t=s(Math.pow(e,6)),n=this,r="";;){var i=m(n,t).g,o=((0<(n=f(n,i.j(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(u(n=i))return o+r;for(;6>o.length;)o="0"+o;r=o+r}},e.i=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},e.l=function(e){return d(e=f(this,e))?-1:u(e)?0:1},e.abs=function(){return d(this)?h(this):this},e.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0,o=0;o<=t;o++){var s=i+(65535&this.i(o))+(65535&e.i(o)),a=(s>>>16)+(this.i(o)>>>16)+(e.i(o)>>>16);i=a>>>16,s&=65535,a&=65535,n[o]=a<<16|s}return new r(n,-2147483648&n[n.length-1]?-1:0)},e.j=function(e){if(u(this)||u(e))return a;if(d(this))return d(e)?h(this).j(h(e)):h(h(this).j(e));if(d(e))return h(this.j(h(e)));if(0>this.l(c)&&0>e.l(c))return s(this.m()*e.m());for(var t=this.g.length+e.g.length,n=[],i=0;i<2*t;i++)n[i]=0;for(i=0;i<this.g.length;i++)for(var o=0;o<e.g.length;o++){var l=this.i(i)>>>16,f=65535&this.i(i),g=e.i(o)>>>16,m=65535&e.i(o);n[2*i+2*o]+=f*m,p(n,2*i+2*o),n[2*i+2*o+1]+=l*m,p(n,2*i+2*o+1),n[2*i+2*o+1]+=f*g,p(n,2*i+2*o+1),n[2*i+2*o+2]+=l*g,p(n,2*i+2*o+2)}for(i=0;i<t;i++)n[i]=n[2*i+1]<<16|n[2*i];for(i=t;i<2*t;i++)n[i]=0;return new r(n,0)},e.A=function(e){return m(this,e).h},e.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0;i<t;i++)n[i]=this.i(i)&e.i(i);return new r(n,this.h&e.h)},e.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0;i<t;i++)n[i]=this.i(i)|e.i(i);return new r(n,this.h|e.h)},e.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],i=0;i<t;i++)n[i]=this.i(i)^e.i(i);return new r(n,this.h^e.h)},t.prototype.digest=t.prototype.v,t.prototype.reset=t.prototype.s,t.prototype.update=t.prototype.u,dv=fv.Md5=t,r.prototype.add=r.prototype.add,r.prototype.multiply=r.prototype.j,r.prototype.modulo=r.prototype.A,r.prototype.compare=r.prototype.l,r.prototype.toNumber=r.prototype.m,r.prototype.toString=r.prototype.toString,r.prototype.getBits=r.prototype.i,r.fromNumber=s,r.fromString=function e(t,n){if(0==t.length)throw Error("number format error: empty string");if(2>(n=n||10)||36<n)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return h(e(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=s(Math.pow(n,8)),i=a,o=0;o<t.length;o+=8){var l=Math.min(8,t.length-o),c=parseInt(t.substring(o,o+l),n);8>l?(l=s(Math.pow(n,l)),i=i.j(l).add(s(c))):i=(i=i.j(r)).add(s(c))}return i},uv=fv.Integer=r}).apply("undefined"!==typeof hv?hv:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});var pv,gv,mv,yv,vv,bv,wv,xv,Av,Ev="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},Sv={};(function(){var e,t="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var n=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof Ev&&Ev];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);!function(e,r){if(r)e:{var i=n;e=e.split(".");for(var o=0;o<e.length-1;o++){var s=e[o];if(!(s in i))break e;i=i[s]}(r=r(o=i[e=e[e.length-1]]))!=o&&null!=r&&t(i,e,{configurable:!0,writable:!0,value:r})}}("Array.prototype.values",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}(this,(function(e,t){return t}))}}));var r=r||{},i=this||self;function o(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function s(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function a(e,t,n){return e.call.apply(e.bind,arguments)}function l(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function c(e,t,n){return(c=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?a:l).apply(null,arguments)}function u(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function d(e,t){function n(){}n.prototype=t.prototype,e.aa=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Qb=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}function h(e){const t=e.length;if(0<t){const n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function f(e,t){for(let n=1;n<arguments.length;n++){const t=arguments[n];if(o(t)){const n=e.length||0,r=t.length||0;e.length=n+r;for(let i=0;i<r;i++)e[n+i]=t[i]}else e.push(t)}}function p(e){return/^[\s\xa0]*$/.test(e)}function g(){var e=i.navigator;return e&&(e=e.userAgent)?e:""}function m(e){return m[" "](e),e}m[" "]=function(){};var y=-1!=g().indexOf("Gecko")&&!(-1!=g().toLowerCase().indexOf("webkit")&&-1==g().indexOf("Edge"))&&!(-1!=g().indexOf("Trident")||-1!=g().indexOf("MSIE"))&&-1==g().indexOf("Edge");function v(e,t,n){for(const r in e)t.call(n,e[r],r,e)}function b(e){const t={};for(const n in e)t[n]=e[n];return t}const w="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function x(e,t){let n,r;for(let i=1;i<arguments.length;i++){for(n in r=arguments[i],r)e[n]=r[n];for(let t=0;t<w.length;t++)n=w[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function A(e){var t=1;e=e.split(":");const n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function E(e){i.setTimeout((()=>{throw e}),0)}function S(){var e=P;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var k=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}((()=>new C),(e=>e.reset()));class C{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let _,T=!1,P=new class{constructor(){this.h=this.g=null}add(e,t){const n=k.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}},I=()=>{const e=i.Promise.resolve(void 0);_=()=>{e.then(O)}};var O=()=>{for(var e;e=S();){try{e.h.call(e.g)}catch(n){E(n)}var t=k;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}T=!1};function R(){this.s=this.s,this.C=this.C}function N(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}R.prototype.s=!1,R.prototype.ma=function(){this.s||(this.s=!0,this.N())},R.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},N.prototype.h=function(){this.defaultPrevented=!0};var M=function(){if(!i.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{const e=()=>{};i.addEventListener("test",e,t),i.removeEventListener("test",e,t)}catch(n){}return e}();function D(e,t){if(N.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(y){e:{try{m(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:L[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&D.aa.h.call(this)}}d(D,N);var L={2:"touch",3:"pen",4:"mouse"};D.prototype.h=function(){D.aa.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var B="closure_listenable_"+(1e6*Math.random()|0),F=0;function j(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++F,this.da=this.fa=!1}function U(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function z(e){this.src=e,this.g={},this.h=0}function V(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],o=Array.prototype.indexOf.call(i,t,void 0);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(U(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function H(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.da&&o.listener==t&&o.capture==!!n&&o.ha==r)return i}return-1}z.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.g[o])||(e=this.g[o]=[],this.h++);var s=H(e,t,r,i);return-1<s?(t=e[s],n||(t.fa=!1)):((t=new j(t,this.src,o,!!r,i)).fa=n,e.push(t)),t};var $="closure_lm_"+(1e6*Math.random()|0),W={};function G(e,t,n,r,i){if(r&&r.once)return K(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)G(e,t[o],n,r,i);return null}return n=te(n),e&&e[B]?e.K(t,n,s(r)?!!r.capture:!!r,i):q(e,t,n,!1,r,i)}function q(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=s(i)?!!i.capture:!!i,l=Z(e);if(l||(e[$]=l=new z(e)),(n=l.add(t,n,r,a,o)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}const t=Y;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)M||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(J(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function K(e,t,n,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;o++)K(e,t[o],n,r,i);return null}return n=te(n),e&&e[B]?e.L(t,n,s(r)?!!r.capture:!!r,i):q(e,t,n,!0,r,i)}function Q(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)Q(e,t[o],n,r,i);else r=s(r)?!!r.capture:!!r,n=te(n),e&&e[B]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=H(o=e.g[t],n,r,i))&&(U(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.g[t],e.h--)))):e&&(e=Z(e))&&(t=e.g[t.toString()],e=-1,t&&(e=H(t,n,r,i)),(n=-1<e?t[e]:null)&&X(n))}function X(e){if("number"!==typeof e&&e&&!e.da){var t=e.src;if(t&&t[B])V(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(J(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Z(t))?(V(n,e),0==n.h&&(n.src=null,t[$]=null)):U(e)}}}function J(e){return e in W?W[e]:W[e]="on"+e}function Y(e,t){if(e.da)e=!0;else{t=new D(t,this);var n=e.listener,r=e.ha||e.src;e.fa&&X(e),e=n.call(r,t)}return e}function Z(e){return(e=e[$])instanceof z?e:null}var ee="__closure_events_fn_"+(1e9*Math.random()>>>0);function te(e){return"function"===typeof e?e:(e[ee]||(e[ee]=function(t){return e.handleEvent(t)}),e[ee])}function ne(){R.call(this),this.i=new z(this),this.M=this,this.F=null}function re(e,t){var n,r=e.F;if(r)for(n=[];r;r=r.F)n.push(r);if(e=e.M,r=t.type||t,"string"===typeof t)t=new N(t,e);else if(t instanceof N)t.target=t.target||e;else{var i=t;x(t=new N(r,e),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var s=t.g=n[o];i=ie(s,r,!0,t)&&i}if(i=ie(s=t.g=e,r,!0,t)&&i,i=ie(s,r,!1,t)&&i,n)for(o=0;o<n.length;o++)i=ie(s=t.g=n[o],r,!1,t)&&i}function ie(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var s=t[o];if(s&&!s.da&&s.capture==n){var a=s.listener,l=s.ha||s.src;s.fa&&V(e.i,s),i=!1!==a.call(l,r)&&i}}return i&&!r.defaultPrevented}function oe(e,t,n){if("function"===typeof e)n&&(e=c(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=c(e.handleEvent,e)}return 2147483647<Number(t)?-1:i.setTimeout(e,t||0)}function se(e){e.g=oe((()=>{e.g=null,e.i&&(e.i=!1,se(e))}),e.l);const t=e.h;e.h=null,e.m.apply(null,t)}d(ne,R),ne.prototype[B]=!0,ne.prototype.removeEventListener=function(e,t,n,r){Q(this,e,t,n,r)},ne.prototype.N=function(){if(ne.aa.N.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)U(n[r]);delete t.g[e],t.h--}}this.F=null},ne.prototype.K=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},ne.prototype.L=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};class ae extends R{constructor(e,t){super(),this.m=e,this.l=t,this.h=null,this.i=!1,this.g=null}j(e){this.h=arguments,this.g?this.i=!0:se(this)}N(){super.N(),this.g&&(i.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function le(e){R.call(this),this.h=e,this.g={}}d(le,R);var ce=[];function ue(e){v(e.g,(function(e,t){this.g.hasOwnProperty(t)&&X(e)}),e),e.g={}}le.prototype.N=function(){le.aa.N.call(this),ue(this)},le.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var de=i.JSON.stringify,he=i.JSON.parse,fe=class{stringify(e){return i.JSON.stringify(e,void 0)}parse(e){return i.JSON.parse(e,void 0)}};function pe(){}function ge(e){return e.h||(e.h=e.i())}function me(){}pe.prototype.h=null;var ye={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function ve(){N.call(this,"d")}function be(){N.call(this,"c")}d(ve,N),d(be,N);var we={},xe=null;function Ae(){return xe=xe||new ne}function Ee(e){N.call(this,we.La,e)}function Se(e){const t=Ae();re(t,new Ee(t))}function ke(e,t){N.call(this,we.STAT_EVENT,e),this.stat=t}function Ce(e){const t=Ae();re(t,new ke(t,e))}function _e(e,t){N.call(this,we.Ma,e),this.size=t}function Te(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return i.setTimeout((function(){e()}),t)}function Pe(){this.g=!0}function Ie(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var s=1;s<i.length;s++)i[s]=""}}}return de(n)}catch(a){return t}}(e,n)+(r?" "+r:"")}))}we.La="serverreachability",d(Ee,N),we.STAT_EVENT="statevent",d(ke,N),we.Ma="timingevent",d(_e,N),Pe.prototype.xa=function(){this.g=!1},Pe.prototype.info=function(){};var Oe,Re={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Ne={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"};function Me(){}function De(e,t,n,r){this.j=e,this.i=t,this.l=n,this.R=r||1,this.U=new le(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new Le}function Le(){this.i=null,this.g="",this.h=!1}d(Me,pe),Me.prototype.g=function(){return new XMLHttpRequest},Me.prototype.i=function(){return{}},Oe=new Me;var Be={},Fe={};function je(e,t,n){e.L=1,e.v=dt(st(t)),e.m=n,e.P=!0,Ue(e,null)}function Ue(e,t){e.F=Date.now(),He(e),e.A=st(e.v);var n=e.A,r=e.R;Array.isArray(r)||(r=[String(r)]),kt(n.i,"t",r),e.C=0,n=e.j.J,e.h=new Le,e.g=fn(e.j,n?t:null,!e.m),0<e.O&&(e.M=new ae(c(e.Y,e,e.g),e.O)),t=e.U,n=e.g,r=e.ca;var i="readystatechange";Array.isArray(i)||(i&&(ce[0]=i.toString()),i=ce);for(var o=0;o<i.length;o++){var s=G(n,i[o],r||t.handleEvent,!1,t.h||t);if(!s)break;t.g[s.key]=s}t=e.H?b(e.H):{},e.m?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.m,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),Se(),function(e,t,n,r,i,o){e.info((function(){if(e.g)if(o)for(var s="",a=o.split("&"),l=0;l<a.length;l++){var c=a[l].split("=");if(1<c.length){var u=c[0];c=c[1];var d=u.split("_");s=2<=d.length&&"type"==d[1]?s+(u+"=")+c+"&":s+(u+"=redacted&")}}else s=null;else s=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+s}))}(e.i,e.u,e.A,e.l,e.R,e.m)}function ze(e){return!!e.g&&("GET"==e.u&&2!=e.L&&e.j.Ca)}function Ve(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Fe:(n=Number(t.substring(n,r)),isNaN(n)?Be:(r+=1)+n>t.length?Fe:(t=t.slice(r,r+n),e.C=r+n,t))}function He(e){e.S=Date.now()+e.I,$e(e,e.I)}function $e(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=Te(c(e.ba,e),t)}function We(e){e.B&&(i.clearTimeout(e.B),e.B=null)}function Ge(e){0==e.j.G||e.J||ln(e.j,e)}function qe(e){We(e);var t=e.M;t&&"function"==typeof t.ma&&t.ma(),e.M=null,ue(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.ma())}function Ke(e,t){try{var n=e.j;if(0!=n.G&&(n.g==e||Ze(n.h,e)))if(!e.K&&Ze(n.h,e)&&3==n.G){try{var r=n.Da.g.parse(t)}catch(u){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;an(n),Xt(n)}rn(n),Ce(18)}}else n.za=i[1],0<n.za-n.T&&37500>i[2]&&n.F&&0==n.v&&!n.C&&(n.C=Te(c(n.Za,n),6e3));if(1>=Ye(n.h)&&n.ca){try{n.ca()}catch(u){}n.ca=void 0}}else un(n,11)}else if((e.K||n.g==e)&&an(n),!p(t))for(i=n.Da.g.parse(t),t=0;t<i.length;t++){let c=i[t];if(n.T=c[0],c=c[1],2==n.G)if("c"==c[0]){n.K=c[1],n.ia=c[2];const t=c[3];null!=t&&(n.la=t,n.j.info("VER="+n.la));const i=c[4];null!=i&&(n.Aa=i,n.j.info("SVER="+n.Aa));const u=c[5];null!=u&&"number"===typeof u&&0<u&&(r=1.5*u,n.L=r,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;const d=e.g;if(d){const e=d.g?d.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var o=r.h;o.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(o.j=o.l,o.g=new Set,o.h&&(et(o,o.h),o.h=null))}if(r.D){const e=d.g?d.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(r.ya=e,ut(r.I,r.D,e))}}n.G=3,n.l&&n.l.ua(),n.ba&&(n.R=Date.now()-e.F,n.j.info("Handshake RTT: "+n.R+"ms"));var s=e;if((r=n).qa=hn(r,r.J?r.ia:null,r.W),s.K){tt(r.h,s);var a=s,l=r.L;l&&(a.I=l),a.B&&(We(a),He(a)),r.g=s}else nn(r);0<n.i.length&&Yt(n)}else"stop"!=c[0]&&"close"!=c[0]||un(n,7);else 3==n.G&&("stop"==c[0]||"close"==c[0]?"stop"==c[0]?un(n,7):Qt(n):"noop"!=c[0]&&n.l&&n.l.ta(c),n.v=0)}Se()}catch(u){}}De.prototype.ca=function(e){e=e.target;const t=this.M;t&&3==Wt(e)?t.j():this.Y(e)},De.prototype.Y=function(e){try{if(e==this.g)e:{const h=Wt(this.g);var t=this.g.Ba();this.g.Z();if(!(3>h)&&(3!=h||this.g&&(this.h.h||this.g.oa()||Gt(this.g)))){this.J||4!=h||7==t||Se(),We(this);var n=this.g.Z();this.X=n;t:if(ze(this)){var r=Gt(this.g);e="";var o=r.length,s=4==Wt(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){qe(this),Ge(this);var a="";break t}this.h.i=new i.TextDecoder}for(t=0;t<o;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:!(s&&t==o-1)});r.length=0,this.h.g+=e,this.C=0,a=this.h.g}else a=this.g.oa();if(this.o=200==n,function(e,t,n,r,i,o,s){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+o+" "+s}))}(this.i,this.u,this.A,this.l,this.R,h,n),this.o){if(this.T&&!this.K){t:{if(this.g){var l,c=this.g;if((l=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!p(l)){var u=l;break t}}u=null}if(!(n=u)){this.o=!1,this.s=3,Ce(12),qe(this),Ge(this);break e}Ie(this.i,this.l,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,Ke(this,n)}if(this.P){let e;for(n=!0;!this.J&&this.C<a.length;){if(e=Ve(this,a),e==Fe){4==h&&(this.s=4,Ce(14),n=!1),Ie(this.i,this.l,null,"[Incomplete Response]");break}if(e==Be){this.s=4,Ce(15),Ie(this.i,this.l,a,"[Invalid Chunk]"),n=!1;break}Ie(this.i,this.l,e,null),Ke(this,e)}if(ze(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=h||0!=a.length||this.h.h||(this.s=1,Ce(16),n=!1),this.o=this.o&&n,n){if(0<a.length&&!this.W){this.W=!0;var d=this.j;d.g==this&&d.ba&&!d.M&&(d.j.info("Great, no buffering proxy detected. Bytes received: "+a.length),on(d),d.M=!0,Ce(11))}}else Ie(this.i,this.l,a,"[Invalid Chunked Response]"),qe(this),Ge(this)}else Ie(this.i,this.l,a,null),Ke(this,a);4==h&&qe(this),this.o&&!this.J&&(4==h?ln(this.j,this):(this.o=!1,He(this)))}else(function(e){const t={};e=(e.g&&2<=Wt(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let r=0;r<e.length;r++){if(p(e[r]))continue;var n=A(e[r]);const i=n[0];if("string"!==typeof(n=n[1]))continue;n=n.trim();const o=t[i]||[];t[i]=o,o.push(n)}!function(e,t){for(const n in e)t.call(void 0,e[n],n,e)}(t,(function(e){return e.join(", ")}))})(this.g),400==n&&0<a.indexOf("Unknown SID")?(this.s=3,Ce(12)):(this.s=0,Ce(13)),qe(this),Ge(this)}}}catch(h){}},De.prototype.cancel=function(){this.J=!0,qe(this)},De.prototype.ba=function(){this.B=null;const e=Date.now();0<=e-this.S?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.i,this.A),2!=this.L&&(Se(),Ce(17)),qe(this),this.s=2,Ge(this)):$e(this,this.S-e)};var Qe=class{constructor(e,t){this.g=e,this.map=t}};function Xe(e){this.l=e||10,i.PerformanceNavigationTiming?e=0<(e=i.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(i.chrome&&i.chrome.loadTimes&&i.chrome.loadTimes()&&i.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function Je(e){return!!e.h||!!e.g&&e.g.size>=e.j}function Ye(e){return e.h?1:e.g?e.g.size:0}function Ze(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function et(e,t){e.g?e.g.add(t):e.h=t}function tt(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function nt(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){let t=e.i;for(const n of e.g.values())t=t.concat(n.D);return t}return h(e.i)}function rt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(o(e)||"string"===typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.na&&"function"==typeof e.na)return e.na();if(!e.V||"function"!=typeof e.V){if("undefined"!==typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!==typeof Set&&e instanceof Set)){if(o(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}t=[],n=0;for(const r in e)t[n++]=r;return t}}}(e),r=function(e){if(e.V&&"function"==typeof e.V)return e.V();if("undefined"!==typeof Map&&e instanceof Map||"undefined"!==typeof Set&&e instanceof Set)return Array.from(e.values());if("string"===typeof e)return e.split("");if(o(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length,s=0;s<i;s++)t.call(void 0,r[s],n&&n[s],e)}Xe.prototype.cancel=function(){if(this.i=nt(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const e of this.g.values())e.cancel();this.g.clear()}};var it=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function ot(e){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,e instanceof ot){this.h=e.h,at(this,e.j),this.o=e.o,this.g=e.g,lt(this,e.s),this.l=e.l;var t=e.i,n=new xt;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),ct(this,n),this.m=e.m}else e&&(t=String(e).match(it))?(this.h=!1,at(this,t[1]||"",!0),this.o=ht(t[2]||""),this.g=ht(t[3]||"",!0),lt(this,t[4]),this.l=ht(t[5]||"",!0),ct(this,t[6]||"",!0),this.m=ht(t[7]||"")):(this.h=!1,this.i=new xt(null,this.h))}function st(e){return new ot(e)}function at(e,t,n){e.j=n?ht(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function lt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.s=t}else e.s=null}function ct(e,t,n){t instanceof xt?(e.i=t,function(e,t){t&&!e.j&&(At(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Et(this,t),kt(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=ft(t,bt)),e.i=new xt(t,e.h))}function ut(e,t,n){e.i.set(t,n)}function dt(e){return ut(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function ht(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function ft(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,pt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function pt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}ot.prototype.toString=function(){var e=[],t=this.j;t&&e.push(ft(t,mt,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(ft(t,mt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.s)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(ft(n,"/"==n.charAt(0)?vt:yt,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.m)&&e.push("#",ft(n,wt)),e.join("")};var gt,mt=/[#\/\?@]/g,yt=/[#\?:]/g,vt=/[#\?]/g,bt=/[#\?@]/g,wt=/#/g;function xt(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function At(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Et(e,t){At(e),t=Ct(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function St(e,t){return At(e),t=Ct(e,t),e.g.has(t)}function kt(e,t,n){Et(e,t),0<n.length&&(e.i=null,e.g.set(Ct(e,t),h(n)),e.h+=n.length)}function Ct(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function _t(e,t,n,r,i){try{i&&(i.onload=null,i.onerror=null,i.onabort=null,i.ontimeout=null),r(n)}catch(o){}}function Tt(){this.g=new fe}function Pt(e,t,n){const r=n||"";try{rt(e,(function(e,n){let i=e;s(e)&&(i=de(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(gK){throw t.push(r+"type="+encodeURIComponent("_badmap")),gK}}function It(e){this.l=e.Ub||null,this.j=e.eb||!1}function Ot(e,t){ne.call(this),this.D=e,this.o=t,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}function Rt(e){e.j.read().then(e.Pa.bind(e)).catch(e.ga.bind(e))}function Nt(e){e.readyState=4,e.l=null,e.j=null,e.v=null,Mt(e)}function Mt(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function Dt(e){let t="";return v(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function Lt(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Dt(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):ut(e,t,n))}function Bt(e){ne.call(this),this.headers=new Map,this.o=e||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}(e=xt.prototype).add=function(e,t){At(this),this.i=null,e=Ct(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},e.forEach=function(e,t){At(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},e.na=function(){At(this);const e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){const i=e[r];for(let e=0;e<i.length;e++)n.push(t[r])}return n},e.V=function(e){At(this);let t=[];if("string"===typeof e)St(this,e)&&(t=t.concat(this.g.get(Ct(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t},e.set=function(e,t){return At(this),this.i=null,St(this,e=Ct(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},e.get=function(e,t){return e&&0<(e=this.V(e)).length?String(e[0]):t},e.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];const o=encodeURIComponent(String(r)),s=this.V(r);for(r=0;r<s.length;r++){var i=o;""!==s[r]&&(i+="="+encodeURIComponent(String(s[r]))),e.push(i)}}return this.i=e.join("&")},d(It,pe),It.prototype.g=function(){return new Ot(this.l,this.j)},It.prototype.i=(gt={},function(){return gt}),d(Ot,ne),(e=Ot.prototype).open=function(e,t){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.B=e,this.A=t,this.readyState=1,Mt(this)},e.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.u,method:this.B,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||i).fetch(new Request(this.A,t)).then(this.Sa.bind(this),this.ga.bind(this))},e.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch((()=>{})),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Nt(this)),this.readyState=0},e.Sa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Mt(this)),this.g&&(this.readyState=3,Mt(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if("undefined"!==typeof i.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;Rt(this)}else e.text().then(this.Ra.bind(this),this.ga.bind(this))},e.Pa=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array(0);(t=this.v.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?Nt(this):Mt(this),3==this.readyState&&Rt(this)}},e.Ra=function(e){this.g&&(this.response=this.responseText=e,Nt(this))},e.Qa=function(e){this.g&&(this.response=e,Nt(this))},e.ga=function(){this.g&&Nt(this)},e.setRequestHeader=function(e,t){this.u.append(e,t)},e.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(Ot.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),d(Bt,ne);var Ft=/^https?$/i,jt=["POST","PUT"];function Ut(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.m=5,zt(e),Ht(e)}function zt(e){e.A||(e.A=!0,re(e,"complete"),re(e,"error"))}function Vt(e){if(e.h&&"undefined"!=typeof r&&(!e.v[1]||4!=Wt(e)||2!=e.Z()))if(e.u&&4==Wt(e))oe(e.Ea,0,e);else if(re(e,"readystatechange"),4==Wt(e)){e.h=!1;try{const r=e.Z();e:switch(r){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var o;if(o=0===r){var s=String(e.D).match(it)[1]||null;!s&&i.self&&i.self.location&&(s=i.self.location.protocol.slice(0,-1)),o=!Ft.test(s?s.toLowerCase():"")}n=o}if(n)re(e,"complete"),re(e,"success");else{e.m=6;try{var a=2<Wt(e)?e.g.statusText:""}catch(l){a=""}e.l=a+" ["+e.Z()+"]",zt(e)}}finally{Ht(e)}}}function Ht(e,t){if(e.g){$t(e);const n=e.g,r=e.v[0]?()=>{}:null;e.g=null,e.v=null,t||re(e,"ready");try{n.onreadystatechange=r}catch(gK){}}}function $t(e){e.I&&(i.clearTimeout(e.I),e.I=null)}function Wt(e){return e.g?e.g.readyState:0}function Gt(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.H){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(_v){return null}}function qt(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Kt(e){this.Aa=0,this.i=[],this.j=new Pe,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=qt("failFast",!1,e),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=qt("baseRetryDelayMs",5e3,e),this.cb=qt("retryDelaySeedMs",1e4,e),this.Wa=qt("forwardChannelMaxRetries",2,e),this.wa=qt("forwardChannelRequestTimeoutMs",2e4,e),this.pa=e&&e.xmlHttpFactory||void 0,this.Xa=e&&e.Tb||void 0,this.Ca=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.h=new Xe(e&&e.concurrentRequestLimit),this.Da=new Tt,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=e&&e.Rb||!1,e&&e.xa&&this.j.xa(),e&&e.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&e&&e.detectBufferingProxy||!1,this.ja=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.ja=e.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}function Qt(e){if(Jt(e),3==e.G){var t=e.U++,n=st(e.I);if(ut(n,"SID",e.K),ut(n,"RID",t),ut(n,"TYPE","terminate"),en(e,n),(t=new De(e,e.j,t)).L=2,t.v=dt(st(n)),n=!1,i.navigator&&i.navigator.sendBeacon)try{n=i.navigator.sendBeacon(t.v.toString(),"")}catch(r){}!n&&i.Image&&((new Image).src=t.v,n=!0),n||(t.g=fn(t.j,null),t.g.ea(t.v)),t.F=Date.now(),He(t)}dn(e)}function Xt(e){e.g&&(on(e),e.g.cancel(),e.g=null)}function Jt(e){Xt(e),e.u&&(i.clearTimeout(e.u),e.u=null),an(e),e.h.cancel(),e.s&&("number"===typeof e.s&&i.clearTimeout(e.s),e.s=null)}function Yt(e){if(!Je(e.h)&&!e.s){e.s=!0;var t=e.Ga;_||I(),T||(_(),T=!0),P.add(t,e),e.B=0}}function Zt(e,t){var n;n=t?t.l:e.U++;const r=st(e.I);ut(r,"SID",e.K),ut(r,"RID",n),ut(r,"AID",e.T),en(e,r),e.m&&e.o&&Lt(r,e.m,e.o),n=new De(e,e.j,n,e.B+1),null===e.m&&(n.H=e.o),t&&(e.i=t.D.concat(e.i)),t=tn(e,n,1e3),n.I=Math.round(.5*e.wa)+Math.round(.5*e.wa*Math.random()),et(e.h,n),je(n,r,t)}function en(e,t){e.H&&v(e.H,(function(e,n){ut(t,n,e)})),e.l&&rt({},(function(e,n){ut(t,n,e)}))}function tn(e,t,n){n=Math.min(e.i.length,n);var r=e.l?c(e.l.Na,e.l,e):null;e:{var i=e.i;let t=-1;for(;;){const e=["count="+n];-1==t?0<n?(t=i[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let s=!0;for(let a=0;a<n;a++){let n=i[a].g;const l=i[a].map;if(n-=t,0>n)t=Math.max(0,i[a].g-100),s=!1;else try{Pt(l,e,"req"+n+"_")}catch(o){r&&r(l)}}if(s){r=e.join("&");break e}}}return e=e.i.splice(0,n),t.D=e,r}function nn(e){if(!e.g&&!e.u){e.Y=1;var t=e.Fa;_||I(),T||(_(),T=!0),P.add(t,e),e.v=0}}function rn(e){return!(e.g||e.u||3<=e.v)&&(e.Y++,e.u=Te(c(e.Fa,e),cn(e,e.v)),e.v++,!0)}function on(e){null!=e.A&&(i.clearTimeout(e.A),e.A=null)}function sn(e){e.g=new De(e,e.j,"rpc",e.Y),null===e.m&&(e.g.H=e.o),e.g.O=0;var t=st(e.qa);ut(t,"RID","rpc"),ut(t,"SID",e.K),ut(t,"AID",e.T),ut(t,"CI",e.F?"0":"1"),!e.F&&e.ja&&ut(t,"TO",e.ja),ut(t,"TYPE","xmlhttp"),en(e,t),e.m&&e.o&&Lt(t,e.m,e.o),e.L&&(e.g.I=e.L);var n=e.g;e=e.ia,n.L=1,n.v=dt(st(t)),n.m=null,n.P=!0,Ue(n,e)}function an(e){null!=e.C&&(i.clearTimeout(e.C),e.C=null)}function ln(e,t){var n=null;if(e.g==t){an(e),on(e),e.g=null;var r=2}else{if(!Ze(e.h,t))return;n=t.D,tt(e.h,t),r=1}if(0!=e.G)if(t.o)if(1==r){n=t.m?t.m.length:0,t=Date.now()-t.F;var i=e.B;re(r=Ae(),new _e(r,n)),Yt(e)}else nn(e);else if(3==(i=t.s)||0==i&&0<t.X||!(1==r&&function(e,t){return!(Ye(e.h)>=e.h.j-(e.s?1:0))&&(e.s?(e.i=t.D.concat(e.i),!0):!(1==e.G||2==e.G||e.B>=(e.Va?0:e.Wa))&&(e.s=Te(c(e.Ga,e,t),cn(e,e.B)),e.B++,!0))}(e,t)||2==r&&rn(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:un(e,5);break;case 4:un(e,10);break;case 3:un(e,6);break;default:un(e,2)}}function cn(e,t){let n=e.Ta+Math.floor(Math.random()*e.cb);return e.isActive()||(n*=2),n*t}function un(e,t){if(e.j.info("Error code "+t),2==t){var n=c(e.fb,e),r=e.Xa;const t=!r;r=new ot(r||"//www.google.com/images/cleardot.gif"),i.location&&"http"==i.location.protocol||at(r,"https"),dt(r),t?function(e,t){const n=new Pe;if(i.Image){const r=new Image;r.onload=u(_t,n,"TestLoadImage: loaded",!0,t,r),r.onerror=u(_t,n,"TestLoadImage: error",!1,t,r),r.onabort=u(_t,n,"TestLoadImage: abort",!1,t,r),r.ontimeout=u(_t,n,"TestLoadImage: timeout",!1,t,r),i.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(r.toString(),n):function(e,t){new Pe;const n=new AbortController,r=setTimeout((()=>{n.abort(),_t(0,0,!1,t)}),1e4);fetch(e,{signal:n.signal}).then((e=>{clearTimeout(r),e.ok?_t(0,0,!0,t):_t(0,0,!1,t)})).catch((()=>{clearTimeout(r),_t(0,0,!1,t)}))}(r.toString(),n)}else Ce(2);e.G=0,e.l&&e.l.sa(t),dn(e),Jt(e)}function dn(e){if(e.G=0,e.ka=[],e.l){const t=nt(e.h);0==t.length&&0==e.i.length||(f(e.ka,t),f(e.ka,e.i),e.h.i.length=0,h(e.i),e.i.length=0),e.l.ra()}}function hn(e,t,n){var r=n instanceof ot?st(n):new ot(n);if(""!=r.g)t&&(r.g=t+"."+r.g),lt(r,r.s);else{var o=i.location;r=o.protocol,t=t?t+"."+o.hostname:o.hostname,o=+o.port;var s=new ot(null);r&&at(s,r),t&&(s.g=t),o&&lt(s,o),n&&(s.l=n),r=s}return n=e.D,t=e.ya,n&&t&&ut(r,n,t),ut(r,"VER",e.la),en(e,r),r}function fn(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=e.Ca&&!e.pa?new Bt(new It({eb:n})):new Bt(e.pa)).Ha(e.J),t}function pn(){}function gn(){}function mn(e,t){ne.call(this),this.g=new Kt(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.o=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.va&&(e?e["X-WebChannel-Client-Profile"]=t.va:e={"X-WebChannel-Client-Profile":t.va}),this.g.S=e,(e=t&&t.Sb)&&!p(e)&&(this.g.m=e),this.v=t&&t.supportsCrossDomainXhr||!1,this.u=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!p(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new bn(this)}function yn(e){ve.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function vn(){be.call(this),this.status=1}function bn(e){this.g=e}(e=Bt.prototype).Ha=function(e){this.J=e},e.ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+e);t=t?t.toUpperCase():"GET",this.D=e,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Oe.g(),this.v=this.o?ge(this.o):ge(Oe),this.g.onreadystatechange=c(this.Ea,this);try{this.B=!0,this.g.open(t,String(e),!0),this.B=!1}catch(s){return void Ut(this,s)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var o in r)n.set(o,r[o]);else{if("function"!==typeof r.keys||"function"!==typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));for(const e of r.keys())n.set(e,r.get(e))}r=Array.from(n.keys()).find((e=>"content-type"==e.toLowerCase())),o=i.FormData&&e instanceof i.FormData,!(0<=Array.prototype.indexOf.call(jt,t,void 0))||r||o||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[i,a]of n)this.g.setRequestHeader(i,a);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{$t(this),this.u=!0,this.g.send(e),this.u=!1}catch(s){Ut(this,s)}},e.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=e||7,re(this,"complete"),re(this,"abort"),Ht(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Ht(this,!0)),Bt.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?Vt(this):this.bb())},e.bb=function(){Vt(this)},e.isActive=function(){return!!this.g},e.Z=function(){try{return 2<Wt(this)?this.g.status:-1}catch(gt){return-1}},e.oa=function(){try{return this.g?this.g.responseText:""}catch(gt){return""}},e.Oa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),he(t)}},e.Ba=function(){return this.m},e.Ka=function(){return"string"===typeof this.l?this.l:String(this.l)},(e=Kt.prototype).la=8,e.G=1,e.connect=function(e,t,n,r){Ce(0),this.W=e,this.H=t||{},n&&void 0!==r&&(this.H.OSID=n,this.H.OAID=r),this.F=this.X,this.I=hn(this,null,this.W),Yt(this)},e.Ga=function(e){if(this.s)if(this.s=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;const i=new De(this,this.j,e);let o=this.o;if(this.S&&(o?(o=b(o),x(o,this.S)):o=this.S),null!==this.m||this.O||(i.H=o,o=null),this.P)e:{for(var t=0,n=0;n<this.i.length;n++){var r=this.i[n];if(void 0===(r="__data__"in r.map&&"string"===typeof(r=r.map.__data__)?r.length:void 0))break;if(4096<(t+=r)){t=n;break e}if(4096===t||n===this.i.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=tn(this,i,t),ut(n=st(this.I),"RID",e),ut(n,"CVER",22),this.D&&ut(n,"X-HTTP-Session-Id",this.D),en(this,n),o&&(this.O?t="headers="+encodeURIComponent(String(Dt(o)))+"&"+t:this.m&&Lt(n,this.m,o)),et(this.h,i),this.Ua&&ut(n,"TYPE","init"),this.P?(ut(n,"$req",t),ut(n,"SID","null"),i.T=!0,je(i,n,null)):je(i,n,t),this.G=2}}else 3==this.G&&(e?Zt(this,e):0==this.i.length||Je(this.h)||Zt(this))},e.Fa=function(){if(this.u=null,sn(this),this.ba&&!(this.M||null==this.g||0>=this.R)){var e=2*this.R;this.j.info("BP detection timer enabled: "+e),this.A=Te(c(this.ab,this),e)}},e.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,Ce(10),Xt(this),sn(this))},e.Za=function(){null!=this.C&&(this.C=null,Xt(this),rn(this),Ce(19))},e.fb=function(e){e?(this.j.info("Successfully pinged google.com"),Ce(2)):(this.j.info("Failed to ping google.com"),Ce(1))},e.isActive=function(){return!!this.l&&this.l.isActive(this)},(e=pn.prototype).ua=function(){},e.ta=function(){},e.sa=function(){},e.ra=function(){},e.isActive=function(){return!0},e.Na=function(){},gn.prototype.g=function(e,t){return new mn(e,t)},d(mn,ne),mn.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},mn.prototype.close=function(){Qt(this.g)},mn.prototype.o=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.u&&((n={}).__data__=de(e),e=n);t.i.push(new Qe(t.Ya++,e)),3==t.G&&Yt(t)},mn.prototype.N=function(){this.g.l=null,delete this.j,Qt(this.g),delete this.g,mn.aa.N.call(this)},d(yn,ve),d(vn,be),d(bn,pn),bn.prototype.ua=function(){re(this.g,"a")},bn.prototype.ta=function(e){re(this.g,new yn(e))},bn.prototype.sa=function(e){re(this.g,new vn)},bn.prototype.ra=function(){re(this.g,"b")},gn.prototype.createWebChannel=gn.prototype.g,mn.prototype.send=mn.prototype.o,mn.prototype.open=mn.prototype.m,mn.prototype.close=mn.prototype.close,Av=Sv.createWebChannelTransport=function(){return new gn},xv=Sv.getStatEventTarget=function(){return Ae()},wv=Sv.Event=we,bv=Sv.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Re.NO_ERROR=0,Re.TIMEOUT=8,Re.HTTP_ERROR=6,vv=Sv.ErrorCode=Re,Ne.COMPLETE="complete",yv=Sv.EventType=Ne,me.EventType=ye,ye.OPEN="a",ye.CLOSE="b",ye.ERROR="c",ye.MESSAGE="d",ne.prototype.listen=ne.prototype.K,mv=Sv.WebChannel=me,gv=Sv.FetchXmlHttpFactory=It,Bt.prototype.listenOnce=Bt.prototype.L,Bt.prototype.getLastError=Bt.prototype.Ka,Bt.prototype.getLastErrorCode=Bt.prototype.Ba,Bt.prototype.getStatus=Bt.prototype.Z,Bt.prototype.getResponseJson=Bt.prototype.Oa,Bt.prototype.getResponseText=Bt.prototype.oa,Bt.prototype.send=Bt.prototype.ea,Bt.prototype.setWithCredentials=Bt.prototype.Ha,pv=Sv.XhrIo=Bt}).apply("undefined"!==typeof Ev?Ev:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});const kv="@firebase/firestore";class Cv{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Cv.UNAUTHENTICATED=new Cv(null),Cv.GOOGLE_CREDENTIALS=new Cv("google-credentials-uid"),Cv.FIRST_PARTY=new Cv("first-party-uid"),Cv.MOCK_USER=new Cv("mock-user");let _v="10.13.0";const Tv=new _f("@firebase/firestore");function Pv(){return Tv.logLevel}function Iv(e){if(Tv.logLevel<=Af.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.map(Nv);Tv.debug(`Firestore (${_v}): ${e}`,...i)}}function Ov(e){if(Tv.logLevel<=Af.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.map(Nv);Tv.error(`Firestore (${_v}): ${e}`,...i)}}function Rv(e){if(Tv.logLevel<=Af.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.map(Nv);Tv.warn(`Firestore (${_v}): ${e}`,...i)}}function Nv(e){if("string"==typeof e)return e;try{return function(e){return JSON.stringify(e)}(e)}catch(t){return e}}function Mv(){const e=`FIRESTORE (${_v}) INTERNAL ASSERTION FAILED: `+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state");throw Ov(e),new Error(e)}function Dv(e,t){e||Mv()}function Lv(e,t){return e}const Bv={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Fv extends of{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class jv{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}class Uv{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class zv{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable((()=>t(Cv.UNAUTHENTICATED)))}shutdown(){}}class Vv{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}shutdown(){this.changeListener=null}}class Hv{constructor(e){this.t=e,this.currentUser=Cv.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let n=this.i;const r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve();let i=new jv;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new jv,e.enqueueRetryable((()=>r(this.currentUser)))};const o=()=>{const t=i;e.enqueueRetryable((async()=>{await t.promise,await r(this.currentUser)}))},s=e=>{Iv("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit((e=>s(e))),setTimeout((()=>{if(!this.auth){const e=this.t.getImmediate({optional:!0});e?s(e):(Iv("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new jv)}}),0),o()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((t=>this.i!==e?(Iv("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(Dv("string"==typeof t.accessToken),new Uv(t.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return Dv(null===e||"string"==typeof e),new Cv(e)}}class $v{constructor(e,t,n){this.l=e,this.h=t,this.P=n,this.type="FirstParty",this.user=Cv.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class Wv{constructor(e,t,n){this.l=e,this.h=t,this.P=n}getToken(){return Promise.resolve(new $v(this.l,this.h,this.P))}start(e,t){e.enqueueRetryable((()=>t(Cv.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class Gv{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class qv{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,t){const n=e=>{null!=e.error&&Iv("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);const n=e.token!==this.R;return this.R=e.token,Iv("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable((()=>n(t)))};const r=e=>{Iv("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.A.onInit((e=>r(e))),setTimeout((()=>{if(!this.appCheck){const e=this.A.getImmediate({optional:!0});e?r(e):Iv("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((e=>e?(Dv("string"==typeof e.token),this.R=e.token,new Gv(e.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Kv(e){const t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}class Qv{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=62*Math.floor(256/62);let n="";for(;n.length<20;){const r=Kv(40);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%62))}return n}}function Xv(e,t){return e<t?-1:e>t?1:0}function Jv(e,t,n){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}class Yv{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new Fv(Bv.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new Fv(Bv.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new Fv(Bv.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Fv(Bv.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Yv.fromMillis(Date.now())}static fromDate(e){return Yv.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor(1e6*(e-1e3*t));return new Yv(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Xv(this.nanoseconds,e.nanoseconds):Xv(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class Zv{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Zv(e)}static min(){return new Zv(new Yv(0,0))}static max(){return new Zv(new Yv(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class eb{constructor(e,t,n){void 0===t?t=0:t>e.length&&Mv(),void 0===n?n=e.length-t:n>e.length-t&&Mv(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===eb.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof eb?e.forEach((e=>{t.push(e)})):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=e.get(r),i=t.get(r);if(n<i)return-1;if(n>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class tb extends eb{construct(e,t,n){return new tb(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n){if(i.indexOf("//")>=0)throw new Fv(Bv.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);e.push(...i.split("/").filter((e=>e.length>0)))}return new tb(e)}static emptyPath(){return new tb([])}}const nb=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rb extends eb{construct(e,t,n){return new rb(e,t,n)}static isValidIdentifier(e){return nb.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rb.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new rb(["__name__"])}static fromServerFormat(e){const t=[];let n="",r=0;const i=()=>{if(0===n.length)throw new Fv(Bv.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let o=!1;for(;r<e.length;){const t=e[r];if("\\"===t){if(r+1===e.length)throw new Fv(Bv.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new Fv(Bv.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(o=!o,r++):"."!==t||o?(n+=t,r++):(i(),r++)}if(i(),o)throw new Fv(Bv.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new rb(t)}static emptyPath(){return new rb([])}}class ib{constructor(e){this.path=e}static fromPath(e){return new ib(tb.fromString(e))}static fromName(e){return new ib(tb.fromString(e).popFirst(5))}static empty(){return new ib(tb.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===tb.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return tb.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ib(new tb(e.slice()))}}class ob{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}ob.UNKNOWN_ID=-1;function sb(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=Zv.fromTimestamp(1e9===r?new Yv(n+1,0):new Yv(n,r));return new lb(i,ib.empty(),t)}function ab(e){return new lb(e.readTime,e.key,-1)}class lb{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new lb(Zv.min(),ib.empty(),-1)}static max(){return new lb(Zv.max(),ib.empty(),-1)}}function cb(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:(n=ib.comparator(e.documentKey,t.documentKey),0!==n?n:Xv(e.largestBatchId,t.largestBatchId))}const ub="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class db{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}async function hb(e){if(e.code!==Bv.FAILED_PRECONDITION||e.message!==ub)throw e;Iv("LocalStore","Unexpectedly lost primary lease")}class fb{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)}),(e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)}))}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&Mv(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new fb(((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(e){try{const t=e();return t instanceof fb?t:fb.resolve(t)}catch(e){return fb.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction((()=>e(t))):fb.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction((()=>e(t))):fb.reject(t)}static resolve(e){return new fb(((t,n)=>{t(e)}))}static reject(e){return new fb(((t,n)=>{n(e)}))}static waitFor(e){return new fb(((t,n)=>{let r=0,i=0,o=!1;e.forEach((e=>{++r,e.next((()=>{++i,o&&i===r&&t()}),(e=>n(e)))})),o=!0,i===r&&t()}))}static or(e){let t=fb.resolve(!1);for(const n of e)t=t.next((e=>e?fb.resolve(e):n()));return t}static forEach(e,t){const n=[];return e.forEach(((e,r)=>{n.push(t.call(this,e,r))})),this.waitFor(n)}static mapArray(e,t){return new fb(((n,r)=>{const i=e.length,o=new Array(i);let s=0;for(let a=0;a<i;a++){const l=a;t(e[l]).next((e=>{o[l]=e,++s,s===i&&n(o)}),(e=>r(e)))}}))}static doWhile(e,t){return new fb(((n,r)=>{const i=()=>{!0===e()?t().next((()=>{i()}),r):n()};i()}))}}function pb(e){const t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function gb(e){return"IndexedDbTransactionError"===e.name}class mb{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ie(e),this.se=e=>t.writeSequenceNumber(e))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.se&&this.se(e),e}}function yb(e){return null==e}function vb(e){return 0===e&&1/e==-1/0}function bb(e){return"number"==typeof e&&Number.isInteger(e)&&!vb(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}mb.oe=-1;const wb=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],xb=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],Ab=xb,Eb=[...Ab,"indexConfiguration","indexState","indexEntries"];function Sb(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function kb(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Cb(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}class _b{constructor(e,t){this.comparator=e,this.root=t||Pb.EMPTY}insert(e,t){return new _b(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,Pb.BLACK,null,null))}remove(e){return new _b(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Pb.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,n)=>(e(t,n),!1)))}toString(){const e=[];return this.inorderTraversal(((t,n)=>(e.push(`${t}:${n}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Tb(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Tb(this.root,e,this.comparator,!1)}getReverseIterator(){return new Tb(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Tb(this.root,e,this.comparator,!0)}}class Tb{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&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(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Pb{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:Pb.RED,this.left=null!=r?r:Pb.EMPTY,this.right=null!=i?i:Pb.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new Pb(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}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 i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?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 Pb.EMPTY;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=this;if(t(e,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return Pb.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.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,Pb.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Pb.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.size+1}check(){if(this.isRed()&&this.left.isRed())throw Mv();if(this.right.isRed())throw Mv();const e=this.left.check();if(e!==this.right.check())throw Mv();return e+(this.isRed()?0:1)}}Pb.EMPTY=null,Pb.RED=!0,Pb.BLACK=!1,Pb.EMPTY=new class{constructor(){this.size=0}get key(){throw Mv()}get value(){throw Mv()}get color(){throw Mv()}get left(){throw Mv()}get right(){throw Mv()}copy(e,t,n,r,i){return this}insert(e,t,n){return new Pb(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Ib{constructor(e){this.comparator=e,this.data=new _b(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,n)=>(e(t),!1)))}forEachInRange(e,t){const n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new Ob(this.data.getIterator())}getIteratorFrom(e){return new Ob(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((e=>{t=t.add(e)})),t}isEqual(e){if(!(e instanceof Ib))return!1;if(this.size!==e.size)return!1;const t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){const e=[];return this.forEach((t=>{e.push(t)})),e}toString(){const e=[];return this.forEach((t=>e.push(t))),"SortedSet("+e.toString()+")"}copy(e){const t=new Ib(this.comparator);return t.data=e,t}}class Ob{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class Rb{constructor(e){this.fields=e,e.sort(rb.comparator)}static empty(){return new Rb([])}unionWith(e){let t=new Ib(rb.comparator);for(const n of this.fields)t=t.add(n);for(const n of e)t=t.add(n);return new Rb(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Jv(this.fields,e.fields,((e,t)=>e.isEqual(t)))}}class Nb extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class Mb{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new Nb("Invalid base64 string: "+e):e}}(e);return new Mb(t)}static fromUint8Array(e){const t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new Mb(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return e=this.binaryString,btoa(e);var e}toUint8Array(){return function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Xv(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Mb.EMPTY_BYTE_STRING=new Mb("");const Db=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Lb(e){if(Dv(!!e),"string"==typeof e){let t=0;const n=Db.exec(e);if(Dv(!!n),n[1]){let e=n[1];e=(e+"000000000").substr(0,9),t=Number(e)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:Bb(e.seconds),nanos:Bb(e.nanos)}}function Bb(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Fb(e){return"string"==typeof e?Mb.fromBase64String(e):Mb.fromUint8Array(e)}function jb(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Ub(e){const t=e.mapValue.fields.__previous_value__;return jb(t)?Ub(t):t}function zb(e){const t=Lb(e.mapValue.fields.__local_write_time__.timestampValue);return new Yv(t.seconds,t.nanos)}class Vb{constructor(e,t,n,r,i,o,s,a,l){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=s,this.longPollingOptions=a,this.useFetchStreams=l}}class Hb{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new Hb("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof Hb&&e.projectId===this.projectId&&e.database===this.database}}const $b={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Wb(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?jb(e)?4:sw(e)?9007199254740991:iw(e)?10:11:Mv()}function Gb(e,t){if(e===t)return!0;const n=Wb(e);if(n!==Wb(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return zb(e).isEqual(zb(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;const n=Lb(e.timestampValue),r=Lb(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return Fb(e.bytesValue).isEqual(Fb(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Bb(e.geoPointValue.latitude)===Bb(t.geoPointValue.latitude)&&Bb(e.geoPointValue.longitude)===Bb(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Bb(e.integerValue)===Bb(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){const n=Bb(e.doubleValue),r=Bb(t.doubleValue);return n===r?vb(n)===vb(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Jv(e.arrayValue.values||[],t.arrayValue.values||[],Gb);case 10:case 11:return function(e,t){const n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Sb(n)!==Sb(r))return!1;for(const i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Gb(n[i],r[i])))return!1;return!0}(e,t);default:return Mv()}}function qb(e,t){return void 0!==(e.values||[]).find((e=>Gb(e,t)))}function Kb(e,t){if(e===t)return 0;const n=Wb(e),r=Wb(t);if(n!==r)return Xv(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Xv(e.booleanValue,t.booleanValue);case 2:return function(e,t){const n=Bb(e.integerValue||e.doubleValue),r=Bb(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return Qb(e.timestampValue,t.timestampValue);case 4:return Qb(zb(e),zb(t));case 5:return Xv(e.stringValue,t.stringValue);case 6:return function(e,t){const n=Fb(e),r=Fb(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){const n=e.split("/"),r=t.split("/");for(let i=0;i<n.length&&i<r.length;i++){const e=Xv(n[i],r[i]);if(0!==e)return e}return Xv(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){const n=Xv(Bb(e.latitude),Bb(t.latitude));return 0!==n?n:Xv(Bb(e.longitude),Bb(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return Xb(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n,r,i,o;const s=e.fields||{},a=t.fields||{},l=null===(n=s.value)||void 0===n?void 0:n.arrayValue,c=null===(r=a.value)||void 0===r?void 0:r.arrayValue,u=Xv((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i.length)||0,(null===(o=null==c?void 0:c.values)||void 0===o?void 0:o.length)||0);return 0!==u?u:Xb(l,c)}(e.mapValue,t.mapValue);case 11:return function(e,t){if(e===$b.mapValue&&t===$b.mapValue)return 0;if(e===$b.mapValue)return 1;if(t===$b.mapValue)return-1;const n=e.fields||{},r=Object.keys(n),i=t.fields||{},o=Object.keys(i);r.sort(),o.sort();for(let s=0;s<r.length&&s<o.length;++s){const e=Xv(r[s],o[s]);if(0!==e)return e;const t=Kb(n[r[s]],i[o[s]]);if(0!==t)return t}return Xv(r.length,o.length)}(e.mapValue,t.mapValue);default:throw Mv()}}function Qb(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Xv(e,t);const n=Lb(e),r=Lb(t),i=Xv(n.seconds,r.seconds);return 0!==i?i:Xv(n.nanos,r.nanos)}function Xb(e,t){const n=e.values||[],r=t.values||[];for(let i=0;i<n.length&&i<r.length;++i){const e=Kb(n[i],r[i]);if(e)return e}return Xv(n.length,r.length)}function Jb(e){return Yb(e)}function Yb(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){const t=Lb(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?function(e){return Fb(e).toBase64()}(e.bytesValue):"referenceValue"in e?function(e){return ib.fromName(e).toString()}(e.referenceValue):"geoPointValue"in e?function(e){return`geo(${e.latitude},${e.longitude})`}(e.geoPointValue):"arrayValue"in e?function(e){let t="[",n=!0;for(const r of e.values||[])n?n=!1:t+=",",t+=Yb(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){const t=Object.keys(e.fields||{}).sort();let n="{",r=!0;for(const i of t)r?r=!1:n+=",",n+=`${i}:${Yb(e.fields[i])}`;return n+"}"}(e.mapValue):Mv()}function Zb(e){return!!e&&"integerValue"in e}function ew(e){return!!e&&"arrayValue"in e}function tw(e){return!!e&&"nullValue"in e}function nw(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function rw(e){return!!e&&"mapValue"in e}function iw(e){var t,n;return"__vector__"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function ow(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return kb(e.mapValue.fields,((e,n)=>t.mapValue.fields[e]=ow(n))),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=ow(e.arrayValue.values[n]);return t}return Object.assign({},e)}function sw(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class aw{constructor(e){this.value=e}static empty(){return new aw({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(t=(t.mapValue.fields||{})[e.get(n)],!rw(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=ow(t)}setAll(e){let t=rb.emptyPath(),n={},r=[];e.forEach(((e,i)=>{if(!t.isImmediateParentOf(i)){const e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=ow(e):r.push(i.lastSegment())}));const i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){const t=this.field(e.popLast());rw(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Gb(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];rw(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){kb(t,((t,n)=>e[t]=n));for(const r of n)delete e[r]}clone(){return new aw(ow(this.value))}}function lw(e){const t=[];return kb(e.fields,((e,n)=>{const r=new rb([e]);if(rw(n)){const e=lw(n.mapValue).fields;if(0===e.length)t.push(r);else for(const n of e)t.push(r.child(n))}else t.push(r)})),new Rb(t)}class cw{constructor(e,t,n,r,i,o,s){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=o,this.documentState=s}static newInvalidDocument(e){return new cw(e,0,Zv.min(),Zv.min(),Zv.min(),aw.empty(),0)}static newFoundDocument(e,t,n,r){return new cw(e,1,t,Zv.min(),n,r,0)}static newNoDocument(e,t){return new cw(e,2,t,Zv.min(),Zv.min(),aw.empty(),0)}static newUnknownDocument(e,t){return new cw(e,3,t,Zv.min(),Zv.min(),aw.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(Zv.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=aw.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=aw.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Zv.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof cw&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new cw(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class uw{constructor(e,t){this.position=e,this.inclusive=t}}function dw(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const o=t[i],s=e.position[i];if(r=o.field.isKeyField()?ib.comparator(ib.fromName(s.referenceValue),n.key):Kb(s,n.data.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return r}function hw(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!Gb(e.position[n],t.position[n]))return!1;return!0}class fw{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";this.field=e,this.dir=t}}function pw(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}class gw{}class mw extends gw{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,n):new Sw(e,t,n):"array-contains"===t?new Tw(e,n):"in"===t?new Pw(e,n):"not-in"===t?new Iw(e,n):"array-contains-any"===t?new Ow(e,n):new mw(e,t,n)}static createKeyFieldInFilter(e,t,n){return"in"===t?new kw(e,n):new Cw(e,n)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(Kb(t,this.value)):null!==t&&Wb(this.value)===Wb(t)&&this.matchesComparison(Kb(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return Mv()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class yw extends gw{constructor(e,t){super(),this.filters=e,this.op=t,this.ae=null}static create(e,t){return new yw(e,t)}matches(e){return vw(this)?void 0===this.filters.find((t=>!t.matches(e))):void 0!==this.filters.find((t=>t.matches(e)))}getFlattenedFilters(){return null!==this.ae||(this.ae=this.filters.reduce(((e,t)=>e.concat(t.getFlattenedFilters())),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function vw(e){return"and"===e.op}function bw(e){return ww(e)&&vw(e)}function ww(e){for(const t of e.filters)if(t instanceof yw)return!1;return!0}function xw(e){if(e instanceof mw)return e.field.canonicalString()+e.op.toString()+Jb(e.value);if(bw(e))return e.filters.map((e=>xw(e))).join(",");{const t=e.filters.map((e=>xw(e))).join(",");return`${e.op}(${t})`}}function Aw(e,t){return e instanceof mw?function(e,t){return t instanceof mw&&e.op===t.op&&e.field.isEqual(t.field)&&Gb(e.value,t.value)}(e,t):e instanceof yw?function(e,t){return t instanceof yw&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce(((e,n,r)=>e&&Aw(n,t.filters[r])),!0)}(e,t):void Mv()}function Ew(e){return e instanceof mw?function(e){return`${e.field.canonicalString()} ${e.op} ${Jb(e.value)}`}(e):e instanceof yw?function(e){return e.op.toString()+" {"+e.getFilters().map(Ew).join(" ,")+"}"}(e):"Filter"}class Sw extends mw{constructor(e,t,n){super(e,t,n),this.key=ib.fromName(n.referenceValue)}matches(e){const t=ib.comparator(e.key,this.key);return this.matchesComparison(t)}}class kw extends mw{constructor(e,t){super(e,"in",t),this.keys=_w("in",t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}}class Cw extends mw{constructor(e,t){super(e,"not-in",t),this.keys=_w("not-in",t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}}function _w(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((e=>ib.fromName(e.referenceValue)))}class Tw extends mw{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return ew(t)&&qb(t.arrayValue,this.value)}}class Pw extends mw{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&qb(this.value.arrayValue,t)}}class Iw extends mw{constructor(e,t){super(e,"not-in",t)}matches(e){if(qb(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!qb(this.value.arrayValue,t)}}class Ow extends mw{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!ew(t)||!t.arrayValue.values)&&t.arrayValue.values.some((e=>qb(this.value.arrayValue,e)))}}class Rw{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=s,this.ue=null}}function Nw(e){return new Rw(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,arguments.length>6&&void 0!==arguments[6]?arguments[6]:null)}function Mw(e){const t=Lv(e);if(null===t.ue){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map((e=>xw(e))).join(","),e+="|ob:",e+=t.orderBy.map((e=>function(e){return e.field.canonicalString()+e.dir}(e))).join(","),yb(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map((e=>Jb(e))).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map((e=>Jb(e))).join(",")),t.ue=e}return t.ue}function Dw(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!pw(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!Aw(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!hw(e.startAt,t.startAt)&&hw(e.endAt,t.endAt)}function Lw(e){return ib.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class Bw{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=s,this.endAt=a,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function Fw(e,t,n,r,i,o,s,a){return new Bw(e,t,n,r,i,o,s,a)}function jw(e){return new Bw(e)}function Uw(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function zw(e){return null!==e.collectionGroup}function Vw(e){const t=Lv(e);if(null===t.ce){t.ce=[];const e=new Set;for(const i of t.explicitOrderBy)t.ce.push(i),e.add(i.field.canonicalString());const n=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc",r=function(e){let t=new Ib(rb.comparator);return e.filters.forEach((e=>{e.getFlattenedFilters().forEach((e=>{e.isInequality()&&(t=t.add(e.field))}))})),t}(t);r.forEach((r=>{e.has(r.canonicalString())||r.isKeyField()||t.ce.push(new fw(r,n))})),e.has(rb.keyField().canonicalString())||t.ce.push(new fw(rb.keyField(),n))}return t.ce}function Hw(e){const t=Lv(e);return t.le||(t.le=$w(t,Vw(e))),t.le}function $w(e,t){if("F"===e.limitType)return Nw(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map((e=>{const t="desc"===e.dir?"asc":"desc";return new fw(e.field,t)}));const n=e.endAt?new uw(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new uw(e.startAt.position,e.startAt.inclusive):null;return Nw(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}function Ww(e,t,n){return new Bw(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Gw(e,t){return Dw(Hw(e),Hw(t))&&e.limitType===t.limitType}function qw(e){return`${Mw(Hw(e))}|lt:${e.limitType}`}function Kw(e){return`Query(target=${function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map((e=>Ew(e))).join(", ")}]`),yb(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map((e=>function(e){return`${e.field.canonicalString()} (${e.dir})`}(e))).join(", ")}]`),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((e=>Jb(e))).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((e=>Jb(e))).join(",")),`Target(${t})`}(Hw(e))}; limitType=${e.limitType})`}function Qw(e,t){return t.isFoundDocument()&&function(e,t){const n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):ib.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(const n of Vw(e))if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(const n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){const r=dw(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,Vw(e),t))&&!(e.endAt&&!function(e,t,n){const r=dw(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,Vw(e),t))}(e,t)}function Xw(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Jw(e){return(t,n)=>{let r=!1;for(const i of Vw(e)){const e=Yw(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}function Yw(e,t,n){const r=e.field.isKeyField()?ib.comparator(t.key,n.key):function(e,t,n){const r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Kb(r,i):Mv()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return Mv()}}class Zw{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(const[r,i]of n)if(this.equalsFn(r,e))return i}has(e){return void 0!==this.get(e)}set(e,t){const n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){kb(this.inner,((t,n)=>{for(const[r,i]of n)e(r,i)}))}isEmpty(){return Cb(this.inner)}size(){return this.innerSize}}const ex=new _b(ib.comparator);function tx(){return ex}const nx=new _b(ib.comparator);function rx(){let e=nx;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n)e=e.insert(i.key,i);return e}function ix(e){let t=nx;return e.forEach(((e,n)=>t=t.insert(e,n.overlayedDocument))),t}function ox(){return ax()}function sx(){return ax()}function ax(){return new Zw((e=>e.toString()),((e,t)=>e.isEqual(t)))}const lx=new _b(ib.comparator),cx=new Ib(ib.comparator);function ux(){let e=cx;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n)e=e.add(i);return e}const dx=new Ib(Xv);function hx(){return dx}function fx(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:vb(t)?"-0":t}}function px(e){return{integerValue:""+e}}function gx(e,t){return bb(t)?px(t):fx(e,t)}class mx{constructor(){this._=void 0}}function yx(e,t,n){return e instanceof wx?function(e,t){const n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&jb(t)&&(t=Ub(t)),t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof xx?Ax(e,t):e instanceof Ex?Sx(e,t):function(e,t){const n=bx(e,t),r=Cx(n)+Cx(e.Pe);return Zb(n)&&Zb(e.Pe)?px(r):fx(e.serializer,r)}(e,t)}function vx(e,t,n){return e instanceof xx?Ax(e,t):e instanceof Ex?Sx(e,t):n}function bx(e,t){return e instanceof kx?function(e){return Zb(e)||function(e){return!!e&&"doubleValue"in e}(e)}(t)?t:{integerValue:0}:null}class wx extends mx{}class xx extends mx{constructor(e){super(),this.elements=e}}function Ax(e,t){const n=_x(t);for(const r of e.elements)n.some((e=>Gb(e,r)))||n.push(r);return{arrayValue:{values:n}}}class Ex extends mx{constructor(e){super(),this.elements=e}}function Sx(e,t){let n=_x(t);for(const r of e.elements)n=n.filter((e=>!Gb(e,r)));return{arrayValue:{values:n}}}class kx extends mx{constructor(e,t){super(),this.serializer=e,this.Pe=t}}function Cx(e){return Bb(e.integerValue||e.doubleValue)}function _x(e){return ew(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class Tx{constructor(e,t){this.version=e,this.transformResults=t}}class Px{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Px}static exists(e){return new Px(void 0,e)}static updateTime(e){return new Px(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function Ix(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class Ox{}function Rx(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new Vx(e.key,Px.none()):new Bx(e.key,e.data,Px.none());{const n=e.data,r=aw.empty();let i=new Ib(rb.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new Fx(e.key,r,new Rb(i.toArray()),Px.none())}}function Nx(e,t,n){e instanceof Bx?function(e,t,n){const r=e.value.clone(),i=Ux(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Fx?function(e,t,n){if(!Ix(e.precondition,t))return void t.convertToUnknownDocument(n.version);const r=Ux(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(jx(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function Mx(e,t,n,r){return e instanceof Bx?function(e,t,n,r){if(!Ix(e.precondition,t))return n;const i=e.value.clone(),o=zx(e.fieldTransforms,r,t);return i.setAll(o),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof Fx?function(e,t,n,r){if(!Ix(e.precondition,t))return n;const i=zx(e.fieldTransforms,r,t),o=t.data;return o.setAll(jx(e)),o.setAll(i),t.convertToFoundDocument(t.version,o).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((e=>e.field)))}(e,t,n,r):function(e,t,n){return Ix(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function Dx(e,t){let n=null;for(const r of e.fieldTransforms){const e=t.data.field(r.field),i=bx(r.transform,e||null);null!=i&&(null===n&&(n=aw.empty()),n.set(r.field,i))}return n||null}function Lx(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&Jv(e,t,((e,t)=>function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof xx&&t instanceof xx||e instanceof Ex&&t instanceof Ex?Jv(e.elements,t.elements,Gb):e instanceof kx&&t instanceof kx?Gb(e.Pe,t.Pe):e instanceof wx&&t instanceof wx}(e.transform,t.transform)}(e,t)))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class Bx extends Ox{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Fx extends Ox{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function jx(e){const t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}})),t}function Ux(e,t,n){const r=new Map;Dv(e.length===n.length);for(let i=0;i<n.length;i++){const o=e[i],s=o.transform,a=t.data.field(o.field);r.set(o.field,vx(s,a,n[i]))}return r}function zx(e,t,n){const r=new Map;for(const i of e){const e=i.transform,o=n.data.field(i.field);r.set(i.field,yx(e,o,t))}return r}class Vx extends Ox{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class Hx extends Ox{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class $x{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){const n=t.mutationResults;for(let r=0;r<this.mutations.length;r++){const t=this.mutations[r];t.key.isEqual(e.key)&&Nx(t,e,n[r])}}applyToLocalView(e,t){for(const n of this.baseMutations)n.key.isEqual(e.key)&&(t=Mx(n,e,t,this.localWriteTime));for(const n of this.mutations)n.key.isEqual(e.key)&&(t=Mx(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const n=sx();return this.mutations.forEach((r=>{const i=e.get(r.key),o=i.overlayedDocument;let s=this.applyToLocalView(o,i.mutatedFields);s=t.has(r.key)?null:s;const a=Rx(o,s);null!==a&&n.set(r.key,a),o.isValidDocument()||o.convertToNoDocument(Zv.min())})),n}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),ux())}isEqual(e){return this.batchId===e.batchId&&Jv(this.mutations,e.mutations,((e,t)=>Lx(e,t)))&&Jv(this.baseMutations,e.baseMutations,((e,t)=>Lx(e,t)))}}class Wx{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){Dv(e.mutations.length===n.length);let r=lx;const i=e.mutations;for(let o=0;o<i.length;o++)r=r.insert(i[o].key,n[o].version);return new Wx(e,t,n,r)}}class Gx{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{\n      largestBatchId: ${this.largestBatchId},\n      mutation: ${this.mutation.toString()}\n    }`}}class qx{constructor(e,t){this.count=e,this.unchangedNames=t}}var Kx,Qx;function Xx(e){switch(e){default:return Mv();case Bv.CANCELLED:case Bv.UNKNOWN:case Bv.DEADLINE_EXCEEDED:case Bv.RESOURCE_EXHAUSTED:case Bv.INTERNAL:case Bv.UNAVAILABLE:case Bv.UNAUTHENTICATED:return!1;case Bv.INVALID_ARGUMENT:case Bv.NOT_FOUND:case Bv.ALREADY_EXISTS:case Bv.PERMISSION_DENIED:case Bv.FAILED_PRECONDITION:case Bv.ABORTED:case Bv.OUT_OF_RANGE:case Bv.UNIMPLEMENTED:case Bv.DATA_LOSS:return!0}}function Jx(e){if(void 0===e)return Ov("GRPC error has no .code"),Bv.UNKNOWN;switch(e){case Kx.OK:return Bv.OK;case Kx.CANCELLED:return Bv.CANCELLED;case Kx.UNKNOWN:return Bv.UNKNOWN;case Kx.DEADLINE_EXCEEDED:return Bv.DEADLINE_EXCEEDED;case Kx.RESOURCE_EXHAUSTED:return Bv.RESOURCE_EXHAUSTED;case Kx.INTERNAL:return Bv.INTERNAL;case Kx.UNAVAILABLE:return Bv.UNAVAILABLE;case Kx.UNAUTHENTICATED:return Bv.UNAUTHENTICATED;case Kx.INVALID_ARGUMENT:return Bv.INVALID_ARGUMENT;case Kx.NOT_FOUND:return Bv.NOT_FOUND;case Kx.ALREADY_EXISTS:return Bv.ALREADY_EXISTS;case Kx.PERMISSION_DENIED:return Bv.PERMISSION_DENIED;case Kx.FAILED_PRECONDITION:return Bv.FAILED_PRECONDITION;case Kx.ABORTED:return Bv.ABORTED;case Kx.OUT_OF_RANGE:return Bv.OUT_OF_RANGE;case Kx.UNIMPLEMENTED:return Bv.UNIMPLEMENTED;case Kx.DATA_LOSS:return Bv.DATA_LOSS;default:return Mv()}}(Qx=Kx||(Kx={}))[Qx.OK=0]="OK",Qx[Qx.CANCELLED=1]="CANCELLED",Qx[Qx.UNKNOWN=2]="UNKNOWN",Qx[Qx.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Qx[Qx.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Qx[Qx.NOT_FOUND=5]="NOT_FOUND",Qx[Qx.ALREADY_EXISTS=6]="ALREADY_EXISTS",Qx[Qx.PERMISSION_DENIED=7]="PERMISSION_DENIED",Qx[Qx.UNAUTHENTICATED=16]="UNAUTHENTICATED",Qx[Qx.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Qx[Qx.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Qx[Qx.ABORTED=10]="ABORTED",Qx[Qx.OUT_OF_RANGE=11]="OUT_OF_RANGE",Qx[Qx.UNIMPLEMENTED=12]="UNIMPLEMENTED",Qx[Qx.INTERNAL=13]="INTERNAL",Qx[Qx.UNAVAILABLE=14]="UNAVAILABLE",Qx[Qx.DATA_LOSS=15]="DATA_LOSS";let Yx=null;function Zx(){return new TextEncoder}const eA=new uv([4294967295,4294967295],0);function tA(e){const t=Zx().encode(e),n=new dv;return n.update(t),new Uint8Array(n.digest())}function nA(e){const t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),o=t.getUint32(12,!0);return[new uv([n,r],0),new uv([i,o],0)]}class rA{constructor(e,t,n){if(this.bitmap=e,this.padding=t,this.hashCount=n,t<0||t>=8)throw new iA(`Invalid padding: ${t}`);if(n<0)throw new iA(`Invalid hash count: ${n}`);if(e.length>0&&0===this.hashCount)throw new iA(`Invalid hash count: ${n}`);if(0===e.length&&0!==t)throw new iA(`Invalid padding when bitmap length is 0: ${t}`);this.Ie=8*e.length-t,this.Te=uv.fromNumber(this.Ie)}Ee(e,t,n){let r=e.add(t.multiply(uv.fromNumber(n)));return 1===r.compare(eA)&&(r=new uv([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Te).toNumber()}de(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(0===this.Ie)return!1;const t=tA(e),[n,r]=nA(t);for(let i=0;i<this.hashCount;i++){const e=this.Ee(n,r,i);if(!this.de(e))return!1}return!0}static create(e,t,n){const r=e%8==0?0:8-e%8,i=new Uint8Array(Math.ceil(e/8)),o=new rA(i,r,t);return n.forEach((e=>o.insert(e))),o}insert(e){if(0===this.Ie)return;const t=tA(e),[n,r]=nA(t);for(let i=0;i<this.hashCount;i++){const e=this.Ee(n,r,i);this.Ae(e)}}Ae(e){const t=Math.floor(e/8),n=e%8;this.bitmap[t]|=1<<n}}class iA extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class oA{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,n){const r=new Map;return r.set(e,sA.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new oA(Zv.min(),r,new _b(Xv),tx(),ux())}}class sA{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,n){return new sA(n,t,ux(),ux(),ux())}}class aA{constructor(e,t,n,r){this.Re=e,this.removedTargetIds=t,this.key=n,this.Ve=r}}class lA{constructor(e,t){this.targetId=e,this.me=t}}class cA{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Mb.EMPTY_BYTE_STRING,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class uA{constructor(){this.fe=0,this.ge=fA(),this.pe=Mb.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return 0!==this.fe}get be(){return this.we}De(e){e.approximateByteSize()>0&&(this.we=!0,this.pe=e)}ve(){let e=ux(),t=ux(),n=ux();return this.ge.forEach(((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:Mv()}})),new sA(this.pe,this.ye,e,t,n)}Ce(){this.we=!1,this.ge=fA()}Fe(e,t){this.we=!0,this.ge=this.ge.insert(e,t)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,Dv(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class dA{constructor(e){this.Le=e,this.Be=new Map,this.ke=tx(),this.qe=hA(),this.Qe=new _b(Xv)}Ke(e){for(const t of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(t,e.Ve):this.Ue(t,e.key,e.Ve);for(const t of e.removedTargetIds)this.Ue(t,e.key,e.Ve)}We(e){this.forEachTarget(e,(t=>{const n=this.Ge(t);switch(e.state){case 0:this.ze(t)&&n.De(e.resumeToken);break;case 1:n.Oe(),n.Se||n.Ce(),n.De(e.resumeToken);break;case 2:n.Oe(),n.Se||this.removeTarget(t);break;case 3:this.ze(t)&&(n.Ne(),n.De(e.resumeToken));break;case 4:this.ze(t)&&(this.je(t),n.De(e.resumeToken));break;default:Mv()}}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Be.forEach(((e,n)=>{this.ze(n)&&t(n)}))}He(e){const t=e.targetId,n=e.me.count,r=this.Je(t);if(r){const i=r.target;if(Lw(i))if(0===n){const e=new ib(i.path);this.Ue(t,e,cw.newNoDocument(e,Zv.min()))}else Dv(1===n);else{const r=this.Ye(t);if(r!==n){const n=this.Ze(e),i=n?this.Xe(n,e,r):1;if(0!==i){this.je(t);const e=2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(t,e)}null==Yx||Yx.et(function(e,t,n,r,i){var o,s,a,l,c,u;const d={localCacheCount:e,existenceFilterCount:t.count,databaseId:n.database,projectId:n.projectId},h=t.unchangedNames;return h&&(d.bloomFilter={applied:0===i,hashCount:null!==(o=null==h?void 0:h.hashCount)&&void 0!==o?o:0,bitmapLength:null!==(l=null===(a=null===(s=null==h?void 0:h.bits)||void 0===s?void 0:s.bitmap)||void 0===a?void 0:a.length)&&void 0!==l?l:0,padding:null!==(u=null===(c=null==h?void 0:h.bits)||void 0===c?void 0:c.padding)&&void 0!==u?u:0,mightContain:e=>{var t;return null!==(t=null==r?void 0:r.mightContain(e))&&void 0!==t&&t}}),d}(r,e.me,this.Le.tt(),n,i))}}}}Ze(e){const t=e.me.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:n="",padding:r=0},hashCount:i=0}=t;let o,s;try{o=Fb(n).toUint8Array()}catch(e){if(e instanceof Nb)return Rv("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{s=new rA(o,r,i)}catch(e){return Rv(e instanceof iA?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===s.Ie?null:s}Xe(e,t,n){return t.me.count===n-this.nt(e,t.targetId)?0:2}nt(e,t){const n=this.Le.getRemoteKeysForTarget(t);let r=0;return n.forEach((n=>{const i=this.Le.tt(),o=`projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;e.mightContain(o)||(this.Ue(t,n,null),r++)})),r}rt(e){const t=new Map;this.Be.forEach(((n,r)=>{const i=this.Je(r);if(i){if(n.current&&Lw(i.target)){const t=new ib(i.target.path);null!==this.ke.get(t)||this.it(r,t)||this.Ue(r,t,cw.newNoDocument(t,e))}n.be&&(t.set(r,n.ve()),n.Ce())}}));let n=ux();this.qe.forEach(((e,t)=>{let r=!0;t.forEachWhile((e=>{const t=this.Je(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(r=!1,!1)})),r&&(n=n.add(e))})),this.ke.forEach(((t,n)=>n.setReadTime(e)));const r=new oA(e,t,this.Qe,this.ke,n);return this.ke=tx(),this.qe=hA(),this.Qe=new _b(Xv),r}$e(e,t){if(!this.ze(e))return;const n=this.it(e,t.key)?2:0;this.Ge(e).Fe(t.key,n),this.ke=this.ke.insert(t.key,t),this.qe=this.qe.insert(t.key,this.st(t.key).add(e))}Ue(e,t,n){if(!this.ze(e))return;const r=this.Ge(e);this.it(e,t)?r.Fe(t,1):r.Me(t),this.qe=this.qe.insert(t,this.st(t).delete(e)),n&&(this.ke=this.ke.insert(t,n))}removeTarget(e){this.Be.delete(e)}Ye(e){const t=this.Ge(e).ve();return this.Le.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let t=this.Be.get(e);return t||(t=new uA,this.Be.set(e,t)),t}st(e){let t=this.qe.get(e);return t||(t=new Ib(Xv),this.qe=this.qe.insert(e,t)),t}ze(e){const t=null!==this.Je(e);return t||Iv("WatchChangeAggregator","Detected inactive target",e),t}Je(e){const t=this.Be.get(e);return t&&t.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new uA),this.Le.getRemoteKeysForTarget(e).forEach((t=>{this.Ue(e,t,null)}))}it(e,t){return this.Le.getRemoteKeysForTarget(e).has(t)}}function hA(){return new _b(ib.comparator)}function fA(){return new _b(ib.comparator)}const pA={asc:"ASCENDING",desc:"DESCENDING"},gA={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},mA={and:"AND",or:"OR"};class yA{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function vA(e,t){return e.useProto3Json||yb(t)?t:{value:t}}function bA(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function wA(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function xA(e,t){return bA(e,t.toTimestamp())}function AA(e){return Dv(!!e),Zv.fromTimestamp(function(e){const t=Lb(e);return new Yv(t.seconds,t.nanos)}(e))}function EA(e,t){return SA(e,t).canonicalString()}function SA(e,t){const n=function(e){return new tb(["projects",e.projectId,"databases",e.database])}(e).child("documents");return void 0===t?n:n.child(t)}function kA(e){const t=tb.fromString(e);return Dv(WA(t)),t}function CA(e,t){return EA(e.databaseId,t.path)}function _A(e,t){const n=kA(t);if(n.get(1)!==e.databaseId.projectId)throw new Fv(Bv.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new Fv(Bv.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ib(OA(n))}function TA(e,t){return EA(e.databaseId,t)}function PA(e){const t=kA(e);return 4===t.length?tb.emptyPath():OA(t)}function IA(e){return new tb(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function OA(e){return Dv(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function RA(e,t,n){return{name:CA(e,t),fields:n.value.mapValue.fields}}function NA(e,t){let n;if(t instanceof Bx)n={update:RA(e,t.key,t.value)};else if(t instanceof Vx)n={delete:CA(e,t.key)};else if(t instanceof Fx)n={update:RA(e,t.key,t.data),updateMask:$A(t.fieldMask)};else{if(!(t instanceof Hx))return Mv();n={verify:CA(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((e=>function(e,t){const n=t.transform;if(n instanceof wx)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof xx)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof Ex)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof kx)return{fieldPath:t.field.canonicalString(),increment:n.Pe};throw Mv()}(0,e)))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:xA(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:Mv()}(e,t.precondition)),n}function MA(e,t){return{documents:[TA(e,t.path)]}}function DA(e,t){const n={structuredQuery:{}},r=t.path;let i;null!==t.collectionGroup?(i=r,n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=TA(e,i);const o=function(e){if(0!==e.length)return HA(yw.create(e,"and"))}(t.filters);o&&(n.structuredQuery.where=o);const s=function(e){if(0!==e.length)return e.map((e=>function(e){return{field:zA(e.field),direction:FA(e.dir)}}(e)))}(t.orderBy);s&&(n.structuredQuery.orderBy=s);const a=vA(e,t.limit);return null!==a&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=function(e){return{before:e.inclusive,values:e.position}}(t.startAt)),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),{_t:n,parent:i}}function LA(e){let t=PA(e.parent);const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Dv(1===r);const e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let o=[];n.where&&(o=function(e){const t=BA(e);return t instanceof yw&&bw(t)?t.getFilters():[t]}(n.where));let s=[];n.orderBy&&(s=function(e){return e.map((e=>function(e){return new fw(VA(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)))}(n.orderBy));let a=null;n.limit&&(a=function(e){let t;return t="object"==typeof e?e.value:e,yb(t)?null:t}(n.limit));let l=null;n.startAt&&(l=function(e){const t=!!e.before,n=e.values||[];return new uw(n,t)}(n.startAt));let c=null;return n.endAt&&(c=function(e){const t=!e.before,n=e.values||[];return new uw(n,t)}(n.endAt)),Fw(t,i,s,o,a,"F",l,c)}function BA(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const t=VA(e.unaryFilter.field);return mw.create(t,"==",{doubleValue:NaN});case"IS_NULL":const n=VA(e.unaryFilter.field);return mw.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const r=VA(e.unaryFilter.field);return mw.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const i=VA(e.unaryFilter.field);return mw.create(i,"!=",{nullValue:"NULL_VALUE"});default:return Mv()}}(e):void 0!==e.fieldFilter?function(e){return mw.create(VA(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return Mv()}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return yw.create(e.compositeFilter.filters.map((e=>BA(e))),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return Mv()}}(e.compositeFilter.op))}(e):Mv()}function FA(e){return pA[e]}function jA(e){return gA[e]}function UA(e){return mA[e]}function zA(e){return{fieldPath:e.canonicalString()}}function VA(e){return rb.fromServerFormat(e.fieldPath)}function HA(e){return e instanceof mw?function(e){if("=="===e.op){if(nw(e.value))return{unaryFilter:{field:zA(e.field),op:"IS_NAN"}};if(tw(e.value))return{unaryFilter:{field:zA(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(nw(e.value))return{unaryFilter:{field:zA(e.field),op:"IS_NOT_NAN"}};if(tw(e.value))return{unaryFilter:{field:zA(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:zA(e.field),op:jA(e.op),value:e.value}}}(e):e instanceof yw?function(e){const t=e.getFilters().map((e=>HA(e)));return 1===t.length?t[0]:{compositeFilter:{op:UA(e.op),filters:t}}}(e):Mv()}function $A(e){const t=[];return e.fields.forEach((e=>t.push(e.canonicalString()))),{fieldPaths:t}}function WA(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class GA{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Zv.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Zv.min(),s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Mb.EMPTY_BYTE_STRING,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=s,this.expectedCount=a}withSequenceNumber(e){return new GA(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new GA(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new GA(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new GA(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class qA{constructor(e){this.ct=e}}function KA(e){const t=LA({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Ww(t,t.limit,"L"):t}class QA{constructor(){}It(e,t){this.Tt(e,t),t.Et()}Tt(e,t){if("nullValue"in e)this.dt(t,5);else if("booleanValue"in e)this.dt(t,10),t.At(e.booleanValue?1:0);else if("integerValue"in e)this.dt(t,15),t.At(Bb(e.integerValue));else if("doubleValue"in e){const n=Bb(e.doubleValue);isNaN(n)?this.dt(t,13):(this.dt(t,15),vb(n)?t.At(0):t.At(n))}else if("timestampValue"in e){let n=e.timestampValue;this.dt(t,20),"string"==typeof n&&(n=Lb(n)),t.Rt(`${n.seconds||""}`),t.At(n.nanos||0)}else if("stringValue"in e)this.Vt(e.stringValue,t),this.ft(t);else if("bytesValue"in e)this.dt(t,30),t.gt(Fb(e.bytesValue)),this.ft(t);else if("referenceValue"in e)this.yt(e.referenceValue,t);else if("geoPointValue"in e){const n=e.geoPointValue;this.dt(t,45),t.At(n.latitude||0),t.At(n.longitude||0)}else"mapValue"in e?sw(e)?this.dt(t,Number.MAX_SAFE_INTEGER):iw(e)?this.wt(e.mapValue,t):(this.St(e.mapValue,t),this.ft(t)):"arrayValue"in e?(this.bt(e.arrayValue,t),this.ft(t)):Mv()}Vt(e,t){this.dt(t,25),this.Dt(e,t)}Dt(e,t){t.Rt(e)}St(e,t){const n=e.fields||{};this.dt(t,55);for(const r of Object.keys(n))this.Vt(r,t),this.Tt(n[r],t)}wt(e,t){var n,r;const i=e.fields||{};this.dt(t,53);const o="value",s=(null===(r=null===(n=i[o].arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.length)||0;this.dt(t,15),t.At(Bb(s)),this.Vt(o,t),this.Tt(i[o],t)}bt(e,t){const n=e.values||[];this.dt(t,50);for(const r of n)this.Tt(r,t)}yt(e,t){this.dt(t,37),ib.fromName(e).path.forEach((e=>{this.dt(t,60),this.Dt(e,t)}))}dt(e,t){e.At(t)}ft(e){e.At(2)}}QA.vt=new QA;class XA{constructor(){this.un=new JA}addToCollectionParentIndex(e,t){return this.un.add(t),fb.resolve()}getCollectionParents(e,t){return fb.resolve(this.un.getEntries(t))}addFieldIndex(e,t){return fb.resolve()}deleteFieldIndex(e,t){return fb.resolve()}deleteAllFieldIndexes(e){return fb.resolve()}createTargetIndexes(e,t){return fb.resolve()}getDocumentsMatchingTarget(e,t){return fb.resolve(null)}getIndexType(e,t){return fb.resolve(0)}getFieldIndexes(e,t){return fb.resolve([])}getNextCollectionGroupToUpdate(e){return fb.resolve(null)}getMinOffset(e,t){return fb.resolve(lb.min())}getMinOffsetFromCollectionGroup(e,t){return fb.resolve(lb.min())}updateCollectionGroup(e,t,n){return fb.resolve()}updateIndexEntries(e,t){return fb.resolve()}}class JA{constructor(){this.index={}}add(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Ib(tb.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new Ib(tb.comparator)).toArray()}}new Uint8Array(0);class YA{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new YA(e,YA.DEFAULT_COLLECTION_PERCENTILE,YA.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}YA.DEFAULT_COLLECTION_PERCENTILE=10,YA.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,YA.DEFAULT=new YA(41943040,YA.DEFAULT_COLLECTION_PERCENTILE,YA.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),YA.DISABLED=new YA(-1,0,0);class ZA{constructor(e){this.Ln=e}next(){return this.Ln+=2,this.Ln}static Bn(){return new ZA(0)}static kn(){return new ZA(-1)}}class eE{constructor(){this.changes=new Zw((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,cw.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?fb.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class tE{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class nE{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next((r=>(n=r,this.remoteDocumentCache.getEntry(e,t)))).next((e=>(null!==n&&Mx(n.mutation,e,Rb.empty(),Yv.now()),e)))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.getLocalViewOfDocuments(e,t,ux()).next((()=>t))))}getLocalViewOfDocuments(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ux();const r=ox();return this.populateOverlays(e,r,t).next((()=>this.computeViews(e,t,r,n).next((e=>{let t=rx();return e.forEach(((e,n)=>{t=t.insert(e,n.overlayedDocument)})),t}))))}getOverlayedDocuments(e,t){const n=ox();return this.populateOverlays(e,n,t).next((()=>this.computeViews(e,t,n,ux())))}populateOverlays(e,t,n){const r=[];return n.forEach((e=>{t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((e=>{e.forEach(((e,n)=>{t.set(e,n)}))}))}computeViews(e,t,n,r){let i=tx();const o=ax(),s=ax();return t.forEach(((e,t)=>{const s=n.get(t.key);r.has(t.key)&&(void 0===s||s.mutation instanceof Fx)?i=i.insert(t.key,t):void 0!==s?(o.set(t.key,s.mutation.getFieldMask()),Mx(s.mutation,t,s.mutation.getFieldMask(),Yv.now())):o.set(t.key,Rb.empty())})),this.recalculateAndSaveOverlays(e,i).next((e=>(e.forEach(((e,t)=>o.set(e,t))),t.forEach(((e,t)=>{var n;return s.set(e,new tE(t,null!==(n=o.get(e))&&void 0!==n?n:null))})),s)))}recalculateAndSaveOverlays(e,t){const n=ax();let r=new _b(((e,t)=>e-t)),i=ux();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((e=>{for(const i of e)i.keys().forEach((e=>{const o=t.get(e);if(null===o)return;let s=n.get(e)||Rb.empty();s=i.applyToLocalView(o,s),n.set(e,s);const a=(r.get(i.batchId)||ux()).add(e);r=r.insert(i.batchId,a)}))})).next((()=>{const o=[],s=r.getReverseIterator();for(;s.hasNext();){const r=s.getNext(),a=r.key,l=r.value,c=sx();l.forEach((e=>{if(!i.has(e)){const r=Rx(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}})),o.push(this.documentOverlayCache.saveOverlays(e,a,c))}return fb.waitFor(o)})).next((()=>n))}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.recalculateAndSaveOverlays(e,t)))}getDocumentsMatchingQuery(e,t,n,r){return function(e){return ib.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):zw(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n,r):this.getDocumentsMatchingCollectionQuery(e,t,n,r)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((i=>{const o=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):fb.resolve(ox());let s=-1,a=i;return o.next((t=>fb.forEach(t,((t,n)=>(s<n.largestBatchId&&(s=n.largestBatchId),i.get(t)?fb.resolve():this.remoteDocumentCache.getEntry(e,t).next((e=>{a=a.insert(t,e)}))))).next((()=>this.populateOverlays(e,t,i))).next((()=>this.computeViews(e,a,t,ux()))).next((e=>({batchId:s,changes:ix(e)})))))}))}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new ib(t)).next((e=>{let t=rx();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}getDocumentsMatchingCollectionGroupQuery(e,t,n,r){const i=t.collectionGroup;let o=rx();return this.indexManager.getCollectionParents(e,i).next((s=>fb.forEach(s,(s=>{const a=function(e,t){return new Bw(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,s.child(i));return this.getDocumentsMatchingCollectionQuery(e,a,n,r).next((e=>{e.forEach(((e,t)=>{o=o.insert(e,t)}))}))})).next((()=>o))))}getDocumentsMatchingCollectionQuery(e,t,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next((o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,i,r)))).next((e=>{i.forEach(((t,n)=>{const r=n.getKey();null===e.get(r)&&(e=e.insert(r,cw.newInvalidDocument(r)))}));let n=rx();return e.forEach(((e,r)=>{const o=i.get(e);void 0!==o&&Mx(o.mutation,r,Rb.empty(),Yv.now()),Qw(t,r)&&(n=n.insert(e,r))})),n}))}}class rE{constructor(e){this.serializer=e,this.hr=new Map,this.Pr=new Map}getBundleMetadata(e,t){return fb.resolve(this.hr.get(t))}saveBundleMetadata(e,t){return this.hr.set(t.id,function(e){return{id:e.id,version:e.version,createTime:AA(e.createTime)}}(t)),fb.resolve()}getNamedQuery(e,t){return fb.resolve(this.Pr.get(t))}saveNamedQuery(e,t){return this.Pr.set(t.name,function(e){return{name:e.name,query:KA(e.bundledQuery),readTime:AA(e.readTime)}}(t)),fb.resolve()}}class iE{constructor(){this.overlays=new _b(ib.comparator),this.Ir=new Map}getOverlay(e,t){return fb.resolve(this.overlays.get(t))}getOverlays(e,t){const n=ox();return fb.forEach(t,(t=>this.getOverlay(e,t).next((e=>{null!==e&&n.set(t,e)})))).next((()=>n))}saveOverlays(e,t,n){return n.forEach(((n,r)=>{this.ht(e,t,r)})),fb.resolve()}removeOverlaysForBatchId(e,t,n){const r=this.Ir.get(n);return void 0!==r&&(r.forEach((e=>this.overlays=this.overlays.remove(e))),this.Ir.delete(n)),fb.resolve()}getOverlaysForCollection(e,t,n){const r=ox(),i=t.length+1,o=new ib(t.child("")),s=this.overlays.getIteratorFrom(o);for(;s.hasNext();){const e=s.getNext().value,o=e.getKey();if(!t.isPrefixOf(o.path))break;o.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return fb.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new _b(((e,t)=>e-t));const o=this.overlays.getIterator();for(;o.hasNext();){const e=o.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=ox(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}const s=ox(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach(((e,t)=>s.set(e,t))),!(s.size()>=r)););return fb.resolve(s)}ht(e,t,n){const r=this.overlays.get(n.key);if(null!==r){const e=this.Ir.get(r.largestBatchId).delete(n.key);this.Ir.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new Gx(t,n));let i=this.Ir.get(t);void 0===i&&(i=ux(),this.Ir.set(t,i)),this.Ir.set(t,i.add(n.key))}}class oE{constructor(){this.sessionToken=Mb.EMPTY_BYTE_STRING}getSessionToken(e){return fb.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,fb.resolve()}}class sE{constructor(){this.Tr=new Ib(aE.Er),this.dr=new Ib(aE.Ar)}isEmpty(){return this.Tr.isEmpty()}addReference(e,t){const n=new aE(e,t);this.Tr=this.Tr.add(n),this.dr=this.dr.add(n)}Rr(e,t){e.forEach((e=>this.addReference(e,t)))}removeReference(e,t){this.Vr(new aE(e,t))}mr(e,t){e.forEach((e=>this.removeReference(e,t)))}gr(e){const t=new ib(new tb([])),n=new aE(t,e),r=new aE(t,e+1),i=[];return this.dr.forEachInRange([n,r],(e=>{this.Vr(e),i.push(e.key)})),i}pr(){this.Tr.forEach((e=>this.Vr(e)))}Vr(e){this.Tr=this.Tr.delete(e),this.dr=this.dr.delete(e)}yr(e){const t=new ib(new tb([])),n=new aE(t,e),r=new aE(t,e+1);let i=ux();return this.dr.forEachInRange([n,r],(e=>{i=i.add(e.key)})),i}containsKey(e){const t=new aE(e,0),n=this.Tr.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class aE{constructor(e,t){this.key=e,this.wr=t}static Er(e,t){return ib.comparator(e.key,t.key)||Xv(e.wr,t.wr)}static Ar(e,t){return Xv(e.wr,t.wr)||ib.comparator(e.key,t.key)}}class lE{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.Sr=1,this.br=new Ib(aE.Er)}checkEmpty(e){return fb.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){const i=this.Sr;this.Sr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new $x(i,t,n,r);this.mutationQueue.push(o);for(const s of r)this.br=this.br.add(new aE(s.key,i)),this.indexManager.addToCollectionParentIndex(e,s.key.path.popLast());return fb.resolve(o)}lookupMutationBatch(e,t){return fb.resolve(this.Dr(t))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=this.vr(n),i=r<0?0:r;return fb.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return fb.resolve(0===this.mutationQueue.length?-1:this.Sr-1)}getAllMutationBatches(e){return fb.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const n=new aE(t,0),r=new aE(t,Number.POSITIVE_INFINITY),i=[];return this.br.forEachInRange([n,r],(e=>{const t=this.Dr(e.wr);i.push(t)})),fb.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new Ib(Xv);return t.forEach((e=>{const t=new aE(e,0),r=new aE(e,Number.POSITIVE_INFINITY);this.br.forEachInRange([t,r],(e=>{n=n.add(e.wr)}))})),fb.resolve(this.Cr(n))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1;let i=n;ib.isDocumentKey(i)||(i=i.child(""));const o=new aE(new ib(i),0);let s=new Ib(Xv);return this.br.forEachWhile((e=>{const t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(s=s.add(e.wr)),!0)}),o),fb.resolve(this.Cr(s))}Cr(e){const t=[];return e.forEach((e=>{const n=this.Dr(e);null!==n&&t.push(n)})),t}removeMutationBatch(e,t){Dv(0===this.Fr(t.batchId,"removed")),this.mutationQueue.shift();let n=this.br;return fb.forEach(t.mutations,(r=>{const i=new aE(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)})).next((()=>{this.br=n}))}On(e){}containsKey(e,t){const n=new aE(t,0),r=this.br.firstAfterOrEqual(n);return fb.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,fb.resolve()}Fr(e,t){return this.vr(e)}vr(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Dr(e){const t=this.vr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class cE{constructor(e){this.Mr=e,this.docs=new _b(ib.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const n=t.key,r=this.docs.get(n),i=r?r.size:0,o=this.Mr(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:o}),this.size+=o-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const n=this.docs.get(t);return fb.resolve(n?n.document.mutableCopy():cw.newInvalidDocument(t))}getEntries(e,t){let n=tx();return t.forEach((e=>{const t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():cw.newInvalidDocument(e))})),fb.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=tx();const o=t.path,s=new ib(o.child("")),a=this.docs.getIteratorFrom(s);for(;a.hasNext();){const{key:e,value:{document:s}}=a.getNext();if(!o.isPrefixOf(e.path))break;e.path.length>o.length+1||cb(ab(s),n)<=0||(r.has(s.key)||Qw(t,s))&&(i=i.insert(s.key,s.mutableCopy()))}return fb.resolve(i)}getAllFromCollectionGroup(e,t,n,r){Mv()}Or(e,t){return fb.forEach(this.docs,(e=>t(e)))}newChangeBuffer(e){return new uE(this)}getSize(e){return fb.resolve(this.size)}}class uE extends eE{constructor(e){super(),this.cr=e}applyChanges(e){const t=[];return this.changes.forEach(((n,r)=>{r.isValidDocument()?t.push(this.cr.addEntry(e,r)):this.cr.removeEntry(n)})),fb.waitFor(t)}getFromCache(e,t){return this.cr.getEntry(e,t)}getAllFromCache(e,t){return this.cr.getEntries(e,t)}}class dE{constructor(e){this.persistence=e,this.Nr=new Zw((e=>Mw(e)),Dw),this.lastRemoteSnapshotVersion=Zv.min(),this.highestTargetId=0,this.Lr=0,this.Br=new sE,this.targetCount=0,this.kr=ZA.Bn()}forEachTarget(e,t){return this.Nr.forEach(((e,n)=>t(n))),fb.resolve()}getLastRemoteSnapshotVersion(e){return fb.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return fb.resolve(this.Lr)}allocateTargetId(e){return this.highestTargetId=this.kr.next(),fb.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Lr&&(this.Lr=t),fb.resolve()}Kn(e){this.Nr.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.kr=new ZA(t),this.highestTargetId=t),e.sequenceNumber>this.Lr&&(this.Lr=e.sequenceNumber)}addTargetData(e,t){return this.Kn(t),this.targetCount+=1,fb.resolve()}updateTargetData(e,t){return this.Kn(t),fb.resolve()}removeTargetData(e,t){return this.Nr.delete(t.target),this.Br.gr(t.targetId),this.targetCount-=1,fb.resolve()}removeTargets(e,t,n){let r=0;const i=[];return this.Nr.forEach(((o,s)=>{s.sequenceNumber<=t&&null===n.get(s.targetId)&&(this.Nr.delete(o),i.push(this.removeMatchingKeysForTargetId(e,s.targetId)),r++)})),fb.waitFor(i).next((()=>r))}getTargetCount(e){return fb.resolve(this.targetCount)}getTargetData(e,t){const n=this.Nr.get(t)||null;return fb.resolve(n)}addMatchingKeys(e,t,n){return this.Br.Rr(t,n),fb.resolve()}removeMatchingKeys(e,t,n){this.Br.mr(t,n);const r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((t=>{i.push(r.markPotentiallyOrphaned(e,t))})),fb.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Br.gr(t),fb.resolve()}getMatchingKeysForTargetId(e,t){const n=this.Br.yr(t);return fb.resolve(n)}containsKey(e,t){return fb.resolve(this.Br.containsKey(t))}}class hE{constructor(e,t){this.qr={},this.overlays={},this.Qr=new mb(0),this.Kr=!1,this.Kr=!0,this.$r=new oE,this.referenceDelegate=e(this),this.Ur=new dE(this),this.indexManager=new XA,this.remoteDocumentCache=function(e){return new cE(e)}((e=>this.referenceDelegate.Wr(e))),this.serializer=new qA(t),this.Gr=new rE(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Kr=!1,Promise.resolve()}get started(){return this.Kr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new iE,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.qr[e.toKey()];return n||(n=new lE(t,this.referenceDelegate),this.qr[e.toKey()]=n),n}getGlobalsCache(){return this.$r}getTargetCache(){return this.Ur}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Gr}runTransaction(e,t,n){Iv("MemoryPersistence","Starting transaction:",e);const r=new fE(this.Qr.next());return this.referenceDelegate.zr(),n(r).next((e=>this.referenceDelegate.jr(r).next((()=>e)))).toPromise().then((e=>(r.raiseOnCommittedEvent(),e)))}Hr(e,t){return fb.or(Object.values(this.qr).map((n=>()=>n.containsKey(e,t))))}}class fE extends db{constructor(e){super(),this.currentSequenceNumber=e}}class pE{constructor(e){this.persistence=e,this.Jr=new sE,this.Yr=null}static Zr(e){return new pE(e)}get Xr(){if(this.Yr)return this.Yr;throw Mv()}addReference(e,t,n){return this.Jr.addReference(n,t),this.Xr.delete(n.toString()),fb.resolve()}removeReference(e,t,n){return this.Jr.removeReference(n,t),this.Xr.add(n.toString()),fb.resolve()}markPotentiallyOrphaned(e,t){return this.Xr.add(t.toString()),fb.resolve()}removeTarget(e,t){this.Jr.gr(t.targetId).forEach((e=>this.Xr.add(e.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next((e=>{e.forEach((e=>this.Xr.add(e.toString())))})).next((()=>n.removeTargetData(e,t)))}zr(){this.Yr=new Set}jr(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return fb.forEach(this.Xr,(n=>{const r=ib.fromPath(n);return this.ei(e,r).next((e=>{e||t.removeEntry(r,Zv.min())}))})).next((()=>(this.Yr=null,t.apply(e))))}updateLimboDocument(e,t){return this.ei(e,t).next((e=>{e?this.Xr.delete(t.toString()):this.Xr.add(t.toString())}))}Wr(e){return 0}ei(e,t){return fb.or([()=>fb.resolve(this.Jr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Hr(e,t)])}}class gE{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.$i=n,this.Ui=r}static Wi(e,t){let n=ux(),r=ux();for(const i of t.docChanges)switch(i.type){case 0:n=n.add(i.doc.key);break;case 1:r=r.add(i.doc.key)}return new gE(e,t.fromCache,n,r)}}class mE{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class yE{constructor(){this.Gi=!1,this.zi=!1,this.ji=100,this.Hi=nf()?8:pb(tf())>0?6:4}initialize(e,t){this.Ji=e,this.indexManager=t,this.Gi=!0}getDocumentsMatchingQuery(e,t,n,r){const i={result:null};return this.Yi(e,t).next((e=>{i.result=e})).next((()=>{if(!i.result)return this.Zi(e,t,r,n).next((e=>{i.result=e}))})).next((()=>{if(i.result)return;const n=new mE;return this.Xi(e,t,n).next((r=>{if(i.result=r,this.zi)return this.es(e,t,n,r.size)}))})).next((()=>i.result))}es(e,t,n,r){return n.documentReadCount<this.ji?(Pv()<=Af.DEBUG&&Iv("QueryEngine","SDK will not create cache indexes for query:",Kw(t),"since it only creates cache indexes for collection contains","more than or equal to",this.ji,"documents"),fb.resolve()):(Pv()<=Af.DEBUG&&Iv("QueryEngine","Query:",Kw(t),"scans",n.documentReadCount,"local documents and returns",r,"documents as results."),n.documentReadCount>this.Hi*r?(Pv()<=Af.DEBUG&&Iv("QueryEngine","The SDK decides to create cache indexes for query:",Kw(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Hw(t))):fb.resolve())}Yi(e,t){if(Uw(t))return fb.resolve(null);let n=Hw(t);return this.indexManager.getIndexType(e,n).next((r=>0===r?null:(null!==t.limit&&1===r&&(t=Ww(t,null,"F"),n=Hw(t)),this.indexManager.getDocumentsMatchingTarget(e,n).next((r=>{const i=ux(...r);return this.Ji.getDocuments(e,i).next((r=>this.indexManager.getMinOffset(e,n).next((n=>{const o=this.ts(t,r);return this.ns(t,o,i,n.readTime)?this.Yi(e,Ww(t,null,"F")):this.rs(e,o,t,n)}))))})))))}Zi(e,t,n,r){return Uw(t)||r.isEqual(Zv.min())?fb.resolve(null):this.Ji.getDocuments(e,n).next((i=>{const o=this.ts(t,i);return this.ns(t,o,n,r)?fb.resolve(null):(Pv()<=Af.DEBUG&&Iv("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Kw(t)),this.rs(e,o,t,sb(r,-1)).next((e=>e)))}))}ts(e,t){let n=new Ib(Jw(e));return t.forEach(((t,r)=>{Qw(e,r)&&(n=n.add(r))})),n}ns(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;const i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Xi(e,t,n){return Pv()<=Af.DEBUG&&Iv("QueryEngine","Using full collection scan to execute query:",Kw(t)),this.Ji.getDocumentsMatchingQuery(e,t,lb.min(),n)}rs(e,t,n,r){return this.Ji.getDocumentsMatchingQuery(e,n,r).next((e=>(t.forEach((t=>{e=e.insert(t.key,t)})),e)))}}class vE{constructor(e,t,n,r){this.persistence=e,this.ss=t,this.serializer=r,this.os=new _b(Xv),this._s=new Zw((e=>Mw(e)),Dw),this.us=new Map,this.cs=e.getRemoteDocumentCache(),this.Ur=e.getTargetCache(),this.Gr=e.getBundleCache(),this.ls(n)}ls(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new nE(this.cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.cs.setIndexManager(this.indexManager),this.ss.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(t=>e.collect(t,this.os)))}}function bE(e,t,n,r){return new vE(e,t,n,r)}async function wE(e,t){const n=Lv(e);return await n.persistence.runTransaction("Handle user change","readonly",(e=>{let r;return n.mutationQueue.getAllMutationBatches(e).next((i=>(r=i,n.ls(t),n.mutationQueue.getAllMutationBatches(e)))).next((t=>{const i=[],o=[];let s=ux();for(const e of r){i.push(e.batchId);for(const t of e.mutations)s=s.add(t.key)}for(const e of t){o.push(e.batchId);for(const t of e.mutations)s=s.add(t.key)}return n.localDocuments.getDocuments(e,s).next((e=>({hs:e,removedBatchIds:i,addedBatchIds:o})))}))}))}function xE(e){const t=Lv(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(e=>t.Ur.getLastRemoteSnapshotVersion(e)))}function AE(e,t,n){let r=ux(),i=ux();return n.forEach((e=>r=r.add(e))),t.getEntries(e,r).next((e=>{let r=tx();return n.forEach(((n,o)=>{const s=e.get(n);o.isFoundDocument()!==s.isFoundDocument()&&(i=i.add(n)),o.isNoDocument()&&o.version.isEqual(Zv.min())?(t.removeEntry(n,o.readTime),r=r.insert(n,o)):!s.isValidDocument()||o.version.compareTo(s.version)>0||0===o.version.compareTo(s.version)&&s.hasPendingWrites?(t.addEntry(o),r=r.insert(n,o)):Iv("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",o.version)})),{Ps:r,Is:i}}))}function EE(e,t){const n=Lv(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(e=>(void 0===t&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t))))}function SE(e,t){const n=Lv(e);return n.persistence.runTransaction("Allocate target","readwrite",(e=>{let r;return n.Ur.getTargetData(e,t).next((i=>i?(r=i,fb.resolve(r)):n.Ur.allocateTargetId(e).next((i=>(r=new GA(t,i,"TargetPurposeListen",e.currentSequenceNumber),n.Ur.addTargetData(e,r).next((()=>r)))))))})).then((e=>{const r=n.os.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.os=n.os.insert(e.targetId,e),n._s.set(t,e.targetId)),e}))}async function kE(e,t,n){const r=Lv(e),i=r.os.get(t),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,(e=>r.persistence.referenceDelegate.removeTarget(e,i)))}catch(e){if(!gb(e))throw e;Iv("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}r.os=r.os.remove(t),r._s.delete(i.target)}function CE(e,t,n){const r=Lv(e);let i=Zv.min(),o=ux();return r.persistence.runTransaction("Execute query","readwrite",(e=>function(e,t,n){const r=Lv(e),i=r._s.get(n);return void 0!==i?fb.resolve(r.os.get(i)):r.Ur.getTargetData(t,n)}(r,e,Hw(t)).next((t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.Ur.getMatchingKeysForTargetId(e,t.targetId).next((e=>{o=e}))})).next((()=>r.ss.getDocumentsMatchingQuery(e,t,n?i:Zv.min(),n?o:ux()))).next((e=>(_E(r,Xw(t),e),{documents:e,Ts:o})))))}function _E(e,t,n){let r=e.us.get(t)||Zv.min();n.forEach(((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.us.set(t,r)}class TE{constructor(){this.activeTargetIds=hx()}fs(e){this.activeTargetIds=this.activeTargetIds.add(e)}gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Vs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class PE{constructor(){this.so=new TE,this.oo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.so.fs(e),this.oo[e]||"not-current"}updateQueryState(e,t,n){this.oo[e]=t}removeLocalQueryTarget(e){this.so.gs(e)}isLocalQueryTarget(e){return this.so.activeTargetIds.has(e)}clearQueryState(e){delete this.oo[e]}getAllActiveQueryTargets(){return this.so.activeTargetIds}isActiveQueryTarget(e){return this.so.activeTargetIds.has(e)}start(){return this.so=new TE,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class IE{_o(e){}shutdown(){}}class OE{constructor(){this.ao=()=>this.uo(),this.co=()=>this.lo(),this.ho=[],this.Po()}_o(e){this.ho.push(e)}shutdown(){window.removeEventListener("online",this.ao),window.removeEventListener("offline",this.co)}Po(){window.addEventListener("online",this.ao),window.addEventListener("offline",this.co)}uo(){Iv("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.ho)e(0)}lo(){Iv("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.ho)e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let RE=null;function NE(){return null===RE?RE=268435456+Math.round(2147483648*Math.random()):RE++,"0x"+RE.toString(16)}const ME={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class DE{constructor(e){this.Io=e.Io,this.To=e.To}Eo(e){this.Ao=e}Ro(e){this.Vo=e}mo(e){this.fo=e}onMessage(e){this.po=e}close(){this.To()}send(e){this.Io(e)}yo(){this.Ao()}wo(){this.Vo()}So(e){this.fo(e)}bo(e){this.po(e)}}const LE="WebChannelConnection";class BE extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",n=encodeURIComponent(this.databaseId.projectId),r=encodeURIComponent(this.databaseId.database);this.Do=t+"://"+e.host,this.vo=`projects/${n}/databases/${r}`,this.Co="(default)"===this.databaseId.database?`project_id=${n}`:`project_id=${n}&database_id=${r}`}get Fo(){return!1}Mo(e,t,n,r,i){const o=NE(),s=this.xo(e,t.toUriEncodedString());Iv("RestConnection",`Sending RPC '${e}' ${o}:`,s,n);const a={"google-cloud-resource-prefix":this.vo,"x-goog-request-params":this.Co};return this.Oo(a,r,i),this.No(e,s,a,n).then((t=>(Iv("RestConnection",`Received RPC '${e}' ${o}: `,t),t)),(t=>{throw Rv("RestConnection",`RPC '${e}' ${o} failed with error: `,t,"url: ",s,"request:",n),t}))}Lo(e,t,n,r,i,o){return this.Mo(e,t,n,r,i)}Oo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+_v,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach(((t,n)=>e[n]=t)),n&&n.headers.forEach(((t,n)=>e[n]=t))}xo(e,t){const n=ME[e];return`${this.Do}/v1/${t}:${n}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}No(e,t,n,r){const i=NE();return new Promise(((o,s)=>{const a=new pv;a.setWithCredentials(!0),a.listenOnce(yv.COMPLETE,(()=>{try{switch(a.getLastErrorCode()){case vv.NO_ERROR:const t=a.getResponseJson();Iv(LE,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),o(t);break;case vv.TIMEOUT:Iv(LE,`RPC '${e}' ${i} timed out`),s(new Fv(Bv.DEADLINE_EXCEEDED,"Request time out"));break;case vv.HTTP_ERROR:const n=a.getStatus();if(Iv(LE,`RPC '${e}' ${i} failed with status:`,n,"response text:",a.getResponseText()),n>0){let e=a.getResponseJson();Array.isArray(e)&&(e=e[0]);const t=null==e?void 0:e.error;if(t&&t.status&&t.message){const e=function(e){const t=e.toLowerCase().replace(/_/g,"-");return Object.values(Bv).indexOf(t)>=0?t:Bv.UNKNOWN}(t.status);s(new Fv(e,t.message))}else s(new Fv(Bv.UNKNOWN,"Server responded with status "+a.getStatus()))}else s(new Fv(Bv.UNAVAILABLE,"Connection failed."));break;default:Mv()}}finally{Iv(LE,`RPC '${e}' ${i} completed.`)}}));const l=JSON.stringify(r);Iv(LE,`RPC '${e}' ${i} sending request:`,r),a.send(t,"POST",l,n,15)}))}Bo(e,t,n){const r=NE(),i=[this.Do,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=Av(),s=xv(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(a.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(a.xmlHttpFactory=new gv({})),this.Oo(a.initMessageHeaders,t,n),a.encodeInitMessageHeaders=!0;const c=i.join("");Iv(LE,`Creating RPC '${e}' stream ${r}: ${c}`,a);const u=o.createWebChannel(c,a);let d=!1,h=!1;const f=new DE({Io:t=>{h?Iv(LE,`Not sending because RPC '${e}' stream ${r} is closed:`,t):(d||(Iv(LE,`Opening RPC '${e}' stream ${r} transport.`),u.open(),d=!0),Iv(LE,`RPC '${e}' stream ${r} sending:`,t),u.send(t))},To:()=>u.close()}),p=(e,t,n)=>{e.listen(t,(e=>{try{n(e)}catch(e){setTimeout((()=>{throw e}),0)}}))};return p(u,mv.EventType.OPEN,(()=>{h||(Iv(LE,`RPC '${e}' stream ${r} transport opened.`),f.yo())})),p(u,mv.EventType.CLOSE,(()=>{h||(h=!0,Iv(LE,`RPC '${e}' stream ${r} transport closed`),f.So())})),p(u,mv.EventType.ERROR,(t=>{h||(h=!0,Rv(LE,`RPC '${e}' stream ${r} transport errored:`,t),f.So(new Fv(Bv.UNAVAILABLE,"The operation could not be completed")))})),p(u,mv.EventType.MESSAGE,(t=>{var n;if(!h){const i=t.data[0];Dv(!!i);const o=i,s=o.error||(null===(n=o[0])||void 0===n?void 0:n.error);if(s){Iv(LE,`RPC '${e}' stream ${r} received error:`,s);const t=s.status;let n=function(e){const t=Kx[e];if(void 0!==t)return Jx(t)}(t),i=s.message;void 0===n&&(n=Bv.INTERNAL,i="Unknown error status: "+t+" with message "+s.message),h=!0,f.So(new Fv(n,i)),u.close()}else Iv(LE,`RPC '${e}' stream ${r} received:`,i),f.bo(i)}})),p(s,wv.STAT_EVENT,(t=>{t.stat===bv.PROXY?Iv(LE,`RPC '${e}' stream ${r} detected buffering proxy`):t.stat===bv.NOPROXY&&Iv(LE,`RPC '${e}' stream ${r} detected no buffering proxy`)})),setTimeout((()=>{f.wo()}),0),f}}function FE(){return"undefined"!=typeof document?document:null}function jE(e){return new yA(e,!0)}class UE{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;this.ui=e,this.timerId=t,this.ko=n,this.qo=r,this.Qo=i,this.Ko=0,this.$o=null,this.Uo=Date.now(),this.reset()}reset(){this.Ko=0}Wo(){this.Ko=this.Qo}Go(e){this.cancel();const t=Math.floor(this.Ko+this.zo()),n=Math.max(0,Date.now()-this.Uo),r=Math.max(0,t-n);r>0&&Iv("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.Ko} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.$o=this.ui.enqueueAfterDelay(this.timerId,r,(()=>(this.Uo=Date.now(),e()))),this.Ko*=this.qo,this.Ko<this.ko&&(this.Ko=this.ko),this.Ko>this.Qo&&(this.Ko=this.Qo)}jo(){null!==this.$o&&(this.$o.skipDelay(),this.$o=null)}cancel(){null!==this.$o&&(this.$o.cancel(),this.$o=null)}zo(){return(Math.random()-.5)*this.Ko}}class zE{constructor(e,t,n,r,i,o,s,a){this.ui=e,this.Ho=n,this.Jo=r,this.connection=i,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=s,this.listener=a,this.state=0,this.Yo=0,this.Zo=null,this.Xo=null,this.stream=null,this.e_=0,this.t_=new UE(e,t)}n_(){return 1===this.state||5===this.state||this.r_()}r_(){return 2===this.state||3===this.state}start(){this.e_=0,4!==this.state?this.auth():this.i_()}async stop(){this.n_()&&await this.close(0)}s_(){this.state=0,this.t_.reset()}o_(){this.r_()&&null===this.Zo&&(this.Zo=this.ui.enqueueAfterDelay(this.Ho,6e4,(()=>this.__())))}a_(e){this.u_(),this.stream.send(e)}async __(){if(this.r_())return this.close(0)}u_(){this.Zo&&(this.Zo.cancel(),this.Zo=null)}c_(){this.Xo&&(this.Xo.cancel(),this.Xo=null)}async close(e,t){this.u_(),this.c_(),this.t_.cancel(),this.Yo++,4!==e?this.t_.reset():t&&t.code===Bv.RESOURCE_EXHAUSTED?(Ov(t.toString()),Ov("Using maximum backoff delay to prevent overloading the backend."),this.t_.Wo()):t&&t.code===Bv.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.l_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.mo(t)}l_(){}auth(){this.state=1;const e=this.h_(this.Yo),t=this.Yo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((e=>{let[n,r]=e;this.Yo===t&&this.P_(n,r)}),(t=>{e((()=>{const e=new Fv(Bv.UNKNOWN,"Fetching auth token failed: "+t.message);return this.I_(e)}))}))}P_(e,t){const n=this.h_(this.Yo);this.stream=this.T_(e,t),this.stream.Eo((()=>{n((()=>this.listener.Eo()))})),this.stream.Ro((()=>{n((()=>(this.state=2,this.Xo=this.ui.enqueueAfterDelay(this.Jo,1e4,(()=>(this.r_()&&(this.state=3),Promise.resolve()))),this.listener.Ro())))})),this.stream.mo((e=>{n((()=>this.I_(e)))})),this.stream.onMessage((e=>{n((()=>1==++this.e_?this.E_(e):this.onNext(e)))}))}i_(){this.state=5,this.t_.Go((async()=>{this.state=0,this.start()}))}I_(e){return Iv("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}h_(e){return t=>{this.ui.enqueueAndForget((()=>this.Yo===e?t():(Iv("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class VE extends zE{constructor(e,t,n,r,i,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,o),this.serializer=i}T_(e,t){return this.connection.Bo("Listen",e,t)}E_(e){return this.onNext(e)}onNext(e){this.t_.reset();const t=function(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:Mv()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(e,t){return e.useProto3Json?(Dv(void 0===t||"string"==typeof t),Mb.fromBase64String(t||"")):(Dv(void 0===t||t instanceof Buffer||t instanceof Uint8Array),Mb.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(e){const t=void 0===e.code?Bv.UNKNOWN:Jx(e.code);return new Fv(t,e.message||"")}(s);n=new cA(r,i,o,a||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=_A(e,r.document.name),o=AA(r.document.updateTime),s=r.document.createTime?AA(r.document.createTime):Zv.min(),a=new aw({mapValue:{fields:r.document.fields}}),l=cw.newFoundDocument(i,o,s,a),c=r.targetIds||[],u=r.removedTargetIds||[];n=new aA(c,u,l.key,l)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=_A(e,r.document),o=r.readTime?AA(r.readTime):Zv.min(),s=cw.newNoDocument(i,o),a=r.removedTargetIds||[];n=new aA([],a,s.key,s)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=_A(e,r.document),o=r.removedTargetIds||[];n=new aA([],o,i,null)}else{if(!("filter"in t))return Mv();{t.filter;const e=t.filter;e.targetId;const{count:r=0,unchangedNames:i}=e,o=new qx(r,i),s=e.targetId;n=new lA(s,o)}}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return Zv.min();const t=e.targetChange;return t.targetIds&&t.targetIds.length?Zv.min():t.readTime?AA(t.readTime):Zv.min()}(e);return this.listener.d_(t,n)}A_(e){const t={};t.database=IA(this.serializer),t.addTarget=function(e,t){let n;const r=t.target;if(n=Lw(r)?{documents:MA(e,r)}:{query:DA(e,r)._t},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=wA(e,t.resumeToken);const r=vA(e,t.expectedCount);null!==r&&(n.expectedCount=r)}else if(t.snapshotVersion.compareTo(Zv.min())>0){n.readTime=bA(e,t.snapshotVersion.toTimestamp());const r=vA(e,t.expectedCount);null!==r&&(n.expectedCount=r)}return n}(this.serializer,e);const n=function(e,t){const n=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Mv()}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.a_(t)}R_(e){const t={};t.database=IA(this.serializer),t.removeTarget=e,this.a_(t)}}class HE extends zE{constructor(e,t,n,r,i,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,o),this.serializer=i}get V_(){return this.e_>0}start(){this.lastStreamToken=void 0,super.start()}l_(){this.V_&&this.m_([])}T_(e,t){return this.connection.Bo("Write",e,t)}E_(e){return Dv(!!e.streamToken),this.lastStreamToken=e.streamToken,Dv(!e.writeResults||0===e.writeResults.length),this.listener.f_()}onNext(e){Dv(!!e.streamToken),this.lastStreamToken=e.streamToken,this.t_.reset();const t=function(e,t){return e&&e.length>0?(Dv(void 0!==t),e.map((e=>function(e,t){let n=e.updateTime?AA(e.updateTime):AA(t);return n.isEqual(Zv.min())&&(n=AA(t)),new Tx(n,e.transformResults||[])}(e,t)))):[]}(e.writeResults,e.commitTime),n=AA(e.commitTime);return this.listener.g_(n,t)}p_(){const e={};e.database=IA(this.serializer),this.a_(e)}m_(e){const t={streamToken:this.lastStreamToken,writes:e.map((e=>NA(this.serializer,e)))};this.a_(t)}}class $E extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.y_=!1}w_(){if(this.y_)throw new Fv(Bv.FAILED_PRECONDITION,"The client has already been terminated.")}Mo(e,t,n,r){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((i=>{let[o,s]=i;return this.connection.Mo(e,SA(t,n),r,o,s)})).catch((e=>{throw"FirebaseError"===e.name?(e.code===Bv.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new Fv(Bv.UNKNOWN,e.toString())}))}Lo(e,t,n,r,i){return this.w_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((o=>{let[s,a]=o;return this.connection.Lo(e,SA(t,n),r,s,a,i)})).catch((e=>{throw"FirebaseError"===e.name?(e.code===Bv.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new Fv(Bv.UNKNOWN,e.toString())}))}terminate(){this.y_=!0,this.connection.terminate()}}class WE{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.S_=0,this.b_=null,this.D_=!0}v_(){0===this.S_&&(this.C_("Unknown"),this.b_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.b_=null,this.F_("Backend didn't respond within 10 seconds."),this.C_("Offline"),Promise.resolve()))))}M_(e){"Online"===this.state?this.C_("Unknown"):(this.S_++,this.S_>=1&&(this.x_(),this.F_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.C_("Offline")))}set(e){this.x_(),this.S_=0,"Online"===e&&(this.D_=!1),this.C_(e)}C_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}F_(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.D_?(Ov(t),this.D_=!1):Iv("OnlineStateTracker",t)}x_(){null!==this.b_&&(this.b_.cancel(),this.b_=null)}}class GE{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.O_=[],this.N_=new Map,this.L_=new Set,this.B_=[],this.k_=i,this.k_._o((e=>{n.enqueueAndForget((async()=>{tS(this)&&(Iv("RemoteStore","Restarting streams for network reachability change."),await async function(e){const t=Lv(e);t.L_.add(4),await KE(t),t.q_.set("Unknown"),t.L_.delete(4),await qE(t)}(this))}))})),this.q_=new WE(n,r)}}async function qE(e){if(tS(e))for(const t of e.B_)await t(!0)}async function KE(e){for(const t of e.B_)await t(!1)}function QE(e,t){const n=Lv(e);n.N_.has(t.targetId)||(n.N_.set(t.targetId,t),eS(n)?ZE(n):wS(n).r_()&&JE(n,t))}function XE(e,t){const n=Lv(e),r=wS(n);n.N_.delete(t),r.r_()&&YE(n,t),0===n.N_.size&&(r.r_()?r.o_():tS(n)&&n.q_.set("Unknown"))}function JE(e,t){if(e.Q_.xe(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(Zv.min())>0){const n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}wS(e).A_(t)}function YE(e,t){e.Q_.xe(t),wS(e).R_(t)}function ZE(e){e.Q_=new dA({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),ot:t=>e.N_.get(t)||null,tt:()=>e.datastore.serializer.databaseId}),wS(e).start(),e.q_.v_()}function eS(e){return tS(e)&&!wS(e).n_()&&e.N_.size>0}function tS(e){return 0===Lv(e).L_.size}function nS(e){e.Q_=void 0}async function rS(e){e.q_.set("Online")}async function iS(e){e.N_.forEach(((t,n)=>{JE(e,t)}))}async function oS(e,t){nS(e),eS(e)?(e.q_.M_(t),ZE(e)):e.q_.set("Unknown")}async function sS(e,t,n){if(e.q_.set("Online"),t instanceof cA&&2===t.state&&t.cause)try{await async function(e,t){const n=t.cause;for(const r of t.targetIds)e.N_.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.N_.delete(r),e.Q_.removeTarget(r))}(e,t)}catch(n){Iv("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await aS(e,n)}else if(t instanceof aA?e.Q_.Ke(t):t instanceof lA?e.Q_.He(t):e.Q_.We(t),!n.isEqual(Zv.min()))try{const t=await xE(e.localStore);n.compareTo(t)>=0&&await function(e,t){const n=e.Q_.rt(t);return n.targetChanges.forEach(((n,r)=>{if(n.resumeToken.approximateByteSize()>0){const i=e.N_.get(r);i&&e.N_.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach(((t,n)=>{const r=e.N_.get(t);if(!r)return;e.N_.set(t,r.withResumeToken(Mb.EMPTY_BYTE_STRING,r.snapshotVersion)),YE(e,t);const i=new GA(r.target,t,n,r.sequenceNumber);JE(e,i)})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){Iv("RemoteStore","Failed to raise snapshot:",t),await aS(e,t)}}async function aS(e,t,n){if(!gb(t))throw t;e.L_.add(1),await KE(e),e.q_.set("Offline"),n||(n=()=>xE(e.localStore)),e.asyncQueue.enqueueRetryable((async()=>{Iv("RemoteStore","Retrying IndexedDB access"),await n(),e.L_.delete(1),await qE(e)}))}function lS(e,t){return t().catch((n=>aS(e,n,t)))}async function cS(e){const t=Lv(e),n=xS(t);let r=t.O_.length>0?t.O_[t.O_.length-1].batchId:-1;for(;uS(t);)try{const e=await EE(t.localStore,r);if(null===e){0===t.O_.length&&n.o_();break}r=e.batchId,dS(t,e)}catch(e){await aS(t,e)}hS(t)&&fS(t)}function uS(e){return tS(e)&&e.O_.length<10}function dS(e,t){e.O_.push(t);const n=xS(e);n.r_()&&n.V_&&n.m_(t.mutations)}function hS(e){return tS(e)&&!xS(e).n_()&&e.O_.length>0}function fS(e){xS(e).start()}async function pS(e){xS(e).p_()}async function gS(e){const t=xS(e);for(const n of e.O_)t.m_(n.mutations)}async function mS(e,t,n){const r=e.O_.shift(),i=Wx.from(r,t,n);await lS(e,(()=>e.remoteSyncer.applySuccessfulWrite(i))),await cS(e)}async function yS(e,t){t&&xS(e).V_&&await async function(e,t){if(function(e){return Xx(e)&&e!==Bv.ABORTED}(t.code)){const n=e.O_.shift();xS(e).s_(),await lS(e,(()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t))),await cS(e)}}(e,t),hS(e)&&fS(e)}async function vS(e,t){const n=Lv(e);n.asyncQueue.verifyOperationInProgress(),Iv("RemoteStore","RemoteStore received new credentials");const r=tS(n);n.L_.add(3),await KE(n),r&&n.q_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.L_.delete(3),await qE(n)}async function bS(e,t){const n=Lv(e);t?(n.L_.delete(2),await qE(n)):t||(n.L_.add(2),await KE(n),n.q_.set("Unknown"))}function wS(e){return e.K_||(e.K_=function(e,t,n){const r=Lv(e);return r.w_(),new VE(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Eo:rS.bind(null,e),Ro:iS.bind(null,e),mo:oS.bind(null,e),d_:sS.bind(null,e)}),e.B_.push((async t=>{t?(e.K_.s_(),eS(e)?ZE(e):e.q_.set("Unknown")):(await e.K_.stop(),nS(e))}))),e.K_}function xS(e){return e.U_||(e.U_=function(e,t,n){const r=Lv(e);return r.w_(),new HE(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Eo:()=>Promise.resolve(),Ro:pS.bind(null,e),mo:yS.bind(null,e),f_:gS.bind(null,e),g_:mS.bind(null,e)}),e.B_.push((async t=>{t?(e.U_.s_(),await cS(e)):(await e.U_.stop(),e.O_.length>0&&(Iv("RemoteStore",`Stopping write stream with ${e.O_.length} pending writes`),e.O_=[]))}))),e.U_}class AS{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new jv,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((e=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,t,n,r,i){const o=Date.now()+n,s=new AS(e,t,o,r,i);return s.start(n),s}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Fv(Bv.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function ES(e,t){if(Ov("AsyncQueue",`${t}: ${e}`),gb(e))return new Fv(Bv.UNAVAILABLE,`${t}: ${e}`);throw e}class SS{constructor(e){this.comparator=e?(t,n)=>e(t,n)||ib.comparator(t.key,n.key):(e,t)=>ib.comparator(e.key,t.key),this.keyedMap=rx(),this.sortedSet=new _b(this.comparator)}static emptySet(e){return new SS(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,n)=>(e(t),!1)))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof SS))return!1;if(this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){const e=[];return this.forEach((t=>{e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}copy(e,t){const n=new SS;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}class kS{constructor(){this.W_=new _b(ib.comparator)}track(e){const t=e.doc.key,n=this.W_.get(t);n?0!==e.type&&3===n.type?this.W_=this.W_.insert(t,e):3===e.type&&1!==n.type?this.W_=this.W_.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.W_=this.W_.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.W_=this.W_.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.W_=this.W_.remove(t):1===e.type&&2===n.type?this.W_=this.W_.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.W_=this.W_.insert(t,{type:2,doc:e.doc}):Mv():this.W_=this.W_.insert(t,e)}G_(){const e=[];return this.W_.inorderTraversal(((t,n)=>{e.push(n)})),e}}class CS{constructor(e,t,n,r,i,o,s,a,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=s,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){const o=[];return t.forEach((e=>{o.push({type:0,doc:e})})),new CS(e,t,SS.emptySet(t),o,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Gw(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}class _S{constructor(){this.z_=void 0,this.j_=[]}H_(){return this.j_.some((e=>e.J_()))}}class TS{constructor(){this.queries=PS(),this.onlineState="Unknown",this.Y_=new Set}terminate(){!function(e,t){const n=Lv(e),r=n.queries;n.queries=PS(),r.forEach(((e,n)=>{for(const r of n.j_)r.onError(t)}))}(this,new Fv(Bv.ABORTED,"Firestore shutting down"))}}function PS(){return new Zw((e=>qw(e)),Gw)}async function IS(e,t){const n=Lv(e);let r=3;const i=t.query;let o=n.queries.get(i);o?!o.H_()&&t.J_()&&(r=2):(o=new _S,r=t.J_()?0:1);try{switch(r){case 0:o.z_=await n.onListen(i,!0);break;case 1:o.z_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(e){const n=ES(e,`Initialization of query '${Kw(t.query)}' failed`);return void t.onError(n)}n.queries.set(i,o),o.j_.push(t),t.Z_(n.onlineState),o.z_&&t.X_(o.z_)&&MS(n)}async function OS(e,t){const n=Lv(e),r=t.query;let i=3;const o=n.queries.get(r);if(o){const e=o.j_.indexOf(t);e>=0&&(o.j_.splice(e,1),0===o.j_.length?i=t.J_()?0:1:!o.H_()&&t.J_()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function RS(e,t){const n=Lv(e);let r=!1;for(const i of t){const e=i.query,t=n.queries.get(e);if(t){for(const e of t.j_)e.X_(i)&&(r=!0);t.z_=i}}r&&MS(n)}function NS(e,t,n){const r=Lv(e),i=r.queries.get(t);if(i)for(const o of i.j_)o.onError(n);r.queries.delete(t)}function MS(e){e.Y_.forEach((e=>{e.next()}))}var DS,LS;(LS=DS||(DS={})).ea="default",LS.Cache="cache";class BS{constructor(e,t,n){this.query=e,this.ta=t,this.na=!1,this.ra=null,this.onlineState="Unknown",this.options=n||{}}X_(e){if(!this.options.includeMetadataChanges){const t=[];for(const n of e.docChanges)3!==n.type&&t.push(n);e=new CS(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.na?this.ia(e)&&(this.ta.next(e),t=!0):this.sa(e,this.onlineState)&&(this.oa(e),t=!0),this.ra=e,t}onError(e){this.ta.error(e)}Z_(e){this.onlineState=e;let t=!1;return this.ra&&!this.na&&this.sa(this.ra,e)&&(this.oa(this.ra),t=!0),t}sa(e,t){if(!e.fromCache)return!0;if(!this.J_())return!0;const n="Offline"!==t;return(!this.options._a||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}ia(e){if(e.docChanges.length>0)return!0;const t=this.ra&&this.ra.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}oa(e){e=CS.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.na=!0,this.ta.next(e)}J_(){return this.options.source!==DS.Cache}}class FS{constructor(e){this.key=e}}class jS{constructor(e){this.key=e}}class US{constructor(e,t){this.query=e,this.Ta=t,this.Ea=null,this.hasCachedResults=!1,this.current=!1,this.da=ux(),this.mutatedKeys=ux(),this.Aa=Jw(e),this.Ra=new SS(this.Aa)}get Va(){return this.Ta}ma(e,t){const n=t?t.fa:new kS,r=t?t.Ra:this.Ra;let i=t?t.mutatedKeys:this.mutatedKeys,o=r,s=!1;const a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal(((e,t)=>{const c=r.get(e),u=Qw(this.query,t)?t:null,d=!!c&&this.mutatedKeys.has(c.key),h=!!u&&(u.hasLocalMutations||this.mutatedKeys.has(u.key)&&u.hasCommittedMutations);let f=!1;c&&u?c.data.isEqual(u.data)?d!==h&&(n.track({type:3,doc:u}),f=!0):this.ga(c,u)||(n.track({type:2,doc:u}),f=!0,(a&&this.Aa(u,a)>0||l&&this.Aa(u,l)<0)&&(s=!0)):!c&&u?(n.track({type:0,doc:u}),f=!0):c&&!u&&(n.track({type:1,doc:c}),f=!0,(a||l)&&(s=!0)),f&&(u?(o=o.add(u),i=h?i.add(e):i.delete(e)):(o=o.delete(e),i=i.delete(e)))})),null!==this.query.limit)for(;o.size>this.query.limit;){const e="F"===this.query.limitType?o.last():o.first();o=o.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{Ra:o,fa:n,ns:s,mutatedKeys:i}}ga(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n,r){const i=this.Ra;this.Ra=e.Ra,this.mutatedKeys=e.mutatedKeys;const o=e.fa.G_();o.sort(((e,t)=>function(e,t){const n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Mv()}};return n(e)-n(t)}(e.type,t.type)||this.Aa(e.doc,t.doc))),this.pa(n),r=null!=r&&r;const s=t&&!r?this.ya():[],a=0===this.da.size&&this.current&&!r?1:0,l=a!==this.Ea;return this.Ea=a,0!==o.length||l?{snapshot:new CS(this.query,e.Ra,i,o,e.mutatedKeys,0===a,l,!1,!!n&&n.resumeToken.approximateByteSize()>0),wa:s}:{wa:s}}Z_(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Ra:this.Ra,fa:new kS,mutatedKeys:this.mutatedKeys,ns:!1},!1)):{wa:[]}}Sa(e){return!this.Ta.has(e)&&!!this.Ra.has(e)&&!this.Ra.get(e).hasLocalMutations}pa(e){e&&(e.addedDocuments.forEach((e=>this.Ta=this.Ta.add(e))),e.modifiedDocuments.forEach((e=>{})),e.removedDocuments.forEach((e=>this.Ta=this.Ta.delete(e))),this.current=e.current)}ya(){if(!this.current)return[];const e=this.da;this.da=ux(),this.Ra.forEach((e=>{this.Sa(e.key)&&(this.da=this.da.add(e.key))}));const t=[];return e.forEach((e=>{this.da.has(e)||t.push(new jS(e))})),this.da.forEach((n=>{e.has(n)||t.push(new FS(n))})),t}ba(e){this.Ta=e.Ts,this.da=ux();const t=this.ma(e.documents);return this.applyChanges(t,!0)}Da(){return CS.fromInitialDocuments(this.query,this.Ra,this.mutatedKeys,0===this.Ea,this.hasCachedResults)}}class zS{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class VS{constructor(e){this.key=e,this.va=!1}}class HS{constructor(e,t,n,r,i,o){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.Ca={},this.Fa=new Zw((e=>qw(e)),Gw),this.Ma=new Map,this.xa=new Set,this.Oa=new _b(ib.comparator),this.Na=new Map,this.La=new sE,this.Ba={},this.ka=new Map,this.qa=ZA.kn(),this.onlineState="Unknown",this.Qa=void 0}get isPrimaryClient(){return!0===this.Qa}}async function $S(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=dk(e);let i;const o=r.Fa.get(t);return o?(r.sharedClientState.addLocalQueryTarget(o.targetId),i=o.view.Da()):i=await GS(r,t,n,!0),i}async function WS(e,t){const n=dk(e);await GS(n,t,!0,!1)}async function GS(e,t,n,r){const i=await SE(e.localStore,Hw(t)),o=i.targetId,s=n?e.sharedClientState.addLocalQueryTarget(o):"not-current";let a;return r&&(a=await qS(e,t,o,"current"===s,i.resumeToken)),e.isPrimaryClient&&n&&QE(e.remoteStore,i),a}async function qS(e,t,n,r,i){e.Ka=(t,n,r)=>async function(e,t,n,r){let i=t.view.ma(n);i.ns&&(i=await CE(e.localStore,t.query,!1).then((e=>{let{documents:n}=e;return t.view.ma(n,i)})));const o=r&&r.targetChanges.get(t.targetId),s=r&&null!=r.targetMismatches.get(t.targetId),a=t.view.applyChanges(i,e.isPrimaryClient,o,s);return ok(e,t.targetId,a.wa),a.snapshot}(e,t,n,r);const o=await CE(e.localStore,t,!0),s=new US(t,o.Ts),a=s.ma(o.documents),l=sA.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),c=s.applyChanges(a,e.isPrimaryClient,l);ok(e,n,c.wa);const u=new zS(t,n,s);return e.Fa.set(t,u),e.Ma.has(n)?e.Ma.get(n).push(t):e.Ma.set(n,[t]),c.snapshot}async function KS(e,t,n){const r=Lv(e),i=r.Fa.get(t),o=r.Ma.get(i.targetId);if(o.length>1)return r.Ma.set(i.targetId,o.filter((e=>!Gw(e,t)))),void r.Fa.delete(t);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedClientState.isActiveQueryTarget(i.targetId)||await kE(r.localStore,i.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(i.targetId),n&&XE(r.remoteStore,i.targetId),rk(r,i.targetId)})).catch(hb)):(rk(r,i.targetId),await kE(r.localStore,i.targetId,!0))}async function QS(e,t){const n=Lv(e),r=n.Fa.get(t),i=n.Ma.get(r.targetId);n.isPrimaryClient&&1===i.length&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),XE(n.remoteStore,r.targetId))}async function XS(e,t){const n=Lv(e);try{const e=await function(e,t){const n=Lv(e),r=t.snapshotVersion;let i=n.os;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(e=>{const o=n.cs.newChangeBuffer({trackRemovals:!0});i=n.os;const s=[];t.targetChanges.forEach(((o,a)=>{const l=i.get(a);if(!l)return;s.push(n.Ur.removeMatchingKeys(e,o.removedDocuments,a).next((()=>n.Ur.addMatchingKeys(e,o.addedDocuments,a))));let c=l.withSequenceNumber(e.currentSequenceNumber);null!==t.targetMismatches.get(a)?c=c.withResumeToken(Mb.EMPTY_BYTE_STRING,Zv.min()).withLastLimboFreeSnapshotVersion(Zv.min()):o.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(o.resumeToken,r)),i=i.insert(a,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(l,c,o)&&s.push(n.Ur.updateTargetData(e,c))}));let a=tx(),l=ux();if(t.documentUpdates.forEach((r=>{t.resolvedLimboDocuments.has(r)&&s.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),s.push(AE(e,o,t.documentUpdates).next((e=>{a=e.Ps,l=e.Is}))),!r.isEqual(Zv.min())){const t=n.Ur.getLastRemoteSnapshotVersion(e).next((t=>n.Ur.setTargetsMetadata(e,e.currentSequenceNumber,r)));s.push(t)}return fb.waitFor(s).next((()=>o.apply(e))).next((()=>n.localDocuments.getLocalViewOfDocuments(e,a,l))).next((()=>a))})).then((e=>(n.os=i,e)))}(n.localStore,t);t.targetChanges.forEach(((e,t)=>{const r=n.Na.get(t);r&&(Dv(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?r.va=!0:e.modifiedDocuments.size>0?Dv(r.va):e.removedDocuments.size>0&&(Dv(r.va),r.va=!1))})),await lk(n,e,t)}catch(e){await hb(e)}}function JS(e,t,n){const r=Lv(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){const e=[];r.Fa.forEach(((n,r)=>{const i=r.view.Z_(t);i.snapshot&&e.push(i.snapshot)})),function(e,t){const n=Lv(e);n.onlineState=t;let r=!1;n.queries.forEach(((e,n)=>{for(const i of n.j_)i.Z_(t)&&(r=!0)})),r&&MS(n)}(r.eventManager,t),e.length&&r.Ca.d_(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function YS(e,t,n){const r=Lv(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.Na.get(t),o=i&&i.key;if(o){let e=new _b(ib.comparator);e=e.insert(o,cw.newNoDocument(o,Zv.min()));const n=ux().add(o),i=new oA(Zv.min(),new Map,new _b(Xv),e,n);await XS(r,i),r.Oa=r.Oa.remove(o),r.Na.delete(t),ak(r)}else await kE(r.localStore,t,!1).then((()=>rk(r,t,n))).catch(hb)}async function ZS(e,t){const n=Lv(e),r=t.batch.batchId;try{const e=await function(e,t){const n=Lv(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(e=>{const r=t.batch.keys(),i=n.cs.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){const i=n.batch,o=i.keys();let s=fb.resolve();return o.forEach((e=>{s=s.next((()=>r.getEntry(t,e))).next((t=>{const o=n.docVersions.get(e);Dv(null!==o),t.version.compareTo(o)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),s.next((()=>e.mutationQueue.removeMutationBatch(t,i)))}(n,e,t,i).next((()=>i.apply(e))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=ux();for(let n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t)))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(n.localStore,t);nk(n,r,null),tk(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await lk(n,e)}catch(e){await hb(e)}}async function ek(e,t,n){const r=Lv(e);try{const e=await function(e,t){const n=Lv(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(e=>{let r;return n.mutationQueue.lookupMutationBatch(e,t).next((t=>(Dv(null!==t),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(r.localStore,t);nk(r,t,n),tk(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await lk(r,e)}catch(n){await hb(n)}}function tk(e,t){(e.ka.get(t)||[]).forEach((e=>{e.resolve()})),e.ka.delete(t)}function nk(e,t,n){const r=Lv(e);let i=r.Ba[r.currentUser.toKey()];if(i){const e=i.get(t);e&&(n?e.reject(n):e.resolve(),i=i.remove(t)),r.Ba[r.currentUser.toKey()]=i}}function rk(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.Ma.get(t))e.Fa.delete(r),n&&e.Ca.$a(r,n);e.Ma.delete(t),e.isPrimaryClient&&e.La.gr(t).forEach((t=>{e.La.containsKey(t)||ik(e,t)}))}function ik(e,t){e.xa.delete(t.path.canonicalString());const n=e.Oa.get(t);null!==n&&(XE(e.remoteStore,n),e.Oa=e.Oa.remove(t),e.Na.delete(n),ak(e))}function ok(e,t,n){for(const r of n)r instanceof FS?(e.La.addReference(r.key,t),sk(e,r)):r instanceof jS?(Iv("SyncEngine","Document no longer in limbo: "+r.key),e.La.removeReference(r.key,t),e.La.containsKey(r.key)||ik(e,r.key)):Mv()}function sk(e,t){const n=t.key,r=n.path.canonicalString();e.Oa.get(n)||e.xa.has(r)||(Iv("SyncEngine","New document in limbo: "+n),e.xa.add(r),ak(e))}function ak(e){for(;e.xa.size>0&&e.Oa.size<e.maxConcurrentLimboResolutions;){const t=e.xa.values().next().value;e.xa.delete(t);const n=new ib(tb.fromString(t)),r=e.qa.next();e.Na.set(r,new VS(n)),e.Oa=e.Oa.insert(n,r),QE(e.remoteStore,new GA(Hw(jw(n.path)),r,"TargetPurposeLimboResolution",mb.oe))}}async function lk(e,t,n){const r=Lv(e),i=[],o=[],s=[];r.Fa.isEmpty()||(r.Fa.forEach(((e,a)=>{s.push(r.Ka(a,t,n).then((e=>{var t;if((e||n)&&r.isPrimaryClient){const i=e?!e.fromCache:null===(t=null==n?void 0:n.targetChanges.get(a.targetId))||void 0===t?void 0:t.current;r.sharedClientState.updateQueryState(a.targetId,i?"current":"not-current")}if(e){i.push(e);const t=gE.Wi(a.targetId,e);o.push(t)}})))})),await Promise.all(s),r.Ca.d_(i),await async function(e,t){const n=Lv(e);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(e=>fb.forEach(t,(t=>fb.forEach(t.$i,(r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r))).next((()=>fb.forEach(t.Ui,(r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))))))}catch(e){if(!gb(e))throw e;Iv("LocalStore","Failed to update sequence numbers: "+e)}for(const r of t){const e=r.targetId;if(!r.fromCache){const t=n.os.get(e),r=t.snapshotVersion,i=t.withLastLimboFreeSnapshotVersion(r);n.os=n.os.insert(e,i)}}}(r.localStore,o))}async function ck(e,t){const n=Lv(e);if(!n.currentUser.isEqual(t)){Iv("SyncEngine","User change. New user:",t.toKey());const e=await wE(n.localStore,t);n.currentUser=t,function(e,t){e.ka.forEach((e=>{e.forEach((e=>{e.reject(new Fv(Bv.CANCELLED,t))}))})),e.ka.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await lk(n,e.hs)}}function uk(e,t){const n=Lv(e),r=n.Na.get(t);if(r&&r.va)return ux().add(r.key);{let e=ux();const r=n.Ma.get(t);if(!r)return e;for(const t of r){const r=n.Fa.get(t);e=e.unionWith(r.view.Va)}return e}}function dk(e){const t=Lv(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=XS.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=uk.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=YS.bind(null,t),t.Ca.d_=RS.bind(null,t.eventManager),t.Ca.$a=NS.bind(null,t.eventManager),t}function hk(e){const t=Lv(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=ZS.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=ek.bind(null,t),t}class fk{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=jE(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,t){return null}createIndexBackfillerScheduler(e,t){return null}createLocalStore(e){return bE(this.persistence,new yE,e.initialUser,this.serializer)}createPersistence(e){return new hE(pE.Zr,this.serializer)}createSharedClientState(e){return new PE}async terminate(){var e,t;null===(e=this.gcScheduler)||void 0===e||e.stop(),null===(t=this.indexBackfillerScheduler)||void 0===t||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class pk{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>JS(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=ck.bind(null,this.syncEngine),await bS(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new TS}createDatastore(e){const t=jE(e.databaseInfo.databaseId),n=function(e){return new BE(e)}(e.databaseInfo);return function(e,t,n,r){return new $E(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){return function(e,t,n,r,i){return new GE(e,t,n,r,i)}(this.localStore,this.datastore,e.asyncQueue,(e=>JS(this.syncEngine,e,0)),OE.D()?new OE:new IE)}createSyncEngine(e,t){return function(e,t,n,r,i,o,s){const a=new HS(e,t,n,r,i,o);return s&&(a.Qa=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(e){const t=Lv(e);Iv("RemoteStore","RemoteStore shutting down."),t.L_.add(5),await KE(t),t.k_.shutdown(),t.q_.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate(),null===(t=this.eventManager)||void 0===t||t.terminate()}}class gk{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ga(this.observer.next,e)}error(e){this.observer.error?this.Ga(this.observer.error,e):Ov("Uncaught Error in snapshot listener:",e.toString())}za(){this.muted=!0}Ga(e,t){this.muted||setTimeout((()=>{this.muted||e(t)}),0)}}class mk{constructor(e,t,n,r){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=Cv.UNAUTHENTICATED,this.clientId=Qv.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,(async e=>{Iv("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e})),this.appCheckCredentials.start(n,(e=>(Iv("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Fv(Bv.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new jv;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const n=ES(t,"Failed to shutdown persistence");e.reject(n)}})),e.promise}}async function yk(e,t){e.asyncQueue.verifyOperationInProgress(),Iv("FirestoreClient","Initializing OfflineComponentProvider");const n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async e=>{r.isEqual(e)||(await wE(t.localStore,e),r=e)})),t.persistence.setDatabaseDeletedListener((()=>e.terminate())),e._offlineComponents=t}async function vk(e,t){e.asyncQueue.verifyOperationInProgress();const n=await wk(e);Iv("FirestoreClient","Initializing OnlineComponentProvider"),await t.initialize(n,e.configuration),e.setCredentialChangeListener((e=>vS(t.remoteStore,e))),e.setAppCheckTokenChangeListener(((e,n)=>vS(t.remoteStore,n))),e._onlineComponents=t}function bk(e){return"FirebaseError"===e.name?e.code===Bv.FAILED_PRECONDITION||e.code===Bv.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}async function wk(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){Iv("FirestoreClient","Using user provided OfflineComponentProvider");try{await yk(e,e._uninitializedComponentsProvider._offline)}catch(t){const n=t;if(!bk(n))throw n;Rv("Error using user provided cache. Falling back to memory cache: "+n),await yk(e,new fk)}}else Iv("FirestoreClient","Using default OfflineComponentProvider"),await yk(e,new fk);return e._offlineComponents}async function xk(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(Iv("FirestoreClient","Using user provided OnlineComponentProvider"),await vk(e,e._uninitializedComponentsProvider._online)):(Iv("FirestoreClient","Using default OnlineComponentProvider"),await vk(e,new pk))),e._onlineComponents}function Ak(e){return xk(e).then((e=>e.syncEngine))}async function Ek(e){const t=await xk(e),n=t.eventManager;return n.onListen=$S.bind(null,t.syncEngine),n.onUnlisten=KS.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=WS.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=QS.bind(null,t.syncEngine),n}function Sk(e){const t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}const kk=new Map;function Ck(e,t,n){if(!n)throw new Fv(Bv.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function _k(e){if(!ib.isDocumentKey(e))throw new Fv(Bv.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function Tk(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const t=function(e){return e.constructor?e.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return"function"==typeof e?"a function":Mv()}function Pk(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Fv(Bv.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Tk(e);throw new Fv(Bv.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}class Ik{constructor(e){var t,n;if(void 0===e.host){if(void 0!==e.ssl)throw new Fv(Bv.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new Fv(Bv.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new Fv(Bv.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=Sk(null!==(n=e.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new Fv(Bv.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new Fv(Bv.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new Fv(Bv.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(e,t){return e.timeoutSeconds===t.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Ok{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Ik({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Fv(Bv.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new Fv(Bv.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Ik(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new zv;switch(e.type){case"firstParty":return new Wv(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new Fv(Bv.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=kk.get(e);t&&(Iv("ComponentProvider","Removing Datastore"),kk.delete(e),t.terminate())}(this),Promise.resolve()}}function Rk(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};var i;const o=(e=Pk(e,Ok))._getSettings(),s=`${t}:${n}`;if("firestore.googleapis.com"!==o.host&&o.host!==s&&Rv("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},o),{host:s,ssl:!1})),r.mockUserToken){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=Cv.MOCK_USER;else{t=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,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[qh(JSON.stringify({alg:"none",type:"JWT"})),qh(JSON.stringify(o)),""].join(".")}(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);const o=r.mockUserToken.sub||r.mockUserToken.user_id;if(!o)throw new Fv(Bv.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new Cv(o)}e._authCredentials=new Vv(new Uv(t,n))}}class Nk{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new Nk(this.firestore,e,this._query)}}class Mk{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Dk(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Mk(this.firestore,e,this._key)}}class Dk extends Nk{constructor(e,t,n){super(e,t,jw(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Mk(this.firestore,null,new ib(e))}withConverter(e){return new Dk(this.firestore,e,this._path)}}function Lk(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=gf(e),1===arguments.length&&(t=Qv.newId()),Ck("doc","path",t),e instanceof Ok){const n=tb.fromString(t,...r);return _k(n),new Mk(e,null,new ib(n))}{if(!(e instanceof Mk||e instanceof Dk))throw new Fv(Bv.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(tb.fromString(t,...r));return _k(n),new Mk(e.firestore,e instanceof Dk?e.converter:null,new ib(n))}}class Bk{constructor(){this.au=Promise.resolve(),this.uu=[],this.cu=!1,this.lu=[],this.hu=null,this.Pu=!1,this.Iu=!1,this.Tu=[],this.t_=new UE(this,"async_queue_retry"),this.Eu=()=>{const e=FE();e&&Iv("AsyncQueue","Visibility state changed to "+e.visibilityState),this.t_.jo()};const e=FE();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Eu)}get isShuttingDown(){return this.cu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.du(),this.Au(e)}enterRestrictedMode(e){if(!this.cu){this.cu=!0,this.Iu=e||!1;const t=FE();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Eu)}}enqueue(e){if(this.du(),this.cu)return new Promise((()=>{}));const t=new jv;return this.Au((()=>this.cu&&this.Iu?Promise.resolve():(e().then(t.resolve,t.reject),t.promise))).then((()=>t.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.uu.push(e),this.Ru())))}async Ru(){if(0!==this.uu.length){try{await this.uu[0](),this.uu.shift(),this.t_.reset()}catch(gK){if(!gb(gK))throw gK;Iv("AsyncQueue","Operation failed with retryable error: "+gK)}this.uu.length>0&&this.t_.Go((()=>this.Ru()))}}Au(e){const t=this.au.then((()=>(this.Pu=!0,e().catch((e=>{this.hu=e,this.Pu=!1;const t=function(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e);throw Ov("INTERNAL UNHANDLED ERROR: ",t),e})).then((e=>(this.Pu=!1,e))))));return this.au=t,t}enqueueAfterDelay(e,t,n){this.du(),this.Tu.indexOf(e)>-1&&(t=0);const r=AS.createAndSchedule(this,e,t,n,(e=>this.Vu(e)));return this.lu.push(r),r}du(){this.hu&&Mv()}verifyOperationInProgress(){}async mu(){let e;do{e=this.au,await e}while(e!==this.au)}fu(e){for(const t of this.lu)if(t.timerId===e)return!0;return!1}gu(e){return this.mu().then((()=>{this.lu.sort(((e,t)=>e.targetTimeMs-t.targetTimeMs));for(const t of this.lu)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.mu()}))}pu(e){this.Tu.push(e)}Vu(e){const t=this.lu.indexOf(e);this.lu.splice(t,1)}}function Fk(e){return function(e,t){if("object"!=typeof e||null===e)return!1;const n=e;for(const r of t)if(r in n&&"function"==typeof n[r])return!0;return!1}(e,["next","error","complete"])}class jk extends Ok{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new Bk,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||zk(this),this._firestoreClient.terminate()}}function Uk(e){return e._firestoreClient||zk(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function zk(e){var t,n,r;const i=e._freezeSettings(),o=function(e,t,n,r){return new Vb(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,Sk(r.experimentalLongPollingOptions),r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,i);e._firestoreClient=new mk(e._authCredentials,e._appCheckCredentials,e._queue,o),(null===(n=i.localCache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=i.localCache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.localCache.kind,_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider})}class Vk{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Vk(Mb.fromBase64String(e))}catch(e){throw new Fv(Bv.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new Vk(Mb.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class Hk{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let r=0;r<t.length;++r)if(0===t[r].length)throw new Fv(Bv.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new rb(t)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class $k{constructor(e){this._methodName=e}}class Wk{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new Fv(Bv.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new Fv(Bv.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Xv(this._lat,e._lat)||Xv(this._long,e._long)}}class Gk{constructor(e){this._values=(e||[]).map((e=>e))}toArray(){return this._values.map((e=>e))}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}(this._values,e._values)}}const qk=/^__.*__$/;class Kk{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return null!==this.fieldMask?new Fx(e,this.data,this.fieldMask,t,this.fieldTransforms):new Bx(e,this.data,t,this.fieldTransforms)}}function Qk(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Mv()}}class Xk{constructor(e,t,n,r,i,o){this.settings=e,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&&this.yu(),this.fieldTransforms=i||[],this.fieldMask=o||[]}get path(){return this.settings.path}get wu(){return this.settings.wu}Su(e){return new Xk(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}bu(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Su({path:n,Du:!1});return r.vu(e),r}Cu(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Su({path:n,Du:!1});return r.yu(),r}Fu(e){return this.Su({path:void 0,Du:!0})}Mu(e){return aC(e,this.settings.methodName,this.settings.xu||!1,this.path,this.settings.Ou)}contains(e){return void 0!==this.fieldMask.find((t=>e.isPrefixOf(t)))||void 0!==this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))}yu(){if(this.path)for(let e=0;e<this.path.length;e++)this.vu(this.path.get(e))}vu(e){if(0===e.length)throw this.Mu("Document fields must not be empty");if(Qk(this.wu)&&qk.test(e))throw this.Mu('Document fields cannot begin and end with "__"')}}class Jk{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=n||jE(e)}Nu(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Xk({wu:e,methodName:t,Ou:n,path:rb.emptyPath(),Du:!1,xu:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Yk(e){const t=e._freezeSettings(),n=jE(e._databaseId);return new Jk(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Zk(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=e.Nu(o.merge||o.mergeFields?2:0,t,n,i);rC("Data must be an object, but it was:",s,r);const a=tC(r,s);let l,c;if(o.merge)l=new Rb(s.fieldMask),c=s.fieldTransforms;else if(o.mergeFields){const e=[];for(const r of o.mergeFields){const i=iC(t,r,n);if(!s.contains(i))throw new Fv(Bv.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);lC(e,i)||e.push(i)}l=new Rb(e),c=s.fieldTransforms.filter((e=>l.covers(e.field)))}else l=null,c=s.fieldTransforms;return new Kk(new aw(a),l,c)}function eC(e,t){if(nC(e=gf(e)))return rC("Unsupported field value:",t,e),tC(e,t);if(e instanceof $k)return function(e,t){if(!Qk(t.wu))throw t.Mu(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.Mu(`${e._methodName}() is not currently supported inside arrays`);const n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.Du&&4!==t.wu)throw t.Mu("Nested arrays are not supported");return function(e,t){const n=[];let r=0;for(const i of e){let e=eC(i,t.Fu(r));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=gf(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return gx(t.serializer,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){const n=Yv.fromDate(e);return{timestampValue:bA(t.serializer,n)}}if(e instanceof Yv){const n=new Yv(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:bA(t.serializer,n)}}if(e instanceof Wk)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof Vk)return{bytesValue:wA(t.serializer,e._byteString)};if(e instanceof Mk){const n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.Mu(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:EA(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof Gk)return function(e,t){return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:e.toArray().map((e=>{if("number"!=typeof e)throw t.Mu("VectorValues must only contain numeric values.");return fx(t.serializer,e)}))}}}}}}(e,t);throw t.Mu(`Unsupported field value: ${Tk(e)}`)}(e,t)}function tC(e,t){const n={};return Cb(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):kb(e,((e,r)=>{const i=eC(r,t.bu(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function nC(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Yv||e instanceof Wk||e instanceof Vk||e instanceof Mk||e instanceof $k||e instanceof Gk)}function rC(e,t,n){if(!nC(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){const r=Tk(n);throw"an object"===r?t.Mu(e+" a custom object"):t.Mu(e+" "+r)}}function iC(e,t,n){if((t=gf(t))instanceof Hk)return t._internalPath;if("string"==typeof t)return sC(e,t);throw aC("Field path arguments must be of type string or ",e,!1,void 0,n)}const oC=new RegExp("[~\\*/\\[\\]]");function sC(e,t,n){if(t.search(oC)>=0)throw aC(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new Hk(...t.split("."))._internalPath}catch(ke){throw aC(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function aC(e,t,n,r,i){const o=r&&!r.isEmpty(),s=void 0!==i;let a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${r}`),s&&(l+=` in document ${i}`),l+=")"),new Fv(Bv.INVALID_ARGUMENT,a+e+l)}function lC(e,t){return e.some((e=>e.isEqual(t)))}class cC{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new Mk(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new uC(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(dC("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class uC extends cC{data(){return super.data()}}function dC(e,t){return"string"==typeof t?sC(e,t):t instanceof Hk?t._internalPath:t._delegate._internalPath}function hC(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Fv(Bv.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class fC{convertValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(Wb(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Bb(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(Fb(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw Mv()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";const n={};return kb(e,((e,r)=>{n[e]=this.convertValue(r,t)})),n}convertVectorValue(e){var t,n,r;const i=null===(r=null===(n=null===(t=e.fields)||void 0===t?void 0:t.value.arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.map((e=>Bb(e.doubleValue)));return new Gk(i)}convertGeoPoint(e){return new Wk(Bb(e.latitude),Bb(e.longitude))}convertArray(e,t){return(e.values||[]).map((e=>this.convertValue(e,t)))}convertServerTimestamp(e,t){switch(t){case"previous":const n=Ub(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(zb(e));default:return null}}convertTimestamp(e){const t=Lb(e);return new Yv(t.seconds,t.nanos)}convertDocumentKey(e,t){const n=tb.fromString(e);Dv(WA(n));const r=new Hb(n.get(1),n.get(3)),i=new ib(n.popFirst(5));return r.isEqual(t)||Ov(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}function pC(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}class gC{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class mC extends cC{constructor(e,t,n,r,i,o){super(e,t,n,r,o),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){const t=new yC(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){const n=this._document.data.field(dC("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class yC extends mC{data(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return super.data(e)}}class vC{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new gC(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach((n=>{e.call(t,new yC(this._firestore,this._userDataWriter,n.key,n,new gC(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(){const e=!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new Fv(Bv.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map((n=>{const r=new yC(e._firestore,e._userDataWriter,n.doc.key,n.doc,new gC(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:r,oldIndex:-1,newIndex:t++}}))}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((e=>t||3!==e.type)).map((t=>{const r=new yC(e._firestore,e._userDataWriter,t.doc.key,t.doc,new gC(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let i=-1,o=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(n=n.add(t.doc),o=n.indexOf(t.doc.key)),{type:bC(t.type),doc:r,oldIndex:i,newIndex:o}}))}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}function bC(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Mv()}}class wC extends fC{constructor(e){super(),this.firestore=e}convertBytes(e){return new Vk(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new Mk(this.firestore,null,t)}}function xC(e,t,n){e=Pk(e,Mk);const r=Pk(e.firestore,jk),i=pC(e.converter,t,n);return EC(r,[Zk(Yk(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,Px.none())])}function AC(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,o,s;e=gf(e);let a={includeMetadataChanges:!1,source:"default"},l=0;"object"!=typeof n[l]||Fk(n[l])||(a=n[l],l++);const c={includeMetadataChanges:a.includeMetadataChanges,source:a.source};if(Fk(n[l])){const e=n[l];n[l]=null===(i=e.next)||void 0===i?void 0:i.bind(e),n[l+1]=null===(o=e.error)||void 0===o?void 0:o.bind(e),n[l+2]=null===(s=e.complete)||void 0===s?void 0:s.bind(e)}let u,d,h;if(e instanceof Mk)d=Pk(e.firestore,jk),h=jw(e._key.path),u={next:t=>{n[l]&&n[l](SC(d,e,t))},error:n[l+1],complete:n[l+2]};else{const t=Pk(e,Nk);d=Pk(t.firestore,jk),h=t._query;const r=new wC(d);u={next:e=>{n[l]&&n[l](new vC(d,r,t,e))},error:n[l+1],complete:n[l+2]},hC(e._query)}return function(e,t,n,r){const i=new gk(r),o=new BS(t,i,n);return e.asyncQueue.enqueueAndForget((async()=>IS(await Ek(e),o))),()=>{i.za(),e.asyncQueue.enqueueAndForget((async()=>OS(await Ek(e),o)))}}(Uk(d),h,c,u)}function EC(e,t){return function(e,t){const n=new jv;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t,n){const r=hk(e);try{const e=await function(e,t){const n=Lv(e),r=Yv.now(),i=t.reduce(((e,t)=>e.add(t.key)),ux());let o,s;return n.persistence.runTransaction("Locally write mutations","readwrite",(e=>{let a=tx(),l=ux();return n.cs.getEntries(e,i).next((e=>{a=e,a.forEach(((e,t)=>{t.isValidDocument()||(l=l.add(e))}))})).next((()=>n.localDocuments.getOverlayedDocuments(e,a))).next((i=>{o=i;const s=[];for(const e of t){const t=Dx(e,o.get(e.key).overlayedDocument);null!=t&&s.push(new Fx(e.key,t,lw(t.value.mapValue),Px.exists(!0)))}return n.mutationQueue.addMutationBatch(e,r,s,t)})).next((t=>{s=t;const r=t.applyToLocalDocumentSet(o,l);return n.documentOverlayCache.saveOverlays(e,t.batchId,r)}))})).then((()=>({batchId:s.batchId,changes:ix(o)})))}(r.localStore,t);r.sharedClientState.addPendingMutation(e.batchId),function(e,t,n){let r=e.Ba[e.currentUser.toKey()];r||(r=new _b(Xv)),r=r.insert(t,n),e.Ba[e.currentUser.toKey()]=r}(r,e.batchId,n),await lk(r,e.changes),await cS(r.remoteStore)}catch(e){const t=ES(e,"Failed to persist write");n.reject(t)}}(await Ak(e),t,n))),n.promise}(Uk(e),t)}function SC(e,t,n){const r=n.docs.get(t._key),i=new wC(e);return new mC(e,i,t._key,r,new gC(n.hasPendingWrites,n.fromCache),t.converter)}new WeakMap;!function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){_v=e}(Op),Cp(new mf("firestore",((e,n)=>{let{instanceIdentifier:r,options:i}=n;const o=e.getProvider("app").getImmediate(),s=new jk(new Hv(e.getProvider("auth-internal")),new qv(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new Fv(Bv.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Hb(e.options.projectId,t)}(o,r),o);return i=Object.assign({useFetchStreams:t},i),s._setSettings(i),s}),"PUBLIC").setMultipleInstances(!0)),Mp(kv,"4.7.0",e),Mp(kv,"4.7.0","esm2017")}();const kC=Rp({apiKey:"AIzaSyDbnj52a9N1KOHVEkmfs7SUfpEHBTUBDqQ",authDomain:"crypto-portfolio-25359.firebaseapp.com",projectId:"crypto-portfolio-25359",storageBucket:"crypto-portfolio-25359.appspot.com",messagingSenderId:"247827946711",appId:"1:247827946711:web:4e12c32cb91ed58ec76492"}),CC=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Np();const t=_p(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=_p(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(lf(n.getOptions(),null!==t&&void 0!==t?t:{}))return e;Zp(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:nv,persistence:[dy,Km,Xm]}),r=Zh("authTokenSyncURL");if(r&&"boolean"===typeof isSecureContext&&isSecureContext){const e=new URL(r,location.origin);if(location.origin===e.origin){const t=(i=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>sv)return;const r=null===t||void 0===t?void 0:t.token;av!==r&&(av=r,await fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});!function(e,t,n){gf(e).beforeAuthStateChanged(t,n)}(n,t,(()=>t(n.currentUser))),function(e,t,n,r){gf(e).onIdTokenChanged(t,n,r)}(n,(e=>t(e)))}}var i;const o=Jh("auth");return o&&mm(n,`http://${o}`),n}(kC),_C=function(e,t){const n="string"==typeof e?e:t||"(default)",r=_p("object"==typeof e?e:Np(),"firestore").getImmediate({identifier:n});if(!r._initialized){const e=(e=>{const t=Jh(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]})("firestore");e&&Rk(r,...e)}return r}(kC),TC=(0,i.createContext)(),PC=e=>{let{children:t}=e;const[n,r]=(0,i.useState)("INR"),[o,s]=(0,i.useState)("\u20b9"),[a,l]=(0,i.useState)([]),[c,u]=(0,i.useState)(!1),[d,h]=(0,i.useState)([]),[f,p]=(0,i.useState)(null),[g,m]=(0,i.useState)(null),[y,v]=(0,i.useState)({open:!1,message:"",severity:"success"}),[b,w]=(0,i.useState)([]);(0,i.useEffect)((()=>{if(f){var e=AC(Lk(_C,"watchlist",f.uid),(e=>{e.exists()?w(e.data().coins):console.log("No Items in Watchlist")}));return()=>e()}}),[f]),(0,i.useEffect)((()=>{!function(e,t,n,r){gf(e).onAuthStateChanged(t,n,r)}(CC,(e=>{p(e||null)}))}));(0,i.useEffect)((()=>{if(f){const e=AC(Lk(_C,"transferHistory",f.uid),(e=>{e.exists()&&h(e.data().history||[])}));return()=>e()}}),[f]);return(0,i.useEffect)((()=>{"USD"===n?s("$"):"EUR"===n?s("\u20ac"):"JPY"===n?s("\xa5"):"GBP"===n?s("\xa3"):"AUD"===n?s("A$"):"INR"===n&&s("\u20b9")}),[n]),(0,mt.jsx)(TC.Provider,{value:{currency:n,symbol:o,setCurrency:r,coins:a,loading:c,fetchCoins:async()=>{u(!0);try{const{data:e}=await Hh.get((e=>`https://api.coingecko.com/api/v3/coins/markets?vs_currency=${e}&order=market_cap_desc&per_page=25&page=1&sparkline=false`)(n));l(e),m(null)}catch(g){m("Network Error. Please try again later.")}u(!1)},alert:y,setAlert:v,user:f,watchlist:b,transferHistory:d,addToTransferHistory:async e=>{if(!f)return;const t=Lk(_C,"transferHistory",f.uid),n=[...d,e];await xC(t,{history:n},{merge:!0})},error:g},children:t})},IC=()=>(0,i.useContext)(TC);let OC;function RC(){if(OC)return OC;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),OC="reverse",e.scrollLeft>0?OC="default":(e.scrollLeft=1,0===e.scrollLeft&&(OC="negative")),document.body.removeChild(e),OC}function NC(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(RC()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function MC(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const DC=["onChange"],LC={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const BC=ho((0,mt.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),FC=ho((0,mt.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function jC(e){return _t("MuiTabScrollButton",e)}const UC=Tt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),zC=["className","slots","slotProps","direction","orientation","disabled"],VC=pt(Qs,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({width:40,flexShrink:0,opacity:.8,[`&.${UC.disabled}`]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})})),HC=i.forwardRef((function(e,t){var n,r;const i=wt({props:e,name:"MuiTabScrollButton"}),{className:o,slots:s={},slotProps:a={},direction:l}=i,c=(0,Ee.A)(i,zC),u=Rn(),d=(0,Se.A)({isRtl:u},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e;return _e({root:["root",n,r&&"disabled"]},jC,t)})(d),f=null!=(n=s.StartScrollButtonIcon)?n:BC,p=null!=(r=s.EndScrollButtonIcon)?r:FC,g=Wn({elementType:f,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=Wn({elementType:p,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,mt.jsx)(VC,(0,Se.A)({component:"div",className:Ce(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},c,{children:"left"===l?(0,mt.jsx)(f,(0,Se.A)({},g)):(0,mt.jsx)(p,(0,Se.A)({},m))}))}));function $C(e){return _t("MuiTabs",e)}const WC=Tt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),GC=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],qC=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,KC=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,QC=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},XC=pt("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${WC.scrollButtons}`]:t.scrollButtons},{[`& .${WC.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${WC.scrollButtons}`]:{[n.breakpoints.down("sm")]:{display:"none"}}})})),JC=pt("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})})),YC=pt("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((e=>{let{ownerState:t}=e;return(0,Se.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),ZC=pt("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),e_=pt((function(e){const{onChange:t}=e,n=(0,Ee.A)(e,DC),r=i.useRef(),o=i.useRef(null),s=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return tr((()=>{const e=ur((()=>{const e=r.current;s(),e!==r.current&&t(r.current)})),n=hr(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),i.useEffect((()=>{s(),t(r.current)}),[t]),(0,mt.jsx)("div",(0,Se.A)({style:LC,ref:o},n))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),t_={};const n_=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTabs"}),r=Pr(),o=Rn(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:d,component:h="div",allowScrollButtonsMobile:f=!1,indicatorColor:p="primary",onChange:g,orientation:m="horizontal",ScrollButtonComponent:y=HC,scrollButtons:v="auto",selectionFollowsFocus:b,slots:w={},slotProps:x={},TabIndicatorProps:A={},TabScrollButtonProps:E={},textColor:S="primary",value:k,variant:C="standard",visibleScrollbar:_=!1}=n,T=(0,Ee.A)(n,GC),P="scrollable"===C,I="vertical"===m,O=I?"scrollTop":"scrollLeft",R=I?"top":"left",N=I?"bottom":"right",M=I?"clientHeight":"clientWidth",D=I?"height":"width",L=(0,Se.A)({},n,{component:h,allowScrollButtonsMobile:f,indicatorColor:p,orientation:m,vertical:I,scrollButtons:v,textColor:S,variant:C,visibleScrollbar:_,fixed:!P,hideScrollbar:P&&!_,scrollableX:P&&!I,scrollableY:P&&I,centered:c&&!P,scrollButtonsHideMobile:!f}),B=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:l}=e;return _e({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},$C,l)})(L),F=Wn({elementType:w.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:L}),j=Wn({elementType:w.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:L});const[U,z]=i.useState(!1),[V,H]=i.useState(t_),[$,W]=i.useState(!1),[G,q]=i.useState(!1),[K,Q]=i.useState(!1),[X,J]=i.useState({overflow:"hidden",scrollbarWidth:0}),Y=new Map,Z=i.useRef(null),ee=i.useRef(null),te=()=>{const e=Z.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:NC(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==k){const e=ee.current.children;if(e.length>0){const t=e[Y.get(k)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ne=hs((()=>{const{tabsMeta:e,tabMeta:t}=te();let n,r=0;if(I)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[D]:t?t[D]:0};if(isNaN(V[n])||isNaN(V[D]))H(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[D]-i[D]);(e>=1||t>=1)&&H(i)}})),re=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:o=MC,duration:s=300}=r;let a=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void i(new Error("Animation cancelled"));null===a&&(a=r);const u=Math.min(1,(r-a)/s);t[e]=o(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{i(null)})):requestAnimationFrame(d)};l===n?i(new Error("Element already at target position")):requestAnimationFrame(d)}(O,Z.current,e,{duration:r.transitions.duration.standard}):Z.current[O]=e},ie=e=>{let t=Z.current[O];I?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===RC()?-1:1),re(t)},oe=()=>{const e=Z.current[M];let t=0;const n=Array.from(ee.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[M]>e){0===r&&(t=e);break}t+=i[M]}return t},se=()=>{ie(-1*oe())},ae=()=>{ie(oe())},le=i.useCallback((e=>{J({overflow:null,scrollbarWidth:e})}),[]),ce=hs((e=>{const{tabsMeta:t,tabMeta:n}=te();if(n&&t)if(n[R]<t[R]){const r=t[O]+(n[R]-t[R]);re(r,{animation:e})}else if(n[N]>t[N]){const r=t[O]+(n[N]-t[N]);re(r,{animation:e})}})),ue=hs((()=>{P&&!1!==v&&Q(!K)}));i.useEffect((()=>{const e=ur((()=>{Z.current&&ne()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),ue()},r=hr(Z.current);let i;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ee.current.children).forEach((e=>{t.observe(e)}))),"undefined"!==typeof MutationObserver&&(i=new MutationObserver(n),i.observe(ee.current,{childList:!0})),()=>{var n,o;e.clear(),r.removeEventListener("resize",e),null==(n=i)||n.disconnect(),null==(o=t)||o.disconnect()}}),[ne,ue]),i.useEffect((()=>{const e=Array.from(ee.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&P&&!1!==v){const n=e[0],r=e[t-1],i={root:Z.current,threshold:.99},o=new IntersectionObserver((e=>{W(!e[0].isIntersecting)}),i);o.observe(n);const s=new IntersectionObserver((e=>{q(!e[0].isIntersecting)}),i);return s.observe(r),()=>{o.disconnect(),s.disconnect()}}}),[P,v,K,null==u?void 0:u.length]),i.useEffect((()=>{z(!0)}),[]),i.useEffect((()=>{ne()})),i.useEffect((()=>{ce(t_!==V)}),[ce,V]),i.useImperativeHandle(l,(()=>({updateIndicator:ne,updateScrollButtons:ue})),[ne,ue]);const de=(0,mt.jsx)(ZC,(0,Se.A)({},A,{className:Ce(B.indicator,A.className),ownerState:L,style:(0,Se.A)({},V,A.style)}));let he=0;const fe=i.Children.map(u,(e=>{if(!i.isValidElement(e))return null;const t=void 0===e.props.value?he:e.props.value;Y.set(t,he);const n=t===k;return he+=1,i.cloneElement(e,(0,Se.A)({fullWidth:"fullWidth"===C,indicator:n&&!U&&de,selected:n,selectionFollowsFocus:b,onChange:g,textColor:S,value:t},1!==he||!1!==k||e.props.tabIndex?{}:{tabIndex:0}))})),pe=(()=>{const e={};e.scrollbarSizeListener=P?(0,mt.jsx)(e_,{onChange:le,className:Ce(B.scrollableX,B.hideScrollbar)}):null;const t=P&&("auto"===v&&($||G)||!0===v);return e.scrollButtonStart=t?(0,mt.jsx)(y,(0,Se.A)({slots:{StartScrollButtonIcon:w.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:F},orientation:m,direction:o?"right":"left",onClick:se,disabled:!$},E,{className:Ce(B.scrollButtons,E.className)})):null,e.scrollButtonEnd=t?(0,mt.jsx)(y,(0,Se.A)({slots:{EndScrollButtonIcon:w.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:j},orientation:m,direction:o?"left":"right",onClick:ae,disabled:!G},E,{className:Ce(B.scrollButtons,E.className)})):null,e})();return(0,mt.jsxs)(XC,(0,Se.A)({className:Ce(B.root,d),ownerState:L,ref:t,as:h},T,{children:[pe.scrollButtonStart,pe.scrollbarSizeListener,(0,mt.jsxs)(JC,{className:B.scroller,ownerState:L,style:{overflow:X.overflow,[I?"margin"+(o?"Left":"Right"):"marginBottom"]:_?void 0:-X.scrollbarWidth},ref:Z,children:[(0,mt.jsx)(YC,{"aria-label":s,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:B.flexContainer,ownerState:L,onKeyDown:e=>{const t=ee.current,n=Pn(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),QC(t,n,KC);break;case i:e.preventDefault(),QC(t,n,qC);break;case"Home":e.preventDefault(),QC(t,null,qC);break;case"End":e.preventDefault(),QC(t,null,KC)}},ref:ee,role:"tablist",children:fe}),U&&de]}),pe.scrollButtonEnd]}))})),r_=n_;function i_(e){return _t("MuiTab",e)}const o_=Tt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),s_=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],a_=pt(Qs,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${At(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${o_.iconWrapper}`]:t.iconWrapper}]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${o_.iconWrapper}`]:(0,Se.A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,[`&.${o_.selected}`]:{opacity:1},[`&.${o_.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,[`&.${o_.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${o_.disabled}`]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,[`&.${o_.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${o_.disabled}`]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})})),l_=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:h,onClick:f,onFocus:p,selected:g,selectionFollowsFocus:m,textColor:y="inherit",value:v,wrapped:b=!1}=n,w=(0,Ee.A)(n,s_),x=(0,Se.A)({},n,{disabled:o,disableFocusRipple:s,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:a,textColor:y,wrapped:b}),A=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:l}=e;return _e({root:["root",o&&s&&"labelIcon",`textColor${At(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]},i_,t)})(x),E=l&&d&&i.isValidElement(l)?i.cloneElement(l,{className:Ce(A.iconWrapper,l.props.className)}):l;return(0,mt.jsxs)(a_,(0,Se.A)({focusRipple:!s,className:Ce(A.root,r),ref:t,role:"tab","aria-selected":g,disabled:o,onClick:e=>{!g&&h&&h(e,v),f&&f(e)},onFocus:e=>{m&&!g&&h&&h(e,v),p&&p(e)},ownerState:x,tabIndex:g?0:-1},w,{children:["top"===c||"start"===c?(0,mt.jsxs)(i.Fragment,{children:[E,d]}):(0,mt.jsxs)(i.Fragment,{children:[d,E]}),u]}))})),c_=l_,u_=["className","component"];const d_=Tt("MuiBox",["root"]),h_=ct(),f_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=(0,qt.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Re.A),a=i.forwardRef((function(e,i){const a=Wt(n),l=(0,yn.A)(e),{className:c,component:u="div"}=l,d=(0,Ee.A)(l,u_);return(0,mt.jsx)(s,(0,Se.A)({as:u,ref:i,className:zt(c,o?o(r):r),theme:t&&a[t]||a},d))}));return a}({themeId:dt,defaultTheme:h_,defaultClassName:d_.root,generateClassName:kt.generate}),p_=f_;function g_(e){return _t("MuiFormLabel",e)}const m_=Tt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),y_=["children","className","color","component","disabled","error","filled","focused","required"],v_=pt("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Se.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${m_.focused}`]:{color:(t.vars||t).palette[n.color].main},[`&.${m_.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${m_.error}`]:{color:(t.vars||t).palette.error.main}})})),b_=pt("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{[`&.${m_.error}`]:{color:(t.vars||t).palette.error.main}}})),w_=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,s=(0,Ee.A)(n,y_),a=ro({props:n,muiFormControl:oo(),states:["color","required","focused","disabled","error","filled"]}),l=(0,Se.A)({},n,{color:a.color||"primary",component:o,disabled:a.disabled,error:a.error,filled:a.filled,focused:a.focused,required:a.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e;return _e({root:["root",`color${At(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]},g_,t)})(l);return(0,mt.jsxs)(v_,(0,Se.A)({as:o,ownerState:l,className:Ce(c.root,i),ref:t},s,{children:[r,a.required&&(0,mt.jsxs)(b_,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))})),x_=w_;function A_(e){return _t("MuiInputLabel",e)}Tt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const E_=["disableAnimation","margin","shrink","variant","className"],S_=pt(x_,{shouldForwardProp:e=>ft(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${m_.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]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,Se.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,Se.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,Se.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),k_=i.forwardRef((function(e,t){const n=wt({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,s=(0,Ee.A)(n,E_),a=oo();let l=i;"undefined"===typeof l&&a&&(l=a.filled||a.focused||a.adornedStart);const c=ro({props:n,muiFormControl:a,states:["size","variant","required","focused"]}),u=(0,Se.A)({},n,{disableAnimation:r,formControl:a,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l=_e({root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&"normal"!==r&&`size${At(r)}`,s],asterisk:[a&&"asterisk"]},A_,t);return(0,Se.A)({},t,l)})(u);return(0,mt.jsx)(S_,(0,Se.A)({"data-shrink":l,ownerState:u,ref:t,className:Ce(d.root,o)},s,{classes:d}))})),C_=k_;const __=function(e,t){var n,r;return i.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(r=e.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)};function T_(e){return _t("MuiFormControl",e)}Tt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const P_=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],I_=pt("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Se.A)({},t.root,t[`margin${At(n.margin)}`],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,Se.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),O_=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiFormControl"}),{children:r,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:h=!1,margin:f="none",required:p=!1,size:g="medium",variant:m="outlined"}=n,y=(0,Ee.A)(n,P_),v=(0,Se.A)({},n,{color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:h,margin:f,required:p,size:g,variant:m}),b=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return _e({root:["root","none"!==n&&`margin${At(n)}`,r&&"fullWidth"]},T_,t)})(v),[w,x]=i.useState((()=>{let e=!1;return r&&i.Children.forEach(r,(t=>{if(!__(t,["Input","Select"]))return;const n=__(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)})),e})),[A,E]=i.useState((()=>{let e=!1;return r&&i.Children.forEach(r,(t=>{__(t,["Input","Select"])&&(Hi(t.props,!0)||Hi(t.props.inputProps,!0))&&(e=!0)})),e})),[S,k]=i.useState(!1);l&&S&&k(!1);const C=void 0===u||l?S:u;let _;const T=i.useMemo((()=>({adornedStart:w,setAdornedStart:x,color:s,disabled:l,error:c,filled:A,focused:C,fullWidth:d,hiddenLabel:h,size:g,onBlur:()=>{k(!1)},onEmpty:()=>{E(!1)},onFilled:()=>{E(!0)},onFocus:()=>{k(!0)},registerEffect:_,required:p,variant:m})),[w,s,l,c,A,C,d,h,_,p,g,m]);return(0,mt.jsx)(io.Provider,{value:T,children:(0,mt.jsx)(I_,(0,Se.A)({as:a,ownerState:v,className:Ce(b.root,o),ref:t},y,{children:r}))})})),R_=O_;function N_(e){return _t("MuiFormHelperText",e)}const M_=Tt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var D_;const L_=["children","className","component","disabled","error","filled","focused","margin","required","variant"],B_=pt("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${At(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${M_.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${M_.error}`]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})})),F_=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,s=(0,Ee.A)(n,L_),a=ro({props:n,muiFormControl:oo(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,Se.A)({},n,{component:o,contained:"filled"===a.variant||"outlined"===a.variant,variant:a.variant,size:a.size,disabled:a.disabled,error:a.error,filled:a.filled,focused:a.focused,required:a.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e;return _e({root:["root",i&&"disabled",o&&"error",r&&`size${At(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]},N_,t)})(l);return(0,mt.jsx)(B_,(0,Se.A)({as:o,ownerState:l,className:Ce(c.root,i),ref:t},s,{children:" "===r?D_||(D_=(0,mt.jsx)("span",{className:"notranslate",children:"\u200b"})):r}))}));function j_(e){return _t("MuiTextField",e)}Tt("MuiTextField",["root"]);const U_=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],z_={standard:Fo,filled:Wo,outlined:rs},V_=pt(R_,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),H_=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:s,color:a="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:f,id:p,InputLabelProps:g,inputProps:m,InputProps:y,inputRef:v,label:b,maxRows:w,minRows:x,multiline:A=!1,name:E,onBlur:S,onChange:k,onFocus:C,placeholder:_,required:T=!1,rows:P,select:I=!1,SelectProps:O,type:R,value:N,variant:M="outlined"}=n,D=(0,Ee.A)(n,U_),L=(0,Se.A)({},n,{autoFocus:i,color:a,disabled:c,error:u,fullWidth:h,multiline:A,required:T,select:I,variant:M}),B=(e=>{const{classes:t}=e;return _e({root:["root"]},j_,t)})(L);const F={};"outlined"===M&&(g&&"undefined"!==typeof g.shrink&&(F.notched=g.shrink),F.label=b),I&&(O&&O.native||(F.id=void 0),F["aria-describedby"]=void 0);const j=_n(p),U=f&&j?`${j}-helper-text`:void 0,z=b&&j?`${j}-label`:void 0,V=z_[M],H=(0,mt.jsx)(V,(0,Se.A)({"aria-describedby":U,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:h,multiline:A,name:E,rows:P,maxRows:w,minRows:x,type:R,value:N,id:j,inputRef:v,onBlur:S,onChange:k,onFocus:C,placeholder:_,inputProps:m},F,y));return(0,mt.jsxs)(V_,(0,Se.A)({className:Ce(B.root,s),disabled:c,error:u,fullWidth:h,ref:t,required:T,color:a,variant:M,ownerState:L},D,{children:[null!=b&&""!==b&&(0,mt.jsx)(C_,(0,Se.A)({htmlFor:j,id:z},g,{children:b})),I?(0,mt.jsx)(ds,(0,Se.A)({"aria-describedby":U,id:j,labelId:z,value:N,input:H},O,{children:o})):H,f&&(0,mt.jsx)(F_,(0,Se.A)({id:U},d,{children:f}))]}))})),$_=H_,W_=e=>{let{handleClose:t}=e;const[n,r]=(0,i.useState)(""),[o,s]=(0,i.useState)(""),[a,l]=(0,i.useState)(""),{setAlert:c}=IC();return(0,mt.jsxs)(p_,{p:3,style:{display:"flex",flexDirection:"column",gap:"20px"},children:[(0,mt.jsx)($_,{variant:"outlined",type:"email",label:"Enter Email",value:n,onChange:e=>r(e.target.value),fullWidth:!0}),(0,mt.jsx)($_,{variant:"outlined",label:"Enter Password",type:"password",value:o,onChange:e=>s(e.target.value),fullWidth:!0}),(0,mt.jsx)($_,{variant:"outlined",label:"Confirm Password",type:"password",value:a,onChange:e=>l(e.target.value),fullWidth:!0}),(0,mt.jsx)(pa,{variant:"contained",size:"large",style:{backgroundColor:"#EEBC1D"},onClick:async()=>{if(o===a)try{const e=await async function(e,t,n){if(Tp(e.app))return Promise.reject(ng(e));const r=lm(e),i=gm(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Dm),o=await i.catch((t=>{throw"auth/password-does-not-meet-requirements"===t.code&&$m(e),t})),s=await Lm._fromIdTokenResponse(r,"signIn",o);return await r._updateCurrentUser(s.user),s}(CC,n,o);c({open:!0,message:`Sign Up Successful. Welcome ${e.user.email}`,type:"success"}),t()}catch(e){return void c({open:!0,message:e.message,type:"error"})}else c({open:!0,message:"Passwords do not match",type:"error"})},children:"Sign Up"})]})},G_=e=>{let{handleClose:t}=e;const[n,r]=(0,i.useState)(""),[o,s]=(0,i.useState)(""),{setAlert:a}=IC();return(0,mt.jsxs)(p_,{p:3,style:{display:"flex",flexDirection:"column",gap:"20px"},children:[(0,mt.jsx)($_,{variant:"outlined",type:"email",label:"Enter Email",value:n,onChange:e=>r(e.target.value),fullWidth:!0}),(0,mt.jsx)($_,{variant:"outlined",label:"Enter Password",type:"password",value:o,onChange:e=>s(e.target.value),fullWidth:!0}),(0,mt.jsx)(pa,{variant:"contained",size:"large",onClick:async()=>{if(n&&o)try{const e=await function(e,t,n){return Tp(e.app)?Promise.reject(ng(e)):Hm(gf(e),Tm.credential(t,n)).catch((async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&$m(e),t}))}(CC,n,o);a({open:!0,message:`Sign Up Successful. Welcome ${e.user.email}`,type:"success"}),t()}catch(e){return void a({open:!0,message:e.message,type:"error"})}else a({open:!0,message:"Please fill all the Fields",type:"error"})},style:{backgroundColor:"#EEBC1D"},children:"Login"})]})};var q_=n(5351);const K_=xu((e=>({modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{width:400,backgroundColor:e.palette.background.paper,color:"white",borderRadius:10},google:{padding:24,paddingTop:0,display:"flex",flexDirection:"column",textAlign:"center",gap:20,fontSize:20}})));function Q_(e){let{triggerOpen:t,handleClose:n}=e;const r=K_(),[o,s]=(0,i.useState)(0),{setAlert:a}=IC(),l=new Rm;return(0,mt.jsx)(di,{"aria-labelledby":"transition-modal-title","aria-describedby":"transition-modal-description",className:r.modal,open:t,onClose:n,closeAfterTransition:!0,BackdropComponent:Xr,BackdropProps:{timeout:500},children:(0,mt.jsx)(Gr,{in:t,children:(0,mt.jsxs)("div",{className:r.paper,children:[(0,mt.jsx)(jt,{position:"static",style:{backgroundColor:"transparent",color:"white"},children:(0,mt.jsxs)(r_,{value:o,onChange:(e,t)=>{s(t)},variant:"fullWidth",style:{borderRadius:10},children:[(0,mt.jsx)(c_,{label:"Login"}),(0,mt.jsx)(c_,{label:"Sign Up"})]})}),0===o&&(0,mt.jsx)(G_,{handleClose:n}),1===o&&(0,mt.jsx)(W_,{handleClose:n}),(0,mt.jsxs)(p_,{className:r.google,children:[(0,mt.jsx)("span",{children:"OR"}),(0,mt.jsx)(q_.Ay,{style:{width:"100%",outline:"none",cursor:"pointer",zIndex:10},onClick:()=>{(async function(e,t,n){if(Tp(e.app))return Promise.reject(eg(e,"operation-not-supported-in-this-environment"));const r=lm(e);rg(e,t,Pm);const i=gy(r,n);return new Ay(r,"signInViaPopup",t,i).executeNotNull()})(CC,l).then((e=>{a({open:!0,message:`Sign Up Successful. Welcome ${e.user.email}`,type:"success"}),n()})).catch((e=>{a({open:!0,message:e.message,type:"error"})}))}})]})]})})})}const X_=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function J_(e,t,n){var r;const i=function(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=hr(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const e=o.getComputedStyle(t);s=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let a=0,l=0;if(s&&"none"!==s&&"string"===typeof s){const e=s.split("(")[1].split(")")[0].split(",");a=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:"right"===e?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:"up"===e?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"===typeof(r=n)?r():r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Y_=i.forwardRef((function(e,t){const n=Pr(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=r,in:h,onEnter:f,onEntered:p,onEntering:g,onExit:m,onExited:y,onExiting:v,style:b,timeout:w=o,TransitionComponent:x=Tr}=e,A=(0,Ee.A)(e,X_),E=i.useRef(null),S=Zn(l.ref,E,t),k=e=>t=>{e&&(void 0===t?e(E.current):e(E.current,t))},C=k(((e,t)=>{J_(u,e,c),Ir(e),f&&f(e,t)})),_=k(((e,t)=>{const r=Or({timeout:w,style:b,easing:d},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,Se.A)({},r)),e.style.transition=n.transitions.create("transform",(0,Se.A)({},r)),e.style.webkitTransform="none",e.style.transform="none",g&&g(e,t)})),T=k(p),P=k(v),I=k((e=>{const t=Or({timeout:w,style:b,easing:d},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),J_(u,e,c),m&&m(e)})),O=k((e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)})),R=i.useCallback((()=>{E.current&&J_(u,E.current,c)}),[u,c]);return i.useEffect((()=>{if(h||"down"===u||"right"===u)return;const e=ur((()=>{E.current&&J_(u,E.current,c)})),t=hr(E.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[u,h,c]),i.useEffect((()=>{h||R()}),[h,R]),(0,mt.jsx)(x,(0,Se.A)({nodeRef:E,onEnter:C,onEntered:T,onEntering:_,onExit:I,onExited:O,onExiting:P,addEndListener:e=>{s&&s(E.current,e)},appear:a,in:h,timeout:w},A,{children:(e,t)=>i.cloneElement(l,(0,Se.A)({ref:S,style:(0,Se.A)({visibility:"exited"!==e||h?void 0:"hidden"},b,l.props.style)},t))}))})),Z_=Y_;function eT(e){return _t("MuiDrawer",e)}Tt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const tT=["BackdropProps"],nT=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],rT=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},iT=pt(di,{name:"MuiDrawer",slot:"Root",overridesResolver:rT})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}})),oT=pt("div",{shouldForwardProp:ft,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:rT})({flex:"0 0 auto"}),sT=pt(Nt,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${At(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${At(n.anchor)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})})),aT={left:"right",right:"left",top:"down",bottom:"up"};const lT=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiDrawer"}),r=Pr(),o=Rn(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:f}={},onClose:p,open:g=!1,PaperProps:m={},SlideProps:y,TransitionComponent:v=Z_,transitionDuration:b=s,variant:w="temporary"}=n,x=(0,Ee.A)(n.ModalProps,tT),A=(0,Ee.A)(n,nT),E=i.useRef(!1);i.useEffect((()=>{E.current=!0}),[]);const S=function(e,t){let{direction:n}=e;return"rtl"===n&&function(e){return-1!==["left","right"].indexOf(e)}(t)?aT[t]:t}({direction:o?"rtl":"ltr"},a),k=a,C=(0,Se.A)({},n,{anchor:k,elevation:d,open:g,variant:w},A),_=(e=>{const{classes:t,anchor:n,variant:r}=e;return _e({root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${At(n)}`,"temporary"!==r&&`paperAnchorDocked${At(n)}`]},eT,t)})(C),T=(0,mt.jsx)(sT,(0,Se.A)({elevation:"temporary"===w?d:0,square:!0},m,{className:Ce(_.paper,m.className),ownerState:C,children:c}));if("permanent"===w)return(0,mt.jsx)(oT,(0,Se.A)({className:Ce(_.root,_.docked,u),ownerState:C,ref:t},A,{children:T}));const P=(0,mt.jsx)(v,(0,Se.A)({in:g,direction:aT[S],timeout:b,appear:E.current},y,{children:T}));return"persistent"===w?(0,mt.jsx)(oT,(0,Se.A)({className:Ce(_.root,_.docked,u),ownerState:C,ref:t},A,{children:P})):(0,mt.jsx)(iT,(0,Se.A)({BackdropProps:(0,Se.A)({},l,f,{transitionDuration:b}),className:Ce(_.root,_.modal,u),open:g,ownerState:C,onClose:p,hideBackdrop:h,ref:t},A,x,{children:P}))})),cT=lT,uT=ho((0,mt.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function dT(e){return _t("MuiAvatar",e)}Tt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const hT=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],fT=["component","slots","slotProps"],pT=["component"];function gT(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:s,internalForwardedProps:a}=t,l=(0,Ee.A)(t,hT),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=(0,Ee.A)(o,fT),f=u[e]||r,p=Hn(d[e],i),g=Vn((0,Se.A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:p})),{props:{component:m},internalRef:y}=g,v=(0,Ee.A)(g.props,pT),b=Dn(y,null==p?void 0:p.ref,t.ref),w=s?s(v):{},x=(0,Se.A)({},i,w),A="root"===e?m||c:m,E=Bn(f,(0,Se.A)({},"root"===e&&!c&&!u[e]&&a,"root"!==e&&!u[e]&&a,v,A&&{as:A},{ref:b}),x);return Object.keys(w).forEach((e=>{delete E[e]})),[f,E]}const mT=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],yT=pt("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})((e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,Se.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,Se.A)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}})),vT=pt("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),bT=pt(uT,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const wT=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiAvatar"}),{alt:r,children:o,className:s,component:a="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:h,srcSet:f,variant:p="circular"}=n,g=(0,Ee.A)(n,mT);let m=null;const y=function(e){let{crossOrigin:t,referrerPolicy:n,src:r,srcSet:o}=e;const[s,a]=i.useState(!1);return i.useEffect((()=>{if(!r&&!o)return;a(!1);let e=!0;const i=new Image;return i.onload=()=>{e&&a("loaded")},i.onerror=()=>{e&&a("error")},i.crossOrigin=t,i.referrerPolicy=n,i.src=r,o&&(i.srcset=o),()=>{e=!1}}),[t,n,r,o]),s}((0,Se.A)({},u,{src:h,srcSet:f})),v=h||f,b=v&&"error"!==y,w=(0,Se.A)({},n,{colorDefault:!b,component:a,variant:p}),x=(e=>{const{classes:t,variant:n,colorDefault:r}=e;return _e({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},dT,t)})(w),[A,E]=gT("img",{className:x.img,elementType:vT,externalForwardedProps:{slots:l,slotProps:{img:(0,Se.A)({},u,c.img)}},additionalProps:{alt:r,src:h,srcSet:f,sizes:d},ownerState:w});return m=b?(0,mt.jsx)(A,(0,Se.A)({},E)):o||0===o?o:v&&r?r[0]:(0,mt.jsx)(bT,{ownerState:w,className:x.fallback}),(0,mt.jsx)(yT,(0,Se.A)({as:a,ownerState:w,className:Ce(x.root,s),ref:t},g,{children:m}))})),xT=wT;var AT=n(4058),ET=n.n(AT);const ST=xu((e=>({Carousel:{height:"50%",display:"flex",alignItems:"center",margin:"20px"},carouselItem:{display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer",textTransform:"uppercase",color:"white"}})));function kT(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}const CT=()=>{const e=ST(),[t,n]=(0,i.useState)([]),{currency:r,symbol:o}=IC(),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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Jeevan Kumar Korra",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_BRANCH_URL:"crypto-portfolio-app-git-master-jeevan10017s-projects.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"Update README.md",REACT_APP_VERCEL_GIT_REPO_SLUG:"Crypto-Portfolio-App",REACT_APP_VERCEL_GIT_COMMIT_SHA:"05df0eb8941a350972bdb46a2a008539d2cfd56f",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"master",REACT_APP_VERCEL_URL:"crypto-portfolio-2w6zcbkxd-jeevan10017s-projects.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"crypto-portfolio-app-olive.vercel.app",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"842148022",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"jeevan10017",REACT_APP_VERCEL_GIT_REPO_OWNER:"jeevan10017"}.API_KEY;(0,i.useEffect)((()=>{(async()=>{try{const{data:e}=await Hh.get((e=>`https://api.coingecko.com/api/v3/coins/markets?vs_currency=${e}&order=gecko_desc&per_page=10&page=1&sparkline=false&price_change_percentage=24h`)(r),{headers:{"X-CMC_PRO_API_KEY":s}});n(e),console.log(e)}catch(e){console.error("Error fetching trending coins:",e)}})()}),[r]);const a=t.map((t=>{var n;let r=(null===t||void 0===t?void 0:t.price_change_percentage_24h)>=0;return(0,mt.jsxs)("div",{className:e.carouselItem,children:[(0,mt.jsx)("img",{src:null===t||void 0===t?void 0:t.image,alt:t.name,height:"80",style:{marginBottom:10}}),(0,mt.jsxs)("span",{children:[null===t||void 0===t?void 0:t.symbol,"\xa0",(0,mt.jsxs)("span",{style:{color:r?"rgb(14, 203, 129)":"red",fontWeight:500},children:[r&&"+",null===t||void 0===t||null===(n=t.price_change_percentage_24h)||void 0===n?void 0:n.toFixed(2),"%"]})]}),(0,mt.jsxs)("span",{style:{fontSize:22,fontWeight:500},children:[o," ",kT(null===t||void 0===t?void 0:t.current_price.toFixed(2))]})]},t.id)}));return(0,mt.jsx)("div",{className:e.Carousel,children:(0,mt.jsx)(ET(),{mouseTracking:!0,infinite:!0,autoPlayInterval:1e3,autoPlay:!0,disableButtonsControls:!0,disableDotsControls:!0,responsive:{0:{items:1},512:{items:4}},items:a})})};var _T={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},TT=i.createContext&&i.createContext(_T),PT=["attr","size","title"];function IT(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function OT(){return OT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OT.apply(this,arguments)}function RT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RT(Object(n),!0).forEach((function(t){MT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MT(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DT(e){return e&&e.map(((e,t)=>i.createElement(e.tag,NT({key:t},e.attr),DT(e.child))))}function LT(e){return t=>i.createElement(BT,OT({attr:NT({},e.attr)},t),DT(e.child))}function BT(e){var t=t=>{var n,{attr:r,size:o,title:s}=e,a=IT(e,PT),l=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),i.createElement("svg",OT({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:n,style:NT(NT({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&i.createElement("title",null,s),e.children)};return void 0!==TT?i.createElement(TT.Consumer,null,(e=>t(e))):t(_T)}function FT(e){return LT({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"},child:[]}]})(e)}const jT=i.createContext();function UT(e){return _t("MuiTable",e)}Tt("MuiTable",["root","stickyHeader"]);const zT=["className","component","padding","size","stickyHeader"],VT=pt("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,Se.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),HT="table",$T=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTable"}),{className:r,component:o=HT,padding:s="normal",size:a="medium",stickyHeader:l=!1}=n,c=(0,Ee.A)(n,zT),u=(0,Se.A)({},n,{component:o,padding:s,size:a,stickyHeader:l}),d=(e=>{const{classes:t,stickyHeader:n}=e;return _e({root:["root",n&&"stickyHeader"]},UT,t)})(u),h=i.useMemo((()=>({padding:s,size:a,stickyHeader:l})),[s,a,l]);return(0,mt.jsx)(jT.Provider,{value:h,children:(0,mt.jsx)(VT,(0,Se.A)({as:o,role:o===HT?null:"table",ref:t,className:Ce(d.root,r),ownerState:u},c))})})),WT=$T;const GT=i.createContext();function qT(e){return _t("MuiTableHead",e)}Tt("MuiTableHead",["root"]);const KT=["className","component"],QT=pt("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),XT={variant:"head"},JT="thead",YT=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTableHead"}),{className:r,component:i=JT}=n,o=(0,Ee.A)(n,KT),s=(0,Se.A)({},n,{component:i}),a=(e=>{const{classes:t}=e;return _e({root:["root"]},qT,t)})(s);return(0,mt.jsx)(GT.Provider,{value:XT,children:(0,mt.jsx)(QT,(0,Se.A)({as:i,className:Ce(a.root,r),ref:t,role:i===JT?null:"rowgroup",ownerState:s},o))})}));function ZT(e){return _t("MuiTableRow",e)}const eP=Tt("MuiTableRow",["root","selected","hover","head","footer"]),tP=["className","component","hover","selected"],nP=pt("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${eP.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${eP.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,Me.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,Me.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}})),rP="tr",iP=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTableRow"}),{className:r,component:o=rP,hover:s=!1,selected:a=!1}=n,l=(0,Ee.A)(n,tP),c=i.useContext(GT),u=(0,Se.A)({},n,{component:o,hover:s,selected:a,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant}),d=(e=>{const{classes:t,selected:n,hover:r,head:i,footer:o}=e;return _e({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},ZT,t)})(u);return(0,mt.jsx)(nP,(0,Se.A)({as:o,ref:t,className:Ce(d.root,r),role:o===rP?null:"row",ownerState:u},l))})),oP=iP;function sP(e){return _t("MuiTableCell",e)}const aP=Tt("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),lP=["align","className","component","padding","scope","size","sortDirection","variant"],cP=pt("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${At(n.size)}`],"normal"!==n.padding&&t[`padding${At(n.padding)}`],"inherit"!==n.align&&t[`align${At(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid\n    ${"light"===t.palette.mode?(0,Me.a)((0,Me.X4)(t.palette.divider,1),.88):(0,Me.e$)((0,Me.X4)(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",[`&.${aP.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),uP=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTableCell"}),{align:r="inherit",className:o,component:s,padding:a,scope:l,size:c,sortDirection:u,variant:d}=n,h=(0,Ee.A)(n,lP),f=i.useContext(jT),p=i.useContext(GT),g=p&&"head"===p.variant;let m;m=s||(g?"th":"td");let y=l;"td"===m?y=void 0:!y&&g&&(y="col");const v=d||p&&p.variant,b=(0,Se.A)({},n,{align:r,component:m,padding:a||(f&&f.padding?f.padding:"normal"),size:c||(f&&f.size?f.size:"medium"),sortDirection:u,stickyHeader:"head"===v&&f&&f.stickyHeader,variant:v}),w=(e=>{const{classes:t,variant:n,align:r,padding:i,size:o,stickyHeader:s}=e;return _e({root:["root",n,s&&"stickyHeader","inherit"!==r&&`align${At(r)}`,"normal"!==i&&`padding${At(i)}`,`size${At(o)}`]},sP,t)})(b);let x=null;return u&&(x="asc"===u?"ascending":"descending"),(0,mt.jsx)(cP,(0,Se.A)({as:m,ref:t,className:Ce(w.root,o),"aria-sort":x,scope:y,ownerState:b},h))})),dP=uP;function hP(e){return _t("MuiTableBody",e)}Tt("MuiTableBody",["root"]);const fP=["className","component"],pP=pt("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),gP={variant:"body"},mP="tbody",yP=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTableBody"}),{className:r,component:i=mP}=n,o=(0,Ee.A)(n,fP),s=(0,Se.A)({},n,{component:i}),a=(e=>{const{classes:t}=e;return _e({root:["root"]},hP,t)})(s);return(0,mt.jsx)(GT.Provider,{value:gP,children:(0,mt.jsx)(pP,(0,Se.A)({className:Ce(a.root,r),as:i,ref:t,role:i===mP?null:"rowgroup",ownerState:s},o))})})),vP=xu({container:{width:350,padding:25,height:"100%",display:"flex",flexDirection:"column",fontFamily:"monospace",backgroundColor:"#121212",color:"#CFB53B"},profile:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:"15px",height:"100%",color:"#CFB53B"},logout:{height:"8%",width:"100%",backgroundColor:"#CFB53B",color:"#121212",marginTop:20},picture:{width:200,height:200,cursor:"pointer",backgroundColor:"#CFB53B",objectFit:"contain"},watchlist:{flex:1,width:"100%",backgroundColor:"#1E1E1E",borderRadius:10,padding:15,paddingTop:10,display:"flex",flexDirection:"column",alignItems:"center",gap:12,overflowY:"scroll","&::-webkit-scrollbar":{width:"8px"}},coin:{padding:10,borderRadius:5,color:"#121212",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#CFB53B",boxShadow:"0 0 3px #CFB53B"}});function bP(){const e=vP(),[t,n]=i.useState({right:!1}),{user:r,setAlert:o,watchlist:s,coins:a,symbol:l,transferHistory:c}=IC();console.log(s,a);const u=(e,r)=>i=>{("keydown"!==i.type||"Tab"!==i.key&&"Shift"!==i.key)&&n({...t,[e]:r})},[d,h]=(0,i.useState)(!1),f=()=>{!function(e){gf(e).signOut()}(CC),o({open:!0,type:"success",message:"Logout Successfull !"}),u()};return(0,mt.jsx)("div",{children:["right"].map((n=>(0,mt.jsxs)(i.Fragment,{children:[(0,mt.jsx)(xT,{onClick:u(n,!0),style:{height:38,width:38,marginLeft:15,cursor:"pointer",backgroundColor:"#EEBC1D"},src:r.photoURL,alt:r.displayName||r.email}),(0,mt.jsx)(cT,{anchor:n,open:t[n],onClose:u(n,!1),children:(0,mt.jsxs)("div",{className:e.container,children:[(0,mt.jsxs)("div",{className:e.profile,children:[(0,mt.jsx)(xT,{className:e.picture,src:r.photoURL,alt:r.displayName||r.email,style:{cursor:"pointer",scale:1.5,marginTop:10,marginBottom:10,borderRadius:50,boxShadow:"0 0 3px #CFB53B",backgroundColor:"#CFB53B",objectFit:"contain",width:80,height:80}}),(0,mt.jsx)("span",{style:{width:"100%",fontSize:25,textAlign:"center",fontWeight:"bolder",wordWrap:"break-word"},children:r.displayName||r.email}),(0,mt.jsx)(pa,{variant:"contained",color:"primary",onClick:()=>h(!0),style:{backgroundColor:"#DDA0DD",color:"black",marginTop:"20px"},children:"View Transfer History"}),(0,mt.jsx)(di,{open:d,onClose:()=>h(!1),"aria-labelledby":"modal-title","aria-describedby":"modal-description",children:(0,mt.jsxs)(p_,{sx:{width:{xs:"90%",sm:"80%",md:"70%"},maxWidth:800,margin:"auto",marginTop:{xs:"20%",sm:"10%"},backgroundColor:"#1E1E1E",padding:4,borderRadius:2,color:"#CFB53B",overflow:"auto"},children:[(0,mt.jsx)(Sn,{variant:"h6",gutterBottom:!0,id:"modal-title",style:{color:"#CFB53B"},children:"Transfer History"}),(0,mt.jsxs)(WT,{children:[(0,mt.jsx)(YT,{children:(0,mt.jsxs)(oP,{children:[(0,mt.jsx)(dP,{style:{color:"#CFB53B"},children:"Date"}),(0,mt.jsx)(dP,{style:{color:"#CFB53B"},children:"Token Address"}),(0,mt.jsx)(dP,{style:{color:"#CFB53B"},children:"Recipient"}),(0,mt.jsx)(dP,{style:{color:"#CFB53B"},children:"Amount"}),(0,mt.jsx)(dP,{style:{color:"#CFB53B"},children:"Transaction Hash"})]})}),(0,mt.jsx)(yP,{children:c.map(((e,t)=>(0,mt.jsxs)(oP,{children:[(0,mt.jsx)(dP,{style:{color:"#FFFFFF"},children:new Date(e.date).toLocaleString()}),(0,mt.jsx)(dP,{style:{color:"#FFFFFF"},children:e.tokenAddress}),(0,mt.jsx)(dP,{style:{color:"#FFFFFF"},children:e.recipientAddress}),(0,mt.jsx)(dP,{style:{color:"#FFFFFF"},children:e.amount}),(0,mt.jsx)(dP,{style:{color:"#FFFFFF"},children:(0,mt.jsx)("a",{href:`https://etherscan.io/tx/${e.transactionHash}`,target:"_blank",rel:"noopener noreferrer",style:{color:"#CFB53B"},children:"View on Etherscan"})})]},t)))})]})]})}),(0,mt.jsxs)("div",{className:e.watchlist,children:[(0,mt.jsx)("span",{style:{fontSize:15,textShadow:"0 0 5px black"},children:"Watchlist"}),a.map((t=>s.includes(t.id)?(0,mt.jsxs)("div",{className:e.coin,children:[(0,mt.jsx)("span",{children:t.name}),(0,mt.jsxs)("span",{style:{display:"flex",gap:8},children:[l," ",kT(t.current_price.toFixed(2)),(0,mt.jsx)(FT,{style:{cursor:"pointer"},fontSize:"16",onClick:()=>(async e=>{const t=Lk(_C,"watchlist",r.uid);try{await xC(t,{coins:s.filter((t=>t!==(null===e||void 0===e?void 0:e.id)))},{merge:!0}),o({open:!0,message:`${e.name} Removed from the Watchlist !`,type:"success"})}catch(n){o({open:!0,message:n.message,type:"error"})}})(t)})]})]}):(0,mt.jsx)(mt.Fragment,{})))]})]}),(0,mt.jsx)(pa,{variant:"contained",className:e.logout,onClick:f,style:{backgroundColor:"#1f1f1f",color:"#EEBC1D",borderRadius:"5px",boxShadow:"0px 4px 15px rgba(238, 188, 29, 0.5)",transition:"0.3s ease",padding:"10px 20px",fontSize:"16px"},children:"Log Out"})]})})]},n)))})}const wP=n.p+"static/media/logo.a52dee2302b22f06c1f8.jpg",xP=xu((()=>({title:{flex:1,color:"#CFB53B",fontFamily:"Montserrat",fontWeight:"extraBold",cursor:"pointer",fontSize:"1.4rem",position:"sticky","@media (max-width: 468px)":{fontSize:"1.1rem"},"@media (max-width: 478px)":{opacity:0,fontSize:"3px"}},select:{"& .MuiSelect-select":{color:"#CFB53B","&:hover":{"& .MuiSelect-select":"#CFB53B"}},"& .MuiSvgIcon-root":{color:"#CFB53B"}},menuItem:{color:"#CFB53B","&:hover":{backgroundColor:"#CFB53B",color:"#CFB53B"},"&:focus":{color:"#CFB53B"}},bar:{zIndex:100,backgroundColor:"black",width:"100%"},btn:{color:"#CFB53B",borderColor:"#CFB53B"}}))),AP=()=>{const e=xP(),t=ne(),{currency:n,setCurrency:r,user:o}=IC(),[s,a]=(0,i.useState)(!1),l=ct({palette:{primary:{main:"#fff"},mode:"dark"}});return(0,mt.jsxs)(_u,{theme:l,children:[(0,mt.jsx)(jt,{className:e.bar,position:"sticky",style:{backgroundColor:"black",width:"100%",zIndex:"100"},children:(0,mt.jsx)(dn,{className:"HeaderCnt",style:{maxwidth:"100%"},children:(0,mt.jsxs)(mn,{children:[(0,mt.jsx)("img",{src:wP,alt:"logo",style:{width:50,cursor:"pointer",padding:5,marginLeft:0},onClick:()=>t("/")}),(0,mt.jsx)(Sn,{onClick:()=>t("/"),className:e.title,style:{marginLeft:10,fontFamily:"Montserrat",fontWeight:"extraBold"},variant:"h6",children:"CRYPTO PORTFOLIO"}),(0,mt.jsxs)(ds,{variant:"outlined",className:e.select,value:n,onChange:e=>r(e.target.value),style:{width:75,height:35},children:[(0,mt.jsx)(ra,{value:"USD",className:e.menuItem,children:"USD"}),(0,mt.jsx)(ra,{value:"EUR",className:e.menuItem,children:"EUR"}),(0,mt.jsx)(ra,{value:"JPY",className:e.menuItem,children:"JPY"}),(0,mt.jsx)(ra,{value:"GBP",className:e.menuItem,children:"GBP"}),(0,mt.jsx)(ra,{value:"AUD",className:e.menuItem,children:"AUD"}),(0,mt.jsx)(ra,{value:"INR",className:e.menuItem,children:"INR"})]}),o?(0,mt.jsx)(bP,{}):(0,mt.jsx)(pa,{variant:"outlined",className:e.btn,style:{color:"#CFB53B",borderColor:"#CFB53B",marginLeft:20},onClick:()=>a(!0),children:"Login"})]})})}),(0,mt.jsx)(Q_,{triggerOpen:s,handleClose:()=>a(!1)})]})},EP=n.p+"static/media/newbg.ac7b6bf5501bc021488c.jpg",SP=xu((()=>({banner:{backgroundImage:`url(${EP})`,zIndex:-1,backgroundSize:"cover",backgroundPosition:"center",height:450,display:"flex",flexDirection:"column",paddingTop:25,justifyContent:"space-around","@media (max-width: 768px)":{height:"75%"},"@media (max-width: 440px)":{height:"85%"}},bannerContent:{height:"100%",display:"flex",flexDirection:"column",paddingTop:25,justifyContent:"space-around",zIndex:1},tagline:{display:"flex",height:"40%",flexDirection:"column",justifyContent:"center",alignItems:"center",zIndex:1},overlay:{position:"absolute",top:"5%",left:0,width:"100%",height:"70%",background:"rgba(0, 0, 0, 0.3)",zIndex:0,borderRadius:"10px","@media (max-width: 868px)":{height:"85vh"},"@media (max-width: 470px)":{height:"90%"},"@media (max-width: 435px)":{height:"80%"}},new:{zIndex:100}}))),kP=()=>{const e=SP(),t=ne(),{user:n}=IC(),[r,o]=(0,i.useState)(!1);return(0,mt.jsxs)("div",{className:e.banner,children:[(0,mt.jsx)("div",{className:e.overlay}),(0,mt.jsxs)(dn,{className:e.bannerContent,children:[(0,mt.jsxs)("div",{className:e.tagline,children:[(0,mt.jsx)(Sn,{variant:"h3",style:{color:"white",fontWeight:"bold",marginBottom:15,fontFamily:"Montserrat"},children:"Welcome to Crypto Portfolio"}),(0,mt.jsx)(Sn,{className:e.new,variant:"h6",style:{color:"white",fontFamily:"Montserrat"},children:"Keep track of your favorite cryptocurrencies"}),!n&&(0,mt.jsx)(pa,{variant:"outlined",style:{backgroundColor:"rgba(0,0,0,0.3)",color:"#CFB53B",marginTop:25,marginBottom:8},onClick:()=>o(!0),children:"Signup Now for Token Management"}),n&&(0,mt.jsx)(pa,{variant:"contained",onClick:()=>t("/tokens"),style:{backgroundColor:"#CFB53B",color:"black",marginTop:25,marginBottom:8},children:"Manage Tokens"})]}),(0,mt.jsx)(CT,{})]}),(0,mt.jsx)(Q_,{triggerOpen:r,handleClose:()=>o(!1)})," "]})};function CP(e){return _t("MuiPagination",e)}Tt("MuiPagination",["root","ul","outlined","text"]);const _P=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function TP(e){return _t("MuiPaginationItem",e)}const PP=Tt("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),IP=ho((0,mt.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),OP=ho((0,mt.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),RP=ho((0,mt.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),NP=ho((0,mt.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),MP=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],DP=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${At(n.size)}`],"text"===n.variant&&t[`text${At(n.color)}`],"outlined"===n.variant&&t[`outlined${At(n.color)}`],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},LP=pt("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:DP})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",[`&.${PP.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})})),BP=pt(Qs,{name:"MuiPaginationItem",slot:"Root",overridesResolver:DP})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,[`&.${PP.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${PP.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${PP.selected}`]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,Me.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${PP.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,Me.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},[`&.${PP.disabled}`]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})}),(e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({},"text"===n.variant&&{[`&.${PP.selected}`]:(0,Se.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},[`&.${PP.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{[`&.${PP.disabled}`]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${PP.selected}`]:(0,Se.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:(0,Me.X4)(t.palette[n.color].main,.5)}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.activatedOpacity})`:(0,Me.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,Me.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${PP.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,Me.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{[`&.${PP.disabled}`]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})})),FP=pt("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})})),jP=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiPaginationItem"}),{className:r,color:i="standard",component:o,components:s={},disabled:a=!1,page:l,selected:c=!1,shape:u="circular",size:d="medium",slots:h={},type:f="page",variant:p="text"}=n,g=(0,Ee.A)(n,MP),m=(0,Se.A)({},n,{color:i,disabled:a,selected:c,shape:u,size:d,type:f,variant:p}),y=Rn(),v=(e=>{const{classes:t,color:n,disabled:r,selected:i,size:o,shape:s,type:a,variant:l}=e;return _e({root:["root",`size${At(o)}`,l,s,"standard"!==n&&`color${At(n)}`,"standard"!==n&&`${l}${At(n)}`,r&&"disabled",i&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[a]],icon:["icon"]},TP,t)})(m),b=(y?{previous:h.next||s.next||NP,next:h.previous||s.previous||RP,last:h.first||s.first||IP,first:h.last||s.last||OP}:{previous:h.previous||s.previous||RP,next:h.next||s.next||NP,first:h.first||s.first||IP,last:h.last||s.last||OP})[f];return"start-ellipsis"===f||"end-ellipsis"===f?(0,mt.jsx)(LP,{ref:t,ownerState:m,className:Ce(v.root,r),children:"\u2026"}):(0,mt.jsxs)(BP,(0,Se.A)({ref:t,ownerState:m,component:o,disabled:a,className:Ce(v.root,r)},g,{children:["page"===f&&l,b?(0,mt.jsx)(FP,{as:b,ownerState:m,className:v.icon}):null]}))})),UP=jP,zP=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],VP=pt("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),HP=pt("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function $P(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const WP=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:i,color:o="standard",count:s=1,defaultPage:a=1,disabled:l=!1,getItemAriaLabel:c=$P,hideNextButton:u=!1,hidePrevButton:d=!1,renderItem:h=e=>(0,mt.jsx)(UP,(0,Se.A)({},e)),shape:f="circular",showFirstButton:p=!1,showLastButton:g=!1,siblingCount:m=1,size:y="medium",variant:v="text"}=n,b=(0,Ee.A)(n,zP),{items:w}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:i=1,disabled:o=!1,hideNextButton:s=!1,hidePrevButton:a=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:h=1}=e,f=(0,Ee.A)(e,_P),[p,g]=$i({controlled:c,default:i,name:n,state:"page"}),m=(e,t)=>{c||g(t),l&&l(e,t)},y=(e,t)=>{const n=t-e+1;return Array.from({length:n},((t,n)=>e+n))},v=y(1,Math.min(t,r)),b=y(Math.max(r-t+1,t+1),r),w=Math.max(Math.min(p-h,r-t-2*h-1),t+2),x=Math.min(Math.max(p+h,t+2*h+2),b.length>0?b[0]-2:r-1),A=[...u?["first"]:[],...a?[]:["previous"],...v,...w>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...y(w,x),...x<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...b,...s?[]:["next"],...d?["last"]:[]],E=e=>{switch(e){case"first":return 1;case"previous":return p-1;case"next":return p+1;case"last":return r;default:return null}},S=A.map((e=>"number"===typeof e?{onClick:t=>{m(t,e)},type:"page",page:e,selected:e===p,disabled:o,"aria-current":e===p?"true":void 0}:{onClick:t=>{m(t,E(e))},type:e,page:E(e),selected:!1,disabled:o||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?p>=r:p<=1)}));return(0,Se.A)({items:S},f)}((0,Se.A)({},n,{componentName:"Pagination"})),x=(0,Se.A)({},n,{boundaryCount:r,color:o,count:s,defaultPage:a,disabled:l,getItemAriaLabel:c,hideNextButton:u,hidePrevButton:d,renderItem:h,shape:f,showFirstButton:p,showLastButton:g,siblingCount:m,size:y,variant:v}),A=(e=>{const{classes:t,variant:n}=e;return _e({root:["root",n],ul:["ul"]},CP,t)})(x);return(0,mt.jsx)(VP,(0,Se.A)({"aria-label":"pagination navigation",className:Ce(A.root,i),ownerState:x,ref:t},b,{children:(0,mt.jsx)(HP,{className:A.ul,ownerState:x,children:w.map(((e,t)=>(0,mt.jsx)("li",{children:h((0,Se.A)({},e,{color:o,"aria-label":c(e.type,e.page,e.selected),shape:f,size:y,variant:v}))},t)))})}))})),GP=WP;function qP(e){return _t("MuiTableContainer",e)}Tt("MuiTableContainer",["root"]);const KP=["className","component"],QP=pt("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),XP=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiTableContainer"}),{className:r,component:i="div"}=n,o=(0,Ee.A)(n,KP),s=(0,Se.A)({},n,{component:i}),a=(e=>{const{classes:t}=e;return _e({root:["root"]},qP,t)})(s);return(0,mt.jsx)(QP,(0,Se.A)({ref:t,as:i,className:Ce(a.root,r),ownerState:s},o))}));function JP(e){return _t("MuiLinearProgress",e)}Tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const YP=["className","color","value","valueBuffer","variant"];let ZP,eI,tI,nI,rI,iI,oI=e=>e;const sI=(0,Ps.i7)(ZP||(ZP=oI`
  0% {
    left: -35%;
    right: 100%;
  }

  60% {
    left: 100%;
    right: -90%;
  }

  100% {
    left: 100%;
    right: -90%;
  }
`)),aI=(0,Ps.i7)(eI||(eI=oI`
  0% {
    left: -200%;
    right: 100%;
  }

  60% {
    left: 107%;
    right: -8%;
  }

  100% {
    left: 107%;
    right: -8%;
  }
`)),lI=(0,Ps.i7)(tI||(tI=oI`
  0% {
    opacity: 1;
    background-position: 0 -23px;
  }

  60% {
    opacity: 0;
    background-position: 0 -23px;
  }

  100% {
    opacity: 1;
    background-position: -200px -23px;
  }
`)),cI=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,Me.a)(e.palette[t].main,.62):(0,Me.e$)(e.palette[t].main,.5),uI=pt("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${At(n.color)}`],t[n.variant]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:cI(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),dI=pt("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${At(n.color)}`]]}})((e=>{let{ownerState:t,theme:n}=e;const r=cI(n,t.color);return(0,Se.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,Ps.AH)(nI||(nI=oI`
    animation: ${0} 3s infinite linear;
  `),lI)),hI=pt("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${At(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .4s linear"},"buffer"===t.variant&&{zIndex:1,transition:"transform .4s linear"})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Ps.AH)(rI||(rI=oI`
      width: auto;
      animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    `),sI)})),fI=pt("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${At(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:cI(n,t.color),transition:"transform .4s linear"})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Ps.AH)(iI||(iI=oI`
      width: auto;
      animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
    `),aI)})),pI=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiLinearProgress"}),{className:r,color:i="primary",value:o,valueBuffer:s,variant:a="indeterminate"}=n,l=(0,Ee.A)(n,YP),c=(0,Se.A)({},n,{color:i,variant:a}),u=(e=>{const{classes:t,variant:n,color:r}=e;return _e({root:["root",`color${At(r)}`,n],dashed:["dashed",`dashedColor${At(r)}`],bar1:["bar",`barColor${At(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&`barColor${At(r)}`,"buffer"===n&&`color${At(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]},JP,t)})(c),d=Rn(),h={},f={bar1:{},bar2:{}};if("determinate"===a||"buffer"===a)if(void 0!==o){h["aria-valuenow"]=Math.round(o),h["aria-valuemin"]=0,h["aria-valuemax"]=100;let e=o-100;d&&(e=-e),f.bar1.transform=`translateX(${e}%)`}else 0;if("buffer"===a)if(void 0!==s){let e=(s||0)-100;d&&(e=-e),f.bar2.transform=`translateX(${e}%)`}else 0;return(0,mt.jsxs)(uI,(0,Se.A)({className:Ce(u.root,r),ownerState:c,role:"progressbar"},h,{ref:t},l,{children:["buffer"===a?(0,mt.jsx)(dI,{className:u.dashed,ownerState:c}):null,(0,mt.jsx)(hI,{className:u.bar1,ownerState:c,style:f.bar1}),"determinate"===a?null:(0,mt.jsx)(fI,{className:u.bar2,ownerState:c,style:f.bar2})]}))})),gI=pI,mI=xu((()=>({row:{backgroundColor:"#16171a",cursor:"pointer","&:hover":{backgroundColor:"#131111"},fontFamily:"Montserrat"},pagination:{"& .MuiPaginationItem-root":{color:"#CFB53B"},"& .MuiPaginationItem-page.Mui-selected":{backgroundColor:"#CFB53B"}}}))),yI=()=>{const[e,t]=(0,i.useState)(""),[n,r]=(0,i.useState)(1),o=ne(),{currency:s,symbol:a,coins:l,loading:c,fetchCoins:u,error:d}=IC();(0,i.useEffect)((()=>{0!==l.length||c||u()}),[s,l,c,u]);const h=ct({palette:{primary:{main:"#fff"},mode:"dark"}}),f=()=>l.filter((t=>t.name.toLowerCase().includes(e.toLowerCase())||t.symbol.toLowerCase().includes(e.toLowerCase()))),p=mI();return(0,mt.jsx)(_u,{theme:h,children:(0,mt.jsxs)(dn,{style:{textAlign:"center",marginTop:"5%",zIndex:10},children:[(0,mt.jsx)(Sn,{variant:"h4",style:{margin:18,fontFamily:"Montserrat"},children:"Cryptocurrency Prices by Market Cap"}),(0,mt.jsx)($_,{label:"Search for Cryptocurrency...",variant:"outlined",style:{marginBottom:20,width:"100%"},onChange:e=>t(e.target.value)}),d?(0,mt.jsx)(Sn,{variant:"h6",style:{color:"red",marginBottom:20},children:d}):(0,mt.jsx)(XP,{children:c?(0,mt.jsx)(gI,{style:{backgroundColor:"#CFB53B"}}):(0,mt.jsxs)(WT,{children:[(0,mt.jsx)(YT,{style:{backgroundColor:"#CFB53B"},children:(0,mt.jsx)(oP,{children:["Coin","Price","24hr Change","Market Cap"].map((e=>(0,mt.jsx)(dP,{style:{color:"black",fontWeight:"700",fontSize:"20px",fontFamily:"Montserrat"},align:"Coin"===e?"left":"right",children:e},e)))})}),(0,mt.jsx)(yP,{children:f().slice(10*(n-1),10*(n-1)+10).map((e=>{const t=e.price_change_percentage_24h>0;return(0,mt.jsxs)(oP,{onClick:()=>o(`/coins/${e.id}`),className:p.row,children:[(0,mt.jsxs)(dP,{component:"th",scope:"row",style:{display:"flex",gap:15},children:[(0,mt.jsx)("img",{src:null===e||void 0===e?void 0:e.image,alt:e.name,height:"50",style:{marginBottom:10}}),(0,mt.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,mt.jsx)("span",{style:{textTransform:"uppercase",fontSize:22},children:e.symbol}),(0,mt.jsx)("span",{style:{color:"darkgray"},children:e.name})]})]}),(0,mt.jsxs)(dP,{align:"right",children:[a," ",kT(e.current_price.toFixed(2))]}),(0,mt.jsxs)(dP,{align:"right",style:{color:t?"green":"red",fontWeight:500},children:[t&&"+",e.price_change_percentage_24h.toFixed(2),"%"]}),(0,mt.jsxs)(dP,{align:"right",children:[a," ",kT(e.market_cap.toString().slice(0,-6)),"M"]})]},e.id)}))})]})}),(0,mt.jsx)(GP,{style:{margin:20,width:"100%",display:"flex",justifyContent:"center"},classes:{ul:p.pagination},color:"primary",count:Math.ceil(f().length/10),page:n,onChange:(e,t)=>{r(t),window.scroll(0,450)}})]})})},vI=()=>(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(kP,{}),(0,mt.jsx)(yI,{})]});var bI=n(2023);const wI=bI.default||bI;function xI(e){return _t("MuiCircularProgress",e)}Tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const AI=["className","color","disableShrink","size","style","thickness","value","variant"];let EI,SI,kI,CI,_I=e=>e;const TI=44,PI=(0,Ps.i7)(EI||(EI=_I`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),II=(0,Ps.i7)(SI||(SI=_I`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),OI=pt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${At(n.color)}`]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,Ps.AH)(kI||(kI=_I`
      animation: ${0} 1.4s linear infinite;
    `),PI)})),RI=pt("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),NI=pt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${At(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,Se.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,Ps.AH)(CI||(CI=_I`
      animation: ${0} 1.4s ease-in-out infinite;
    `),II)})),MI=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:s=40,style:a,thickness:l=3.6,value:c=0,variant:u="indeterminate"}=n,d=(0,Ee.A)(n,AI),h=(0,Se.A)({},n,{color:i,disableShrink:o,size:s,thickness:l,value:c,variant:u}),f=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e;return _e({root:["root",n,`color${At(r)}`],svg:["svg"],circle:["circle",`circle${At(n)}`,i&&"circleDisableShrink"]},xI,t)})(h),p={},g={},m={};if("determinate"===u){const e=2*Math.PI*((TI-l)/2);p.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(c),p.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return(0,mt.jsx)(OI,(0,Se.A)({className:Ce(f.root,r),style:(0,Se.A)({width:s,height:s},g,a),ownerState:h,ref:t,role:"progressbar"},m,d,{children:(0,mt.jsx)(RI,{className:f.svg,ownerState:h,viewBox:"22 22 44 44",children:(0,mt.jsx)(NI,{className:f.circle,style:p,ownerState:h,cx:TI,cy:TI,r:(TI-l)/2,fill:"none",strokeWidth:l})})}))})),DI=MI;function LI(e){return e+.5|0}const BI=(e,t,n)=>Math.max(Math.min(e,n),t);function FI(e){return BI(LI(2.55*e),0,255)}function jI(e){return BI(LI(255*e),0,255)}function UI(e){return BI(LI(e/2.55)/100,0,1)}function zI(e){return BI(LI(100*e),0,100)}const VI={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},HI=[..."0123456789ABCDEF"],$I=e=>HI[15&e],WI=e=>HI[(240&e)>>4]+HI[15&e],GI=e=>(240&e)>>4===(15&e);function qI(e){var t=(e=>GI(e.r)&&GI(e.g)&&GI(e.b)&&GI(e.a))(e)?$I:WI;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const KI=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function QI(e,t,n){const r=t*Math.min(n,1-n),i=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(i-3,9-i,1),-1)};return[i(0),i(8),i(4)]}function XI(e,t,n){const r=function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(i,4-i,1),0)};return[r(5),r(3),r(1)]}function JI(e,t,n){const r=QI(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function YI(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),o=Math.min(t,n,r),s=(i+o)/2;let a,l,c;return i!==o&&(c=i-o,l=s>.5?c/(2-i-o):c/(i+o),a=function(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}(t,n,r,c,i),a=60*a+.5),[0|a,l||0,s]}function ZI(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(jI)}function eO(e,t,n){return ZI(QI,e,t,n)}function tO(e){return(e%360+360)%360}function nO(e){const t=KI.exec(e);let n,r=255;if(!t)return;t[5]!==n&&(r=t[6]?FI(+t[5]):jI(+t[5]));const i=tO(+t[2]),o=+t[3]/100,s=+t[4]/100;return n="hwb"===t[1]?function(e,t,n){return ZI(JI,e,t,n)}(i,o,s):"hsv"===t[1]?function(e,t,n){return ZI(XI,e,t,n)}(i,o,s):eO(i,o,s),{r:n[0],g:n[1],b:n[2],a:r}}const rO={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},iO={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let oO;function sO(e){oO||(oO=function(){const e={},t=Object.keys(iO),n=Object.keys(rO);let r,i,o,s,a;for(r=0;r<t.length;r++){for(s=a=t[r],i=0;i<n.length;i++)o=n[i],a=a.replace(o,rO[o]);o=parseInt(iO[s],16),e[a]=[o>>16&255,o>>8&255,255&o]}return e}(),oO.transparent=[0,0,0,0]);const t=oO[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const aO=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const lO=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,cO=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function uO(e,t,n){if(e){let r=YI(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=eO(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function dO(e,t){return e?Object.assign(t||{},e):e}function hO(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=jI(e[3]))):(t=dO(e,{r:0,g:0,b:0,a:1})).a=jI(t.a),t}function fO(e){return"r"===e.charAt(0)?function(e){const t=aO.exec(e);let n,r,i,o=255;if(t){if(t[7]!==n){const e=+t[7];o=t[8]?FI(e):BI(255*e,0,255)}return n=+t[1],r=+t[3],i=+t[5],n=255&(t[2]?FI(n):BI(n,0,255)),r=255&(t[4]?FI(r):BI(r,0,255)),i=255&(t[6]?FI(i):BI(i,0,255)),{r:n,g:r,b:i,a:o}}}(e):nO(e)}class pO{constructor(e){if(e instanceof pO)return e;const t=typeof e;let n;"object"===t?n=hO(e):"string"===t&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*VI[e[1]],g:255&17*VI[e[2]],b:255&17*VI[e[3]],a:5===n?17*VI[e[4]]:255}:7!==n&&9!==n||(t={r:VI[e[1]]<<4|VI[e[2]],g:VI[e[3]]<<4|VI[e[4]],b:VI[e[5]]<<4|VI[e[6]],a:9===n?VI[e[7]]<<4|VI[e[8]]:255})),t}(e)||sO(e)||fO(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=dO(this._rgb);return e&&(e.a=UI(e.a)),e}set rgb(e){this._rgb=hO(e)}rgbString(){return this._valid?function(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${UI(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?qI(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=YI(e),n=t[0],r=zI(t[1]),i=zI(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${UI(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let i;const o=t===i?.5:t,s=2*o-1,a=n.a-r.a,l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2;i=1-l,n.r=255&l*n.r+i*r.r+.5,n.g=255&l*n.g+i*r.g+.5,n.b=255&l*n.b+i*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=cO(UI(e.r)),i=cO(UI(e.g)),o=cO(UI(e.b));return{r:jI(lO(r+n*(cO(UI(t.r))-r))),g:jI(lO(i+n*(cO(UI(t.g))-i))),b:jI(lO(o+n*(cO(UI(t.b))-o))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new pO(this.rgb)}alpha(e){return this._rgb.a=jI(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=LI(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return uO(this._rgb,2,e),this}darken(e){return uO(this._rgb,2,-e),this}saturate(e){return uO(this._rgb,1,e),this}desaturate(e){return uO(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=YI(e);n[0]=tO(n[0]+t),n=eO(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function gO(){}const mO=(()=>{let e=0;return()=>e++})();function yO(e){return null===e||"undefined"===typeof e}function vO(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function bO(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function wO(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function xO(e,t){return wO(e)?e:t}function AO(e,t){return"undefined"===typeof e?t:e}const EO=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function SO(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function kO(e,t,n,r){let i,o,s;if(vO(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(bO(e))for(s=Object.keys(e),o=s.length,i=0;i<o;i++)t.call(n,e[s[i]],s[i])}function CO(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function _O(e){if(vO(e))return e.map(_O);if(bO(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=_O(e[n[i]]);return t}return e}function TO(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function PO(e,t,n,r){if(!TO(e))return;const i=t[e],o=n[e];bO(i)&&bO(o)?IO(i,o,r):t[e]=_O(o)}function IO(e,t,n){const r=vO(t)?t:[t],i=r.length;if(!bO(e))return e;const o=(n=n||{}).merger||PO;let s;for(let a=0;a<i;++a){if(s=r[a],!bO(s))continue;const t=Object.keys(s);for(let r=0,i=t.length;r<i;++r)o(t[r],e,s,n)}return e}function OO(e,t){return IO(e,t,{merger:RO})}function RO(e,t,n){if(!TO(e))return;const r=t[e],i=n[e];bO(r)&&bO(i)?OO(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=_O(i))}const NO={"":e=>e,x:e=>e.x,y:e=>e.y};function MO(e,t){const n=NO[t]||(NO[t]=function(e){const t=function(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(e);return e=>{for(const n of t){if(""===n)break;e=e&&e[n]}return e}}(t));return n(e)}function DO(e){return e.charAt(0).toUpperCase()+e.slice(1)}const LO=e=>"undefined"!==typeof e,BO=e=>"function"===typeof e,FO=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};const jO=Math.PI,UO=2*jO,zO=UO+jO,VO=Number.POSITIVE_INFINITY,HO=jO/180,$O=jO/2,WO=jO/4,GO=2*jO/3,qO=Math.log10,KO=Math.sign;function QO(e,t,n){return Math.abs(e-t)<n}function XO(e){const t=Math.round(e);e=QO(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(qO(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function JO(e){return!isNaN(parseFloat(e))&&isFinite(e)}function YO(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ZO(e){return e*(jO/180)}function eR(e){return e*(180/jO)}function tR(e){if(!wO(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function nR(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*jO&&(o+=UO),{angle:o,distance:i}}function rR(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function iR(e,t){return(e-t+zO)%UO-jO}function oR(e){return(e%UO+UO)%UO}function sR(e,t,n,r){const i=oR(e),o=oR(t),s=oR(n),a=oR(o-i),l=oR(s-i),c=oR(i-o),u=oR(i-s);return i===o||i===s||r&&o===s||a>l&&c<u}function aR(e,t,n){return Math.max(t,Math.min(n,e))}function lR(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function cR(e,t,n){n=n||(n=>e[n]<t);let r,i=e.length-1,o=0;for(;i-o>1;)r=o+i>>1,n(r)?o=r:i=r;return{lo:o,hi:i}}const uR=(e,t,n,r)=>cR(e,n,r?r=>{const i=e[r][t];return i<n||i===n&&e[r+1][t]===n}:r=>e[r][t]<n),dR=(e,t,n)=>cR(e,n,(r=>e[r][t]>=n));const hR=["push","pop","shift","splice","unshift"];function fR(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(hR.forEach((t=>{delete e[t]})),delete e._chartjs)}function pR(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const gR="undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame;function mR(e,t){let n=[],r=!1;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];n=o,r||(r=!0,gR.call(window,(()=>{r=!1,e.apply(t,n)})))}}const yR=e=>"start"===e?"left":"end"===e?"right":"center",vR=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function bR(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(i=aR(Math.min(uR(a,l,c).lo,n?r:uR(t,l,s.getPixelForValue(c)).lo),0,r-1)),o=h?aR(Math.max(uR(a,s.axis,u,!0).hi+1,n?0:uR(t,l,s.getPixelForValue(u),!0).hi+1),i,r)-i:r-i}return{start:i,count:o}}function wR(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const xR=e=>0===e||1===e,AR=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*UO/n),ER=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*UO/n)+1,SR={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*$O),easeOutSine:e=>Math.sin(e*$O),easeInOutSine:e=>-.5*(Math.cos(jO*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>xR(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>xR(e)?e:AR(e,.075,.3),easeOutElastic:e=>xR(e)?e:ER(e,.075,.3),easeInOutElastic(e){const t=.1125;return xR(e)?e:e<.5?.5*AR(2*e,t,.45):.5+.5*ER(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-SR.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*SR.easeInBounce(2*e):.5*SR.easeOutBounce(2*e-1)+.5};function kR(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function CR(e){return kR(e)?e:new pO(e)}function _R(e){return kR(e)?e:new pO(e).saturate(.5).darken(.1).hexString()}const TR=["x","y","borderWidth","radius","tension"],PR=["color","borderColor","backgroundColor"];const IR=new Map;function OR(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=IR.get(n);return r||(r=new Intl.NumberFormat(e,t),IR.set(n,r)),r}(t,n).format(e)}const RR={values:e=>vO(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(i="scientific"),o=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const s=qO(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),OR(e,r,l)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(qO(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?RR.numeric.call(this,e,t,n):""}};var NR={formatters:RR};const MR=Object.create(null),DR=Object.create(null);function LR(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const t=n[r];e=e[t]||(e[t]=Object.create(null))}return e}function BR(e,t,n){return"string"===typeof t?IO(LR(e,t),n):IO(LR(e,""),t)}class FR{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>_R(t.backgroundColor),this.hoverBorderColor=(e,t)=>_R(t.borderColor),this.hoverColor=(e,t)=>_R(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return BR(this,e,t)}get(e){return LR(this,e)}describe(e,t){return BR(DR,e,t)}override(e,t){return BR(MR,e,t)}route(e,t,n,r){const i=LR(this,e),o=LR(this,n),s="_"+t;Object.defineProperties(i,{[s]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[s],t=o[r];return bO(e)?Object.assign({},t,e):AO(e,t)},set(e){this[s]=e}}})}apply(e){e.forEach((e=>e(this)))}}var jR=new FR({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:PR},numbers:{type:"number",properties:TR}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:NR.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function UR(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function zR(e,t,n){const r=e.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function VR(e,t){(t||e)&&((t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function HR(e,t,n,r){$R(e,t,n,r,null)}function $R(e,t,n,r,i){let o,s,a,l,c,u,d,h;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*HO;if(f&&"object"===typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(n,r),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void e.restore();if(!(isNaN(g)||g<=0)){switch(e.beginPath(),f){default:i?e.ellipse(n,r,i/2,g,0,0,UO):e.arc(n,r,g,0,UO),e.closePath();break;case"triangle":u=i?i/2:g,e.moveTo(n+Math.sin(m)*u,r-Math.cos(m)*g),m+=GO,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*g),m+=GO,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*g),e.closePath();break;case"rectRounded":c=.516*g,l=g-c,s=Math.cos(m+WO)*l,d=Math.cos(m+WO)*(i?i/2-c:l),a=Math.sin(m+WO)*l,h=Math.sin(m+WO)*(i?i/2-c:l),e.arc(n-d,r-a,c,m-jO,m-$O),e.arc(n+h,r-s,c,m-$O,m),e.arc(n+d,r+a,c,m,m+$O),e.arc(n-h,r+s,c,m+$O,m+jO),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}m+=WO;case"rectRot":d=Math.cos(m)*(i?i/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-a),e.lineTo(n+h,r-s),e.lineTo(n+d,r+a),e.lineTo(n-h,r+s),e.closePath();break;case"crossRot":m+=WO;case"cross":d=Math.cos(m)*(i?i/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+h,r-s),e.lineTo(n-h,r+s);break;case"star":d=Math.cos(m)*(i?i/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+h,r-s),e.lineTo(n-h,r+s),m+=WO,d=Math.cos(m)*(i?i/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+h,r-s),e.lineTo(n-h,r+s);break;case"line":s=i?i/2:Math.cos(m)*g,a=Math.sin(m)*g,e.moveTo(n-s,r-a),e.lineTo(n+s,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(m)*(i?i/2:g),r+Math.sin(m)*g);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function WR(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function GR(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function qR(e){e.restore()}function KR(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if("middle"===i){const r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else"after"===i!==!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function QR(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function XR(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(s,u),e.lineTo(a,u),e.stroke()}}function JR(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function YR(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=vO(t)?t:[t],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(e.save(),e.font=i.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),yO(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&JR(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),yO(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),XR(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function ZR(e,t){const{x:n,y:r,w:i,h:o,radius:s}=t;e.arc(n+s.topLeft,r+s.topLeft,s.topLeft,1.5*jO,jO,!0),e.lineTo(n,r+o-s.bottomLeft),e.arc(n+s.bottomLeft,r+o-s.bottomLeft,s.bottomLeft,jO,$O,!0),e.lineTo(n+i-s.bottomRight,r+o),e.arc(n+i-s.bottomRight,r+o-s.bottomRight,s.bottomRight,$O,0,!0),e.lineTo(n+i,r+s.topRight),e.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-$O,!0),e.lineTo(n+s.topLeft,r)}const eN=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,tN=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nN(e,t){const n=(""+e).match(eN);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e}const rN=e=>+e||0;function iN(e,t){const n={},r=bO(t),i=r?Object.keys(t):t,o=bO(e)?r?n=>AO(e[n],e[t[n]]):t=>e[t]:()=>e;for(const s of i)n[s]=rN(o(s));return n}function oN(e){return iN(e,{top:"y",right:"x",bottom:"y",left:"x"})}function sN(e){return iN(e,["topLeft","topRight","bottomLeft","bottomRight"])}function aN(e){const t=oN(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function lN(e,t){e=e||{},t=t||jR.font;let n=AO(e.size,t.size);"string"===typeof n&&(n=parseInt(n,10));let r=AO(e.style,t.style);r&&!(""+r).match(tN)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:AO(e.family,t.family),lineHeight:nN(AO(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:AO(e.weight,t.weight),string:""};return i.string=function(e){return!e||yO(e.size)||yO(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i}function cN(e,t,n,r){let i,o,s,a=!0;for(i=0,o=e.length;i<o;++i)if(s=e[i],void 0!==s&&(void 0!==t&&"function"===typeof s&&(s=s(t),a=!1),void 0!==n&&vO(s)&&(s=s[n%s.length],a=!1),void 0!==s))return r&&!a&&(r.cacheable=!1),s}function uN(e,t){return Object.assign(Object.create(e),t)}function dN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>e[0];const i=(arguments.length>2?arguments[2]:void 0)||e;"undefined"===typeof n&&(n=AN("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>dN([r,...e],t,i,n)};return new Proxy(o,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>mN(n,r,(()=>function(e,t,n,r){let i;for(const o of t)if(i=AN(pN(o,e),n),"undefined"!==typeof i)return gN(e,i)?wN(n,r,e,i):i}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>EN(e).includes(t),ownKeys:e=>EN(e),set(e,t,n){const i=e._storage||(e._storage=r());return e[t]=i[t]=n,delete e._keys,!0}})}function hN(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:fN(e,r),setContext:t=>hN(e,t,n,r),override:i=>hN(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>mN(e,t,(()=>function(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];BO(a)&&s.isScriptable(t)&&(a=function(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,s||r);a.delete(e),gN(e,l)&&(l=wN(i._scopes,i,e,l));return l}(t,a,e,n));vO(a)&&a.length&&(a=function(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if("undefined"!==typeof o.index&&r(e))return t[o.index%t.length];if(bO(t[0])){const n=t,r=i._scopes.filter((e=>e!==n));t=[];for(const l of n){const n=wN(r,i,e,l);t.push(hN(n,o,s&&s[e],a))}}return t}(t,a,e,s.isIndexable));gN(t,a)&&(a=hN(a,i,o&&o[t],s));return a}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function fN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:BO(n)?n:()=>n,isIndexable:BO(r)?r:()=>r}}const pN=(e,t)=>e?e+DO(t):t,gN=(e,t)=>bO(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function mN(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];const r=n();return e[t]=r,r}function yN(e,t,n){return BO(e)?e(t,n):e}const vN=(e,t)=>!0===e?t:"string"===typeof e?MO(t,e):void 0;function bN(e,t,n,r,i){for(const o of t){const t=vN(n,o);if(t){e.add(t);const o=yN(t._fallback,n,i);if("undefined"!==typeof o&&o!==n&&o!==r)return o}else if(!1===t&&"undefined"!==typeof r&&n!==r)return null}return!1}function wN(e,t,n,r){const i=t._rootScopes,o=yN(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=xN(a,s,n,o||n,r);return null!==l&&(("undefined"===typeof o||o===n||(l=xN(a,s,o,l,r),null!==l))&&dN(Array.from(a),[""],i,o,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];if(vO(i)&&bO(n))return n;return i||{}}(t,n,r))))}function xN(e,t,n,r,i){for(;n;)n=bN(e,t,n,r,i);return n}function AN(e,t){for(const n of t){if(!n)continue;const t=n[e];if("undefined"!==typeof t)return t}}function EN(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}const SN=Number.EPSILON||1e-14,kN=(e,t)=>t<e.length&&!e[t].skip&&e[t],CN=e=>"x"===e?"y":"x";function _N(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=rR(o,i),l=rR(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:o.x-d*(s.x-i.x),y:o.y-d*(s.y-i.y)},next:{x:o.x+h*(s.x-i.x),y:o.y+h*(s.y-i.y)}}}function TN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=CN(t),r=e.length,i=Array(r).fill(0),o=Array(r);let s,a,l,c=kN(e,0);for(s=0;s<r;++s)if(a=l,l=c,c=kN(e,s+1),l){if(c){const e=c[t]-l[t];i[s]=0!==e?(c[n]-l[n])/e:0}o[s]=a?c?KO(i[s-1])!==KO(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}!function(e,t,n){const r=e.length;let i,o,s,a,l,c=kN(e,0);for(let u=0;u<r-1;++u)l=c,c=kN(e,u+1),l&&c&&(QO(t[u],0,SN)?n[u]=n[u+1]=0:(i=n[u]/t[u],o=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(o,2),a<=9||(s=3/Math.sqrt(a),n[u]=i*s*t[u],n[u+1]=o*s*t[u])))}(e,i,o),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";const r=CN(n),i=e.length;let o,s,a,l=kN(e,0);for(let c=0;c<i;++c){if(s=a,a=l,l=kN(e,c+1),!a)continue;const i=a[n],u=a[r];s&&(o=(i-s[n])/3,a[`cp1${n}`]=i-o,a[`cp1${r}`]=u-o*t[c]),l&&(o=(l[n]-i)/3,a[`cp2${n}`]=i+o,a[`cp2${r}`]=u+o*t[c])}}(e,o,t)}function PN(e,t,n){return Math.max(Math.min(e,n),t)}function IN(e,t,n,r,i){let o,s,a,l;if(t.spanGaps&&(e=e.filter((e=>!e.skip))),"monotone"===t.cubicInterpolationMode)TN(e,i);else{let n=r?e[e.length-1]:e[0];for(o=0,s=e.length;o<s;++o)a=e[o],l=_N(n,a,e[Math.min(o+1,s-(r?0:1))%s],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,n=a}t.capBezierPoints&&function(e,t){let n,r,i,o,s,a=WR(e[0],t);for(n=0,r=e.length;n<r;++n)s=o,o=a,a=n<r-1&&WR(e[n+1],t),o&&(i=e[n],s&&(i.cp1x=PN(i.cp1x,t.left,t.right),i.cp1y=PN(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=PN(i.cp2x,t.left,t.right),i.cp2y=PN(i.cp2y,t.top,t.bottom)))}(e,n)}function ON(){return"undefined"!==typeof window&&"undefined"!==typeof document}function RN(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function NN(e,t,n){let r;return"string"===typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}const MN=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);const DN=["top","right","bottom","left"];function LN(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=DN[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const BN=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function FN(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=MN(n),o="border-box"===i.boxSizing,s=LN(i,"padding"),a=LN(i,"border","width"),{x:l,y:c,box:u}=function(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s,a,l=!1;if(BN(i,o,e.target))s=i,a=o;else{const e=t.getBoundingClientRect();s=r.clientX-e.left,a=r.clientY-e.top,l=!0}return{x:s,y:a,box:l}}(e,n),d=s.left+(u&&a.left),h=s.top+(u&&a.top);let{width:f,height:p}=t;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-d)/f*n.width/r),y:Math.round((c-h)/p*n.height/r)}}const jN=e=>Math.round(10*e)/10;function UN(e,t,n,r){const i=MN(e),o=LN(i,"margin"),s=NN(i.maxWidth,e,"clientWidth")||VO,a=NN(i.maxHeight,e,"clientHeight")||VO,l=function(e,t,n){let r,i;if(void 0===t||void 0===n){const o=e&&RN(e);if(o){const e=o.getBoundingClientRect(),s=MN(o),a=LN(s,"border","width"),l=LN(s,"padding");t=e.width-l.width-a.width,n=e.height-l.height-a.height,r=NN(s.maxWidth,o,"clientWidth"),i=NN(s.maxHeight,o,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||VO,maxHeight:i||VO}}(e,t,n);let{width:c,height:u}=l;if("content-box"===i.boxSizing){const e=LN(i,"border","width"),t=LN(i,"padding");c-=t.width+e.width,u-=t.height+e.height}c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=jN(Math.min(c,s,l.maxWidth)),u=jN(Math.min(u,a,l.maxHeight)),c&&!u&&(u=jN(c/2));return(void 0!==t||void 0!==n)&&r&&l.height&&u>l.height&&(u=l.height,c=jN(Math.floor(u*r))),{width:c,height:u}}function zN(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o)&&(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0)}const VN=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};ON()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(gK){}return e}();function HN(e,t){const n=function(e,t){return MN(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function $N(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function WN(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function GN(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=$N(e,i,n),a=$N(i,o,n),l=$N(o,t,n),c=$N(s,a,n),u=$N(a,l,n);return $N(c,u,n)}function qN(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function KN(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function QN(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function XN(e){return"angle"===e?{between:sR,compare:iR,normalize:oR}:{between:lR,compare:(e,t)=>e-t,normalize:e=>e}}function JN(e){let{start:t,end:n,count:r,loop:i,style:o}=e;return{start:t%r,end:n%r,loop:i&&(n-t+1)%r===0,style:o}}function YN(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,s=t.length,{compare:a,between:l,normalize:c}=XN(r),{start:u,end:d,loop:h,style:f}=function(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=XN(r),l=t.length;let c,u,{start:d,end:h,loop:f}=e;if(f){for(d+=l,h+=l,c=0,u=l;c<u&&s(a(t[d%l][r]),i,o);++c)d--,h--;d%=l,h%=l}return h<d&&(h+=l),{start:d,end:h,loop:f,style:e.style}}(e,t,n),p=[];let g,m,y,v=!1,b=null;const w=()=>v||l(i,y,g)&&0!==a(i,y),x=()=>!v||0===a(o,g)||l(o,y,g);for(let A=u,E=u;A<=d;++A)m=t[A%s],m.skip||(g=c(m[r]),g!==y&&(v=l(g,i,o),null===b&&w()&&(b=0===a(g,i)?A:E),null!==b&&x()&&(p.push(JN({start:b,end:A,loop:h,count:s,style:f})),b=null),E=A,y=g));return null!==b&&p.push(JN({start:b,end:d,loop:h,count:s,style:f})),p}function ZN(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=YN(r[i],e.points,t);o.length&&n.push(...o)}return n}function eM(e,t,n,r){return r&&r.setContext&&n?function(e,t,n,r){const i=e._chart.getContext(),o=tM(e.options),{_datasetIndex:s,options:{spanGaps:a}}=e,l=n.length,c=[];let u=o,d=t[0].start,h=d;function f(e,t,r,i){const o=a?-1:1;if(e!==t){for(e+=l;n[e%l].skip;)e-=o;for(;n[t%l].skip;)t+=o;e%l!==t%l&&(c.push({start:e%l,end:t%l,loop:r,style:i}),u=i,d=t%l)}}for(const p of t){d=a?d:p.start;let e,t=n[d%l];for(h=d+1;h<=p.end;h++){const o=n[h%l];e=tM(r.setContext(uN(i,{type:"segment",p0:t,p1:o,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),nM(e,u)&&f(d,h-1,p.loop,u),t=o,u=e}d<h-1&&f(d,h-1,p.loop,u)}return c}(e,t,n,r):t}function tM(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function nM(e,t){if(!t)return!1;const n=[],r=function(e,t){return kR(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}class rM{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){const i=t.listeners[r],o=t.duration;i.forEach((r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(n-t.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=gR.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const i=n.items;let o,s=i.length-1,a=!1;for(;s>=0;--s)o=i[s],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(e),a=!0):(i[s]=i[i.length-1],i.pop());a&&(r.draw(),this._notify(r,n,e,"progress")),i.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=i.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var iM=new rM;const oM="transparent",sM={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=CR(e||oM),i=r.valid&&CR(t||oM);return i&&i.valid?i.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class aM{constructor(e,t,n,r){const i=t[n];r=cN([e.to,r,i,e.from]);const o=cN([e.from,i,r]);this._active=!0,this._fn=e.fn||sM[e.type||typeof o],this._easing=SR[e.easing]||SR.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],i=n-this._start,o=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=cN([e.to,t,r,e.from]),this._from=cN([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,i=this._from,o=this._loop,s=this._to;let a;if(this._active=i!==s&&(o||t<n),!this._active)return this._target[r]=s,void this._notify(!0);t<0?this._target[r]=i:(a=t/n%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[r]=this._fn(i,s,a))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}}class lM{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!bO(e))return;const t=Object.keys(jR.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach((r=>{const i=e[r];if(!bO(i))return;const o={};for(const e of t)o[e]=i[e];(vO(i.properties)&&i.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,o)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const t=e[r[i]];t&&t.active()&&n.push(t.wait())}return Promise.all(n)}(e.options.$animations,n).then((()=>{e.options=n}),(()=>{})),i}_createAnimations(e,t){const n=this._properties,r=[],i=e.$animations||(e.$animations={}),o=Object.keys(t),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=i[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,c,s);continue}u.cancel()}d&&d.duration?(i[l]=u=new aM(d,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(iM.add(this._chart,n),!0):void 0}}function cM(e,t){const n=e&&e.options||{},r=n.reverse,i=void 0===n.min?t:0,o=void 0===n.max?t:0;return{start:r?o:i,end:r?i:o}}function uM(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function dM(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=e.keys,o="single"===r.mode;let s,a,l,c;if(null!==t){for(s=0,a=i.length;s<a;++s){if(l=+i[s],l===n){if(r.all)continue;break}c=e.values[l],wO(c)&&(o||0===t||KO(t)===KO(c))&&(t+=c)}return t}}function hM(e,t){const n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function fM(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function pM(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const t=e[i.index];if(n&&t>0||!n&&t<0)return i.index}return null}function gM(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,u=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(o,s,r),d=t.length;let h;for(let f=0;f<d;++f){const e=t[f],{[l]:n,[c]:o}=e;h=(e._stacks||(e._stacks={}))[c]=fM(i,u,n),h[a]=o,h._top=pM(h,s,!0,r.type),h._bottom=pM(h,s,!1,r.type);(h._visualValues||(h._visualValues={}))[a]=o}}function mM(e,t){const n=e.scales;return Object.keys(n).filter((e=>n[e].axis===t)).shift()}function yM(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const vM=e=>"reset"===e||"none"===e,bM=(e,t)=>t?e:Object.assign({},e);class wM{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=hM(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&yM(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,i=t.xAxisID=AO(n.xAxisID,mM(e,"x")),o=t.yAxisID=AO(n.yAxisID,mM(e,"y")),s=t.rAxisID=AO(n.rAxisID,mM(e,"r")),a=t.indexAxis,l=t.iAxisID=r(a,i,o,s),c=t.vAxisID=r(a,o,i,s);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&fR(this._data,this),e._stacked&&yM(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(bO(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,i="x"===n.axis?"x":"y",o="x"===r.axis?"x":"y",s=Object.keys(e),a=new Array(s.length);let l,c,u;for(l=0,c=s.length;l<c;++l)u=s[l],a[l]={[i]:u,[o]:e[u]};return a}(t,e)}else if(n!==t){if(n){fR(n,this);const e=this._cachedMeta;yM(e),e._parsed=[]}t&&Object.isExtensible(t)&&(i=this,(r=t)._chartjs?r._chartjs.listeners.push(i):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),hR.forEach((e=>{const t="_onData"+DO(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];const s=n.apply(this,i);return r._chartjs.listeners.forEach((e=>{"function"===typeof e[t]&&e[t](...i)})),s}})})))),this._syncList=[],this._data=t}var r,i}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const i=t._stacked;t._stacked=hM(t.vScale,t),t.stack!==n.stack&&(r=!0,yM(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&gM(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:o}=n,s=i.axis;let a,l,c,u=0===e&&t===r.length||n._sorted,d=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=vO(r[e])?this.parseArrayData(n,r,e,t):bO(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const i=()=>null===l[s]||d&&l[s]<d[s];for(a=0;a<t;++a)n._parsed[a+e]=l=c[a],u&&(i()&&(u=!1),d=l);n._sorted=u}o&&gM(this,c)}parsePrimitiveData(e,t,n,r){const{iScale:i,vScale:o}=e,s=i.axis,a=o.axis,l=i.getLabels(),c=i===o,u=new Array(r);let d,h,f;for(d=0,h=r;d<h;++d)f=d+n,u[d]={[s]:c||i.parse(l[f],f),[a]:o.parse(t[f],f)};return u}parseArrayData(e,t,n,r){const{xScale:i,yScale:o}=e,s=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=t[c],s[a]={x:i.parse(u[0],c),y:o.parse(u[1],c)};return s}parseObjectData(e,t,n,r){const{xScale:i,yScale:o}=e,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,l=new Array(r);let c,u,d,h;for(c=0,u=r;c<u;++c)d=c+n,h=t[d],l[c]={x:i.parse(MO(h,s),d),y:o.parse(MO(h,a),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const r=this.chart,i=this._cachedMeta,o=t[e.axis];return dM({keys:uM(r,!0),values:t._stacks[e.axis]._visualValues},o,i.index,{mode:n})}updateRangeFromParsed(e,t,n,r){const i=n[t.axis];let o=null===i?NaN:i;const s=r&&n._stacks[t.axis];r&&s&&(r.values=s,o=dM(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,t){const n=this._cachedMeta,r=n._parsed,i=n._sorted&&e===n.iScale,o=r.length,s=this._getOtherScale(e),a=((e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:uM(n,!0),values:null})(t,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(s);let d,h;function f(){h=r[d];const t=h[s.axis];return!wO(h[e.axis])||c>t||u<t}for(d=0;d<o&&(f()||(this.updateRangeFromParsed(l,e,h,a),!i));++d);if(i)for(d=o-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,e,h,a);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r][e.axis],wO(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,r=t.vScale,i=this.getParsed(e);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,n,r,i;return bO(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:!1===e}}(AO(this.options.clip,function(e,t,n){if(!1===n)return!1;const r=cM(e,n),i=cM(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],i=t.chartArea,o=[],s=this._drawStart||0,a=this._drawCount||r.length-s,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(e,i,s,a),c=s;c<s+a;++c){const t=r[c];t.hidden||(t.active&&l?o.push(t):t.draw(e,i))}for(c=0;c<o.length;++c)o[c].draw(e,i)}getStyle(e,t){const n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const r=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];i=t.$context||(t.$context=function(e,t,n){return uN(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=function(e,t){return uN(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const r="active"===t,i=this._cachedDataOpts,o=e+"-"+t,s=i[o],a=this.enableOptionSharing&&LO(n);if(s)return bM(s,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),c),h=Object.keys(jR.elements[e]),f=l.resolveNamedOptions(d,h,(()=>this.getContext(n,r,t)),u);return f.$shared&&(f.$shared=a,i[o]=Object.freeze(bM(f,a))),f}_resolveAnimations(e,t,n){const r=this.chart,i=this._cachedDataOpts,o=`animation-${t}`,s=i[o];if(s)return s;let a;if(!1!==r.options.animation){const r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),o=r.getOptionScopes(this.getDataset(),i);a=r.createResolver(o,this.getContext(e,n,t))}const l=new lM(r,a&&a.animations);return a&&a._cacheable&&(i[o]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||vM(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),o=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:o}}updateElement(e,t,n,r){vM(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!vM(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[s,a,l]of this._syncList)this[s](a,l);this._syncList=[];const r=n.length,i=t.length,o=Math.min(i,r);o&&this.parse(0,o),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this._cachedMeta,i=r.data,o=e+t;let s;const a=e=>{for(e.length+=t,s=e.length-1;s>=o;s--)e[s]=e[s-t]};for(a(i),s=e;s<o;++s)i[s]=new this.dataElementType;this._parsing&&a(r._parsed),this.parse(e,t),n&&this.updateElements(i,e,t,"reset")}updateElements(e,t,n,r){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,t);n._stacked&&yM(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class xM extends wM{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:n,data:r=[],_dataset:i}=t,o=this.chart._animationsDisabled;let{start:s,count:a}=bR(t,r,o);this._drawStart=s,this._drawCount=a,wR(t)&&(s=0,a=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=r;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:l},e),this.updateElements(r,s,a,e)}updateElements(e,t,n,r){const i="reset"===r,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(t,r),d=o.axis,h=s.axis,{spanGaps:f,segment:p}=this.options,g=JO(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||i||"none"===r,y=t+n,v=e.length;let b=t>0&&this.getParsed(t-1);for(let w=0;w<v;++w){const n=e[w],f=m?n:{};if(w<t||w>=y){f.skip=!0;continue}const v=this.getParsed(w),x=yO(v[h]),A=f[d]=o.getPixelForValue(v[d],w),E=f[h]=i||x?s.getBasePixel():s.getPixelForValue(a?this.applyStack(s,v,a):v[h],w);f.skip=isNaN(A)||isNaN(E)||x,f.stop=w>0&&Math.abs(v[d]-b[d])>g,p&&(f.parsed=v,f.raw=l.data[w]),u&&(f.options=c||this.resolveDataElementOptions(w,n.active?"active":r)),m||this.updateElement(n,w,f,r),b=v}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const i=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function AM(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class EM{static override(e){Object.assign(EM.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return AM()}parse(){return AM()}format(){return AM()}add(){return AM()}diff(){return AM()}startOf(){return AM()}endOf(){return AM()}}var SM=EM;function kM(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&"r"!==t&&s&&o.length){const e=a._reversePixels?dR:uR;if(!r)return e(o,t,n);if(i._sharedOptions){const r=o[0],i="function"===typeof r.getRange&&r.getRange(t);if(i){const r=e(o,t,n-i),s=e(o,t,n+i);return{lo:r.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function CM(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a<l;++a){const{index:e,data:n}=o[a],{lo:l,hi:c}=kM(o[a],t,s,i);for(let t=l;t<=c;++t){const i=n[t];i.skip||r(i,e,t)}}}function _M(e,t,n,r,i){const o=[];if(!i&&!e.isPointInArea(t))return o;return CM(e,n,t,(function(n,s,a){(i||WR(n,e.chartArea,0))&&n.inRange(t.x,t.y,r)&&o.push({element:n,datasetIndex:s,index:a})}),!0),o}function TM(e,t,n,r,i,o){let s=[];const a=function(e){const t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){const i=t?Math.abs(e.x-r.x):0,o=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}(n);let l=Number.POSITIVE_INFINITY;return CM(e,n,t,(function(n,c,u){const d=n.inRange(t.x,t.y,i);if(r&&!d)return;const h=n.getCenterPoint(i);if(!(!!o||e.isPointInArea(h))&&!d)return;const f=a(t,h);f<l?(s=[{element:n,datasetIndex:c,index:u}],l=f):f===l&&s.push({element:n,datasetIndex:c,index:u})})),s}function PM(e,t,n,r,i,o){return o||e.isPointInArea(t)?"r"!==n||r?TM(e,t,n,r,i,o):function(e,t,n,r){let i=[];return CM(e,n,t,(function(e,n,o){const{startAngle:s,endAngle:a}=e.getProps(["startAngle","endAngle"],r),{angle:l}=nR(e,{x:t.x,y:t.y});sR(l,s,a)&&i.push({element:e,datasetIndex:n,index:o})})),i}(e,t,n,i):[]}function IM(e,t,n,r,i){const o=[],s="x"===n?"inXRange":"inYRange";let a=!1;return CM(e,n,t,((e,r,l)=>{e[s](t[n],i)&&(o.push({element:e,datasetIndex:r,index:l}),a=a||e.inRange(t.x,t.y,i))})),r&&!a?[]:o}var OM={evaluateInteractionItems:CM,modes:{index(e,t,n,r){const i=FN(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?_M(e,i,o,r,s):PM(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=a[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,n,r){const i=FN(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?_M(e,i,o,r,s):PM(e,i,o,!1,r,s);if(a.length>0){const t=a[0].datasetIndex,n=e.getDatasetMeta(t).data;a=[];for(let e=0;e<n.length;++e)a.push({element:n[e],datasetIndex:t,index:e})}return a},point:(e,t,n,r)=>_M(e,FN(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const i=FN(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return PM(e,i,o,n.intersect,r,s)},x:(e,t,n,r)=>IM(e,FN(t,e),"x",n.intersect,r),y:(e,t,n,r)=>IM(e,FN(t,e),"y",n.intersect,r)}};const RM=["left","top","right","bottom"];function NM(e,t){return e.filter((e=>e.pos===t))}function MM(e,t){return e.filter((e=>-1===RM.indexOf(e.pos)&&e.box.axis===t))}function DM(e,t){return e.sort(((e,n)=>{const r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function LM(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:i}=n;if(!e||!RM.includes(r))continue;const o=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];const{fullSize:s}=a.box,l=n[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*r:s&&t.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:s&&t.availableHeight)}return n}function BM(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function FM(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function jM(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!bO(i)){n.size&&(e[i]-=n.size);const t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?o.height:o.width),n.size=t.size/t.count,e[i]+=n.size}o.getPadding&&FM(s,o.getPadding());const a=Math.max(0,t.outerWidth-BM(s,e,"left","right")),l=Math.max(0,t.outerHeight-BM(s,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function UM(e,t){const n=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function zM(e,t,n,r){const i=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o<s;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,UM(a.horizontal,t));const{same:s,other:d}=jM(t,n,a,r);c|=s&&i.length,u=u||d,l.fullSize||i.push(a)}return c&&zM(i,t,n,r)||u}function VM(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function HM(e,t,n,r){const i=n.padding;let{x:o,y:s}=t;for(const a of e){const e=a.box,l=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const r=t.w*c,o=l.size||e.height;LO(l.start)&&(s=l.start),e.fullSize?VM(e,i.left,s,n.outerWidth-i.right-i.left,o):VM(e,t.left+l.placed,s,r,o),l.start=s,l.placed+=r,s=e.bottom}else{const r=t.h*c,s=l.size||e.width;LO(l.start)&&(o=l.start),e.fullSize?VM(e,o,i.top,s,n.outerHeight-i.bottom-i.top):VM(e,o,t.top+l.placed,s,r),l.start=o,l.placed+=r,o=e.right}}t.x=o,t.y=s}var $M={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=aN(e.options.layout.padding),o=Math.max(t-i.width,0),s=Math.max(n-i.height,0),a=function(e){const t=function(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],({position:o,options:{stack:s,stackWeight:a=1}}=i),t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:a});return t}(e),n=DM(t.filter((e=>e.box.fullSize)),!0),r=DM(NM(t,"left"),!0),i=DM(NM(t,"right")),o=DM(NM(t,"top"),!0),s=DM(NM(t,"bottom")),a=MM(t,"x"),l=MM(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:NM(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}(e.boxes),l=a.vertical,c=a.horizontal;kO(e.boxes,(e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},i);FM(h,aN(r));const f=Object.assign({maxPadding:h,w:o,h:s,x:i.left,y:i.top},i),p=LM(l.concat(c),d);zM(a.fullSize,f,d,p),zM(l,f,d,p),zM(c,f,d,p)&&zM(l,f,d,p),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(f),HM(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,HM(a.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},kO(a.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class WM{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class GM extends WM{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const qM="$chartjs",KM={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},QM=e=>null===e||""===e;const XM=!!VN&&{passive:!0};function JM(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,XM)}function YM(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function ZM(e,t,n){const r=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||YM(n.addedNodes,r),t=t&&!YM(n.removedNodes,r);t&&n()}));return i.observe(document,{childList:!0,subtree:!0}),i}function eD(e,t,n){const r=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||YM(n.removedNodes,r),t=t&&!YM(n.addedNodes,r);t&&n()}));return i.observe(document,{childList:!0,subtree:!0}),i}const tD=new Map;let nD=0;function rD(){const e=window.devicePixelRatio;e!==nD&&(nD=e,tD.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function iD(e,t,n){const r=e.canvas,i=r&&RN(r);if(!i)return;const o=mR(((e,t)=>{const r=i.clientWidth;n(e,t),r<i.clientWidth&&n()}),window),s=new ResizeObserver((e=>{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||o(n,r)}));return s.observe(i),function(e,t){tD.size||window.addEventListener("resize",rD),tD.set(e,t)}(e,o),s}function oD(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){tD.delete(e),tD.size||window.removeEventListener("resize",rD)}(e)}function sD(e,t,n){const r=e.canvas,i=mR((t=>{null!==e.ctx&&n(function(e,t){const n=KM[e.type]||e.type,{x:r,y:i}=FN(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==i?i:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,XM)}(r,t,i),i}class aD extends WM{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[qM]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",QM(i)){const t=HN(e,"width");void 0!==t&&(e.width=t)}if(QM(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=HN(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[qM])return!1;const n=t[qM].initial;["height","width"].forEach((e=>{const r=n[e];yO(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[qM],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),i={attach:ZM,detach:eD,resize:iD}[t]||sD;r[t]=i(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:oD,detach:oD,resize:oD}[t]||JM)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return UN(e,t,n,r)}isAttached(e){const t=e&&RN(e);return!(!t||!t.isConnected)}}class lD{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return JO(this.x)&&JO(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function cD(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return function(e,t,n,r){let i,o=0,s=n[0];for(r=Math.ceil(r),i=0;i<e.length;i++)i===s&&(t.push(e[i]),o++,s=n[o*r])}(t,c,o,s/i),c;const u=function(e,t,n){const r=function(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}(e),i=t.length/n;if(!r)return Math.max(i,1);const o=function(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(0|n)&&t.push(n),t.sort(((e,t)=>e-t)).pop(),t}(r);for(let s=0,a=o.length-1;s<a;s++){const e=o[s];if(e>i)return e}return Math.max(i,1)}(o,t,i);if(s>0){let e,n;const r=s>1?Math.round((l-a)/(s-1)):null;for(uD(t,c,u,yO(r)?0:a-r,a),e=0,n=s-1;e<n;e++)uD(t,c,u,o[e],o[e+1]);return uD(t,c,u,l,yO(r)?t.length:l+r),c}return uD(t,c,u),c}function uD(e,t,n,r,i){const o=AO(r,0),s=Math.min(AO(i,e.length),e.length);let a,l,c,u=0;for(n=Math.ceil(n),i&&(a=i-r,n=a/Math.floor(a/n)),c=o;c<0;)u++,c=Math.round(o+u*n);for(l=Math.max(o,0);l<s;l++)l===c&&(t.push(e[l]),u++,c=Math.round(o+u*n))}const dD=(e,t,n)=>"top"===t||"left"===t?e[t]+n:e[t]-n,hD=(e,t)=>Math.min(t||e,e);function fD(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function pD(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,s=e._endPixel,a=1e-6;let l,c=e.getPixelForTick(i);if(!(n&&(l=1===r?Math.max(c-o,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(i-1))/2,c+=i<t?l:-l,c<o-a||c>s+a)))return c}function gD(e){return e.drawTicks?e.tickLength:0}function mD(e,t){if(!e.display)return 0;const n=lN(e.font,t),r=aN(e.padding);return(vO(e.text)?e.text.length:1)*n.lineHeight+r.height}function yD(e,t,n){let r=yR(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class vD extends lD{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=xO(e,Number.POSITIVE_INFINITY),t=xO(t,Number.NEGATIVE_INFINITY),n=xO(n,Number.POSITIVE_INFINITY),r=xO(r,Number.NEGATIVE_INFINITY),{min:xO(e,n),max:xO(t,r),minDefined:wO(e),maxDefined:wO(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds();if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;a<l;++a)t=s[a].controller.getMinMax(this,e),i||(n=Math.min(n,t.min)),o||(r=Math.max(r,t.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:xO(n,xO(r,n)),max:xO(r,xO(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){SO(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:i,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:i}=e,o=EO(t,(i-r)/2),s=(e,t)=>n&&0===e?0:e+t;return{min:s(r,-Math.abs(o)),max:s(i,o)}}(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s<this.ticks.length;this._convertTicksToLabels(a?fD(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=cD(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,n=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,n=!n),this._startPixel=e,this._endPixel=t,this._reversePixels=n,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){SO(this.options.afterUpdate,[this])}beforeSetDimensions(){SO(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){SO(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),SO(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){SO(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,r,i;for(n=0,r=e.length;n<r;n++)i=e[n],i.label=SO(t.callback,[i.value,n,e],this)}afterTickToLabelConversion(){SO(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){SO(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=hD(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,i=t.maxRotation;let o,s,a,l=r;if(!this._isVisible()||!t.display||r>=i||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,d=c.highest.height,h=aR(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:h/(n-1),u+6>o&&(o=h/(n-(e.offset?.5:1)),s=this.maxHeight-gD(e.grid)-t.padding-mD(e.title,this.chart.options.font),a=Math.sqrt(u*u+d*d),l=eR(Math.min(Math.asin(aR((c.highest.height+6)/o,-1,1)),Math.asin(aR(s/a,-1,1))-Math.asin(aR(d/a,-1,1)))),l=Math.max(r,Math.min(i,l))),this.labelRotation=l}afterCalculateLabelRotation(){SO(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){SO(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=mD(r,t.options.font);if(s?(e.width=this.maxWidth,e.height=gD(i)+o):(e.height=this.maxHeight,e.width=gD(i)+o),n.display&&this.ticks.length){const{first:t,last:r,widest:i,highest:o}=this._getLabelSizes(),a=2*n.padding,l=ZO(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(s){const t=n.mirror?0:u*i.width+c*o.height;e.height=Math.min(this.maxHeight,e.height+t+a)}else{const t=n.mirror?0:c*i.width+u*o.height;e.width=Math.min(this.maxWidth,e.width+t+a)}this._calculatePadding(t,r,u,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:i,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;a?l?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):"start"===i?d=t.width:"end"===i?u=e.width:"inner"!==i&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((d-c+o)*this.width/(this.width-c),0)}else{let n=t.height/2,r=e.height/2;"start"===i?(n=0,r=e.height):"end"===i&&(n=t.height,r=0),this.paddingTop=n+o,this.paddingBottom=r+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){SO(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)yO(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=fD(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){const{ctx:r,_longestTextCache:i}=this,o=[],s=[],a=Math.floor(t/hD(t,n));let l,c,u,d,h,f,p,g,m,y,v,b=0,w=0;for(l=0;l<t;l+=a){if(d=e[l].label,h=this._resolveTickFontOptions(l),r.font=f=h.string,p=i[f]=i[f]||{data:{},gc:[]},g=h.lineHeight,m=y=0,yO(d)||vO(d)){if(vO(d))for(c=0,u=d.length;c<u;++c)v=d[c],yO(v)||vO(v)||(m=UR(r,p.data,p.gc,m,v),y+=g)}else m=UR(r,p.data,p.gc,m,d),y=g;o.push(m),s.push(y),b=Math.max(m,b),w=Math.max(y,w)}!function(e,t){kO(e,(e=>{const n=e.gc,r=n.length/2;let i;if(r>t){for(i=0;i<r;++i)delete e.data[n[i]];n.splice(0,r)}}))}(i,t);const x=o.indexOf(b),A=s.indexOf(w),E=e=>({width:o[e]||0,height:s[e]||0});return{first:E(0),last:E(t-1),widest:E(x),highest:E(A),widths:o,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return aR(this._alignToPixels?zR(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const n=t[e];return n.$context||(n.$context=function(e,t,n){return uN(e,{tick:n,index:t,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=uN(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const e=this.options.ticks,t=ZO(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,s=i?i.widest.width+o:0,a=i?i.highest.height+o:0;return this.isHorizontal()?a*n>s*r?s/n:a/r:a*r<s*n?a/n:s/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:i,position:o,border:s}=r,a=i.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),u=gD(i),d=[],h=s.setContext(this.getContext()),f=h.display?h.width:0,p=f/2,g=function(e){return zR(n,e,f)};let m,y,v,b,w,x,A,E,S,k,C,_;if("top"===o)m=g(this.bottom),x=this.bottom-u,E=m-p,k=g(e.top)+p,_=e.bottom;else if("bottom"===o)m=g(this.top),k=e.top,_=g(e.bottom)-p,x=m+p,E=this.top+u;else if("left"===o)m=g(this.right),w=this.right-u,A=m-p,S=g(e.left)+p,C=e.right;else if("right"===o)m=g(this.left),S=e.left,C=g(e.right)-p,w=m+p,A=this.left+u;else if("x"===t){if("center"===o)m=g((e.top+e.bottom)/2+.5);else if(bO(o)){const e=Object.keys(o)[0],t=o[e];m=g(this.chart.scales[e].getPixelForValue(t))}k=e.top,_=e.bottom,x=m+p,E=x+u}else if("y"===t){if("center"===o)m=g((e.left+e.right)/2);else if(bO(o)){const e=Object.keys(o)[0],t=o[e];m=g(this.chart.scales[e].getPixelForValue(t))}w=m-p,A=w-u,S=e.left,C=e.right}const T=AO(r.ticks.maxTicksLimit,c),P=Math.max(1,Math.ceil(c/T));for(y=0;y<c;y+=P){const e=this.getContext(y),t=i.setContext(e),r=s.setContext(e),o=t.lineWidth,c=t.color,u=r.dash||[],h=r.dashOffset,f=t.tickWidth,p=t.tickColor,g=t.tickBorderDash||[],m=t.tickBorderDashOffset;v=pD(this,y,a),void 0!==v&&(b=zR(n,v,o),l?w=A=S=C=b:x=E=k=_=b,d.push({tx1:w,ty1:x,tx2:A,ty2:E,x1:S,y1:k,x2:C,y2:_,width:o,color:c,borderDash:u,borderDashOffset:h,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=m,d}_computeLabelItems(e){const t=this.axis,n=this.options,{position:r,ticks:i}=n,o=this.isHorizontal(),s=this.ticks,{align:a,crossAlign:l,padding:c,mirror:u}=i,d=gD(n.grid),h=d+c,f=u?-c:h,p=-ZO(this.labelRotation),g=[];let m,y,v,b,w,x,A,E,S,k,C,_,T="middle";if("top"===r)x=this.bottom-f,A=this._getXAxisLabelAlignment();else if("bottom"===r)x=this.top+f,A=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(d);A=e.textAlign,w=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(d);A=e.textAlign,w=e.x}else if("x"===t){if("center"===r)x=(e.top+e.bottom)/2+h;else if(bO(r)){const e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)+h}A=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)w=(e.left+e.right)/2-h;else if(bO(r)){const e=Object.keys(r)[0],t=r[e];w=this.chart.scales[e].getPixelForValue(t)}A=this._getYAxisLabelAlignment(d).textAlign}"y"===t&&("start"===a?T="top":"end"===a&&(T="bottom"));const P=this._getLabelSizes();for(m=0,y=s.length;m<y;++m){v=s[m],b=v.label;const e=i.setContext(this.getContext(m));E=this.getPixelForTick(m)+i.labelOffset,S=this._resolveTickFontOptions(m),k=S.lineHeight,C=vO(b)?b.length:1;const t=C/2,n=e.color,a=e.textStrokeColor,c=e.textStrokeWidth;let d,h=A;if(o?(w=E,"inner"===A&&(h=m===y-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),_="top"===r?"near"===l||0!==p?-C*k+k/2:"center"===l?-P.highest.height/2-t*k+k:-P.highest.height+k/2:"near"===l||0!==p?k/2:"center"===l?P.highest.height/2-t*k:P.highest.height-C*k,u&&(_*=-1),0===p||e.showLabelBackdrop||(w+=k/2*Math.sin(p))):(x=E,_=(1-C)*k/2),e.showLabelBackdrop){const t=aN(e.backdropPadding),n=P.heights[m],r=P.widths[m];let i=_-t.top,o=0-t.left;switch(T){case"middle":i-=n/2;break;case"bottom":i-=n}switch(A){case"center":o-=r/2;break;case"right":o-=r;break;case"inner":m===y-1?o-=r:m>0&&(o-=r/2)}d={left:o,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}g.push({label:b,font:S,textOffset:_,options:{rotation:p,color:n,strokeColor:a,strokeWidth:c,textAlign:h,textBaseline:T,translation:[w,x],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-ZO(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,o=e+i,s=this._getLabelSizes().widest.width;let a,l;return"left"===t?r?(l=this.right+i,"near"===n?a="left":"center"===n?(a="center",l+=s/2):(a="right",l+=s)):(l=this.right-o,"near"===n?a="right":"center"===n?(a="center",l-=s/2):(a="left",l=this.left)):"right"===t?r?(l=this.left+i,"near"===n?a="right":"center"===n?(a="center",l-=s/2):(a="left",l-=s)):(l=this.left+o,"near"===n?a="left":"center"===n?(a="center",l+=s/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:o}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,o),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,o;const s=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,o=r.length;i<o;++i){const e=r[i];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:n,grid:r}}=this,i=n.setContext(this.getContext()),o=n.display?i.width:0;if(!o)return;const s=r.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=zR(e,this.left,o)-o/2,c=zR(e,this.right,s)+s/2,u=d=a):(u=zR(e,this.top,o)-o/2,d=zR(e,this.bottom,s)+s/2,l=c=a),t.save(),t.lineWidth=i.width,t.strokeStyle=i.color,t.beginPath(),t.moveTo(l,u),t.lineTo(c,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,n=this._computeLabelArea();n&&GR(t,n);const r=this.getLabelItems(e);for(const i of r){const e=i.options,n=i.font;YR(t,i.label,0,i.textOffset,n,e)}n&&qR(t)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;const i=lN(n.font),o=aN(n.padding),s=n.align;let a=i.lineHeight/2;"bottom"===t||"center"===t||bO(t)?(a+=o.bottom,vO(n.text)&&(a+=i.lineHeight*(n.text.length-1))):a+=o.top;const{titleX:l,titleY:c,maxWidth:u,rotation:d}=function(e,t,n,r){const{top:i,left:o,bottom:s,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d,h,f,p=0;const g=s-i,m=a-o;if(e.isHorizontal()){if(h=vR(r,o,a),bO(n)){const e=Object.keys(n)[0],r=n[e];f=u[e].getPixelForValue(r)+g-t}else f="center"===n?(c.bottom+c.top)/2+g-t:dD(e,n,t);d=a-o}else{if(bO(n)){const e=Object.keys(n)[0],r=n[e];h=u[e].getPixelForValue(r)-m+t}else h="center"===n?(c.left+c.right)/2-m+t:dD(e,n,t);f=vR(r,s,i),p="left"===n?-$O:$O}return{titleX:h,titleY:f,maxWidth:d,rotation:p}}(this,a,t,s);YR(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:d,textAlign:yD(s,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=AO(e.grid&&e.grid.z,-1),r=AO(e.border&&e.border.z,0);return this._isVisible()&&this.draw===vD.prototype.draw?[{z:n,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let i,o;for(i=0,o=t.length;i<o;++i){const o=t[i];o[n]!==this.id||e&&o.type!==e||r.push(o)}return r}_resolveTickFontOptions(e){return lN(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class bD{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;(function(e){return"id"in e&&"defaults"in e})(t)&&(n=this.register(t));const r=this.items,i=e.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in r||(r[i]=e,function(e,t,n){const r=IO(Object.create(null),[n?jR.get(n):{},jR.get(t),e.defaults]);jR.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");jR.route(o,i,l,a)}))}(t,e.defaultRoutes);e.descriptors&&jR.describe(t,e.descriptors)}(e,o,n),this.override&&jR.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in jR[r]&&(delete jR[r][n],this.override&&delete MR[n])}}class wD{constructor(){this.controllers=new bD(wM,"datasets",!0),this.elements=new bD(lD,"elements"),this.plugins=new bD(Object,"plugins"),this.scales=new bD(vD,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t)}remove(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t)}addControllers(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.controllers)}addElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.elements)}addPlugins(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.plugins)}addScales(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.controllers)}removeElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.elements)}removePlugins(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.plugins)}removeScales(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.scales)}_each(e,t,n){[...t].forEach((t=>{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):kO(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=DO(e);SO(n["before"+r],[],n),t[e](n),SO(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}}var xD=new wD;class AD{constructor(){this._init=[]}notify(e,t,n,r){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=r?this._descriptors(e).filter(r):this._descriptors(e),o=this._notify(i,e,t,n);return"afterDestroy"===t&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,n,r){r=r||{};for(const i of e){const e=i.plugin;if(!1===SO(e[n],[t,r,i.options],e)&&r.cancelable)return!1}return!0}invalidate(){yO(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,r=AO(n.options&&n.options.plugins,{}),i=function(e){const t={},n=[],r=Object.keys(xD.plugins.items);for(let o=0;o<r.length;o++)n.push(xD.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const e=i[o];-1===n.indexOf(e)&&(n.push(e),t[e.id]=!0)}return{plugins:n,localIds:t}}(n);return!1!==r||t?function(e,t,n,r){let{plugins:i,localIds:o}=t;const s=[],a=e.getContext();for(const l of i){const t=l.id,i=ED(n[t],r);null!==i&&s.push({plugin:l,options:SD(e.config,{plugin:l,local:o[t]},i,a)})}return s}(e,i,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function ED(e,t){return t||!1!==e?!0===e?{}:e:null}function SD(e,t,n,r){let{plugin:i,local:o}=t;const s=e.pluginScopeKeys(i),a=e.getOptionScopes(n,s);return o&&i.defaults&&a.push(i.defaults),e.createResolver(a,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function kD(e,t){const n=jR.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function CD(e){if("x"===e||"y"===e||"r"===e)return e}function _D(e){if(CD(e))return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(const o of n){const t=o.axis||("top"===(i=o.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||e.length>1&&CD(e[0].toLowerCase());if(t)return t}var i;throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function TD(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function PD(e,t){const n=MR[e.type]||{scales:{}},r=t.scales||{},i=kD(e.type,t),o=Object.create(null);return Object.keys(r).forEach((t=>{const s=r[t];if(!bO(s))return console.error(`Invalid scale configuration for scale: ${t}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=_D(t,s,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return TD(e,"x",n[0])||TD(e,"y",n[0])}return{}}(t,e),jR.scales[s.type]),l=function(e,t){return e===t?"_index_":"_value_"}(a,i),c=n.scales||{};o[t]=OO(Object.create(null),[{axis:a},s,c[a],c[l]])})),e.data.datasets.forEach((n=>{const i=n.type||e.type,s=n.indexAxis||kD(i,t),a=(MR[i]||{}).scales||{};Object.keys(a).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,s),i=n[t+"AxisID"]||t;o[i]=o[i]||Object.create(null),OO(o[i],[{axis:t},r[i],a[e]])}))})),Object.keys(o).forEach((e=>{const t=o[e];OO(t,[jR.scales[t.type],jR.scale])})),o}function ID(e){const t=e.options||(e.options={});t.plugins=AO(t.plugins,{}),t.scales=PD(e,t)}function OD(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const RD=new Map,ND=new Set;function MD(e,t){let n=RD.get(e);return n||(n=t(),RD.set(e,n),ND.add(n)),n}const DD=(e,t,n)=>{const r=MO(t,n);void 0!==r&&e.add(r)};class LD{constructor(e){this._config=function(e){return(e=e||{}).data=OD(e.data),ID(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=OD(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),ID(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return MD(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return MD(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return MD(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return MD(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:i}=this,o=this._cachedScopes(e,n),s=o.get(t);if(s)return s;const a=new Set;t.forEach((t=>{e&&(a.add(e),t.forEach((t=>DD(a,e,t)))),t.forEach((e=>DD(a,r,e))),t.forEach((e=>DD(a,MR[i]||{},e))),t.forEach((e=>DD(a,jR,e))),t.forEach((e=>DD(a,DR,e)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ND.has(t)&&o.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,MR[t]||{},jR.datasets[t]||{},{type:t},jR,DR]}resolveNamedOptions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const i={$shared:!0},{resolver:o,subPrefixes:s}=BD(this._resolverCache,e,r);let a=o;if(function(e,t){const{isScriptable:n,isIndexable:r}=fN(e);for(const i of t){const t=n(i),o=r(i),s=(o||t)&&e[i];if(t&&(BO(s)||FD(s))||o&&vO(s))return!0}return!1}(o,t)){i.$shared=!1;a=hN(o,n=BO(n)?n():n,this.createResolver(e,n,s))}for(const l of t)i[l]=a[l];return i}createResolver(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0;const{resolver:i}=BD(this._resolverCache,e,n);return bO(t)?hN(i,t,void 0,r):i}}function BD(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);if(!o){o={resolver:dN(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(i,o)}return o}const FD=e=>bO(e)&&Object.getOwnPropertyNames(e).some((t=>BO(e[t])));const jD=["top","bottom","left","right","chartArea"];function UD(e,t){return"top"===e||"bottom"===e||-1===jD.indexOf(e)&&"x"===t}function zD(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function VD(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),SO(n&&n.onComplete,[e],t)}function HD(e){const t=e.chart,n=t.options.animation;SO(n&&n.onProgress,[e],t)}function $D(e){return ON()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const WD={},GD=e=>{const t=$D(e);return Object.values(WD).filter((e=>e.canvas===t)).pop()};function qD(e,t,n){const r=Object.keys(e);for(const i of r){const r=+i;if(r>=t){const o=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=o)}}}function KD(e,t,n){return e.options.clip?e[n]:t[n]}class QD{static defaults=(()=>jR)();static instances=(()=>WD)();static overrides=(()=>MR)();static registry=(()=>xD)();static version="4.4.3";static getChart=(()=>GD)();static register(){xD.add(...arguments),XD()}static unregister(){xD.remove(...arguments),XD()}constructor(e,t){const n=this.config=new LD(t),r=$D(e),i=GD(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!ON()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?GM:aD}(r)),this.platform.updateConfig(n);const s=this.platform.acquireContext(r,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=mO(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new AD,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}((e=>this.update(e)),o.resizeDelay||0),this._dataChanges=[],WD[this.id]=this,s&&a?(iM.listen(this,"complete",VD),iM.listen(this,"progress",HD),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return yO(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return xD}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():zN(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return VR(this.canvas,this.ctx),this}stop(){return iM.stop(this),this}resize(e,t){iM.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,t,i),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,zN(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),SO(n.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){kO(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let i=[];t&&(i=i.concat(Object.keys(t).map((e=>{const n=t[e],r=_D(e,n),i="r"===r,o="x"===r;return{options:n,dposition:i?"chartArea":o?"bottom":"left",dtype:i?"radialLinear":o?"category":"linear"}})))),kO(i,(t=>{const i=t.options,o=i.id,s=_D(o,i),a=AO(i.type,t.dtype);void 0!==i.position&&UD(i.position,s)===UD(t.dposition)||(i.position=t.dposition),r[o]=!0;let l=null;if(o in n&&n[o].type===a)l=n[o];else{l=new(xD.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(i,e)})),kO(r,((e,t)=>{e||delete n[t]})),kO(n,(e=>{$M.configure(this,e,e.options),$M.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(zD("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){const r=t[n];let i=this.getDatasetMeta(n);const o=r.type||this.config.type;if(i.type&&i.type!==o&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=o,i.indexAxis=r.indexAxis||kD(o,this.options),i.order=r.order||0,i.index=n,i.label=""+r.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{const t=xD.getController(o),{datasetElementType:r,dataElementType:s}=jR.datasets[o];Object.assign(t,{dataElementType:xD.getElement(s),datasetElementType:r&&xD.getElement(r)}),i.controller=new t(this,n),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){kO(this.data.datasets,((e,t)=>{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let l=0,c=this.data.datasets.length;l<c;l++){const{controller:e}=this.getDatasetMeta(l),t=!r&&-1===i.indexOf(e);e.buildOrUpdateElements(t),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),r||kO(i,(e=>{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(zD("z","_idx"));const{_active:s,_lastEvent:a}=this;a?this._eventHandler(a,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){kO(this.scales,(e=>{$M.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);FO(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of t){qD(e,r,"_removeElements"===n?-i:i)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let i=1;i<t;i++)if(!FO(r,n(i)))return;return Array.from(r).map((e=>e.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;$M.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],kO(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,BO(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(iM.has(this)?this.attached&&!iM.running(this)&&iM.start(this):(this.draw(),VD({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resize(e,t),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let r,i;for(r=0,i=t.length;r<i;++r){const i=t[r];e&&!i.visible||n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,i=function(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:KD(n,t,"left"),right:KD(n,t,"right"),top:KD(r,t,"top"),bottom:KD(r,t,"bottom")}:t}(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(r&&GR(t,{left:!1===n.left?0:i.left-n.left,right:!1===n.right?this.width:i.right+n.right,top:!1===n.top?0:i.top-n.top,bottom:!1===n.bottom?this.height:i.bottom+n.bottom}),e.controller.draw(),r&&qR(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return WR(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const i=OM.modes[t];return"function"===typeof i?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=uN(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,r);LO(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(i,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),iM.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),VR(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete WD[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};kO(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)};let o;const s=()=>{r("attach",s),this.attached=!0,this.resize(),n("resize",i),n("detach",o)};o=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",s)},t.isAttached(this.canvas)?s():o()}unbindEvents(){kO(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},kO(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,o,s,a;for("dataset"===t&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),s=0,a=e.length;s<a;++s){o=e[s];const t=o&&this.getDatasetMeta(o.datasetIndex).controller;t&&t[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map((e=>{let{datasetIndex:t,index:n}=e;const r=this.getDatasetMeta(t);if(!r)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:r.data[n],index:n}}));!CO(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,i=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),o=i(t,e),s=n?e:i(e,t);o.length&&this.updateHoverStyle(o,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:i}=this,o=t,s=this._getActiveElements(e,r,n,o),a=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,a);n&&(this._lastEvent=null,SO(i.onHover,[e,s,this],this),a&&SO(i.onClick,[e,s,this],this));const c=!CO(s,r);return(c||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}function XD(){return kO(QD.instances,(e=>e._plugins.invalidate()))}function JD(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=AO(n.borderCapStyle,t.borderCapStyle),e.setLineDash(AO(n.borderDash,t.borderDash)),e.lineDashOffset=AO(n.borderDashOffset,t.borderDashOffset),e.lineJoin=AO(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=AO(n.borderWidth,t.borderWidth),e.strokeStyle=AO(n.borderColor,t.borderColor)}function YD(e,t,n){e.lineTo(n.x,n.y)}function ZD(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),u=i<s&&o<s||i>a&&o>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function eL(e,t,n,r){const{points:i,options:o}=t,{count:s,start:a,loop:l,ilen:c}=ZD(i,n,r),u=function(e){return e.stepped?KR:e.tension||"monotone"===e.cubicInterpolationMode?QR:YD}(o);let d,h,f,{move:p=!0,reverse:g}=r||{};for(d=0;d<=c;++d)h=i[(a+(g?c-d:d))%s],h.skip||(p?(e.moveTo(h.x,h.y),p=!1):u(e,f,h,g,o.stepped),f=h);return l&&(h=i[(a+(g?c:0))%s],u(e,f,h,g,o.stepped)),!!l}function tL(e,t,n,r){const i=t.points,{count:o,start:s,ilen:a}=ZD(i,n,r),{move:l=!0,reverse:c}=r||{};let u,d,h,f,p,g,m=0,y=0;const v=e=>(s+(c?a-e:e))%o,b=()=>{f!==p&&(e.lineTo(m,p),e.lineTo(m,f),e.lineTo(m,g))};for(l&&(d=i[v(0)],e.moveTo(d.x,d.y)),u=0;u<=a;++u){if(d=i[v(u)],d.skip)continue;const t=d.x,n=d.y,r=0|t;r===h?(n<f?f=n:n>p&&(p=n),m=(y*m+t)/++y):(b(),e.lineTo(t,n),h=r,y=0,f=p=n),g=n}b()}function nL(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!n?tL:eL}const rL="function"===typeof Path2D;function iL(e,t,n,r){rL&&!t.options.segment?function(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),JD(e,t.options),e.stroke(i)}(e,t,n,r):function(e,t,n,r){const{segments:i,options:o}=t,s=nL(t);for(const a of i)JD(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class oL extends lD{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;IN(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=function(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}(n,i,o,r);return eM(e,!0===r?[{start:s,end:a,loop:o}]:function(e,t,n,r){const i=e.length,o=[];let s,a=t,l=e[t];for(s=t+1;s<=n;++s){const n=e[s%i];n.skip||n.stop?l.skip||(r=!1,o.push({start:t%i,end:(s-1)%i,loop:r}),t=a=n.stop?s:null):(a=s,l.skip&&(t=s)),l=n}return null!==a&&o.push({start:t%i,end:a%i,loop:r}),o}(n,s,a<s?a+i:a,!!e._fullLoop&&0===s&&a===i-1),n,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){const n=this.options,r=e[t],i=this.points,o=ZN(this,{property:t,start:r,end:r});if(!o.length)return;const s=[],a=function(e){return e.stepped?WN:e.tension||"monotone"===e.cubicInterpolationMode?GN:$N}(n);let l,c;for(l=0,c=o.length;l<c;++l){const{start:c,end:u}=o[l],d=i[c],h=i[u];if(d===h){s.push(d);continue}const f=a(d,h,Math.abs((r-d[t])/(h[t]-d[t])),n.stepped);f[t]=e[t],s.push(f)}return 1===s.length?s[0]:s}pathSegment(e,t,n){return nL(this)(e,this,t,n)}path(e,t,n){const r=this.segments,i=nL(this);let o=this._loop;t=t||0,n=n||this.points.length-t;for(const s of r)o&=i(e,this,s,{start:t,end:t+n-1});return!!o}draw(e,t,n,r){const i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),iL(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function sL(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class aL extends lD{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.options,{x:i,y:o}=this.getProps(["x","y"],n);return Math.pow(e-i,2)+Math.pow(t-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,t){return sL(this,e,"x",t)}inYRange(e,t){return sL(this,e,"y",t)}getCenterPoint(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e,t){const n=this.options;this.skip||n.radius<.1||!WR(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,HR(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function lL(e,t,n,r){if(r)return;let i=t[e],o=n[e];return"angle"===e&&(i=oR(i),o=oR(o)),{property:e,start:i,end:o}}function cL(e,t,n){for(;t>e;t--){const e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function uL(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function dL(e,t){let n=[],r=!1;return vO(e)?(r=!0,n=e):n=function(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach((e=>{let{start:t,end:s}=e;s=cL(t,s,i);const a=i[t],l=i[s];null!==r?(o.push({x:a.x,y:r}),o.push({x:l.x,y:r})):null!==n&&(o.push({x:n,y:a.y}),o.push({x:n,y:l.y}))})),o}(e,t),n.length?new oL({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function hL(e){return e&&!1!==e.fill}function fL(e,t,n){let r=e[t].fill;const i=[t];let o;if(!n)return r;for(;!1!==r&&-1===i.indexOf(r);){if(!wO(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;i.push(r),r=o.fill}return!1}function pL(e,t,n){const r=function(e){const t=e.options,n=t.fill;let r=AO(n&&n.target,n);void 0===r&&(r=!!t.backgroundColor);if(!1===r||null===r)return!1;if(!0===r)return"origin";return r}(e);if(bO(r))return!isNaN(r.value)&&r;let i=parseFloat(r);return wO(i)&&Math.floor(i)===i?function(e,t,n,r){"-"!==e&&"+"!==e||(n=t+n);if(n===t||n<0||n>=r)return!1;return n}(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function gL(e,t,n){const r=[];for(let i=0;i<n.length;i++){const o=n[i],{first:s,last:a,point:l}=mL(o,t,"x");if(!(!l||s&&a))if(s)r.unshift(l);else if(e.push(l),!a)break}e.push(...r)}function mL(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],o=e.segments,s=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const e=o[c],t=s[e.start][n],r=s[e.end][n];if(lR(i,t,r)){a=i===t,l=i===r;break}}return{first:a,last:l,point:r}}class yL{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:r,y:i,radius:o}=this;return t=t||{start:0,end:UO},e.arc(r,i,o,t.end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:r}=this,i=e.angle;return{x:t+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}}function vL(e){const{chart:t,fill:n,line:r}=e;if(wO(n))return function(e,t){const n=e.getDatasetMeta(t),r=n&&e.isDatasetVisible(t);return r?n.dataset:null}(t,n);if("stack"===n)return function(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=function(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const e=r[i];if(e.index===t)break;e.hidden||n.unshift(e.dataset)}return n}(t,n);a.push(dL({x:null,y:t.bottom},r));for(let l=0;l<o.length;l++){const e=o[l];for(let t=e.start;t<=e.end;t++)gL(i,s[t],a)}return new oL({points:i,options:{}})}(e);if("shape"===n)return!0;const i=function(e){const t=e.scale||{};if(t.getPointPositionForValue)return function(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,o=r.reverse?t.max:t.min,s=function(e,t,n){let r;return r="start"===e?n:"end"===e?t.options.reverse?t.min:t.max:bO(e)?e.value:t.getBaseValue(),r}(n,t,o),a=[];if(r.grid.circular){const e=t.getPointPositionForValue(0,o);return new yL({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,s));return a}(e);return function(e){const{scale:t={},fill:n}=e,r=function(e,t){let n=null;return"start"===e?n=t.bottom:"end"===e?n=t.top:bO(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}(n,t);if(wO(r)){const e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}(e)}(e);return i instanceof yL?i:dL(i,r)}function bL(e,t,n){const r=vL(t),{line:i,scale:o,axis:s}=t,a=i.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};r&&i.points.length&&(GR(e,n),function(e,t){const{line:n,target:r,above:i,below:o,area:s,scale:a}=t,l=n._loop?"angle":t.axis;e.save(),"x"===l&&o!==i&&(wL(e,r,s.top),xL(e,{line:n,target:r,color:i,scale:a,property:l}),e.restore(),e.save(),wL(e,r,s.bottom));xL(e,{line:n,target:r,color:o,scale:a,property:l}),e.restore()}(e,{line:i,target:r,above:u,below:d,area:n,scale:o,axis:s}),qR(e))}function wL(e,t,n){const{segments:r,points:i}=t;let o=!0,s=!1;e.beginPath();for(const a of r){const{start:r,end:l}=a,c=i[r],u=i[cL(r,l,i)];o?(e.moveTo(c.x,c.y),o=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),s=!!t.pathSegment(e,a,{move:s}),s?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function xL(e,t){const{line:n,target:r,property:i,color:o,scale:s}=t,a=function(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:e,end:r}=a;r=cL(e,r,i);const l=lL(n,i[e],i[r],a.loop);if(!t.segments){s.push({source:a,target:l,start:i[e],end:i[r]});continue}const c=ZN(t,l);for(const t of c){const e=lL(n,o[t.start],o[t.end],t.loop),r=YN(a,i,e);for(const i of r)s.push({source:i,target:t,start:{[n]:uL(l,e,"start",Math.max)},end:{[n]:uL(l,e,"end",Math.min)}})}}return s}(n,r,i);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:t=o}={}}=l,a=!0!==r;e.save(),e.fillStyle=t,AL(e,s,a&&lL(i,u,d)),e.beginPath();const h=!!n.pathSegment(e,l);let f;if(a){h?e.closePath():EL(e,r,d,i);const t=!!r.pathSegment(e,c,{move:h,reverse:!0});f=h&&t,f||EL(e,r,u,i)}e.closePath(),e.fill(f?"evenodd":"nonzero"),e.restore()}}function AL(e,t,n){const{top:r,bottom:i}=t.chart.chartArea,{property:o,start:s,end:a}=n||{};"x"===o&&(e.beginPath(),e.rect(s,r,a-s,i-r),e.clip())}function EL(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var SL={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let o,s,a,l;for(s=0;s<r;++s)o=e.getDatasetMeta(s),a=o.dataset,l=null,a&&a.options&&a instanceof oL&&(l={visible:e.isDatasetVisible(s),index:s,fill:pL(a,s,r),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,i.push(l);for(s=0;s<r;++s)l=i[s],l&&!1!==l.fill&&(l.fill=fL(i,s,n.propagate))},beforeDraw(e,t,n){const r="beforeDraw"===n.drawTime,i=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let s=i.length-1;s>=0;--s){const t=i[s].$filler;t&&(t.line.updateControlPoints(o,t.axis),r&&t.fill&&bL(e.ctx,t,o))}},beforeDatasetsDraw(e,t,n){if("beforeDatasetsDraw"!==n.drawTime)return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const t=r[i].$filler;hL(t)&&bL(e.ctx,t,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;hL(r)&&"beforeDatasetDraw"===n.drawTime&&bL(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const kL=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class CL extends lD{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=SO(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=lN(n.font),i=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=kL(n,i);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,i,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:i,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+s;let u=e;i.textAlign="left",i.textBaseline="middle";let d=-1,h=-c;return this.legendItems.forEach(((e,f)=>{const p=n+t/2+i.measureText(e.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(u+=c,l[l.length-(f>0?0:1)]=0,h+=c,d++),a[f]={left:0,top:h,row:d,width:p,height:r},l[l.length-1]+=p+s})),u}_fitCols(e,t,n,r){const{ctx:i,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-e;let u=s,d=0,h=0,f=0,p=0;return this.legendItems.forEach(((e,o)=>{const{itemWidth:g,itemHeight:m}=function(e,t,n,r,i){const o=function(e,t,n,r){let i=e.text;i&&"string"!==typeof i&&(i=i.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(i).width}(r,e,t,n),s=function(e,t,n){let r=e;"string"!==typeof t.text&&(r=_L(t,n));return r}(i,r,t.lineHeight);return{itemWidth:o,itemHeight:s}}(n,t,i,e,r);o>0&&h+m+2*s>c&&(u+=d+s,l.push({width:d,height:h}),f+=d+s,p++,d=h=0),a[o]={left:f,top:h,col:p,width:g,height:m},d=Math.max(d,g),h+=m+s})),u+=d,l.push({width:d,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,o=qN(i,this.left,this.width);if(this.isHorizontal()){let i=0,s=vR(n,this.left+r,this.right-this.lineWidths[i]);for(const a of t)i!==a.row&&(i=a.row,s=vR(n,this.left+r,this.right-this.lineWidths[i])),a.top+=this.top+e+r,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+r}else{let i=0,s=vR(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(const a of t)a.col!==i&&(i=a.col,s=vR(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),a.top=s,a.left+=this.left+r,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;GR(e,this),this._draw(),qR(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:o}=e,s=jR.color,a=qN(e.rtl,this.left,this.width),l=lN(o.font),{padding:c}=o,u=l.size,d=u/2;let h;this.drawTitle(),r.textAlign=a.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:g}=kL(o,u),m=this.isHorizontal(),y=this._computeTitleHeight();h=m?{x:vR(i,this.left+c,this.right-n[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:vR(i,this.top+y+c,this.bottom-t[0].height),line:0},KN(this.ctx,e.textDirection);const v=g+c;this.legendItems.forEach(((b,w)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const x=r.measureText(b.text).width,A=a.textAlign(b.textAlign||(b.textAlign=o.textAlign)),E=f+d+x;let S=h.x,k=h.y;a.setWidth(this.width),m?w>0&&S+E+c>this.right&&(k=h.y+=v,h.line++,S=h.x=vR(i,this.left+c,this.right-n[h.line])):w>0&&k+v>this.bottom&&(S=h.x=S+t[h.line].width+c,h.line++,k=h.y=vR(i,this.top+y+c,this.bottom-t[h.line].height));if(function(e,t,n){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;r.save();const i=AO(n.lineWidth,1);if(r.fillStyle=AO(n.fillStyle,s),r.lineCap=AO(n.lineCap,"butt"),r.lineDashOffset=AO(n.lineDashOffset,0),r.lineJoin=AO(n.lineJoin,"miter"),r.lineWidth=i,r.strokeStyle=AO(n.strokeStyle,s),r.setLineDash(AO(n.lineDash,[])),o.usePointStyle){const s={radius:p*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},l=a.xPlus(e,f/2);$R(r,s,l,t+d,o.pointStyleWidth&&f)}else{const o=t+Math.max((u-p)/2,0),s=a.leftForLtr(e,f),l=sN(n.borderRadius);r.beginPath(),Object.values(l).some((e=>0!==e))?ZR(r,{x:s,y:o,w:f,h:p,radius:l}):r.rect(s,o,f,p),r.fill(),0!==i&&r.stroke()}r.restore()}(a.x(S),k,b),S=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(A,S+f+d,m?S+E:this.right,e.rtl),function(e,t,n){YR(r,n.text,e,t+g/2,l,{strikethrough:n.hidden,textAlign:a.textAlign(n.textAlign)})}(a.x(S),k,b),m)h.x+=E+c;else if("string"!==typeof b.text){const e=l.lineHeight;h.y+=_L(b,e)+c}else h.y+=v})),QN(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=lN(t.font),r=aN(t.padding);if(!t.display)return;const i=qN(e.rtl,this.left,this.width),o=this.ctx,s=t.position,a=n.size/2,l=r.top+a;let c,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,u=vR(e.align,u,this.right-d);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+vR(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const h=vR(s,u,u+d);o.textAlign=i.textAlign(yR(s)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=n.string,YR(o,t.text,h,c,n)}_computeTitleHeight(){const e=this.options.title,t=lN(e.font),n=aN(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(lR(e,this.left,this.right)&&lR(t,this.top,this.bottom))for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(r=i[n],lR(e,r.left,r.left+r.width)&&lR(t,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(e){const t=this.options;if(!function(e,t){if(("mousemove"===e||"mouseout"===e)&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const r=this._hoveredItem,i=((e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index)(r,n);r&&!i&&SO(t.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!i&&SO(t.onHover,[e,n,this],this)}else n&&SO(t.onClick,[e,n,this],this)}}function _L(e,t){return t*(e.text?e.text.length:0)}var TL={id:"legend",_element:CL,start(e,t,n){const r=e.legend=new CL({ctx:e.ctx,options:n,chart:e});$M.configure(e,r,n),$M.addBox(e,r)},stop(e){$M.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;$M.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const l=e.controller.getStyle(n?0:void 0),c=aN(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:i||l.textAlign,borderRadius:s&&(a||l.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class PL extends lD{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const r=vO(n.text)?n.text.length:1;this._padding=aN(n.padding);const i=r*lN(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:r,right:i,options:o}=this,s=o.align;let a,l,c,u=0;return this.isHorizontal()?(l=vR(s,n,i),c=t+e,a=i-n):("left"===o.position?(l=n+e,c=vR(s,r,t),u=-.5*jO):(l=i-e,c=vR(s,t,r),u=.5*jO),a=r-t),{titleX:l,titleY:c,maxWidth:a,rotation:u}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=lN(t.font),r=n.lineHeight/2+this._padding.top,{titleX:i,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(r);YR(e,t.text,0,0,n,{color:t.color,maxWidth:s,rotation:a,textAlign:yR(t.align),textBaseline:"middle",translation:[i,o]})}}var IL={id:"title",_element:PL,start(e,t,n){!function(e,t){const n=new PL({ctx:e.ctx,options:t,chart:e});$M.configure(e,n,t),$M.addBox(e,n),e.titleBlock=n}(e,n)},stop(e){const t=e.titleBlock;$M.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;$M.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const OL={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const n=e[t].element;if(n&&n.hasValue()){const e=n.tooltipPosition();r.add(e.x),i+=e.y,++o}}const s=[...r].reduce(((e,t)=>e+t))/r.size;return{x:s,y:i/o}},nearest(e,t){if(!e.length)return!1;let n,r,i,o=t.x,s=t.y,a=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){const r=e[n].element;if(r&&r.hasValue()){const e=rR(t,r.getCenterPoint());e<a&&(a=e,i=r)}}if(i){const e=i.tooltipPosition();o=e.x,s=e.y}return{x:o,y:s}}};function RL(e,t){return t&&(vO(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function NL(e){return("string"===typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function ML(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function DL(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=lN(t.bodyFont),c=lN(t.titleFont),u=lN(t.footerFont),d=o.length,h=i.length,f=r.length,p=aN(t.padding);let g=p.height,m=0,y=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){g+=f*(t.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}h&&(g+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let v=0;const b=function(e){m=Math.max(m,n.measureText(e).width+v)};return n.save(),n.font=c.string,kO(e.title,b),n.font=l.string,kO(e.beforeBody.concat(e.afterBody),b),v=t.displayColors?s+2+t.boxPadding:0,kO(r,(e=>{kO(e.before,b),kO(e.lines,b),kO(e.after,b)})),v=0,n.font=u.string,kO(e.footer,b),n.restore(),m+=p.width,{width:m,height:g}}function LL(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return"center"===r?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),function(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;return"left"===e&&i+o+s>t.width||"right"===e&&i-o-s<0||void 0}(c,e,t,n)&&(c="center"),c}function BL(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||LL(e,t,n,r),yAlign:r}}function FL(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=sN(s);let p=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,a);const g=function(e,t,n){let{y:r,height:i}=e;return"top"===t?r+=n:r-="bottom"===t?i+n:i/2,r}(t,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(u,h)+i:"right"===a&&(p+=Math.max(d,f)+i),{x:aR(p,0,r.width-t.width),y:aR(g,0,r.height-t.height)}}function jL(e,t,n){const r=aN(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function UL(e){return RL([],NL(e))}function zL(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const VL={beforeTitle:gO,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:gO,beforeBody:gO,beforeLabel:gO,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return yO(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:gO,afterBody:gO,beforeFooter:gO,footer:gO,afterFooter:gO};function HL(e,t,n,r){const i=e[t].call(n,r);return"undefined"===typeof i?VL[t].call(n,r):i}class $L extends lD{static positioners=(()=>OL)();constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,i=new lM(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,uN(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=HL(n,"beforeTitle",this,e),i=HL(n,"title",this,e),o=HL(n,"afterTitle",this,e);let s=[];return s=RL(s,NL(r)),s=RL(s,NL(i)),s=RL(s,NL(o)),s}getBeforeBody(e,t){return UL(HL(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return kO(e,(e=>{const t={before:[],lines:[],after:[]},i=zL(n,e);RL(t.before,NL(HL(i,"beforeLabel",this,e))),RL(t.lines,HL(i,"label",this,e)),RL(t.after,NL(HL(i,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return UL(HL(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=HL(n,"beforeFooter",this,e),i=HL(n,"footer",this,e),o=HL(n,"afterFooter",this,e);let s=[];return s=RL(s,NL(r)),s=RL(s,NL(i)),s=RL(s,NL(o)),s}_createItems(e){const t=this._active,n=this.chart.data,r=[],i=[],o=[];let s,a,l=[];for(s=0,a=t.length;s<a;++s)l.push(ML(this.chart,t[s]));return e.filter&&(l=l.filter(((t,r,i)=>e.filter(t,r,i,n)))),e.itemSort&&(l=l.sort(((t,r)=>e.itemSort(t,r,n)))),kO(l,(t=>{const n=zL(e.callbacks,t);r.push(HL(n,"labelColor",this,t)),i.push(HL(n,"labelPointStyle",this,t)),o.push(HL(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=l,l}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let i,o=[];if(r.length){const e=OL[n.position].call(this,r,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const t=this._size=DL(this,n),s=Object.assign({},e,t),a=BL(this.chart,n,s),l=FL(n,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,i={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:i}=this,{caretSize:o,cornerRadius:s}=n,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:u}=sN(s),{x:d,y:h}=e,{width:f,height:p}=t;let g,m,y,v,b,w;return"center"===i?(b=h+p/2,"left"===r?(g=d,m=g-o,v=b+o,w=b-o):(g=d+f,m=g+o,v=b-o,w=b+o),y=g):(m="left"===r?d+Math.max(a,c)+o:"right"===r?d+f-Math.max(l,u)-o:this.caretX,"top"===i?(v=h,b=v-o,g=m-o,y=m+o):(v=h+p,b=v+o,g=m+o,y=m-o),w=v),{x1:g,x2:m,x3:y,y1:v,y2:b,y3:w}}drawTitle(e,t,n){const r=this.title,i=r.length;let o,s,a;if(i){const l=qN(n.rtl,this.x,this.width);for(e.x=jL(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",o=lN(n.titleFont),s=n.titleSpacing,t.fillStyle=n.titleColor,t.font=o.string,a=0;a<i;++a)t.fillText(r[a],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s,a+1===i&&(e.y+=n.titleMarginBottom-s)}}_drawColorBox(e,t,n,r,i){const o=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:a,boxWidth:l}=i,c=lN(i.bodyFont),u=jL(this,"left",i),d=r.x(u),h=a<c.lineHeight?(c.lineHeight-a)/2:0,f=t.y+h;if(i.usePointStyle){const t={radius:Math.min(l,a)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},n=r.leftForLtr(d,l)+l/2,c=f+a/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,HR(e,t,n,c),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,HR(e,t,n,c)}else{e.lineWidth=bO(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const t=r.leftForLtr(d,l),n=r.leftForLtr(r.xPlus(d,1),l-2),s=sN(o.borderRadius);Object.values(s).some((e=>0!==e))?(e.beginPath(),e.fillStyle=i.multiKeyBackground,ZR(e,{x:t,y:f,w:l,h:a,radius:s}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),ZR(e,{x:n,y:f+1,w:l-2,h:a-2,radius:s}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,f,l,a),e.strokeRect(t,f,l,a),e.fillStyle=o.backgroundColor,e.fillRect(n,f+1,l-2,a-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:i,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=n,u=lN(n.bodyFont);let d=u.lineHeight,h=0;const f=qN(n.rtl,this.x,this.width),p=function(n){t.fillText(n,f.x(e.x+h),e.y+d/2),e.y+=d+i},g=f.textAlign(o);let m,y,v,b,w,x,A;for(t.textAlign=o,t.textBaseline="middle",t.font=u.string,e.x=jL(this,g,n),t.fillStyle=n.bodyColor,kO(this.beforeBody,p),h=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,b=0,x=r.length;b<x;++b){for(m=r[b],y=this.labelTextColors[b],t.fillStyle=y,kO(m.before,p),v=m.lines,s&&v.length&&(this._drawColorBox(t,e,b,f,n),d=Math.max(u.lineHeight,a)),w=0,A=v.length;w<A;++w)p(v[w]),d=u.lineHeight;kO(m.after,p)}h=0,d=u.lineHeight,kO(this.afterBody,p),e.y-=i}drawFooter(e,t,n){const r=this.footer,i=r.length;let o,s;if(i){const a=qN(n.rtl,this.x,this.width);for(e.x=jL(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=a.textAlign(n.footerAlign),t.textBaseline="middle",o=lN(n.footerFont),t.fillStyle=n.footerColor,t.font=o.string,s=0;s<i;++s)t.fillText(r[s],a.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){const{xAlign:i,yAlign:o}=this,{x:s,y:a}=e,{width:l,height:c}=n,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=sN(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(s+u,a),"top"===o&&this.drawCaret(e,t,n,r),t.lineTo(s+l-d,a),t.quadraticCurveTo(s+l,a,s+l,a+d),"center"===o&&"right"===i&&this.drawCaret(e,t,n,r),t.lineTo(s+l,a+c-f),t.quadraticCurveTo(s+l,a+c,s+l-f,a+c),"bottom"===o&&this.drawCaret(e,t,n,r),t.lineTo(s+h,a+c),t.quadraticCurveTo(s,a+c,s,a+c-h),"center"===o&&"left"===i&&this.drawCaret(e,t,n,r),t.lineTo(s,a+u),t.quadraticCurveTo(s,a,s+u,a),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){const n=OL[e.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=DL(this,e),s=Object.assign({},n,this._size),a=BL(t,e,s),l=FL(e,s,a,t);r._to===l.x&&i._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=aN(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),KN(e,t.textDirection),i.y+=o.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),QN(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((e=>{let{datasetIndex:t,index:n}=e;const r=this.chart.getDatasetMeta(t);if(!r)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:r.data[n],index:n}})),i=!CO(n,r),o=this._positionChanged(r,t);(i||o)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],o=this._getActiveElements(e,i,t,n),s=this._positionChanged(o,e),a=t||!CO(o,i)||s;return a&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,n,r){const i=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const o=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:n,caretY:r,options:i}=this,o=OL[i.position].call(this,e,t);return!1!==o&&(n!==o.x||r!==o.y)}}var WL={id:"tooltip",_element:$L,positioners:OL,afterInit(e,t,n){n&&(e.tooltip=new $L({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:VL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function GL(e,t,n,r){const i=e.indexOf(t);if(-1===i)return((e,t,n,r)=>("string"===typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return i!==e.lastIndexOf(t)?n:i}function qL(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class KL extends vD{static id="category";static defaults=(()=>({ticks:{callback:qL}}))();constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(yO(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:aR(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:GL(n,e,AO(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let i=this.getLabels();i=0===e&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=e;o<=t;o++)r.push({value:o});return r}getLabelForValue(e){return qL.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!==typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function QL(e,t){const n=[],{bounds:r,step:i,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=e,h=i||1,f=c-1,{min:p,max:g}=t,m=!yO(o),y=!yO(s),v=!yO(l),b=(g-p)/(u+1);let w,x,A,E,S=XO((g-p)/f/h)*h;if(S<1e-14&&!m&&!y)return[{value:p},{value:g}];E=Math.ceil(g/S)-Math.floor(p/S),E>f&&(S=XO(E*S/f/h)*h),yO(a)||(w=Math.pow(10,a),S=Math.ceil(S*w)/w),"ticks"===r?(x=Math.floor(p/S)*S,A=Math.ceil(g/S)*S):(x=p,A=g),m&&y&&i&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((s-o)/i,S/1e3)?(E=Math.round(Math.min((s-o)/S,c)),S=(s-o)/E,x=o,A=s):v?(x=m?o:x,A=y?s:A,E=l-1,S=(A-x)/E):(E=(A-x)/S,E=QO(E,Math.round(E),S/1e3)?Math.round(E):Math.ceil(E));const k=Math.max(tR(S),tR(x));w=Math.pow(10,yO(a)?k:a),x=Math.round(x*w)/w,A=Math.round(A*w)/w;let C=0;for(m&&(d&&x!==o?(n.push({value:o}),x<o&&C++,QO(Math.round((x+C*S)*w)/w,o,XL(o,b,e))&&C++):x<o&&C++);C<E;++C){const e=Math.round((x+C*S)*w)/w;if(y&&e>s)break;n.push({value:e})}return y&&d&&A!==s?n.length&&QO(n[n.length-1].value,s,XL(s,b,e))?n[n.length-1].value=s:n.push({value:s}):y&&A!==s||n.push({value:A}),n}function XL(e,t,n){let{horizontal:r,minRotation:i}=n;const o=ZO(i),s=(r?Math.sin(o):Math.cos(o))||.001,a=.75*t*(""+e).length;return Math.min(t/s,a)}class JL extends vD{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return yO(e)||("number"===typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this;const o=e=>r=t?r:e,s=e=>i=n?i:e;if(e){const e=KO(r),t=KO(i);e<0&&t<0?s(0):e>0&&t>0&&o(0)}if(r===i){let t=0===i?1:Math.abs(.05*i);s(i+t),e||o(r-t)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=QL({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&YO(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return OR(e,this.chart.options.locale,this.options.ticks.format)}}class YL extends JL{static id="linear";static defaults=(()=>({ticks:{callback:NR.formatters.numeric}}))();determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=wO(e)?e:0,this.max=wO(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=ZO(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}NR.formatters.logarithmic;NR.formatters.numeric;const ZL={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},eB=Object.keys(ZL);function tB(e,t){return e-t}function nB(e,t){if(yO(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return"function"===typeof r&&r(s),wO(s)||("string"===typeof r?n.parse(s,r):n.parse(s)),null===s?null:(i&&("week"!==i||!JO(o)&&!0!==o?n.startOf(s,i):n.startOf(s,"isoWeek",o)),+s)}function rB(e,t,n,r){const i=eB.length;for(let o=eB.indexOf(e);o<i-1;++o){const e=ZL[eB[o]],i=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((n-t)/(i*e.size))<=r)return eB[o]}return eB[i-1]}function iB(e,t,n){if(n){if(n.length){const{lo:r,hi:i}=cR(n,t);e[n[r]>=t?n[r]:n[i]]=!0}}else e[t]=!0}function oB(e,t,n){const r=[],i={},o=t.length;let s,a;for(0;s<o;++s)t[s],i[a]=s,r.push({value:a,major:!1});return 0!==o&&n?function(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(o;a<=s;+i.add(a,1,r))n[a],l>=0&&(t[l].major=!0);return t}(e,r,i,n):r}class sB extends vD{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.time||(e.time={}),r=this._adapter=new SM(e.adapters.date);r.init(t),OO(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:nB(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:r,max:i,minDefined:o,maxDefined:s}=this.getUserBounds();function a(e){o||isNaN(e.min)||Math.min(r,e.min),s||isNaN(e.max)||Math.max(i,e.max)}o&&s||(a(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||a(this.getMinMax(!1))),wO(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),wO(i)&&!isNaN(i)?i:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(e[0],e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,o=function(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)0;for(;i>r&&e[i-1]>n;)0;return r>0||i<e.length?e.slice(r,i):e}(r,i,this.max);return this._unit=t.unit||(n.autoSkip?rB(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):function(e,t,n,r,i){for(let o=eB.length-1;o>=eB.indexOf(n);o--){const n=eB[o];if(ZL[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return eB[n?eB.indexOf(n):0]}(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(let t=eB.indexOf(e)+1,n=eB.length;t<n;++t)if(ZL[eB[t]].common)return eB[t]}(this._unit):void 0,this.initOffsets(r),e.reverse&&o.reverse(),oB(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((e=>+e.value)))}initOffsets(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=0,i=0;this.options.offset&&n.length&&(this.getDecimalForValue(n[0]),1===n.length?1-e:(this.getDecimalForValue(n[1])-e)/2,this.getDecimalForValue(n[n.length-1]),1===n.length?t:(t-this.getDecimalForValue(n[n.length-2]))/2);const o=n.length<3?.5:.25;aR(r,0,o),aR(i,0,o),this._offsets={start:r,end:i,factor:1/(r+1+i)}}_generate(){const e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,o=i.unit||rB(i.minUnit,t,n,this._getLabelCapacity(t)),s=AO(r.ticks.stepSize,1),a="week"===o&&i.isoWeekday,l=JO(a)||!0===a,c={};let u,d,h=t;if(l&&+e.startOf(h,"isoWeek",a),+e.startOf(h,l?"day":o),e.diff(n,t,o)>1e5*s)throw new Error(t+" and "+n+" are too far apart with stepSize of "+s+" "+o);const f="data"===r.ticks.source&&this.getDataTimestamps();for(0;u<n;+e.add(u,s,o),d++)iB(c,u,f);return u!==n&&"ticks"!==r.bounds&&1!==d||iB(c,u,f),Object.keys(c).sort(tB).map((e=>+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){const i=this.options,o=i.ticks.callback;if(o)return SO(o,[e,t,n],this);const s=i.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&s[a],u=l&&s[l],d=n[t],h=l&&u&&d&&d.major;return this._adapter.format(e,r||(h?u:c))}generateTickLabels(e){let t,n,r;for(e.length;t<n;++t)e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,n=this.ctx.measureText(e).width,r=ZO(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),o=Math.sin(r),s=this._resolveTickFontOptions(0).size;return{w:n*i+s*o,h:n*o+s*i}}_getLabelCapacity(e){const t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,i=this._tickFormatFunction(e,0,oB(this,[e],this._majorUnit),r),o=this._getLabelSize(i),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let e,t,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(r.length;e<t;++e)n.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const e=this._cache.labels||[];let t,n;if(e.length)return e;const r=this.getLabels();for(r.length;t<n;++t)e.push(nB(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return pR(e.sort(tB))}}const aB="label";function lB(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function cB(e,t){e.labels=t}function uB(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:aB;const r=[];e.datasets=t.map((t=>{const i=e.datasets.find((e=>e[n]===t[n]));return i&&t.data&&!r.includes(i)?(r.push(i),Object.assign(i,t),i):{...t}}))}function dB(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aB;const n={labels:[],datasets:[]};return cB(n,e.labels),uB(n,e.datasets,t),n}function hB(e,t){const{height:n=150,width:r=300,redraw:o=!1,datasetIdKey:s,type:a,data:l,options:c,plugins:u=[],fallbackContent:d,updateMode:h,...f}=e,p=(0,i.useRef)(null),g=(0,i.useRef)(),m=()=>{p.current&&(g.current=new QD(p.current,{type:a,data:dB(l,s),options:c&&{...c},plugins:u}),lB(t,g.current))},y=()=>{lB(t,null),g.current&&(g.current.destroy(),g.current=null)};return(0,i.useEffect)((()=>{!o&&g.current&&c&&function(e,t){const n=e.options;n&&t&&Object.assign(n,t)}(g.current,c)}),[o,c]),(0,i.useEffect)((()=>{!o&&g.current&&cB(g.current.config.data,l.labels)}),[o,l.labels]),(0,i.useEffect)((()=>{!o&&g.current&&l.datasets&&uB(g.current.config.data,l.datasets,s)}),[o,l.datasets]),(0,i.useEffect)((()=>{g.current&&(o?(y(),setTimeout(m)):g.current.update(h))}),[o,c,l.labels,l.datasets,h]),(0,i.useEffect)((()=>{g.current&&(y(),setTimeout(m))}),[a]),(0,i.useEffect)((()=>(m(),()=>y())),[]),i.createElement("canvas",Object.assign({ref:p,role:"img",height:n,width:r},f),d)}const fB=(0,i.forwardRef)(hB);function pB(e,t){return QD.register(t),(0,i.forwardRef)(((t,n)=>i.createElement(fB,Object.assign({},t,{ref:n,type:e}))))}const gB=pB("line",xM),mB=[{label:"24 Hours",value:1},{label:"30 Days",value:30},{label:"3 Months",value:90},{label:"1 Year",value:365}],yB=e=>{let{children:t,selected:n,onClick:r}=e;return(0,mt.jsx)(pa,{onClick:r,variant:"contained",style:{backgroundColor:n?"#EEBC1D":"transparent",color:n?"black":"#EEBC1D",border:"1px solid #EEBC1D",fontWeight:n?600:500,width:"22%",margin:5},children:t})};QD.register(KL,YL,aL,oL,IL,WL,TL,SL);const vB=xu((e=>({container:{width:"75%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginTop:25,padding:40,[e.breakpoints.down("md")]:{width:"100%",marginTop:0,padding:20,paddingTop:0}}}))),bB=e=>{let{coin:t}=e;const[n,r]=(0,i.useState)(),[o,s]=(0,i.useState)(1),[a,l]=(0,i.useState)(!1),[c,u]=(0,i.useState)(0),[d,h]=(0,i.useState)("#EEBC1D"),[f,p]=(0,i.useState)(""),{currency:g}=IC(),m=vB();(0,i.useEffect)((()=>{(async()=>{try{const{data:e}=await Hh.get(function(e){return`https://api.coingecko.com/api/v3/coins/${e}/market_chart?vs_currency=${arguments.length>2?arguments[2]:void 0}&days=${arguments.length>1&&void 0!==arguments[1]?arguments[1]:365}`}(t.id,o,g));l(!0),r(e.prices);const n=e.prices[0][1],i=(e.prices[e.prices.length-1][1]-n)/n*100;u(i.toFixed(2)),h(i>0?"green":"red")}catch(n){var e;n.response?console.error("API responded with an error:",n.response.data):n.request?console.error("API request was made but no response received:",n.request):console.error("Error setting up API request:",n.message),"Network Error"!==n.message&&429!==(null===(e=n.response)||void 0===e?void 0:e.status)||(l(!1),r(null),p("Free API limit is exceeded, come back in 30 seconds or wait for 30 seconds."))}})()}),[o,g]);const y=ct({palette:{primary:{main:"#fff"},mode:"dark"}});return(0,mt.jsx)(_u,{theme:y,children:(0,mt.jsx)("div",{className:m.container,children:!n&&!1===a&&f?(0,mt.jsx)(Sn,{variant:"h6",style:{color:"red",marginBottom:20,textAlign:"center"},children:f}):n&&!1!==a?(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)(Sn,{variant:"h5",style:{color:d,marginBottom:20},children:`Change: ${c}%`}),(0,mt.jsx)(gB,{data:{labels:n.map((e=>{let t=new Date(e[0]),n=t.getHours()>12?`${t.getHours()-12}:${t.getMinutes()} PM`:`${t.getHours()}:${t.getMinutes()} AM`;return 1===o?n:t.toLocaleDateString()})),datasets:[{data:n.map((e=>e[1])),label:`Price ( Past ${o} Days ) in ${g}`,borderColor:d,backgroundColor:e=>{const t=e.chart,{ctx:n,chartArea:r}=t;if(!r)return null;const i=n.createLinearGradient(0,r.top,0,r.bottom);return i.addColorStop(0,"green"===d?"rgba(0, 255, 0, 0.2)":"rgba(255, 0, 0, 0.2)"),i.addColorStop(1,"rgba(0, 0, 0, 0.3)"),i},fill:!0}]},options:{elements:{point:{radius:1}}}}),(0,mt.jsx)("div",{style:{display:"flex",marginTop:20,justifyContent:"space-around",width:"100%"},children:mB.map((e=>(0,mt.jsx)(yB,{onClick:()=>{s(e.value),l(!1)},selected:e.value===o,children:e.label},e.value)))})]}):(0,mt.jsx)(DI,{style:{color:"#CFB53B"},size:250,thickness:1})})})};function wB(e){return LT({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"},child:[]}]})(e)}const xB=xu((e=>({container:{display:"flex",padding:"20px",gap:"40px",[e.breakpoints.down("md")]:{flexDirection:"column",alignItems:"center",gap:"20px"}},sidebar:{width:"30%",backgroundColor:"#1a1a1d",borderRadius:"10px",padding:"20px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.2)",[e.breakpoints.down("md")]:{width:"100%"},display:"flex",flexDirection:"column",alignItems:"center",borderRight:"none",justifyContent:"center"},heading:{fontWeight:"bold",marginBottom:20,fontFamily:"Montserrat",color:"#f5f5f5"},description:{width:"100%",fontFamily:"Montserrat",padding:15,textAlign:"justify",color:"#b0b0b0"},marketData:{alignSelf:"start",padding:15,width:"100%",borderTop:"1px solid gray",[e.breakpoints.down("md")]:{display:"flex",justifyContent:"space-around",borderTop:"none"},[e.breakpoints.down("sm")]:{flexDirection:"column",alignItems:"center"}},marketDataItem:{display:"flex",justifyContent:"space-between",marginBottom:10,color:"#f5f5f5"},button:{"&:hover":{backgroundColor:"#CFB53B",color:"black"}},nsymbol:{color:"#CFB53B"},[e.breakpoints.down("sm")]:{flexDirection:"column",alignItems:"center"},[e.breakpoints.down("md")]:{display:"flex",flexDirection:"column",alignItems:"center"},[e.breakpoints.down("xs")]:{alignItems:"start"}}))),AB=()=>{const{id:e}=function(){let{matches:e}=i.useContext(J),t=e[e.length-1];return t?t.params:{}}(),[t,n]=(0,i.useState)(),[r,o]=(0,i.useState)(""),s=ne(),{currency:a,symbol:l,user:c,watchlist:u,setAlert:d}=IC();(0,i.useEffect)((()=>{(async()=>{try{const{data:t}=await Hh.get((e=>`https://api.coingecko.com/api/v3/coins/${e}`)(e));n(t),o("")}catch(t){console.error("Error fetching coin:",t);let e="An unknown error occurred.";e=t.response?`API Error: ${t.response.status} ${t.response.statusText}`:t.request?"Free API limit is exceeded, come back in 30 seconds or wait for 30 seconds.":`Error: ${t.message}`,o(e)}})()}),[a]);const h=u.includes(null===t||void 0===t?void 0:t.id),[f,p]=(0,i.useState)(!1),g=xB();return t||r?(0,mt.jsxs)("div",{className:g.container,children:[(0,mt.jsxs)("div",{className:g.sidebar,children:[(0,mt.jsx)(wB,{onClick:()=>s("/"),style:{position:"absolute",top:100,left:30,fontSize:"24px",color:"#CFB53B",cursor:"pointer",zIndex:10}}),r?(0,mt.jsx)(Sn,{style:{color:"red",textAlign:"center",marginTop:20},children:r}):(0,mt.jsxs)(mt.Fragment,{children:[(0,mt.jsx)("img",{src:null===t||void 0===t?void 0:t.image.large,alt:null===t||void 0===t?void 0:t.name,height:"200",style:{marginBottom:20}}),(0,mt.jsxs)(Sn,{variant:"h4",className:g.heading,children:[(0,mt.jsxs)("span",{className:g.nsymbol,children:[null===t||void 0===t?void 0:t.name," "]}),(0,mt.jsxs)("span",{style:{color:"gray"},children:["(",null===t||void 0===t?void 0:t.symbol.toUpperCase(),")"]})]}),(0,mt.jsxs)(Sn,{className:g.description,children:[wI(null===t||void 0===t?void 0:t.description.en.split(". ")[0]),"."]}),(0,mt.jsxs)("div",{className:g.marketData,children:[(0,mt.jsxs)(p_,{className:g.marketDataItem,children:[(0,mt.jsx)(Sn,{variant:"h5",className:g.heading,children:"Rank:"}),(0,mt.jsx)(Sn,{variant:"h5",className:g.nsymbol,children:null===t||void 0===t?void 0:t.market_cap_rank})]}),(0,mt.jsxs)(p_,{className:g.marketDataItem,children:[(0,mt.jsx)(Sn,{variant:"h5",className:g.heading,children:"Current Price:"}),(0,mt.jsxs)(Sn,{variant:"h5",className:g.nsymbol,children:[l," ",kT(null===t||void 0===t?void 0:t.market_data.current_price[a.toLowerCase()])]})]}),(0,mt.jsxs)(p_,{className:g.marketDataItem,children:[(0,mt.jsx)(Sn,{variant:"h5",className:g.heading,children:"Market Cap:"}),(0,mt.jsxs)(Sn,{variant:"h5",className:g.nsymbol,children:[l," ",kT(null===t||void 0===t?void 0:t.market_data.market_cap[a.toLowerCase()].toString().slice(0,-6)),"M"]})]}),(0,mt.jsxs)(p_,{className:g.marketDataItem,children:[(0,mt.jsx)(Sn,{variant:"h5",className:g.heading,children:"24h Change:"}),(0,mt.jsxs)(Sn,{variant:"h5",className:g.nsymbol,style:{color:(null===t||void 0===t?void 0:t.market_data.price_change_percentage_24h)>0?"green":"red"},children:[null===t||void 0===t?void 0:t.market_data.price_change_percentage_24h.toFixed(2),"%"]})]})]}),(0,mt.jsxs)("div",{style:{width:"100%",marginTop:20},children:[(0,mt.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:!c&&(0,mt.jsx)(pa,{className:g.button,variant:"outlined",style:{color:"#CFB53B",borderColor:"#CFB53B"},onClick:()=>p(!0),children:"Login / Sign Up for wallet and Token management"})}),c&&(0,mt.jsx)(pa,{variant:"outlined",style:{width:"100%",height:40,marginTop:20,backgroundColor:h?"#ed1806":"#CFB53B",color:h?"white":"black"},onClick:h?async()=>{const e=Lk(_C,"watchlist",c.uid);try{await xC(e,{coins:u.filter((e=>e!==(null===t||void 0===t?void 0:t.id)))},{merge:!0}),d({open:!0,message:`${t.name} removed from watchlist!`,severity:"success"})}catch(n){console.error("Error removing from watchlist:",n),d({open:!0,message:"Error removing from watchlist!",severity:"error"})}}:async()=>{const e=Lk(_C,"watchlist",c.uid);try{await xC(e,{coins:u?[...u,t.id]:[t.id]}),d({open:!0,message:`${t.name} added to watchlist!`,severity:"success"})}catch(n){console.error("Error adding to watchlist:",n),d({open:!0,message:"Error adding to watchlist!",severity:"error"})}},children:h?"Remove from Watchlist":"Add to Watchlist"}),c&&(0,mt.jsx)(pa,{variant:"contained",color:"secondary",onClick:()=>s("/tokens"),style:{marginTop:25,marginBottom:8,width:"100%",height:40,marginTop:20},children:"Manage Tokens"})]})]})]}),(0,mt.jsx)(bB,{coin:t}),(0,mt.jsx)(Q_,{triggerOpen:f,handleClose:()=>p(!1)})]}):(0,mt.jsx)(gI,{style:{backgroundColor:"#CFB53B"}})},EB="6.13.2";function SB(e,t,n){const r=t.split("|").map((e=>e.trim()));for(let o=0;o<r.length;o++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${n}`,i.value=e,i}async function kB(e){const t=Object.keys(e),n=await Promise.all(t.map((t=>Promise.resolve(e[t]))));return n.reduce(((e,n,r)=>(e[t[r]]=n,e)),{})}function CB(e,t,n){for(let r in t){let i=t[r];const o=n?n[r]:null;o&&SB(i,o,r),Object.defineProperty(e,r,{enumerable:!0,value:i,writable:!1})}}function _B(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(_B).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let n="0x";for(let r=0;r<e.length;r++)n+=t[e[r]>>4],n+=t[15&e[r]];return n}if("object"===typeof e&&"function"===typeof e.toJSON)return _B(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${_B(t)}: ${_B(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function TB(e,t){return e&&e.code===t}function PB(e){return TB(e,"CALL_EXCEPTION")}function IB(e,t,n){let r,i=e;{const r=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${_B(n)}`);for(const e in n){if("shortMessage"===e)continue;const t=n[e];r.push(e+"="+_B(t))}}r.push(`code=${t}`),r.push(`version=${EB}`),r.length&&(e+=" ("+r.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":r=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":r=new RangeError(e);break;default:r=new Error(e)}return CB(r,{code:t}),n&&Object.assign(r,n),null==r.shortMessage&&CB(r,{shortMessage:i}),r}function OB(e,t,n,r){if(!e)throw IB(t,n,r)}function RB(e,t,n,r){OB(e,t,"INVALID_ARGUMENT",{argument:n,value:r})}function NB(e,t,n){null==n&&(n=""),n&&(n=": "+n),OB(e>=t,"missing arguemnt"+n,"MISSING_ARGUMENT",{count:e,expectedCount:t}),OB(e<=t,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const MB=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(n){}return e}),[]);function DB(e,t,n){if(null==n&&(n=""),e!==t){let e=n,t="new";n&&(e+=".",t+=" "+n),OB(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}function LB(e,t,n){if(e instanceof Uint8Array)return n?new Uint8Array(e):e;if("string"===typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let n=2;for(let r=0;r<t.length;r++)t[r]=parseInt(e.substring(n,n+2),16),n+=2;return t}RB(!1,"invalid BytesLike value",t||"value",e)}function BB(e,t){return LB(e,t,!1)}function FB(e,t){return LB(e,t,!0)}function jB(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(("number"!==typeof t||e.length===2+2*t)&&(!0!==t||e.length%2===0))}function UB(e){return jB(e,!0)||e instanceof Uint8Array}const zB="0123456789abcdef";function VB(e){const t=BB(e);let n="0x";for(let r=0;r<t.length;r++){const e=t[r];n+=zB[(240&e)>>4]+zB[15&e]}return n}function HB(e){return"0x"+e.map((e=>VB(e).substring(2))).join("")}function $B(e){return jB(e,!0)?(e.length-2)/2:BB(e).length}function WB(e,t,n){const r=BB(e);return null!=n&&n>r.length&&OB(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),VB(r.slice(null==t?0:t,null==n?r.length:n))}function GB(e,t,n){const r=BB(e);OB(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),n?i.set(r,t-r.length):i.set(r,0),VB(i)}function qB(e,t){return GB(e,t,!0)}const KB=BigInt(0),QB=BigInt(1),XB=9007199254740991;function JB(e,t){const n=tF(e,"value"),r=BigInt(iF(t,"width"));if(OB(n>>r===KB,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),n>>r-QB){return-((~n&(QB<<r)-QB)+QB)}return n}function YB(e,t){let n=eF(e,"value");const r=BigInt(iF(t,"width")),i=QB<<r-QB;if(n<KB){n=-n,OB(n<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e});return(~n&(QB<<r)-QB)+QB}return OB(n<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),n}function ZB(e,t){const n=tF(e,"value"),r=BigInt(iF(t,"bits"));return n&(QB<<r)-QB}function eF(e,t){switch(typeof e){case"bigint":return e;case"number":return RB(Number.isInteger(e),"underflow",t||"value",e),RB(e>=-XB&&e<=XB,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(gK){RB(!1,`invalid BigNumberish string: ${gK.message}`,t||"value",e)}}RB(!1,"invalid BigNumberish value",t||"value",e)}function tF(e,t){const n=eF(e,t);return OB(n>=KB,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),n}const nF="0123456789abcdef";function rF(e){if(e instanceof Uint8Array){let t="0x0";for(const n of e)t+=nF[n>>4],t+=nF[15&n];return BigInt(t)}return eF(e)}function iF(e,t){switch(typeof e){case"bigint":return RB(e>=-XB&&e<=XB,"overflow",t||"value",e),Number(e);case"number":return RB(Number.isInteger(e),"underflow",t||"value",e),RB(e>=-XB&&e<=XB,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return iF(BigInt(e),t)}catch(gK){RB(!1,`invalid numeric string: ${gK.message}`,t||"value",e)}}RB(!1,"invalid numeric value",t||"value",e)}function oF(e,t){let n=tF(e,"value").toString(16);if(null==t)n.length%2&&(n="0"+n);else{const r=iF(t,"width");for(OB(2*r>=n.length,`value exceeds width (${r} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});n.length<2*r;)n="0"+n}return"0x"+n}function sF(e){const t=tF(e,"value");if(t===KB)return new Uint8Array([]);let n=t.toString(16);n.length%2&&(n="0"+n);const r=new Uint8Array(n.length/2);for(let i=0;i<r.length;i++){const e=2*i;r[i]=parseInt(n.substring(e,e+2),16)}return r}function aF(e){let t=VB(UB(e)?e:sF(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}const lF=32,cF=new Uint8Array(lF),uF=["then"],dF={},hF=new WeakMap;function fF(e){return hF.get(e)}function pF(e,t){hF.set(e,t)}function gF(e,t){const n=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw n.error=t,n}function mF(e,t,n){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof yF?mF(fF(e),e,n):e)):e.reduce(((e,r,i)=>{let o=t.getValue(r);return r in e||(n&&o instanceof yF&&(o=mF(fF(o),o,n)),e[r]=o),e}),{})}class yF extends Array{#e;constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0];let i=t[1],o=(t[2]||[]).slice(),s=!0;r!==dF&&(i=t,o=[],s=!1),super(i.length),i.forEach(((e,t)=>{this[t]=e}));const a=o.reduce(((e,t)=>("string"===typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(pF(this,Object.freeze(i.map(((e,t)=>{const n=o[t];return null!=n&&1===a.get(n)?n:null})))),this.#e=[],null==this.#e&&this.#e,!s)return;Object.freeze(this);const l=new Proxy(this,{get:(e,t,n)=>{if("string"===typeof t){if(t.match(/^[0-9]+$/)){const n=iF(t,"%index");if(n<0||n>=this.length)throw new RangeError("out of result range");const r=e[n];return r instanceof Error&&gF(`index ${n}`,r),r}if(uF.indexOf(t)>=0)return Reflect.get(e,t,n);const r=e[t];if(r instanceof Function)return function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return r.apply(this===n?e:this,i)};if(!(t in e))return e.getValue.apply(this===n?e:this,[t])}return Reflect.get(e,t,n)}});return pF(l,fF(this)),l}toArray(e){const t=[];return this.forEach(((n,r)=>{n instanceof Error&&gF(`index ${r}`,n),e&&n instanceof yF&&(n=n.toArray(e)),t.push(n)})),t}toObject(e){const t=fF(this);return t.reduce(((n,r,i)=>(OB(null!=r,`value at index ${i} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),mF(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const n=fF(this),r=[],i=[];for(let o=e;o<t;o++)r.push(this[o]),i.push(n[o]);return new yF(dF,r,i)}filter(e,t){const n=fF(this),r=[],i=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&gF(`index ${o}`,s),e.call(t,s,o,this)&&(r.push(s),i.push(n[o]))}return new yF(dF,r,i)}map(e,t){const n=[];for(let r=0;r<this.length;r++){const i=this[r];i instanceof Error&&gF(`index ${r}`,i),n.push(e.call(t,i,r,this))}return n}getValue(e){const t=fF(this).indexOf(e);if(-1===t)return;const n=this[t];return n instanceof Error&&gF(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,t){return new yF(dF,e,t)}}function vF(e){let t=sF(e);return OB(t.length<=lF,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:lF,offset:t.length}),t.length!==lF&&(t=FB(HB([cF.slice(t.length%lF),t]))),t}class bF{name;type;localName;dynamic;constructor(e,t,n,r){CB(this,{name:e,type:t,localName:n,dynamic:r},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){RB(!1,e,this.localName,t)}}class wF{#t;#n;constructor(){this.#t=[],this.#n=0}get data(){return HB(this.#t)}get length(){return this.#n}#r(e){return this.#t.push(e),this.#n+=e.length,e.length}appendWriter(e){return this.#r(FB(e.data))}writeBytes(e){let t=FB(e);const n=t.length%lF;return n&&(t=FB(HB([t,cF.slice(n)]))),this.#r(t)}writeValue(e){return this.#r(vF(e))}writeUpdatableValue(){const e=this.#t.length;return this.#t.push(cF),this.#n+=lF,t=>{this.#t[e]=vF(t)}}}class xF{allowLoose;#t;#i;#o;#s;#a;constructor(e,t,n){CB(this,{allowLoose:!!t}),this.#t=FB(e),this.#o=0,this.#s=null,this.#a=null!=n?n:1024,this.#i=0}get data(){return VB(this.#t)}get dataLength(){return this.#t.length}get consumed(){return this.#i}get bytes(){return new Uint8Array(this.#t)}#l(e){if(this.#s)return this.#s.#l(e);this.#o+=e,OB(this.#a<1||this.#o<=this.#a*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#a} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:FB(this.#t),offset:this.#i,length:e,info:{bytesRead:this.#o,dataLength:this.dataLength}})}#c(e,t,n){let r=Math.ceil(t/lF)*lF;return this.#i+r>this.#t.length&&(this.allowLoose&&n&&this.#i+t<=this.#t.length?r=t:OB(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:FB(this.#t),length:this.#t.length,offset:this.#i+r})),this.#t.slice(this.#i,this.#i+r)}subReader(e){const t=new xF(this.#t.slice(this.#i+e),this.allowLoose,this.#a);return t.#s=this,t}readBytes(e,t){let n=this.#c(0,e,!!t);return this.#l(e),this.#i+=n.length,n.slice(0,e)}readValue(){return rF(this.readBytes(lF))}readIndex(){return iF(rF(this.readBytes(lF)))}}function AF(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function EF(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(n.length>0&&!n.includes(e.length))throw new Error(`Expected Uint8Array of length ${n}, not of length=${e.length}`)}function SF(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");AF(e.outputLen),AF(e.blockLen)}function kF(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function CF(e,t){EF(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const _F=BigInt(2**32-1),TF=BigInt(32);function PF(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&_F),l:Number(e>>TF&_F)}:{h:0|Number(e>>TF&_F),l:0|Number(e&_F)}}function IF(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=PF(e[i],t);[n[i],r[i]]=[o,s]}return[n,r]}const OF=(e,t,n)=>e<<n|t>>>32-n,RF=(e,t,n)=>t<<n|e>>>32-n,NF=(e,t,n)=>t<<n-32|e>>>64-n,MF=(e,t,n)=>e<<n-32|t>>>64-n;const DF={fromBig:PF,split:IF,toBig:(e,t)=>BigInt(e>>>0)<<TF|BigInt(t>>>0),shrSH:(e,t,n)=>e>>>n,shrSL:(e,t,n)=>e<<32-n|t>>>n,rotrSH:(e,t,n)=>e>>>n|t<<32-n,rotrSL:(e,t,n)=>e<<32-n|t>>>n,rotrBH:(e,t,n)=>e<<64-n|t>>>n-32,rotrBL:(e,t,n)=>e>>>n-32|t<<64-n,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:OF,rotlSL:RF,rotlBH:NF,rotlBL:MF,add:function(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}},add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,add5H:(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,add5L:(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)},LF="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,BF=e=>e instanceof Uint8Array,FF=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),jF=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function UF(e){if("string"===typeof e&&(e=function(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!BF(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class zF{clone(){return this._cloneInto()}}function VF(e){const t=t=>e().update(UF(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function HF(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(LF&&"function"===typeof LF.getRandomValues)return LF.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const[$F,WF,GF]=[[],[],[]],qF=BigInt(0),KF=BigInt(1),QF=BigInt(2),XF=BigInt(7),JF=BigInt(256),YF=BigInt(113);for(let n=0,mK=KF,yK=1,vK=0;n<24;n++){[yK,vK]=[vK,(2*yK+3*vK)%5],$F.push(2*(5*vK+yK)),WF.push((n+1)*(n+2)/2%64);let e=qF;for(let t=0;t<7;t++)mK=(mK<<KF^(mK>>XF)*YF)%JF,mK&QF&&(e^=KF<<(KF<<BigInt(t))-KF);GF.push(e)}const[ZF,ej]=IF(GF,!0),tj=(e,t,n)=>n>32?NF(e,t,n):OF(e,t,n),nj=(e,t,n)=>n>32?MF(e,t,n):RF(e,t,n);class rj extends zF{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,AF(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,o=n[i],s=n[i+1],a=tj(o,s,1)^n[t],l=nj(o,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=l}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=WF[n],o=tj(t,i,r),s=nj(t,i,r),a=$F[n];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=ZF[r],e[1]^=ej[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){kF(this);const{blockLen:t,state:n}=this,r=(e=UF(e)).length;for(let i=0;i<r;){const o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){kF(this,!1),EF(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return AF(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(CF(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new rj(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}const ij=(e,t,n)=>VF((()=>new rj(t,e,n))),oj=ij(1,136,32);let sj=!1;const aj=function(e){return oj(e)};let lj=aj;function cj(e){const t=BB(e,"data");return VB(lj(t))}cj._=aj,cj.lock=function(){sj=!0},cj.register=function(e){if(sj)throw new TypeError("keccak256 is locked");lj=e},Object.freeze(cj);const uj=BigInt(0),dj=BigInt(36);function hj(e){const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=t[i].charCodeAt(0);const r=BB(cj(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(15&r[i>>1])>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const fj={};for(let n=0;n<10;n++)fj[String(n)]=String(n);for(let n=0;n<26;n++)fj[String.fromCharCode(65+n)]=String(10+n);const pj=15;function gj(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>fj[e])).join("");for(;t.length>=pj;){let e=t.substring(0,pj);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}const mj=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function yj(e){if(RB("string"===typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=hj(e);return RB(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){RB(e.substring(2,4)===gj(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=uj;for(let n=0;n<e.length;n++)t=t*dj+mj[e[n]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return hj("0x"+t)}RB(!1,"invalid address","address",e)}const vj={};function bj(e,t){let n=!1;return t<0&&(n=!0,t*=-1),new Aj(vj,`${n?"":"u"}int${t}`,e,{signed:n,width:t})}function wj(e,t){return new Aj(vj,`bytes${t||""}`,e,{size:t})}const xj=Symbol.for("_ethers_typed");class Aj{type;value;#u;_typedSymbol;constructor(e,t,n,r){null==r&&(r=null),DB(vj,e,"Typed"),CB(this,{_typedSymbol:xj,type:t,value:n}),this.#u=r,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#u}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#u?-1:!1===this.#u?this.value.length:null}static from(e,t){return new Aj(vj,e,t)}static uint8(e){return bj(e,8)}static uint16(e){return bj(e,16)}static uint24(e){return bj(e,24)}static uint32(e){return bj(e,32)}static uint40(e){return bj(e,40)}static uint48(e){return bj(e,48)}static uint56(e){return bj(e,56)}static uint64(e){return bj(e,64)}static uint72(e){return bj(e,72)}static uint80(e){return bj(e,80)}static uint88(e){return bj(e,88)}static uint96(e){return bj(e,96)}static uint104(e){return bj(e,104)}static uint112(e){return bj(e,112)}static uint120(e){return bj(e,120)}static uint128(e){return bj(e,128)}static uint136(e){return bj(e,136)}static uint144(e){return bj(e,144)}static uint152(e){return bj(e,152)}static uint160(e){return bj(e,160)}static uint168(e){return bj(e,168)}static uint176(e){return bj(e,176)}static uint184(e){return bj(e,184)}static uint192(e){return bj(e,192)}static uint200(e){return bj(e,200)}static uint208(e){return bj(e,208)}static uint216(e){return bj(e,216)}static uint224(e){return bj(e,224)}static uint232(e){return bj(e,232)}static uint240(e){return bj(e,240)}static uint248(e){return bj(e,248)}static uint256(e){return bj(e,256)}static uint(e){return bj(e,256)}static int8(e){return bj(e,-8)}static int16(e){return bj(e,-16)}static int24(e){return bj(e,-24)}static int32(e){return bj(e,-32)}static int40(e){return bj(e,-40)}static int48(e){return bj(e,-48)}static int56(e){return bj(e,-56)}static int64(e){return bj(e,-64)}static int72(e){return bj(e,-72)}static int80(e){return bj(e,-80)}static int88(e){return bj(e,-88)}static int96(e){return bj(e,-96)}static int104(e){return bj(e,-104)}static int112(e){return bj(e,-112)}static int120(e){return bj(e,-120)}static int128(e){return bj(e,-128)}static int136(e){return bj(e,-136)}static int144(e){return bj(e,-144)}static int152(e){return bj(e,-152)}static int160(e){return bj(e,-160)}static int168(e){return bj(e,-168)}static int176(e){return bj(e,-176)}static int184(e){return bj(e,-184)}static int192(e){return bj(e,-192)}static int200(e){return bj(e,-200)}static int208(e){return bj(e,-208)}static int216(e){return bj(e,-216)}static int224(e){return bj(e,-224)}static int232(e){return bj(e,-232)}static int240(e){return bj(e,-240)}static int248(e){return bj(e,-248)}static int256(e){return bj(e,-256)}static int(e){return bj(e,-256)}static bytes1(e){return wj(e,1)}static bytes2(e){return wj(e,2)}static bytes3(e){return wj(e,3)}static bytes4(e){return wj(e,4)}static bytes5(e){return wj(e,5)}static bytes6(e){return wj(e,6)}static bytes7(e){return wj(e,7)}static bytes8(e){return wj(e,8)}static bytes9(e){return wj(e,9)}static bytes10(e){return wj(e,10)}static bytes11(e){return wj(e,11)}static bytes12(e){return wj(e,12)}static bytes13(e){return wj(e,13)}static bytes14(e){return wj(e,14)}static bytes15(e){return wj(e,15)}static bytes16(e){return wj(e,16)}static bytes17(e){return wj(e,17)}static bytes18(e){return wj(e,18)}static bytes19(e){return wj(e,19)}static bytes20(e){return wj(e,20)}static bytes21(e){return wj(e,21)}static bytes22(e){return wj(e,22)}static bytes23(e){return wj(e,23)}static bytes24(e){return wj(e,24)}static bytes25(e){return wj(e,25)}static bytes26(e){return wj(e,26)}static bytes27(e){return wj(e,27)}static bytes28(e){return wj(e,28)}static bytes29(e){return wj(e,29)}static bytes30(e){return wj(e,30)}static bytes31(e){return wj(e,31)}static bytes32(e){return wj(e,32)}static address(e){return new Aj(vj,"address",e)}static bool(e){return new Aj(vj,"bool",!!e)}static bytes(e){return new Aj(vj,"bytes",e)}static string(e){return new Aj(vj,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Aj(vj,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"===typeof e&&"_typedSymbol"in e&&e._typedSymbol===xj}static dereference(e,t){if(Aj.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class Ej extends bF{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=Aj.dereference(t,"string");try{n=yj(n)}catch(r){return this._throwError(r.message,t)}return e.writeValue(n)}decode(e){return yj(oF(e.readValue(),20))}}class Sj extends bF{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function kj(e,t,n){let r=[];if(Array.isArray(n))r=n;else if(n&&"object"===typeof n){let e={};r=t.map((t=>{const r=t.localName;return OB(r,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:n}),OB(!e[r],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:n}),e[r]=!0,n[r]}))}else RB(!1,"invalid tuple value","tuple",n);RB(t.length===r.length,"types/value length mismatch","tuple",n);let i=new wF,o=new wF,s=[];t.forEach(((e,t)=>{let n=r[t];if(e.dynamic){let t=o.length;e.encode(o,n);let r=i.writeUpdatableValue();s.push((e=>{r(e+t)}))}else e.encode(i,n)})),s.forEach((e=>{e(i.length)}));let a=e.appendWriter(i);return a+=e.appendWriter(o),a}function Cj(e,t){let n=[],r=[],i=e.subReader(0);return t.forEach((t=>{let o=null;if(t.dynamic){let n=e.readIndex(),r=i.subReader(n);try{o=t.decode(r)}catch(s){if(TB(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(s){if(TB(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=t.name,o.name=t.localName,o.type=t.type}if(void 0==o)throw new Error("investigate");n.push(o),r.push(t.localName||null)})),yF.fromItems(n,r)}class _j extends bF{coder;length;constructor(e,t,n){super("array",e.type+"["+(t>=0?t:"")+"]",n,-1===t||e.dynamic),CB(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;n<this.length;n++)t.push(e);return t}encode(e,t){const n=Aj.dereference(t,"array");Array.isArray(n)||this._throwError("expected array value",n);let r=this.length;-1===r&&(r=n.length,e.writeValue(n.length)),NB(n.length,r,"coder array"+(this.localName?" "+this.localName:""));let i=[];for(let o=0;o<n.length;o++)i.push(this.coder);return kj(e,i,n)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),OB(t*lF<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*lF,length:e.dataLength}));let n=[];for(let r=0;r<t;r++)n.push(new Sj(this.coder));return Cj(e,n)}}class Tj extends bF{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const n=Aj.dereference(t,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class Pj extends bF{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=FB(t);let n=e.writeValue(t.length);return n+=e.writeBytes(t),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class Ij extends Pj{constructor(e){super("bytes",e)}decode(e){return VB(super.decode(e))}}class Oj extends bF{size;constructor(e,t){let n="bytes"+String(e);super(n,n,t,!1),CB(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let n=FB(Aj.dereference(t,this.type));return n.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(n)}decode(e){return VB(e.readBytes(this.size))}}const Rj=new Uint8Array([]);class Nj extends bF{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(Rj)}decode(e){return e.readBytes(0),null}}const Mj=BigInt(0),Dj=BigInt(1),Lj=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Bj extends bF{size;signed;constructor(e,t,n){const r=(t?"int":"uint")+8*e;super(r,r,n,!1),CB(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let n=eF(Aj.dereference(t,this.type)),r=ZB(Lj,256);if(this.signed){let e=ZB(r,8*this.size-1);(n>e||n<-(e+Dj))&&this._throwError("value out-of-bounds",t),n=YB(n,256)}else(n<Mj||n>ZB(r,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(n)}decode(e){let t=ZB(e.readValue(),8*this.size);return this.signed&&(t=JB(t,8*this.size)),t}}function Fj(e,t,n,r,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let r=t+1;r<n.length&&n[r]>>6===2;r++)e++;return e}return"OVERRUN"===e?n.length-t-1:0}const jj=Object.freeze({error:function(e,t,n,r,i){RB(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:Fj,replace:function(e,t,n,r,i){return"OVERLONG"===e?(RB("number"===typeof i,"invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),Fj(e,t,n))}});function Uj(e,t){null==t&&(t=jj.error);const n=BB(e,"bytes"),r=[];let i=0;for(;i<n.length;){const e=n[i++];if(e>>7===0){r.push(e);continue}let o=null,s=null;if(192===(224&e))o=1,s=127;else if(224===(240&e))o=2,s=2047;else{if(240!==(248&e)){i+=t(128===(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",i-1,n,r);continue}o=3,s=65535}if(i-1+o>=n.length){i+=t("OVERRUN",i-1,n,r);continue}let a=e&(1<<8-o-1)-1;for(let l=0;l<o;l++){let e=n[i];if(128!=(192&e)){i+=t("MISSING_CONTINUE",i,n,r),a=null;break}a=a<<6|63&e,i++}null!==a&&(a>1114111?i+=t("OUT_OF_RANGE",i-1-o,n,r,a):a>=55296&&a<=57343?i+=t("UTF16_SURROGATE",i-1-o,n,r,a):a<=s?i+=t("OVERLONG",i-1-o,n,r,a):r.push(a))}return r}function zj(e,t){RB("string"===typeof e,"invalid string value","str",e),null!=t&&(!function(e){OB(MB.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}(t),e=e.normalize(t));let n=[];for(let r=0;r<e.length;r++){const t=e.charCodeAt(r);if(t<128)n.push(t);else if(t<2048)n.push(t>>6|192),n.push(63&t|128);else if(55296==(64512&t)){r++;const i=e.charCodeAt(r);RB(r<e.length&&56320===(64512&i),"invalid surrogate pair","str",e);const o=65536+((1023&t)<<10)+(1023&i);n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(63&o|128)}else n.push(t>>12|224),n.push(t>>6&63|128),n.push(63&t|128)}return new Uint8Array(n)}function Vj(e,t){return Uj(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}class Hj extends Pj{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,zj(Aj.dereference(t,"string")))}decode(e){return Vj(super.decode(e))}}class $j extends bF{coders;constructor(e,t){let n=!1;const r=[];e.forEach((e=>{e.dynamic&&(n=!0),r.push(e.type)}));super("tuple","tuple("+r.join(",")+")",t,n),CB(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e}),{});return this.coders.forEach(((n,r)=>{let i=n.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[r]))})),Object.freeze(e)}encode(e,t){const n=Aj.dereference(t,"tuple");return kj(e,this.coders,n)}decode(e){return Cj(e,this.coders)}}function Wj(e){return cj(zj(e))}function Gj(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const qj=Gj("external public payable override".split(" ")),Kj="constant external internal payable private public pure view override",Qj=Gj(Kj.split(" ")),Xj="constructor error event fallback function receive struct",Jj=Gj(Xj.split(" ")),Yj="calldata memory storage payable indexed",Zj=Gj(Yj.split(" ")),eU=Gj([Xj,Yj,"tuple returns",Kj].join(" ").split(" ")),tU={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},nU=new RegExp("^(\\s*)"),rU=new RegExp("^([0-9]+)"),iU=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),oU=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),sU=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class aU{#i;#d;get offset(){return this.#i}get length(){return this.#d.length-this.#i}constructor(e){this.#i=0,this.#d=e.slice()}clone(){return new aU(this.#d)}reset(){this.#i=0}#h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new aU(this.#d.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#h(this.#i+1,e.match+1);return this.#i=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#i<e.match-1;){const e=this.peek().linkNext;t.push(this.#h(this.#i+1,e)),this.#i=e}return this.#i=e.match+1,t}peek(){if(this.#i>=this.#d.length)throw new Error("out-of-bounds");return this.#d[this.#i]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#i++,e}toString(){const e=[];for(let t=this.#i;t<this.#d.length;t++){const n=this.#d[t];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}}function lU(e){const t=[],n=t=>{const n=o<e.length?JSON.stringify(e[o]):"$EOI";throw new Error(`invalid token ${n} at ${o}: ${t}`)};let r=[],i=[],o=0;for(;o<e.length;){let s=e.substring(o),a=s.match(nU);a&&(o+=a[1].length,s=e.substring(o));const l={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:o,value:-1};t.push(l);let c=tU[s[0]]||"";if(c){if(l.type=c,l.text=s[0],o++,"OPEN_PAREN"===c)r.push(t.length-1),i.push(t.length-1);else if("CLOSE_PAREN"==c)0===r.length&&n("no matching open bracket"),l.match=r.pop(),t[l.match].match=t.length-1,l.depth--,l.linkBack=i.pop(),t[l.linkBack].linkNext=t.length-1;else if("COMMA"===c)l.linkBack=i.pop(),t[l.linkBack].linkNext=t.length-1,i.push(t.length-1);else if("OPEN_BRACKET"===c)l.type="BRACKET";else if("CLOSE_BRACKET"===c){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const n=t.pop().text;e=n+e,t[t.length-1].value=iF(n)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(a=s.match(iU),a){if(l.text=a[1],o+=l.text.length,eU.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(sU)){l.type="TYPE";continue}l.type="ID"}else{if(a=s.match(rU),!a)throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${o}`);l.text=a[1],l.type="NUMBER",o+=l.text.length}}return new aU(t.map((e=>Object.freeze(e))))}function cU(e,t){let n=[];for(const r in t.keys())e.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function uU(e,t){if(t.peekKeyword(Jj)){const n=t.pop().text;if(n!==e)throw new Error(`expected ${e}, got ${n}`)}return t.popType("ID")}function dU(e,t){const n=new Set;for(;;){const r=e.peekType("KEYWORD");if(null==r||t&&!t.has(r))break;if(e.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function hU(e){let t=dU(e,Qj);return cU(t,Gj("constant payable nonpayable".split(" "))),cU(t,Gj("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function fU(e,t){return e.popParams().map((e=>_U.from(e,t)))}function pU(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return eF(e.pop().text);throw new Error("invalid gas")}return null}function gU(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const mU=new RegExp(/^(.*)\[([0-9]*)\]$/);function yU(e){const t=e.match(sU);if(RB(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const n=parseInt(t[2]);RB(0!==n&&n<=32,"invalid bytes length","type",e)}else if(t[3]){const n=parseInt(t[3]);RB(0!==n&&n<=256&&n%8===0,"invalid numeric width","type",e)}return e}const vU={},bU=Symbol.for("_ethers_internal"),wU="_ParamTypeInternal",xU="_ErrorInternal",AU="_EventInternal",EU="_ConstructorInternal",SU="_FallbackInternal",kU="_FunctionInternal",CU="_StructInternal";class _U{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,n,r,i,o,s,a){if(DB(e,vU,"ParamType"),Object.defineProperty(this,bU,{value:wU}),o&&(o=Object.freeze(o.slice())),"array"===r){if(null==s||null==a)throw new Error("")}else if(null!=s||null!=a)throw new Error("");if("tuple"===r){if(null==o)throw new Error("")}else if(null!=o)throw new Error("");CB(this,{name:t,type:n,baseType:r,indexed:i,components:o,arrayLength:s,arrayChildren:a})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const n={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"===typeof this.indexed&&(n.indexed=this.indexed),this.isTuple()&&(n.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(n)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map((e=>n.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map(((e,r)=>n.components[r].walk(e,t)))}return t(this.type,e)}#f(e,t,n,r){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=t.slice();return o.forEach(((t,r)=>{i.#f(e,t,n,(e=>{o[r]=e}))})),void r(o)}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(null==t||"object"!==typeof t)throw new Error("invalid tuple value");o=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(o.length!==this.components.length)throw new Error("array is wrong length");return o.forEach(((t,r)=>{i[r].#f(e,t,n,(e=>{o[r]=e}))})),void r(o)}const i=n(this.type,t);i.then?e.push(async function(){r(await i)}()):r(i)}async walkAsync(e,t){const n=[],r=[e];return this.#f(n,e,t,(e=>{r[0]=e})),n.length&&await Promise.all(n),r[0]}static from(e,t){if(_U.isParamType(e))return e;if("string"===typeof e)try{return _U.from(lU(e),t)}catch(s){RB(!1,"invalid param type","obj",e)}else if(e instanceof aU){let n="",r="",i=null;dU(e,Gj(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(r="tuple",i=e.popParams().map((e=>_U.from(e))),n=`tuple(${i.map((e=>e.format())).join(",")})`):(n=yU(e.popType("TYPE")),r=n);let o=null,s=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();o=new _U(vU,"",n,r,null,i,s,o),s=t.value,n+=t.text,r="array",i=null}let a=null;if(dU(e,Zj).has("indexed")){if(!t)throw new Error("");a=!0}const l=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new _U(vU,l,n,r,a,i,s,o)}const n=e.name;RB(!n||"string"===typeof n&&n.match(oU),"invalid name","obj.name",n);let r=e.indexed;null!=r&&(RB(t,"parameter cannot be indexed","obj.indexed",e.indexed),r=!!r);let i=e.type,o=i.match(mU);if(o){const t=parseInt(o[2]||"-1"),s=_U.from({type:o[1],components:e.components});return new _U(vU,n||"",i,"array",r,null,t,s)}if("tuple"===i||i.startsWith("tuple(")||i.startsWith("(")){const t=null!=e.components?e.components.map((e=>_U.from(e))):null;return new _U(vU,n||"",i,"tuple",r,t,null,null)}return i=yU(e.type),new _U(vU,n||"",i,i,r,null,null,null)}static isParamType(e){return e&&e[bU]===wU}}class TU{type;inputs;constructor(e,t,n){DB(e,vU,"Fragment"),CB(this,{type:t,inputs:n=Object.freeze(n.slice())})}static from(e){if("string"===typeof e){try{TU.from(JSON.parse(e))}catch(gK){}return TU.from(lU(e))}if(e instanceof aU){switch(e.peekKeyword(Jj)){case"constructor":return NU.from(e);case"error":return OU.from(e);case"event":return RU.from(e);case"fallback":case"receive":return MU.from(e);case"function":return DU.from(e);case"struct":return LU.from(e)}}else if("object"===typeof e){switch(e.type){case"constructor":return NU.from(e);case"error":return OU.from(e);case"event":return RU.from(e);case"fallback":case"receive":return MU.from(e);case"function":return DU.from(e);case"struct":return LU.from(e)}OB(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}RB(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return NU.isFragment(e)}static isError(e){return OU.isFragment(e)}static isEvent(e){return RU.isFragment(e)}static isFunction(e){return DU.isFragment(e)}static isStruct(e){return LU.isFragment(e)}}class PU extends TU{name;constructor(e,t,n,r){super(e,t,r),RB("string"===typeof n&&n.match(oU),"invalid identifier","name",n),r=Object.freeze(r.slice()),CB(this,{name:n})}}function IU(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}class OU extends PU{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,bU,{value:xU})}get selector(){return Wj(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+IU(e,this.inputs)),t.join(" ")}static from(e){if(OU.isFragment(e))return e;if("string"===typeof e)return OU.from(lU(e));if(e instanceof aU){const t=uU("error",e),n=fU(e);return gU(e),new OU(vU,t,n)}return new OU(vU,e.name,e.inputs?e.inputs.map(_U.from):[])}static isFragment(e){return e&&e[bU]===xU}}class RU extends PU{anonymous;constructor(e,t,n,r){super(e,"event",t,n),Object.defineProperty(this,bU,{value:AU}),CB(this,{anonymous:r})}get topicHash(){return Wj(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+IU(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){t=(t||[]).map((e=>_U.from(e)));return new RU(vU,e,t,!1).topicHash}static from(e){if(RU.isFragment(e))return e;if("string"===typeof e)try{return RU.from(lU(e))}catch(t){RB(!1,"invalid event fragment","obj",e)}else if(e instanceof aU){const t=uU("event",e),n=fU(e,!0),r=!!dU(e,Gj(["anonymous"])).has("anonymous");return gU(e),new RU(vU,t,n,r)}return new RU(vU,e.name,e.inputs?e.inputs.map((e=>_U.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[bU]===AU}}class NU extends TU{payable;gas;constructor(e,t,n,r,i){super(e,t,n),Object.defineProperty(this,bU,{value:EU}),CB(this,{payable:r,gas:i})}format(e){if(OB(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${IU(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(NU.isFragment(e))return e;if("string"===typeof e)try{return NU.from(lU(e))}catch(t){RB(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof aU){dU(e,Gj(["constructor"]));const t=fU(e),n=!!dU(e,qj).has("payable"),r=pU(e);return gU(e),new NU(vU,"constructor",t,n,r)}return new NU(vU,"constructor",e.inputs?e.inputs.map(_U.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[bU]===EU}}class MU extends TU{payable;constructor(e,t,n){super(e,"fallback",t),Object.defineProperty(this,bU,{value:SU}),CB(this,{payable:n})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(MU.isFragment(e))return e;if("string"===typeof e)try{return MU.from(lU(e))}catch(t){RB(!1,"invalid fallback fragment","obj",e)}else if(e instanceof aU){const t=e.toString();RB(e.peekKeyword(Gj(["fallback","receive"])),"type must be fallback or receive","obj",t);if("receive"===e.popKeyword(Gj(["fallback","receive"]))){const t=fU(e);return RB(0===t.length,"receive cannot have arguments","obj.inputs",t),dU(e,Gj(["payable"])),gU(e),new MU(vU,[],!0)}let n=fU(e);n.length?RB(1===n.length&&"bytes"===n[0].type,"invalid fallback inputs","obj.inputs",n.map((e=>e.format("minimal"))).join(", ")):n=[_U.from("bytes")];const r=hU(e);if(RB("nonpayable"===r||"payable"===r,"fallback cannot be constants","obj.stateMutability",r),dU(e,Gj(["returns"])).has("returns")){const t=fU(e);RB(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return gU(e),new MU(vU,n,"payable"===r)}if("receive"===e.type)return new MU(vU,[],!0);if("fallback"===e.type){const t=[_U.from("bytes")],n="payable"===e.stateMutability;return new MU(vU,t,n)}RB(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[bU]===SU}}class DU extends PU{constant;outputs;stateMutability;payable;gas;constructor(e,t,n,r,i,o){super(e,"function",t,r),Object.defineProperty(this,bU,{value:kU});CB(this,{constant:"view"===n||"pure"===n,gas:o,outputs:i=Object.freeze(i.slice()),payable:"payable"===n,stateMutability:n})}get selector(){return Wj(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+IU(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(IU(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){t=(t||[]).map((e=>_U.from(e)));return new DU(vU,e,"view",t,[],null).selector}static from(e){if(DU.isFragment(e))return e;if("string"===typeof e)try{return DU.from(lU(e))}catch(n){RB(!1,"invalid function fragment","obj",e)}else if(e instanceof aU){const t=uU("function",e),n=fU(e),r=hU(e);let i=[];dU(e,Gj(["returns"])).has("returns")&&(i=fU(e));const o=pU(e);return gU(e),new DU(vU,t,r,n,i,o)}let t=e.stateMutability;return null==t&&(t="payable","boolean"===typeof e.constant?(t="view",e.constant||(t="payable","boolean"!==typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!==typeof e.payable||e.payable||(t="nonpayable")),new DU(vU,e.name,t,e.inputs?e.inputs.map(_U.from):[],e.outputs?e.outputs.map(_U.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[bU]===kU}}class LU extends PU{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,bU,{value:CU})}format(){throw new Error("@TODO")}static from(e){if("string"===typeof e)try{return LU.from(lU(e))}catch(t){RB(!1,"invalid struct fragment","obj",e)}else if(e instanceof aU){const t=uU("struct",e),n=fU(e);return gU(e),new LU(vU,t,n)}return new LU(vU,e.name,e.inputs?e.inputs.map(_U.from):[])}static isFragment(e){return e&&e[bU]===CU}}const BU=new Map;BU.set(0,"GENERIC_PANIC"),BU.set(1,"ASSERT_FALSE"),BU.set(17,"OVERFLOW"),BU.set(18,"DIVIDE_BY_ZERO"),BU.set(33,"ENUM_RANGE_ERROR"),BU.set(34,"BAD_STORAGE_DATA"),BU.set(49,"STACK_UNDERFLOW"),BU.set(50,"ARRAY_RANGE_ERROR"),BU.set(65,"OUT_OF_MEMORY"),BU.set(81,"UNINITIALIZED_FUNCTION_CALL");const FU=new RegExp(/^bytes([0-9]*)$/),jU=new RegExp(/^(u?int)([0-9]*)$/);let UU=null,zU=1024;class VU{#p(e){if(e.isArray())return new _j(this.#p(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new $j(e.components.map((e=>this.#p(e))),e.name);switch(e.baseType){case"address":return new Ej(e.name);case"bool":return new Tj(e.name);case"string":return new Hj(e.name);case"bytes":return new Ij(e.name);case"":return new Nj(e.name)}let t=e.type.match(jU);if(t){let n=parseInt(t[2]||"256");return RB(0!==n&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new Bj(n/8,"int"===t[1],e.name)}if(t=e.type.match(FU),t){let n=parseInt(t[1]);return RB(0!==n&&n<=32,"invalid bytes length","param",e),new Oj(n,e.name)}RB(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#p(_U.from(e))));return new $j(t,"_").defaultValue()}encode(e,t){NB(t.length,e.length,"types/values length mismatch");const n=e.map((e=>this.#p(_U.from(e)))),r=new $j(n,"_"),i=new wF;return r.encode(i,t),i.data}decode(e,t,n){const r=e.map((e=>this.#p(_U.from(e))));return new $j(r,"_").decode(new xF(t,n,zU))}static _setDefaultMaxInflation(e){RB("number"===typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),zU=e}static defaultAbiCoder(){return null==UU&&(UU=new VU),UU}static getBuiltinCallException(e,t,n){return function(e,t,n,r){let i="missing revert data",o=null,s=null;if(n){i="execution reverted";const e=BB(n);if(n=VB(n),0===e.length)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!==4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===VB(e.slice(0,4)))try{o=r.decode(["string"],e.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch(l){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===VB(e.slice(0,4)))try{const t=Number(r.decode(["uint256"],e.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${BU.get(t)||"UNKNOWN"}(${t})`,i+=`: ${o}`}catch(l){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const a={to:t.to?yj(t.to):null,data:t.data||"0x"};return t.from&&(a.from=yj(t.from)),IB(i,"CALL_EXCEPTION",{action:e,data:n,reason:o,transaction:a,invocation:null,revert:s})}(e,t,n,VU.defaultAbiCoder())}}function HU(e){return e&&"function"===typeof e.getAddress}async function $U(e,t){const n=await t;return null!=n&&"0x0000000000000000000000000000000000000000"!==n||(OB("string"!==typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),RB(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),yj(n)}function WU(e,t){return"string"===typeof e?e.match(/^0x[0-9a-f]{40}$/i)?yj(e):(OB(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),$U(e,t.resolveName(e))):HU(e)?$U(e,e.getAddress()):e&&"function"===typeof e.then?$U(e,e):void RB(!1,"unsupported addressable value","target",e)}const GU=new Uint8Array(32);GU.fill(0);const qU=BigInt(-1),KU=BigInt(0),QU=BigInt(1),XU=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const JU=oF(QU,32),YU=oF(KU,32),ZU={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ez=["name","version","chainId","verifyingContract","salt"];function tz(e){return function(t){return RB("string"===typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const nz={name:tz("name"),version:tz("version"),chainId:function(e){const t=eF(e,"domain.chainId");return RB(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):aF(t)},verifyingContract:function(e){try{return yj(e).toLowerCase()}catch(t){}RB(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=BB(e,"domain.salt");return RB(32===t.length,'invalid domain value "salt"',"domain.salt",e),VB(t)}};function rz(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const n=""===t[1],r=parseInt(t[2]);RB(r%8===0&&0!==r&&r<=256&&t[2]===String(r),"invalid numeric width","type",e);const i=ZB(XU,n?r-1:r),o=n?(i+QU)*qU:KU;return function(t){const r=eF(t,"value");return RB(r>=o&&r<=i,`value out-of-bounds for ${e}`,"value",r),oF(n?YB(r,256):r,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const n=parseInt(t[1]);return RB(0!==n&&n<=32&&t[1]===String(n),"invalid bytes width","type",e),function(t){return RB(BB(t).length===n,`invalid length for ${e}`,"value",t),function(e){const t=BB(e),n=t.length%32;return n?HB([t,GU.slice(n)]):VB(t)}(t)}}}switch(e){case"address":return function(e){return qB(yj(e),32)};case"bool":return function(e){return e?JU:YU};case"bytes":return function(e){return cj(e)};case"string":return function(e){return Wj(e)}}return null}function iz(e,t){return`${e}(${t.map((e=>{let{name:t,type:n}=e;return n+" "+t})).join(",")})`}function oz(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class sz{primaryType;#g;get types(){return JSON.parse(this.#g)}#m;#y;constructor(e){this.#m=new Map,this.#y=new Map;const t=new Map,n=new Map,r=new Map,i={};Object.keys(e).forEach((o=>{i[o]=e[o].map((t=>{let{name:n,type:r}=t,{base:i,index:o}=oz(r);return"int"!==i||e.int||(i="int256"),"uint"!==i||e.uint||(i="uint256"),{name:n,type:i+(o||"")}})),t.set(o,new Set),n.set(o,[]),r.set(o,new Set)})),this.#g=JSON.stringify(i);for(const s in i){const r=new Set;for(const o of i[s]){RB(!r.has(o.name),`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(s)}`,"types",e),r.add(o.name);const i=oz(o.type).base;RB(i!==s,`circular type reference to ${JSON.stringify(i)}`,"types",e);rz(i)||(RB(n.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),n.get(i).push(s),t.get(s).add(i))}}const o=Array.from(n.keys()).filter((e=>0===n.get(e).length));RB(0!==o.length,"missing primary type","types",e),RB(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),CB(this,{primaryType:o[0]}),function i(o,s){RB(!s.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),s.add(o);for(const e of t.get(o))if(n.has(e)){i(e,s);for(const t of s)r.get(t).add(e)}s.delete(o)}(this.primaryType,new Set);for(const[s,a]of r){const e=Array.from(a);e.sort(),this.#m.set(s,iz(s,i[s])+e.map((e=>iz(e,i[e]))).join(""))}}getEncoder(e){let t=this.#y.get(e);return t||(t=this.#v(e),this.#y.set(e,t)),t}#v(e){{const t=rz(e);if(t)return t}const t=oz(e).array;if(t){const e=t.prefix,n=this.getEncoder(e);return r=>{RB(-1===t.count||t.count===r.length,`array length mismatch; expected length ${t.count}`,"value",r);let i=r.map(n);return this.#m.has(e)&&(i=i.map(cj)),cj(HB(i))}}const n=this.types[e];if(n){const t=Wj(this.#m.get(e));return e=>{const r=n.map((t=>{let{name:n,type:r}=t;const i=this.getEncoder(r)(e[n]);return this.#m.has(r)?cj(i):i}));return r.unshift(t),HB(r)}}RB(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#m.get(e);return RB(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return cj(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(rz(e))return n(e,t);const r=oz(e).array;if(r)return RB(-1===r.count||r.count===t.length,`array length mismatch; expected length ${r.count}`,"value",t),t.map((e=>this._visit(r.prefix,e,n)));const i=this.types[e];if(i)return i.reduce(((e,r)=>{let{name:i,type:o}=r;return e[i]=this._visit(o,t[i],n),e}),{});RB(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new sz(e)}static getPrimaryType(e){return sz.from(e).primaryType}static hashStruct(e,t,n){return sz.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){if(null==e[n])continue;const r=ZU[n];RB(r,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort(((e,t)=>ez.indexOf(e.name)-ez.indexOf(t.name))),sz.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return HB(["0x1901",sz.hashDomain(e),sz.from(t).hash(n)])}static hash(e,t,n){return cj(sz.encode(e,t,n))}static async resolveNames(e,t,n,r){e=Object.assign({},e);for(const s in e)null==e[s]&&delete e[s];const i={};e.verifyingContract&&!jB(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=sz.from(t);o.visit(n,((e,t)=>("address"!==e||jB(t,20)||(i[t]="0x"),t)));for(const s in i)i[s]=await r(s);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:n=o.visit(n,((e,t)=>"address"===e&&i[t]?i[t]:t))}}static getPayload(e,t,n){sz.hashDomain(e);const r={},i=[];ez.forEach((t=>{const n=e[t];null!=n&&(r[t]=nz[t](n),i.push({name:t,type:ZU[t]}))}));const o=sz.from(t);t=o.types;const s=Object.assign({},t);return RB(null==s.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),s.EIP712Domain=i,o.encode(n),{types:s,domain:r,primaryType:o.primaryType,message:o.visit(n,((e,t)=>{if(e.match(/^bytes(\d*)/))return VB(BB(t));if(e.match(/^u?int/))return eF(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return RB("string"===typeof t,"invalid string","value",t),t}RB(!1,"unsupported type","type",e)}))}}}function az(e,t){return{address:yj(e),storageKeys:t.map(((e,t)=>(RB(jB(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}function lz(e){if(Array.isArray(e))return e.map(((t,n)=>Array.isArray(t)?(RB(2===t.length,"invalid slot set",`value[${n}]`,t),az(t[0],t[1])):(RB(null!=t&&"object"===typeof t,"invalid address-slot set","value",e),az(t.address,t.storageKeys))));RB(null!=e&&"object"===typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const n=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return az(t,Object.keys(n).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function cz(e){return async function(e,t){OB(null==t||!t.cancelled,"request cancelled before sending","CANCELLED");const n=e.url.split(":")[0].toLowerCase();OB("http"===n||"https"===n,`unsupported protocol ${n}`,"UNSUPPORTED_OPERATION",{info:{protocol:n},operation:"request"}),OB("https"===n||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let r=null;const i=new AbortController,o=setTimeout((()=>{r=IB("request timeout","TIMEOUT"),i.abort()}),e.timeout);t&&t.addListener((()=>{r=IB("request cancelled","CANCELLED"),i.abort()}));const s={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:i.signal};let a;try{a=await fetch(e.url,s)}catch(d){if(clearTimeout(o),r)throw r;throw d}clearTimeout(o);const l={};a.headers.forEach(((e,t)=>{l[t.toLowerCase()]=e}));const c=await a.arrayBuffer(),u=null==c?null:new Uint8Array(c);return{statusCode:a.status,statusMessage:a.statusText,headers:l,body:u}}}cz();let uz=cz();const dz=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),hz=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let fz=!1;async function pz(e,t){try{const t=e.match(dz);if(!t)throw new Error("invalid data");return new xz(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?function(e){e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return BB(t)}(t[3]):zj(t[3].replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))}catch(n){return new xz(599,"BAD REQUEST (invalid data: URI)",{},null,new wz(e))}}function gz(e){return async function(t,n){try{const n=t.match(hz);if(!n)throw new Error("invalid link");return new wz(`${e}${n[2]}`)}catch(r){return new xz(599,"BAD REQUEST (invalid IPFS URI)",{},null,new wz(t))}}}const mz={data:pz,ipfs:gz("https://gateway.ipfs.io/ipfs/")},yz=new WeakMap;class vz{#b;#w;constructor(e){this.#b=[],this.#w=!1,yz.set(e,(()=>{if(!this.#w){this.#w=!0;for(const e of this.#b)setTimeout((()=>{e()}),0);this.#b=[]}}))}addListener(e){OB(!this.#w,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#b.push(e)}get cancelled(){return this.#w}checkSignal(){OB(!this.cancelled,"cancelled","CANCELLED",{})}}function bz(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}class wz{#x;#A;#E;#S;#k;#C;#_;#T;#P;#I;#O;#R;#N;#M;#D;get url(){return this.#C}set url(e){this.#C=String(e)}get body(){return null==this.#_?null:new Uint8Array(this.#_)}set body(e){if(null==e)this.#_=void 0,this.#T=void 0;else if("string"===typeof e)this.#_=zj(e),this.#T="text/plain";else if(e instanceof Uint8Array)this.#_=e,this.#T="application/octet-stream";else{if("object"!==typeof e)throw new Error("invalid body");this.#_=zj(JSON.stringify(e)),this.#T="application/json"}}hasBody(){return null!=this.#_}get method(){return this.#S?this.#S:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#S=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#E);return this.#P&&(e.authorization=`Basic ${function(e){const t=BB(e);let n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return btoa(n)}(zj(this.#P))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#T&&(e["content-type"]=this.#T),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#E[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#E={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n<t.length){const r=t[n++];return{value:[r,e[r]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#P||null}setCredentials(e,t){RB(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#P=`${e}:${t}`}get allowGzip(){return this.#A}set allowGzip(e){this.#A=!!e}get allowInsecureAuthentication(){return!!this.#x}set allowInsecureAuthentication(e){this.#x=!!e}get timeout(){return this.#k}set timeout(e){RB(e>=0,"timeout must be non-zero","timeout",e),this.#k=e}get preflightFunc(){return this.#I||null}set preflightFunc(e){this.#I=e}get processFunc(){return this.#O||null}set processFunc(e){this.#O=e}get retryFunc(){return this.#R||null}set retryFunc(e){this.#R=e}get getUrlFunc(){return this.#D||uz}set getUrlFunc(e){this.#D=e}constructor(e){this.#C=String(e),this.#x=!1,this.#A=!0,this.#E={},this.#S="",this.#k=3e5,this.#M={slotInterval:250,maxAttempts:12},this.#D=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#_?VB(this.#_):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#M.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#M.maxAttempts=e.maxAttempts)}async#L(e,t,n,r,i){if(e>=this.#M.maxAttempts)return i.makeServerError("exceeded maximum retry limit");OB(Az()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:r}),n>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(n);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in mz){const e=await mz[s](o.url,bz(r.#N));if(e instanceof xz){let t=e;if(this.processFunc){bz(r.#N);try{t=await this.processFunc(o,t)}catch(c){null!=c.throttle&&"number"===typeof c.stall||t.makeServerError("error in post-processing function",c).assertOk()}}return t}o=e}this.preflightFunc&&(o=await this.preflightFunc(o));const a=await this.getUrlFunc(o,bz(r.#N));let l=new xz(a.statusCode,a.statusMessage,a.headers,a.body,r);if(301===l.statusCode||302===l.statusCode){try{const n=l.headers.location||"";return o.redirect(n).#L(e+1,t,0,r,l)}catch(c){}return l}if(429===l.statusCode&&(null==this.retryFunc||await this.retryFunc(o,l,e))){const n=l.headers["retry-after"];let i=this.#M.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"===typeof n&&n.match(/^[1-9][0-9]*$/)&&(i=parseInt(n)),o.clone().#L(e+1,t,i,r,l)}if(this.processFunc){bz(r.#N);try{l=await this.processFunc(o,l)}catch(c){null!=c.throttle&&"number"===typeof c.stall||l.makeServerError("error in post-processing function",c).assertOk();let n=this.#M.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return c.stall>=0&&(n=c.stall),o.clone().#L(e+1,t,n,r,l)}}return l}send(){return OB(null==this.#N,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#N=new vz(this),this.#L(0,Az()+this.timeout,0,this,new xz(0,"",{},null,this))}cancel(){OB(null!=this.#N,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=yz.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();OB("GET"===this.method&&("https"!==t||"http"!==n)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const r=new wz(e);return r.method="GET",r.allowGzip=this.allowGzip,r.timeout=this.timeout,r.#E=Object.assign({},this.#E),this.#_&&(r.#_=new Uint8Array(this.#_)),r.#T=this.#T,r}clone(){const e=new wz(this.url);return e.#S=this.#S,this.#_&&(e.#_=this.#_),e.#T=this.#T,e.#E=Object.assign({},this.#E),e.#P=this.#P,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#I=this.#I,e.#O=this.#O,e.#R=this.#R,e.#M=Object.assign({},this.#M),e.#D=this.#D,e}static lockConfig(){fz=!0}static getGateway(e){return mz[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(fz)throw new Error("gateways locked");mz[e]=t}static registerGetUrl(e){if(fz)throw new Error("gateways locked");uz=e}static createGetUrlFunc(e){return cz()}static createDataGateway(){return pz}static createIpfsGatewayFunc(e){return gz(e)}}class xz{#B;#F;#E;#_;#j;#U;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#_?VB(this.#_):"null"}>`}get statusCode(){return this.#B}get statusMessage(){return this.#F}get headers(){return Object.assign({},this.#E)}get body(){return null==this.#_?null:new Uint8Array(this.#_)}get bodyText(){try{return null==this.#_?"":Vj(this.#_)}catch(e){OB(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){OB(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let n=0;return{next:()=>{if(n<t.length){const r=t[n++];return{value:[r,e[r]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,n,r,i){this.#B=e,this.#F=t,this.#E=Object.keys(n).reduce(((e,t)=>(e[t.toLowerCase()]=String(n[t]),e)),{}),this.#_=null==r?null:new Uint8Array(r),this.#j=i||null,this.#U={message:""}}makeServerError(e,t){let n;n=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const r=new xz(599,n,this.headers,this.body,this.#j||void 0);return r.#U={message:e,error:t},r}throwThrottleError(e,t){null==t?t=-1:RB(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const n=new Error(e||"throttling requests");throw CB(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#_}get request(){return this.#j}ok(){return""===this.#U.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#U;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let r=null;try{this.#_&&(r=Vj(this.#_))}catch(gK){}OB(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:r,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function Az(){return(new Date).getTime()}const Ez="0x0000000000000000000000000000000000000000";class Sz{fragment;name;signature;topic;args;constructor(e,t,n){const r=e.name,i=e.format();CB(this,{fragment:e,name:r,signature:i,topic:t,args:n})}}class kz{fragment;name;args;signature;selector;value;constructor(e,t,n,r){const i=e.name,o=e.format();CB(this,{fragment:e,name:i,args:n,signature:o,selector:t,value:r})}}class Cz{fragment;name;args;signature;selector;constructor(e,t,n){const r=e.name,i=e.format();CB(this,{fragment:e,name:r,args:n,signature:i,selector:t})}}class _z{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){CB(this,{hash:e,_isIndexed:!0})}}const Tz={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Pz={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&Tz[e.toString()]&&(t=Tz[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class Iz{fragments;deploy;fallback;receive;#z;#V;#H;#$;constructor(e){let t=[];t="string"===typeof e?JSON.parse(e):e,this.#H=new Map,this.#z=new Map,this.#V=new Map;const n=[];for(const s of t)try{n.push(TU.from(s))}catch(o){console.log(`[Warning] Invalid Fragment ${JSON.stringify(s)}:`,o.message)}CB(this,{fragments:Object.freeze(n)});let r=null,i=!1;this.#$=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let n;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void CB(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:(RB(!r||e.payable!==r.payable,"conflicting fallback fragments",`fragments[${t}]`,e),r=e,i=r.payable));case"function":n=this.#H;break;case"event":n=this.#V;break;case"error":n=this.#z;break;default:return}const o=e.format();n.has(o)||n.set(o,e)})),this.deploy||CB(this,{deploy:NU.from("constructor()")}),CB(this,{fallback:r,receive:i})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return VU.defaultAbiCoder()}#W(e,t,n){if(jB(e)){const t=e.toLowerCase();for(const e of this.#H.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const r=[];for(const[t,n]of this.#H)t.split("(")[0]===e&&r.push(n);if(t){const e=t.length>0?t[t.length-1]:null;let n=t.length,i=!0;Aj.isTyped(e)&&"overrides"===e.type&&(i=!1,n--);for(let t=r.length-1;t>=0;t--){const e=r[t].inputs.length;e===n||i&&e===n-1||r.splice(t,1)}for(let o=r.length-1;o>=0;o--){const e=r[o].inputs;for(let n=0;n<t.length;n++)if(Aj.isTyped(t[n])){if(n>=e.length){if("overrides"===t[n].type)continue;r.splice(o,1);break}if(t[n].type!==e[n].baseType){r.splice(o,1);break}}}}if(1===r.length&&t&&t.length!==r[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!==typeof e)&&r.splice(0,1)}if(0===r.length)return null;if(r.length>1&&n){RB(!1,`ambiguous function description (i.e. matches ${r.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e)}return r[0]}const r=this.#H.get(DU.from(e).format());return r||null}getFunctionName(e){const t=this.#W(e,null,!1);return RB(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#W(e,null,!1)}getFunction(e,t){return this.#W(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#H.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let n=0;n<t.length;n++){const r=t[n];e(this.#H.get(r),n)}}#G(e,t,n){if(jB(e)){const t=e.toLowerCase();for(const e of this.#V.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){const r=[];for(const[t,n]of this.#V)t.split("(")[0]===e&&r.push(n);if(t){for(let e=r.length-1;e>=0;e--)r[e].inputs.length<t.length&&r.splice(e,1);for(let e=r.length-1;e>=0;e--){const n=r[e].inputs;for(let i=0;i<t.length;i++)if(Aj.isTyped(t[i])&&t[i].type!==n[i].baseType){r.splice(e,1);break}}}if(0===r.length)return null;if(r.length>1&&n){RB(!1,`ambiguous event description (i.e. matches ${r.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e)}return r[0]}const r=this.#V.get(RU.from(e).format());return r||null}getEventName(e){const t=this.#G(e,null,!1);return RB(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#G(e,null,!1)}getEvent(e,t){return this.#G(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#V.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let n=0;n<t.length;n++){const r=t[n];e(this.#V.get(r),n)}}getError(e,t){if(jB(e)){const t=e.toLowerCase();if(Pz[t])return OU.from(Pz[t].signature);for(const e of this.#z.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const t=[];for(const[n,r]of this.#z)n.split("(")[0]===e&&t.push(r);if(0===t.length)return"Error"===e?OU.from("error Error(string)"):"Panic"===e?OU.from("error Panic(uint256)"):null;if(t.length>1){RB(!1,`ambiguous error description (i.e. ${t.map((e=>JSON.stringify(e.format()))).join(", ")})`,"name",e)}return t[0]}if("Error(string)"===(e=OU.from(e).format()))return OU.from("error Error(string)");if("Panic(uint256)"===e)return OU.from("error Panic(uint256)");const n=this.#z.get(e);return n||null}forEachError(e){const t=Array.from(this.#z.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let n=0;n<t.length;n++){const r=t[n];e(this.#z.get(r),n)}}_decodeParams(e,t){return this.#$.decode(e,t)}_encodeParams(e,t){return this.#$.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"===typeof e){const t=this.getError(e);RB(t,"unknown error","fragment",e),e=t}return RB(WB(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,WB(t,4))}encodeErrorResult(e,t){if("string"===typeof e){const t=this.getError(e);RB(t,"unknown error","fragment",e),e=t}return HB([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"===typeof e){const t=this.getFunction(e);RB(t,"unknown function","fragment",e),e=t}return RB(WB(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,WB(t,4))}encodeFunctionData(e,t){if("string"===typeof e){const t=this.getFunction(e);RB(t,"unknown function","fragment",e),e=t}return HB([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"===typeof e){const t=this.getFunction(e);RB(t,"unknown function","fragment",e),e=t}let n="invalid length for result data";const r=FB(t);if(r.length%32===0)try{return this.#$.decode(e.outputs,r)}catch(i){n="could not decode result data"}OB(!1,n,"BAD_DATA",{value:VB(r),info:{method:e.name,signature:e.format()}})}makeError(e,t){const n=BB(e,"data"),r=VU.getBuiltinCallException("call",t,n);if(r.message.startsWith("execution reverted (unknown custom error)")){const e=VB(n.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#$.decode(t.inputs,n.slice(4));r.revert={name:t.name,signature:t.format(),args:e},r.reason=r.revert.signature,r.message=`execution reverted: ${r.reason}`}catch(gK){r.message="execution reverted (coult not decode custom error)"}}const i=this.parseTransaction(t);return i&&(r.invocation={method:i.name,signature:i.signature,args:i.args}),r}encodeFunctionResult(e,t){if("string"===typeof e){const t=this.getFunction(e);RB(t,"unknown function","fragment",e),e=t}return VB(this.#$.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"===typeof e){const t=this.getEvent(e);RB(t,"unknown event","eventFragment",e),e=t}OB(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const r=(e,t)=>"string"===e.type?Wj(t):"bytes"===e.type?cj(VB(t)):("bool"===e.type&&"boolean"===typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=oF(t):e.type.match(/^bytes/)?t=function(e,t){return GB(e,t,!1)}(t,32):"address"===e.type&&this.#$.encode(["address"],[t]),qB(VB(t),32));for(t.forEach(((t,i)=>{const o=e.inputs[i];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?RB(!1,"filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((e=>r(o,e)))):n.push(r(o,t)):RB(null==t,"cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}encodeEventLog(e,t){if("string"===typeof e){const t=this.getEvent(e);RB(t,"unknown event","eventFragment",e),e=t}const n=[],r=[],i=[];return e.anonymous||n.push(e.topicHash),RB(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const s=t[o];if(e.indexed)if("string"===e.type)n.push(Wj(s));else if("bytes"===e.type)n.push(cj(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(this.#$.encode([e.type],[s]))}else r.push(e),i.push(s)})),{data:this.#$.encode(r,i),topics:n}}decodeEventLog(e,t,n){if("string"===typeof e){const t=this.getEvent(e);RB(t,"unknown event","eventFragment",e),e=t}if(null!=n&&!e.anonymous){const t=e.topicHash;RB(jB(n[0],32)&&n[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const r=[],i=[],o=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(r.push(_U.from({type:"bytes32",name:e.name})),o.push(!0)):(r.push(e),o.push(!1)):(i.push(e),o.push(!1))}));const s=null!=n?this.#$.decode(r,HB(n)):null,a=this.#$.decode(i,t,!0),l=[],c=[];let u=0,d=0;return e.inputs.forEach(((e,t)=>{let n=null;if(e.indexed)if(null==s)n=new _z(null);else if(o[t])n=new _z(s[d++]);else try{n=s[d++]}catch(r){n=r}else try{n=a[u++]}catch(r){n=r}l.push(n),c.push(e.name||null)})),yF.fromItems(l,c)}parseTransaction(e){const t=BB(e.data,"tx.data"),n=eF(null!=e.value?e.value:0,"tx.value"),r=this.getFunction(VB(t.slice(0,4)));if(!r)return null;const i=this.#$.decode(r.inputs,t.slice(4));return new kz(r,r.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Sz(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=VB(e),n=this.getError(WB(t,0,4));if(!n)return null;const r=this.#$.decode(n.inputs,WB(t,4));return new Cz(n,n.selector,r)}static from(e){return e instanceof Iz?e:"string"===typeof e?new Iz(JSON.parse(e)):"function"===typeof e.formatJson?new Iz(e.formatJson()):"function"===typeof e.format?new Iz(e.format("json")):new Iz(e)}}const Oz=BigInt(0);function Rz(e){return null==e?null:e}function Nz(e){return null==e?null:e.toString()}class Mz{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,n){CB(this,{gasPrice:Rz(e),maxFeePerGas:Rz(t),maxPriorityFeePerGas:Rz(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Nz(e),maxFeePerGas:Nz(t),maxPriorityFeePerGas:Nz(n)}}}function Dz(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=VB(e.data));const n="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)i in e&&null!=e[i]&&(t[i]=eF(e[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=iF(e[i],`request.${i}`));return e.accessList&&(t.accessList=lz(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>UB(e)?VB(e):Object.assign({},e)))),t}class Lz{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#q;constructor(e,t){this.#q=e.transactions.map((e=>"string"!==typeof e?new jz(e,t):e)),CB(this,{provider:t,hash:Rz(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Rz(e.prevRandao),extraData:e.extraData,baseFeePerGas:Rz(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#q.map((e=>"string"===typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#q.slice();return 0===e.length?[]:(OB("object"===typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:r,gasUsed:i,hash:o,miner:s,prevRandao:a,nonce:l,number:c,parentHash:u,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:f,timestamp:p,transactions:g}=this;return{_type:"Block",baseFeePerGas:Nz(e),difficulty:Nz(t),extraData:n,gasLimit:Nz(r),gasUsed:Nz(i),blobGasUsed:Nz(this.blobGasUsed),excessBlobGas:Nz(this.excessBlobGas),hash:o,miner:s,prevRandao:a,nonce:l,number:c,parentHash:u,timestamp:p,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:f,transactions:g}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#q.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"===typeof e)t=this.#q[e];else{const n=e.toLowerCase();for(const e of this.#q){if("string"===typeof e){if(e!==n)continue;t=e;break}if(e.hash!==n){t=e;break}}}if(null==t)throw new Error("no such tx");return"string"===typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){const t=this.prefetchedTransactions;if("number"===typeof e)return t[e];e=e.toLowerCase();for(const n of t)if(n.hash===e)return n;RB(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return{orphan:"drop-block",hash:(e=this).hash,number:e.number};var e}}class Bz{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const n=Object.freeze(e.topics.slice());CB(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:n,data:r,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:l}=this;return{_type:"log",address:e,blockHash:t,blockNumber:n,data:r,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:l}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return OB(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return OB(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return OB(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}class Fz{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#K;constructor(e,t){this.#K=Object.freeze(e.logs.map((e=>new Bz(e,t))));let n=Oz;null!=e.effectiveGasPrice?n=e.effectiveGasPrice:null!=e.gasPrice&&(n=e.gasPrice),CB(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#K}toJSON(){const{to:e,from:t,contractAddress:n,hash:r,index:i,blockHash:o,blockNumber:s,logsBloom:a,logs:l,status:c,root:u}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:n,cumulativeGasUsed:Nz(this.cumulativeGasUsed),from:t,gasPrice:Nz(this.gasPrice),blobGasUsed:Nz(this.blobGasUsed),blobGasPrice:Nz(this.blobGasPrice),gasUsed:Nz(this.gasUsed),hash:r,index:i,logs:l,logsBloom:a,root:u,status:c,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(null==e)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(null==e)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return zz(this)}reorderedEvent(e){return OB(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),Uz(this,e)}}class jz{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;#Q;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.#Q=-1}toJSON(){const{blockNumber:e,blockHash:t,index:n,hash:r,type:i,to:o,from:s,nonce:a,data:l,signature:c,accessList:u,blobVersionedHashes:d}=this;return{_type:"TransactionResponse",accessList:u,blockNumber:e,blockHash:t,blobVersionedHashes:d,chainId:Nz(this.chainId),data:l,from:s,gasLimit:Nz(this.gasLimit),gasPrice:Nz(this.gasPrice),hash:r,maxFeePerGas:Nz(this.maxFeePerGas),maxPriorityFeePerGas:Nz(this.maxPriorityFeePerGas),maxFeePerBlobGas:Nz(this.maxFeePerBlobGas),nonce:a,signature:c,to:o,index:n,type:i,value:Nz(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){const t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;const t=this.provider.getBlock(e);if(null==t)throw new Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){const{tx:e,blockNumber:t}=await kB({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){const n=null==e?1:e,r=null==t?0:t;let i=this.#Q,o=-1,s=-1===i;const a=async()=>{if(s)return null;const{blockNumber:e,nonce:t}=await kB({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce)return void(i=e);if(s)return null;const r=await this.getTransaction();if(!r||null==r.blockNumber)for(-1===o&&(o=i-3,o<this.#Q&&(o=this.#Q));o<=e;){if(s)return null;const t=await this.provider.getBlock(o,!0);if(null==t)return;for(const e of t)if(e===this.hash)return;for(let r=0;r<t.length;r++){const o=await t.getTransaction(r);if(o.from===this.from&&o.nonce===this.nonce){if(s)return null;const t=await this.provider.getTransactionReceipt(o.hash);if(null==t)return;if(e-t.blockNumber+1<n)return;let r="replaced";o.data===this.data&&o.to===this.to&&o.value===this.value?r="repriced":"0x"===o.data&&o.from===o.to&&o.value===Oz&&(r="cancelled"),OB(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===r||"cancelled"===r,reason:r,replacement:o.replaceableTransaction(i),hash:o.hash,receipt:t})}}o++}},l=e=>{if(null==e||0!==e.status)return e;OB(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},c=await this.provider.getTransactionReceipt(this.hash);if(0===n)return l(c);if(c){if(await c.confirmations()>=n)return l(c)}else if(await a(),0===n)return null;const u=new Promise(((e,t)=>{const o=[],c=()=>{o.forEach((e=>e()))};if(o.push((()=>{s=!0})),r>0){const e=setTimeout((()=>{c(),t(IB("wait for transaction timeout","TIMEOUT"))}),r);o.push((()=>{clearTimeout(e)}))}const u=async r=>{if(await r.confirmations()>=n){c();try{e(l(r))}catch(i){t(i)}}};if(o.push((()=>{this.provider.off(this.hash,u)})),this.provider.on(this.hash,u),i>=0){const e=async()=>{try{await a()}catch(n){if(TB(n,"TRANSACTION_REPLACED"))return c(),void t(n)}s||this.provider.once("block",e)};o.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await u}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return OB(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),zz(this)}reorderedEvent(e){return OB(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),OB(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Uz(this,e)}replaceableTransaction(e){RB(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new jz(this,this.provider);return t.#Q=e,t}}function Uz(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function zz(e){return{orphan:"drop-transaction",tx:e}}class Vz{filter;emitter;#X;constructor(e,t,n){this.#X=t,CB(this,{emitter:e,filter:n})}async removeListener(){null!=this.#X&&await this.emitter.off(this.filter,this.#X)}}class Hz extends Bz{interface;fragment;args;constructor(e,t,n){super(e,e.provider);CB(this,{args:t.decodeEventLog(n,e.data,e.topics),fragment:n,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class $z extends Bz{error;constructor(e,t){super(e,e.provider),CB(this,{error:t})}}class Wz extends Fz{#J;constructor(e,t,n){super(n,t),this.#J=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#J.getEvent(e.topics[0]):null;if(t)try{return new Hz(e,this.#J,t)}catch(n){return new $z(e,n)}return e}))}}class Gz extends jz{#J;constructor(e,t,n){super(n,t),this.#J=e}async wait(e,t){const n=await super.wait(e,t);return null==n?null:new Wz(this.#J,this.provider,n)}}class qz extends Vz{log;constructor(e,t,n,r){super(e,t,n),CB(this,{log:r})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Kz extends qz{constructor(e,t,n,r,i){super(e,t,n,new Hz(i,e.interface,r));CB(this,{args:e.interface.decodeEventLog(r,this.log.data,this.log.topics),fragment:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const Qz=BigInt(0);function Xz(e){return e&&"function"===typeof e.call}function Jz(e){return e&&"function"===typeof e.estimateGas}function Yz(e){return e&&"function"===typeof e.resolveName}function Zz(e){return e&&"function"===typeof e.sendTransaction}function eV(e){if(null!=e){if(Yz(e))return e;if(e.provider)return e.provider}}class tV{#Y;fragment;constructor(e,t,n){if(CB(this,{fragment:t}),t.inputs.length<n.length)throw new Error("too many arguments");const r=nV(e.runner,"resolveName"),i=Yz(r)?r:null;this.#Y=async function(){const r=await Promise.all(t.inputs.map(((e,t)=>null==n[t]?null:e.walkAsync(n[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>WU(e,i)))):WU(t,i):t)))));return e.interface.encodeFilterTopics(t,r)}()}getTopicFilter(){return this.#Y}}function nV(e,t){return null==e?null:"function"===typeof e[t]?e:e.provider&&"function"===typeof e.provider[t]?e.provider:null}function rV(e){return null==e?null:e.provider||null}async function iV(e,t){const n=Aj.dereference(e,"overrides");RB("object"===typeof n,"invalid overrides parameter","overrides",e);const r=Dz(n);return RB(null==r.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),RB(null==r.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}function oV(e){const t=async function(t){const n=await iV(t,["data"]);n.to=await e.getAddress(),n.from&&(n.from=await WU(n.from,eV(e.runner)));const r=e.interface,i=eF(n.value||Qz,"overrides.value")===Qz,o="0x"===(n.data||"0x");!r.fallback||r.fallback.payable||!r.receive||o||i||RB(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),RB(r.fallback||o,"cannot send data to receive-only contract","overrides.data",n.data);return RB(r.receive||r.fallback&&r.fallback.payable||i,"cannot send value to non-payable fallback","overrides.value",n.value),RB(r.fallback||o,"cannot send data to receive-only contract","overrides.data",n.data),n},n=async function(n){const r=e.runner;OB(Zz(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await t(n)),o=rV(e.runner);return new Gz(e.interface,o,i)},r=async e=>await n(e);return CB(r,{_contract:e,estimateGas:async function(n){const r=nV(e.runner,"estimateGas");return OB(Jz(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await t(n))},populateTransaction:t,send:n,staticCall:async function(n){const r=nV(e.runner,"call");OB(Xz(r),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(n);try{return await r.call(i)}catch(o){if(PB(o)&&o.data)throw e.interface.makeError(o.data,i);throw o}}}),r}function sV(e,t){const n=function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const o=e.interface.getFunction(t,r);return OB(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),o},r=async function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];const o=n(...r);let s={};if(o.inputs.length+1===r.length&&(s=await iV(r.pop()),s.from&&(s.from=await WU(s.from,eV(e.runner)))),o.inputs.length!==r.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const a=await async function(e,t,n){const r=nV(e,"resolveName"),i=Yz(r)?r:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(n[t],((e,t)=>(t=Aj.dereference(t,e),"address"===e?WU(t,i):t))))))}(e.runner,o.inputs,r);return Object.assign({},s,await kB({to:e.getAddress(),data:e.interface.encodeFunctionData(o,a)}))},i=async function(){const e=await s(...arguments);return 1===e.length?e[0]:e},o=async function(){const t=e.runner;OB(Zz(t),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await t.sendTransaction(await r(...arguments)),i=rV(e.runner);return new Gz(e.interface,i,n)},s=async function(){const t=nV(e.runner,"call");OB(Xz(t),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await r(...arguments);let o="0x";try{o=await t.call(i)}catch(a){if(PB(a)&&a.data)throw e.interface.makeError(a.data,i);throw a}const s=n(...arguments);return e.interface.decodeFunctionResult(s,o)},a=async function(){return n(...arguments).constant?await i(...arguments):await o(...arguments)};return CB(a,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:n,estimateGas:async function(){const t=nV(e.runner,"estimateGas");return OB(Jz(t),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await t.estimateGas(await r(...arguments))},populateTransaction:r,send:o,staticCall:i,staticCallResult:s}),Object.defineProperty(a,"fragment",{configurable:!1,enumerable:!0,get:()=>{const n=e.interface.getFunction(t);return OB(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),n}}),a}const aV=Symbol.for("_ethersInternal_contract"),lV=new WeakMap;function cV(e){return lV.get(e[aV])}async function uV(e,t){let n,r=null;if(Array.isArray(t)){const r=function(t){if(jB(t,32))return t;const n=e.interface.getEvent(t);return RB(n,"unknown fragment","name",t),n.topicHash};n=t.map((e=>null==e?null:Array.isArray(e)?e.map(r):r(e)))}else"*"===t?n=[null]:"string"===typeof t?jB(t,32)?n=[t]:(r=e.interface.getEvent(t),RB(r,"unknown fragment","event",t),n=[r.topicHash]):(i=t)&&"object"===typeof i&&"getTopicFilter"in i&&"function"===typeof i.getTopicFilter&&i.fragment?n=await t.getTopicFilter():"fragment"in t?(r=t.fragment,n=[r.topicHash]):RB(!1,"unknown event name","event",t);var i;n=n.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()}));return{fragment:r,tag:n.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:n}}async function dV(e,t){const{subs:n}=cV(e);return n.get((await uV(e,t)).tag)||null}async function hV(e,t,n){const r=rV(e.runner);OB(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:s}=await uV(e,n),{addr:a,subs:l}=cV(e);let c=l.get(o);if(!c){const t={address:a||e,topics:s},u=t=>{let r=i;if(null==r)try{r=e.interface.getEvent(t.topics[0])}catch(o){}if(r){const o=r,s=i?e.interface.decodeEventLog(i,t.data,t.topics):[];pV(e,n,s,(r=>new Kz(e,r,n,o,t)))}else pV(e,n,[],(r=>new qz(e,r,n,t)))};let d=[];c={tag:o,listeners:[],start:()=>{d.length||d.push(r.on(t,u))},stop:async()=>{if(0==d.length)return;let e=d;d=[],await Promise.all(e),r.off(t,u)}},l.set(o,c)}return c}let fV=Promise.resolve();async function pV(e,t,n,r){try{await fV}catch(o){}const i=async function(e,t,n,r){await fV;const i=await dV(e,t);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter((t=>{let{listener:i,once:s}=t;const a=Array.from(n);r&&a.push(r(s?null:i));try{i.call(e,...a)}catch(o){}return!s})),0===i.listeners.length&&(i.stop(),cV(e).subs.delete(i.tag)),s>0}(e,t,n,r);return fV=i,await i}const gV=["then"];class mV{target;interface;runner;filters;[aV];fallback;constructor(e,t,n,r){RB("string"===typeof e||HU(e),"invalid value for Contract target","target",e),null==n&&(n=null);const i=Iz.from(t);let o;CB(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,aV,{value:{}});let s=null,a=null;if(r){const e=rV(n);a=new Gz(this.interface,e,r)}let l=new Map;if("string"===typeof e)if(jB(e))s=e,o=Promise.resolve(e);else{const t=nV(n,"resolveName");if(!Yz(t))throw IB("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=t.resolveName(e).then((t=>{if(null==t)throw IB("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return cV(this).addr=t,t}))}else o=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return cV(this).addr=e,e}));!function(e,t){lV.set(e[aV],t)}(this,{addrPromise:o,addr:s,deployTx:a,subs:l});const c=new Proxy({},{get:(e,t,n)=>{if("symbol"===typeof t||gV.indexOf(t)>=0)return Reflect.get(e,t,n);try{return this.getEvent(t)}catch(r){if(!TB(r,"INVALID_ARGUMENT")||"key"!==r.argument)throw r}},has:(e,t)=>gV.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return CB(this,{filters:c}),CB(this,{fallback:i.receive||i.fallback?oV(this):null}),new Proxy(this,{get:(e,t,n)=>{if("symbol"===typeof t||t in e||gV.indexOf(t)>=0)return Reflect.get(e,t,n);try{return e.getFunction(t)}catch(r){if(!TB(r,"INVALID_ARGUMENT")||"key"!==r.argument)throw r}},has:(e,t)=>"symbol"===typeof t||t in e||gV.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new mV(this.target,this.interface,e)}attach(e){return new mV(e,this.interface,this.runner)}async getAddress(){return await cV(this).addrPromise}async getDeployedCode(){const e=rV(this.runner);OB(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=rV(this.runner);return OB(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,n)=>{const r=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",r)}catch(i){n(i)}};r()}))}deploymentTransaction(){return cV(this).deployTx}getFunction(e){"string"!==typeof e&&(e=e.format());return sV(this,e)}getEvent(e){return"string"!==typeof e&&(e=e.format()),function(e,t){const n=function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const o=e.interface.getEvent(t,r);return OB(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),o},r=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return new tV(e,n(...r),r)};return CB(r,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const n=e.interface.getEvent(t);return OB(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),n}}),r}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){null==t&&(t=0),null==n&&(n="latest");const{addr:r,addrPromise:i}=cV(this),o=r||await i,{fragment:s,topics:a}=await uV(this,e),l={address:o,topics:a,fromBlock:t,toBlock:n},c=rV(this.runner);return OB(c,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await c.getLogs(l)).map((e=>{let t=s;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(n){}if(t)try{return new Hz(e,this.interface,t)}catch(n){return new $z(e,n)}return new Bz(e,c)}))}async on(e,t){const n=await hV(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await hV(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return await pV(this,e,n,null)}async listenerCount(e){if(e){const t=await dV(this,e);return t?t.listeners.length:0}const{subs:t}=cV(this);let n=0;for(const{listeners:r}of t.values())n+=r.length;return n}async listeners(e){if(e){const t=await dV(this,e);return t?t.listeners.map((e=>{let{listener:t}=e;return t})):[]}const{subs:t}=cV(this);let n=[];for(const{listeners:r}of t.values())n=n.concat(r.map((e=>{let{listener:t}=e;return t})));return n}async off(e,t){const n=await dV(this,e);if(!n)return this;if(t){const e=n.listeners.map((e=>{let{listener:t}=e;return t})).indexOf(t);e>=0&&n.listeners.splice(e,1)}return null!=t&&0!==n.listeners.length||(n.stop(),cV(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const t=await dV(this,e);if(!t)return this;t.stop(),cV(this).subs.delete(t.tag)}else{const{subs:e}=cV(this);for(const{tag:t,stop:n}of e.values())n(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends mV{constructor(t){super(t,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)}}}static from(e,t,n){null==n&&(n=null);return new this(e,t,n)}}class yV extends(function(){return mV}()){}var vV="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const bV=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),wV=4;function xV(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),i=1,o=[0,1];for(let w=1;w<r;w++)o.push(i+=n());let s=n(),a=t;t+=s;let l=0,c=0;function u(){return 0==l&&(c=c<<8|e[t++],l=8),c>>--l&1}const d=2**31,h=d>>>1,f=h>>1,p=d-1;let g=0;for(let w=0;w<31;w++)g=g<<1|u();let m=[],y=0,v=d;for(;;){let e=Math.floor(((g-y+1)*i-1)/v),t=0,n=r;for(;n-t>1;){let r=t+n>>>1;e<o[r]?n=r:t=r}if(0==t)break;m.push(t);let s=y+Math.floor(v*o[t]/i),a=y+Math.floor(v*o[t+1]/i)-1;for(;0==((s^a)&h);)g=g<<1&p|u(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&f;)g=g&h|g<<1&p>>>1|u(),s=s<<1^h,a=(a^h)<<1|h|1;y=s,v=1+a-s}let b=r-4;return m.map((t=>{switch(t-b){case 3:return b+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return b+256+(e[a++]<<8|e[a++]);case 1:return b+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,n)=>t[e.charCodeAt(0)]=n));let n=e.length,r=new Uint8Array(6*n>>3);for(let i=0,o=0,s=0,a=0;i<n;i++)a=a<<6|t[e.charCodeAt(i)],s+=6,s>=8&&(r[o++]=a>>(s-=8));return r}(e)))}function AV(e){return 1&e?~e>>1:e>>1}function EV(e,t){let n=Array(e);for(let r=0,i=0;r<e;r++)n[r]=i+=AV(t());return n}function SV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];for(;;){let r=e(),i=e();if(!i)break;t+=r;for(let e=0;e<i;e++)n.push(t+e);t+=i+1}return n}function kV(e){return _V((()=>{let t=SV(e);if(t.length)return t}))}function CV(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(PV(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(IV(n,e))}return t.flat()}function _V(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function TV(e,t,n){let r=Array(e).fill().map((()=>[]));for(let i=0;i<t;i++)EV(e,n).forEach(((e,t)=>r[t].push(e)));return r}function PV(e,t){let n=1+t(),r=t(),i=_V(t);return TV(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*r;return[o+t*n,s.map((e=>e+i))]}))}))}function IV(e,t){return TV(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function OV(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function RV(e){let t=[];for(let n=0,r=e.length;n<r;){let r=e.codePointAt(n);n+=r<65536?1:2,t.push(r)}return t}function NV(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let n=[];for(let r=0;r<t;)n.push(String.fromCodePoint(...e.slice(r,r+=4096)));return n.join("")}function MV(e,t){let n=e.length,r=n-t.length;for(let i=0;0==r&&i<n;i++)r=e[i]-t[i];return r}var DV="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const LV=44032,BV=4352,FV=4449,jV=4519,UV=28,zV=21*UV,VV=LV+19*zV,HV=BV+19,$V=FV+21,WV=jV+UV;function GV(e){return e>>24&255}function qV(e){return 16777215&e}let KV,QV,XV,JV;function YV(e){return e>=LV&&e<VV}function ZV(e,t){if(e>=BV&&e<HV&&t>=FV&&t<$V)return LV+(e-BV)*zV+(t-FV)*UV;if(YV(e)&&t>jV&&t<WV&&(e-LV)%UV==0)return e+(t-jV);{let n=JV.get(e);return n&&(n=n.get(t),n)?n:-1}}function eH(e){KV||function(){let e=xV(DV);KV=new Map(kV(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),QV=new Set(SV(e)),XV=new Map,JV=new Map;for(let[t,n]of CV(e)){if(!QV.has(t)&&2==n.length){let[e,r]=n,i=JV.get(e);i||(i=new Map,JV.set(e,i)),i.set(r,t)}XV.set(t,n.reverse())}}();let t=[],n=[],r=!1;function i(e){let n=KV.get(e);n&&(r=!0,e|=n),t.push(e)}for(let o of e)for(;;){if(o<128)t.push(o);else if(YV(o)){let e=o-LV,t=e%zV/UV|0,n=e%UV;i(BV+(e/zV|0)),i(FV+t),n>0&&i(jV+n)}else{let e=XV.get(o);e?n.push(...e):i(o)}if(!n.length)break;o=n.pop()}if(r&&t.length>1){let e=GV(t[0]);for(let n=1;n<t.length;n++){let r=GV(t[n]);if(0==r||e<=r){e=r;continue}let i=n-1;for(;;){let n=t[i+1];if(t[i+1]=t[i],t[i]=n,!i)break;if(e=GV(t[--i]),e<=r)break}e=GV(t[n])}}return t}function tH(e){return eH(e).map(qV)}function nH(e){return function(e){let t=[],n=[],r=-1,i=0;for(let o of e){let e=GV(o),s=qV(o);if(-1==r)0==e?r=s:t.push(s);else if(i>0&&i>=e)0==e?(t.push(r,...n),n.length=0,r=s):n.push(s),i=e;else{let o=ZV(r,s);o>=0?r=o:0==i&&0==e?(t.push(r),r=s):(n.push(s),i=e)}}return r>=0&&t.push(r,...n),t}(eH(e))}const rH=45,iH=".",oH=65039,sH=1,aH=e=>Array.from(e);function lH(e,t){return e.P.has(t)||e.Q.has(t)}class cH extends Array{get is_emoji(){return!0}}let uH,dH,hH,fH,pH,gH,mH,yH,vH,bH,wH,xH;function AH(){if(uH)return;let e=xV(vV);const t=()=>SV(e),n=()=>new Set(t()),r=(e,t)=>t.forEach((t=>e.add(t)));uH=new Map(CV(e)),dH=n(),hH=t(),fH=new Set(t().map((e=>hH[e]))),hH=new Set(hH),pH=n(),gH=n();let i=kV(e),o=e();const s=()=>{let e=new Set;return t().forEach((t=>r(e,i[t]))),r(e,t()),e};mH=_V((t=>{let n=_V(e).map((e=>e+96));if(n.length){let r=t>=o;return n[0]-=32,n=NV(n),r&&(n=`Restricted[${n}]`),{N:n,P:s(),Q:s(),M:!e(),R:r}}})),yH=n(),vH=new Map;let a=t().concat(aH(yH)).sort(((e,t)=>e-t));a.forEach(((t,n)=>{let r=e(),i=a[n]=r?a[n-r]:{V:[],M:new Map};i.V.push(t),yH.has(t)||vH.set(t,i)}));for(let{V:u,M:d}of new Set(vH.values())){let e=[];for(let n of u){let t=mH.filter((e=>lH(e,n))),i=e.find((e=>{let{G:n}=e;return t.some((e=>n.has(e)))}));i||(i={G:new Set,V:[]},e.push(i)),i.V.push(n),r(i.G,t)}let t=e.flatMap((e=>aH(e.G)));for(let{G:n,V:r}of e){let e=new Set(t.filter((e=>!n.has(e))));for(let t of r)d.set(t,e)}}bH=new Set;let l=new Set;const c=e=>bH.has(e)?l.add(e):bH.add(e);for(let u of mH){for(let e of u.P)c(e);for(let e of u.Q)c(e)}for(let u of bH)vH.has(u)||l.has(u)||vH.set(u,sH);r(bH,tH(bH)),wH=function(e){let t=[],n=SV(e);return function e(n,r,i){let{S:o,B:s}=n;if(!(4&o&&i===r[r.length-1])){2&o&&(i=r[r.length-1]),1&o&&t.push(r);for(let t of s)for(let n of t.Q)e(t,[...r,n],i)}}(function t(r){return{S:e(),B:_V((()=>{let r=SV(e).map((e=>n[e]));if(r.length)return t(r)})),Q:r}}([]),[]),t}(e).map((e=>cH.from(e))).sort(MV),xH=new Map;for(let u of wH){let e=[xH];for(let t of u){let n=e.map((e=>{let n=e.get(t);return n||(n=new Map,e.set(t,n)),n}));t===oH?e.push(...n):e=n}for(let t of e)t.V=u}}function EH(e){return(CH(e)?"":`${SH(kH([e]))} `)+OV(e)}function SH(e){return`"${e}"\u200e`}function kH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:OV,r=[];var i;i=e[0],AH(),hH.has(i)&&r.push("\u25cc"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let o=0,s=e.length;for(let a=0;a<s;a++){let t=e[a];CH(t)&&(r.push(NV(e.slice(o,a))),r.push(n(t)),o=a+1)}return r.push(NV(e.slice(o,s))),r.join("")}function CH(e){return AH(),pH.has(e)}function _H(e,t,n){if(!e)return[];AH();let r=0;return e.split(iH).map((e=>{let i=RV(e),o={input:i,offset:r};r+=i.length+1;try{let e,r=o.tokens=RH(i,t,n),s=r.length;if(!s)throw new Error("empty label");let a=o.output=r.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(a),!(o.emoji=s>1||r[0].is_emoji)&&a.every((e=>e<128)))!function(e){if(e.length>=4&&e[2]==rH&&e[3]==rH)throw new Error(`invalid label extension: "${NV(e.slice(0,4))}"`)}(a),e="ASCII";else{let t=r.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(hH.has(a[0]))throw OH("leading combining mark");for(let e=1;e<s;e++){let t=r[e];if(!t.is_emoji&&hH.has(t[0]))throw OH(`emoji + combining mark: "${NV(r[e-1])} + ${kH([t[0]])}"`)}!function(e){let t=e[0],n=bV.get(t);if(n)throw OH(`leading ${n}`);let r=e.length,i=-1;for(let o=1;o<r;o++){t=e[o];let r=bV.get(t);if(r){if(i==o)throw OH(`${n} + ${r}`);i=o+1,n=r}}if(i==r)throw OH(`trailing ${n}`)}(a);let n=aH(new Set(t)),[i]=function(e){let t=mH;for(let n of e){let e=t.filter((e=>lH(e,n)));if(!e.length)throw mH.some((e=>lH(e,n)))?IH(t[0],n):PH(n);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let n of t)if(!lH(e,n))throw IH(e,n);if(e.M){let e=tH(t);for(let t=1,n=e.length;t<n;t++)if(fH.has(e[t])){let r=t+1;for(let i;r<n&&fH.has(i=e[r]);r++)for(let n=t;n<r;n++)if(e[n]==i)throw new Error(`duplicate non-spacing marks: ${EH(i)}`);if(r-t>wV)throw new Error(`excessive non-spacing marks: ${SH(kH(e.slice(t-1,r)))} (${r-t}/${wV})`);t=r}}}(i,t),function(e,t){let n,r=[];for(let i of t){let e=vH.get(i);if(e===sH)return;if(e){let t=e.M.get(i);if(n=n?n.filter((e=>t.has(e))):aH(t),!n.length)return}else r.push(i)}if(n)for(let i of n)if(r.every((e=>lH(i,e))))throw new Error(`whole-script confusable: ${e.N}/${i.N}`)}(i,n),e=i.N}else e="Emoji"}o.type=e}catch(s){o.error=s}return o}))}function TH(e){return e.map((t=>{let{input:n,error:r,output:i}=t;if(r){let t=r.message;throw new Error(1==e.length?t:`Invalid label ${SH(kH(n,63))}: ${t}`)}return NV(i)})).join(iH)}function PH(e){return new Error(`disallowed character: ${EH(e)}`)}function IH(e,t){let n=EH(t),r=mH.find((e=>e.P.has(t)));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function OH(e){return new Error(`illegal placement: ${e}`)}function RH(e,t,n){let r=[],i=[];for(e=e.slice().reverse();e.length;){let o=MH(e);if(o)i.length&&(r.push(t(i)),i=[]),r.push(n(o));else{let t=e.pop();if(bH.has(t))i.push(t);else{let e=uH.get(t);if(e)i.push(...e);else if(!dH.has(t))throw PH(t)}}}return i.length&&r.push(t(i)),r}function NH(e){return e.filter((e=>e!=oH))}function MH(e,t){let n,r=xH,i=e.length;for(;i&&(r=r.get(e[--i]),r);){let{V:o}=r;o&&(n=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return n}const DH=new Uint8Array(32);function LH(e){return RB(0!==e.length,"invalid ENS name; empty component","comp",e),e}function BH(e){const t=zj(function(e){try{if(0===e.length)throw new Error("empty label");return function(e){return TH(_H(e,nH,NH))}(e)}catch(t){RB(!1,`invalid ENS name (${t.message})`,"name",e)}}(e)),n=[];if(0===e.length)return n;let r=0;for(let i=0;i<t.length;i++){46===t[i]&&(n.push(LH(t.slice(r,i))),r=i+1)}return RB(r<t.length,"invalid ENS name; empty component","name",e),n.push(LH(t.slice(r))),n}function FH(e){RB("string"===typeof e,"invalid ENS name; not a string","name",e),RB(e.length,"invalid ENS name (empty label)","name",e);let t=DH;const n=BH(e);for(;n.length;)t=cj(HB([t,cj(n.pop())]));return VB(t)}function jH(e,t){const n=null!=t?t:63;return RB(n<=255,"DNS encoded label cannot exceed 255","length",n),VB(HB(BH(e).map((t=>{RB(t.length<=n,`label ${JSON.stringify(e)} exceeds ${n} bytes`,"name",e);const r=new Uint8Array(t.length+1);return r.set(t,1),r[0]=r.length-1,r}))))+"00"}DH.fill(0);class UH extends zF{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=FF(this.buffer)}update(e){kF(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=UF(e)).length;for(let o=0;o<i;){const s=Math.min(r-this.pos,i-o);if(s!==r)n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=FF(e);for(;r<=i-o;o+=r)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){kF(this),CF(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(n,0),o=0);for(let u=o;u<r;u++)t[u]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),l=r?4:0,c=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+c,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=FF(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=a/4,c=this.get();if(l>c.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)s.setUint32(4*u,c[u],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=o,r%t&&e.buffer.set(n),e}}const zH=(e,t,n)=>e&t^~e&n,VH=(e,t,n)=>e&t^e&n^t&n,HH=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),$H=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),WH=new Uint32Array(64);class GH extends UH{constructor(){super(64,32,8,!1),this.A=0|$H[0],this.B=0|$H[1],this.C=0|$H[2],this.D=0|$H[3],this.E=0|$H[4],this.F=0|$H[5],this.G=0|$H[6],this.H=0|$H[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let u=0;u<16;u++,t+=4)WH[u]=e.getUint32(t,!1);for(let u=16;u<64;u++){const e=WH[u-15],t=WH[u-2],n=jF(e,7)^jF(e,18)^e>>>3,r=jF(t,17)^jF(t,19)^t>>>10;WH[u]=r+WH[u-7]+n+WH[u-16]|0}let{A:n,B:r,C:i,D:o,E:s,F:a,G:l,H:c}=this;for(let u=0;u<64;u++){const e=c+(jF(s,6)^jF(s,11)^jF(s,25))+zH(s,a,l)+HH[u]+WH[u]|0,t=(jF(n,2)^jF(n,13)^jF(n,22))+VH(n,r,i)|0;c=l,l=a,a=s,s=o+e|0,o=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(n,r,i,o,s,a,l,c)}roundClean(){WH.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const qH=VF((()=>new GH)),[KH,QH]=(()=>DF.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),XH=new Uint32Array(80),JH=new Uint32Array(80);class YH extends UH{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:l,El:c,Fh:u,Fl:d,Gh:h,Gl:f,Hh:p,Hl:g}=this;return[e,t,n,r,i,o,s,a,l,c,u,d,h,f,p,g]}set(e,t,n,r,i,o,s,a,l,c,u,d,h,f,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|l,this.El=0|c,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let v=0;v<16;v++,t+=4)XH[v]=e.getUint32(t),JH[v]=e.getUint32(t+=4);for(let v=16;v<80;v++){const e=0|XH[v-15],t=0|JH[v-15],n=DF.rotrSH(e,t,1)^DF.rotrSH(e,t,8)^DF.shrSH(e,t,7),r=DF.rotrSL(e,t,1)^DF.rotrSL(e,t,8)^DF.shrSL(e,t,7),i=0|XH[v-2],o=0|JH[v-2],s=DF.rotrSH(i,o,19)^DF.rotrBH(i,o,61)^DF.shrSH(i,o,6),a=DF.rotrSL(i,o,19)^DF.rotrBL(i,o,61)^DF.shrSL(i,o,6),l=DF.add4L(r,a,JH[v-7],JH[v-16]),c=DF.add4H(l,n,s,XH[v-7],XH[v-16]);XH[v]=0|c,JH[v]=0|l}let{Ah:n,Al:r,Bh:i,Bl:o,Ch:s,Cl:a,Dh:l,Dl:c,Eh:u,El:d,Fh:h,Fl:f,Gh:p,Gl:g,Hh:m,Hl:y}=this;for(let v=0;v<80;v++){const e=DF.rotrSH(u,d,14)^DF.rotrSH(u,d,18)^DF.rotrBH(u,d,41),t=DF.rotrSL(u,d,14)^DF.rotrSL(u,d,18)^DF.rotrBL(u,d,41),b=u&h^~u&p,w=d&f^~d&g,x=DF.add5L(y,t,w,QH[v],JH[v]),A=DF.add5H(x,m,e,b,KH[v],XH[v]),E=0|x,S=DF.rotrSH(n,r,28)^DF.rotrBH(n,r,34)^DF.rotrBH(n,r,39),k=DF.rotrSL(n,r,28)^DF.rotrBL(n,r,34)^DF.rotrBL(n,r,39),C=n&i^n&s^i&s,_=r&o^r&a^o&a;m=0|p,y=0|g,p=0|h,g=0|f,h=0|u,f=0|d,({h:u,l:d}=DF.add(0|l,0|c,0|A,0|E)),l=0|s,c=0|a,s=0|i,a=0|o,i=0|n,o=0|r;const T=DF.add3L(E,k,_);n=DF.add3H(T,A,S,C),r=0|T}({h:n,l:r}=DF.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:o}=DF.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=DF.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:l,l:c}=DF.add(0|this.Dh,0|this.Dl,0|l,0|c)),({h:u,l:d}=DF.add(0|this.Eh,0|this.El,0|u,0|d)),({h:h,l:f}=DF.add(0|this.Fh,0|this.Fl,0|h,0|f)),({h:p,l:g}=DF.add(0|this.Gh,0|this.Gl,0|p,0|g)),({h:m,l:y}=DF.add(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(n,r,i,o,s,a,l,c,u,d,h,f,p,g,m,y)}roundClean(){XH.fill(0),JH.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ZH=VF((()=>new YH));const e$=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global;throw new Error("unable to locate global object")}();e$.crypto||e$.msCrypto;function t$(e){switch(e){case"sha256":return qH.create();case"sha512":return ZH.create()}RB(!1,"invalid hashing algorithm name","algorithm",e)}const n$=function(e){return t$("sha256").update(e).digest()},r$=function(e){return t$("sha512").update(e).digest()};let i$=n$,o$=r$,s$=!1,a$=!1;function l$(e){const t=BB(e,"data");return VB(i$(t))}function c$(e){const t=BB(e,"data");return VB(o$(t))}l$._=n$,l$.lock=function(){s$=!0},l$.register=function(e){if(s$)throw new Error("sha256 is locked");i$=e},Object.freeze(l$),c$._=r$,c$.lock=function(){a$=!0},c$.register=function(e){if(a$)throw new Error("sha512 is locked");o$=e},Object.freeze(l$);const u$="0x0000000000000000000000000000000000000000000000000000000000000000",d$=BigInt(0),h$=BigInt(1),f$=BigInt(2),p$=BigInt(27),g$=BigInt(28),m$=BigInt(35),y$={};function v$(e){return qB(sF(e),32)}class b${#Z;#ee;#te;#ne;get r(){return this.#Z}set r(e){RB(32===$B(e),"invalid r","value",e),this.#Z=VB(e)}get s(){return this.#ee}set s(e){RB(32===$B(e),"invalid s","value",e);const t=VB(e);RB(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#ee=t}get v(){return this.#te}set v(e){const t=iF(e,"value");RB(27===t||28===t,"invalid v","v",e),this.#te=t}get networkV(){return this.#ne}get legacyChainId(){const e=this.networkV;return null==e?null:b$.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=BB(this.s);return this.yParity&&(e[0]|=128),VB(e)}get compactSerialized(){return HB([this.r,this.yParityAndS])}get serialized(){return HB([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,n,r){DB(e,y$,"Signature"),this.#Z=t,this.#ee=n,this.#te=r,this.#ne=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new b$(y$,this.r,this.s,this.v);return this.networkV&&(e.#ne=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=eF(e,"v");return t==p$||t==g$?d$:(RB(t>=m$,"invalid EIP-155 v","v",e),(t-m$)/f$)}static getChainIdV(e,t){return eF(e)*f$+BigInt(35+t-27)}static getNormalizedV(e){const t=eF(e);return t===d$||t===p$?27:t===h$||t===g$?28:(RB(t>=m$,"invalid v","v",e),t&h$?27:28)}static from(e){function t(t,n){RB(t,n,"signature",e)}if(null==e)return new b$(y$,u$,u$,27);if("string"===typeof e){const n=BB(e,"signature");if(64===n.length){const e=VB(n.slice(0,32)),t=n.slice(32,64),r=128&t[0]?28:27;return t[0]&=127,new b$(y$,e,VB(t),r)}if(65===n.length){const e=VB(n.slice(0,32)),r=n.slice(32,64);t(0===(128&r[0]),"non-canonical s");const i=b$.getNormalizedV(n[64]);return new b$(y$,e,VB(r),i)}t(!1,"invalid raw signature length")}if(e instanceof b$)return e.clone();const n=e.r;t(null!=n,"missing r");const r=v$(n),i=function(e,n){if(null!=e)return v$(e);if(null!=n){t(jB(n,32),"invalid yParityAndS");const e=BB(n);return e[0]&=127,VB(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(0==(128&BB(i)[0]),"non-canonical s");const{networkV:o,v:s}=function(e,n,r){if(null!=e){const t=eF(e);return{networkV:t>=m$?t:void 0,v:b$.getNormalizedV(t)}}if(null!=n)return t(jB(n,32),"invalid yParityAndS"),{v:128&BB(n)[0]?28:27};if(null!=r){switch(iF(r,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),a=new b$(y$,r,i,s);return o&&(a.#ne=o),t(null==e.yParity||iF(e.yParity,"sig.yParity")===a.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===a.yParityAndS,"yParityAndS mismatch"),a}}BigInt(0);const w$=BigInt(1),x$=BigInt(2),A$=e=>e instanceof Uint8Array,E$=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function S$(e){if(!A$(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=E$[e[n]];return t}function k$(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function C$(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(t/2);for(let r=0;r<n.length;r++){const t=2*r,i=e.slice(t,t+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");n[r]=o}return n}function _$(e){return k$(S$(e))}function T$(e){if(!A$(e))throw new Error("Uint8Array expected");return k$(S$(Uint8Array.from(e).reverse()))}function P$(e,t){return C$(e.toString(16).padStart(2*t,"0"))}function I$(e,t){return P$(e,t).reverse()}function O$(e,t,n){let r;if("string"===typeof t)try{r=C$(t)}catch(gK){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${gK}`)}else{if(!A$(t))throw new Error(`${e} must be hex string or Uint8Array`);r=Uint8Array.from(t)}const i=r.length;if("number"===typeof n&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r}function R$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=new Uint8Array(t.reduce(((e,t)=>e+t.length),0));let i=0;return t.forEach((e=>{if(!A$(e))throw new Error("Uint8Array expected");r.set(e,i),i+=e.length})),r}const N$=e=>(x$<<BigInt(e-1))-w$,M$=e=>new Uint8Array(e),D$=e=>Uint8Array.from(e);function L$(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");let r=M$(e),i=M$(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n(i,r,...t)},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M$();i=a(D$([0]),e),r=a(),0!==e.length&&(i=a(D$([1]),e),r=a())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){r=a();const t=r.slice();n.push(t),e+=r.length}return R$(...n)};return(e,t)=>{let n;for(s(),l(e);!(n=t(c()));)l();return s(),n}}const B$={bigint:e=>"bigint"===typeof e,function:e=>"function"===typeof e,boolean:e=>"boolean"===typeof e,string:e=>"string"===typeof e,stringOrUint8Array:e=>"string"===typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"===typeof e&&Number.isSafeInteger(e.outputLen)};function F$(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(t,n,r)=>{const i=B$[n];if("function"!==typeof i)throw new Error(`Invalid validator "${n}", expected function`);const o=e[t];if((!r||void 0!==o)&&!i(o,e))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${n}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const j$=BigInt(0),U$=BigInt(1),z$=BigInt(2),V$=BigInt(3),H$=BigInt(4),$$=BigInt(5),W$=BigInt(8);BigInt(9),BigInt(16);function G$(e,t){const n=e%t;return n>=j$?n:t+n}function q$(e,t,n){if(n<=j$||t<j$)throw new Error("Expected power/modulo > 0");if(n===U$)return j$;let r=U$;for(;t>j$;)t&U$&&(r=r*e%n),e=e*e%n,t>>=U$;return r}function K$(e,t,n){let r=e;for(;t-- >j$;)r*=r,r%=n;return r}function Q$(e,t){if(e===j$||t<=j$)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=G$(e,t),r=t,i=j$,o=U$,s=U$,a=j$;for(;n!==j$;){const e=r/n,t=r%n,l=i-s*e,c=o-a*e;r=n,n=t,i=s,o=a,s=l,a=c}if(r!==U$)throw new Error("invert: does not exist");return G$(i,t)}function X$(e){if(e%H$===V$){const t=(e+U$)/H$;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}if(e%W$===$$){const t=(e-$$)/W$;return function(e,n){const r=e.mul(n,z$),i=e.pow(r,t),o=e.mul(n,i),s=e.mul(e.mul(o,z$),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),n))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-U$)/z$;let n,r,i;for(n=e-U$,r=0;n%z$===j$;n/=z$,r++);for(i=z$;i<e&&q$(i,t,e)!==e-U$;i++);if(1===r){const t=(e+U$)/H$;return function(e,n){const r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw new Error("Cannot find square root");return r}}const o=(n+U$)/z$;return function(e,s){if(e.pow(s,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=r,l=e.pow(e.mul(e.ONE,i),n),c=e.pow(s,o),u=e.pow(s,n);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const n=e.pow(l,U$<<BigInt(a-t-1));l=e.sqr(n),c=e.mul(c,n),u=e.mul(u,l),a=t}return c}}(e)}const J$=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Y$(e,t){const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Z$(e){if("bigint"!==typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function eW(e){const t=Z$(e);return t+Math.ceil(t/2)}class tW extends zF{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,SF(e);const n=UF(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),i.fill(0)}update(e){return kF(this),this.iHash.update(e),this}digestInto(e){kF(this),EF(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const nW=(e,t,n)=>new tW(e,t).update(n).digest();nW.create=(e,t)=>new tW(e,t);const rW=BigInt(0),iW=BigInt(1);function oW(e){return function(e){const t=J$.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});F$(e,t)}(e.Fp),F$(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Y$(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:sW,aT:aW}=t,lW={Err:class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},_parseInt(e){const{Err:t}=lW;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(128&r[0])throw new t("Invalid signature integer: negative");if(0===r[0]&&!(128&r[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:sW(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=lW,n="string"===typeof e?aW(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let r=n.length;if(r<2||48!=n[0])throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=lW._parseInt(n.subarray(2)),{d:s,l:a}=lW._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:s}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,n=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,s=i.length/2,a=n(o),l=n(s);return`30${n(s+o+4)}02${l}${i}02${a}${r}`}},cW=BigInt(0),uW=BigInt(1),dW=(BigInt(2),BigInt(3));BigInt(4);function hW(e){const t=function(e){const t=oW(e);F$(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof n||"bigint"!==typeof n.beta||"function"!==typeof n.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=t,r=t.toBytes||((e,t,r)=>{const i=t.toAffine();return R$(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),i=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function o(e){const{a:r,b:i}=t,o=n.sqr(e),s=n.mul(o,e);return n.add(n.add(s,n.mul(e,r)),i)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(e){return"bigint"===typeof e&&cW<e&&e<t.n}function a(e){if(!s(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function l(e){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:i,n:o}=t;if(n&&"bigint"!==typeof e){if(e instanceof Uint8Array&&(e=S$(e)),"string"!==typeof e||!n.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*r,"0")}let s;try{s="bigint"===typeof e?e:_$(O$("private key",e,r))}catch(l){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof e}`)}return i&&(s=G$(s,o)),a(s),s}const c=new Map;function u(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t))throw new Error("y required");if(null==r||!n.isValid(r))throw new Error("z required")}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(i(O$("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(l(e))}_setWindowSize(e){this._WINDOW_SIZE=e,c.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:r}=this.toAffine();if(!n.isValid(e)||!n.isValid(r))throw new Error("bad point: x or y not FE");const i=n.sqr(r),s=o(e);if(!n.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){u(e);const{px:t,py:r,pz:i}=this,{px:o,py:s,pz:a}=e,l=n.eql(n.mul(t,a),n.mul(o,i)),c=n.eql(n.mul(r,a),n.mul(s,i));return l&&c}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:r}=t,i=n.mul(r,dW),{px:o,py:s,pz:a}=this;let l=n.ZERO,c=n.ZERO,u=n.ZERO,h=n.mul(o,o),f=n.mul(s,s),p=n.mul(a,a),g=n.mul(o,s);return g=n.add(g,g),u=n.mul(o,a),u=n.add(u,u),l=n.mul(e,u),c=n.mul(i,p),c=n.add(l,c),l=n.sub(f,c),c=n.add(f,c),c=n.mul(l,c),l=n.mul(g,l),u=n.mul(i,u),p=n.mul(e,p),g=n.sub(h,p),g=n.mul(e,g),g=n.add(g,u),u=n.add(h,h),h=n.add(u,h),h=n.add(h,p),h=n.mul(h,g),c=n.add(c,h),p=n.mul(s,a),p=n.add(p,p),h=n.mul(p,g),l=n.sub(l,h),u=n.mul(p,f),u=n.add(u,u),u=n.add(u,u),new d(l,c,u)}add(e){u(e);const{px:r,py:i,pz:o}=this,{px:s,py:a,pz:l}=e;let c=n.ZERO,h=n.ZERO,f=n.ZERO;const p=t.a,g=n.mul(t.b,dW);let m=n.mul(r,s),y=n.mul(i,a),v=n.mul(o,l),b=n.add(r,i),w=n.add(s,a);b=n.mul(b,w),w=n.add(m,y),b=n.sub(b,w),w=n.add(r,o);let x=n.add(s,l);return w=n.mul(w,x),x=n.add(m,v),w=n.sub(w,x),x=n.add(i,o),c=n.add(a,l),x=n.mul(x,c),c=n.add(y,v),x=n.sub(x,c),f=n.mul(p,w),c=n.mul(g,v),f=n.add(c,f),c=n.sub(y,f),f=n.add(y,f),h=n.mul(c,f),y=n.add(m,m),y=n.add(y,m),v=n.mul(p,v),w=n.mul(g,w),y=n.add(y,v),v=n.sub(m,v),v=n.mul(p,v),w=n.add(w,v),m=n.mul(y,w),h=n.add(h,m),m=n.mul(x,w),c=n.mul(b,c),c=n.sub(c,m),m=n.mul(b,y),f=n.mul(x,f),f=n.add(f,m),new d(c,h,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return f.wNAFCached(this,c,e,(e=>{const t=n.invertBatch(e.map((e=>e.pz)));return e.map(((e,n)=>e.toAffine(t[n]))).map(d.fromAffine)}))}multiplyUnsafe(e){const r=d.ZERO;if(e===cW)return r;if(a(e),e===uW)return this;const{endo:i}=t;if(!i)return f.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:l,k2:c}=i.splitScalar(e),u=r,h=r,p=this;for(;s>cW||c>cW;)s&uW&&(u=u.add(p)),c&uW&&(h=h.add(p)),p=p.double(),s>>=uW,c>>=uW;return o&&(u=u.negate()),l&&(h=h.negate()),h=new d(n.mul(h.px,i.beta),h.py,h.pz),u.add(h)}multiply(e){a(e);let r,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:l}=s.splitScalar(o);let{p:c,f:u}=this.wNAF(t),{p:h,f:p}=this.wNAF(l);c=f.constTimeNegate(e,c),h=f.constTimeNegate(a,h),h=new d(n.mul(h.px,s.beta),h.py,h.pz),r=c.add(h),i=u.add(p)}else{const{p:e,f:t}=this.wNAF(o);r=e,i=t}return d.normalizeZ([r,i])[0]}multiplyAndAddUnsafe(e,t,n){const r=d.BASE,i=(e,t)=>t!==cW&&t!==uW&&e.equals(r)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,n));return o.is0()?void 0:o}toAffine(e){const{px:t,py:r,pz:i}=this,o=this.is0();null==e&&(e=o?n.ONE:n.inv(i));const s=n.mul(t,e),a=n.mul(r,e),l=n.mul(i,e);if(o)return{x:n.ZERO,y:n.ZERO};if(!n.eql(l,n.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===uW)return!0;if(n)return n(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===uW?this:n?n(d,this):this.multiplyUnsafe(t.h)}toRawBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),r(d,this,e)}toHex(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return S$(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const h=t.nBitLength,f=function(e,t){const n=(e,t)=>{const n=t.negate();return e?n:t},r=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let r=e.ZERO,i=t;for(;n>rW;)n&iW&&(r=r.add(i)),i=i.double(),n>>=iW;return r},precomputeWindow(e,t){const{windows:n,windowSize:i}=r(t),o=[];let s=e,a=s;for(let r=0;r<n;r++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:s,windowSize:a}=r(t);let l=e.ZERO,c=e.BASE;const u=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<s;e++){const t=e*a;let r=Number(o&u);o>>=h,r>a&&(r-=d,o+=iW);const s=t,f=t+Math.abs(r)-1,p=e%2!==0,g=r<0;0===r?c=c.add(n(p,i[s])):l=l.add(n(g,i[f]))}return{p:l,f:c}},wNAFCached(e,t,n,r){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,r(o))),this.wNAF(i,o,n)}}}(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:s}}function fW(e){const t=function(e){const t=oW(e);return F$(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(e){return G$(e,r)}function a(e){return Q$(e,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:c,weierstrassEquation:u,isWithinCurveOrder:d}=hW({...t,toBytes(e,t,r){const i=t.toAffine(),o=n.toBytes(i.x),s=R$;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,n.toBytes(i.y))},fromBytes(e){const t=e.length,r=e[0],s=e.subarray(1);if(t!==i||2!==r&&3!==r){if(t===o&&4===r){return{x:n.fromBytes(s.subarray(0,n.BYTES)),y:n.fromBytes(s.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const e=_$(s);if(!(cW<(a=e)&&a<n.ORDER))throw new Error("Point is not on curve");const t=u(e);let i=n.sqrt(t);return 1===(1&r)!==((i&uW)===uW)&&(i=n.neg(i)),{x:e,y:i}}var a}}),h=e=>S$(P$(e,t.nByteLength));function f(e){return e>r>>uW}const p=(e,t,n)=>_$(e.slice(t,n));class g{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){const n=t.nByteLength;return e=O$("compactSignature",e,2*n),new g(p(e,0,n),p(e,n,2*n))}static fromDER(e){const{r:t,s:n}=lW.toSig(O$("DER",e));return new g(t,n)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:r,s:i,recovery:o}=this,c=b(O$("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const u=2===o||3===o?r+t.n:r;if(u>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=0===(1&o)?"02":"03",f=l.fromHex(d+h(u)),p=a(u),g=s(-c*p),m=s(i*p),y=l.BASE.multiplyAndAddUnsafe(f,g,m);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return f(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return C$(this.toDERHex())}toDERHex(){return lW.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return C$(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const m={isValidPrivateKey(e){try{return c(e),!0}catch(t){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{const e=eW(t.n);return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.length,i=Z$(t),o=eW(t);if(r<16||r<o||r>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=G$(n?_$(e):T$(e),t-U$)+U$;return n?I$(s,i):P$(s,i)}(t.randomBytes(e),t.n)},precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function y(e){const t=e instanceof Uint8Array,n="string"===typeof e,r=(t||n)&&e.length;return t?r===i||r===o:n?r===2*i||r===2*o:e instanceof l}const v=t.bits2int||function(e){const n=_$(e),r=8*e.length-t.nBitLength;return r>0?n>>BigInt(r):n},b=t.bits2int_modN||function(e){return s(v(e))},w=N$(t.nBitLength);function x(e){if("bigint"!==typeof e)throw new Error("bigint expected");if(!(cW<=e&&e<w))throw new Error(`bigint expected < 2^${t.nBitLength}`);return P$(e,t.nByteLength)}function A(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;if(["recovered","canonical"].some((e=>e in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:u}=t;let{lowS:h,prehash:p,extraEntropy:m}=i;null==h&&(h=!0),e=O$("msgHash",e),p&&(e=O$("prehashed msgHash",o(e)));const y=b(e),w=c(r),A=[x(w),x(y)];if(null!=m){const e=!0===m?u(n.BYTES):m;A.push(O$("extraEntropy",e))}const S=R$(...A),k=y;return{seed:S,k2sig:function(e){const t=v(e);if(!d(t))return;const n=a(t),r=l.BASE.multiply(t).toAffine(),i=s(r.x);if(i===cW)return;const o=s(n*s(k+i*w));if(o===cW)return;let c=(r.x===i?0:2)|Number(r.y&uW),u=o;return h&&f(o)&&(u=function(e){return f(e)?s(-e):e}(o),c^=1),new g(i,u,c)}}}const E={lowS:t.lowS,prehash:!1},S={lowS:t.lowS,prehash:!1};return l.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return l.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return l.fromHex(t).multiply(c(e)).toRawBytes(n)},sign:function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;const{seed:i,k2sig:o}=A(e,n,r),s=t;return L$(s.hash.outputLen,s.nByteLength,s.hmac)(i,o)},verify:function(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:S;const o=e;if(n=O$("msgHash",n),r=O$("publicKey",r),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=i;let d,h;try{if("string"===typeof o||o instanceof Uint8Array)try{d=g.fromDER(o)}catch(A){if(!(A instanceof lW.Err))throw A;d=g.fromCompact(o)}else{if("object"!==typeof o||"bigint"!==typeof o.r||"bigint"!==typeof o.s)throw new Error("PARSE");{const{r:e,s:t}=o;d=new g(e,t)}}h=l.fromHex(r)}catch(E){if("PARSE"===E.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&d.hasHighS())return!1;u&&(n=t.hash(n));const{r:f,s:p}=d,m=b(n),y=a(p),v=s(m*y),w=s(f*y),x=l.BASE.multiplyAndAddUnsafe(h,v,w)?.toAffine();return!!x&&s(x.x)===f},ProjectivePoint:l,Signature:g,utils:m}}function pW(e){return{hash:e,hmac:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return nW(e,t,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=new Uint8Array(t.reduce(((e,t)=>e+t.length),0));let i=0;return t.forEach((e=>{if(!BF(e))throw new Error("Uint8Array expected");r.set(e,i),i+=e.length})),r}(...r))},randomBytes:HF}}const gW=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),mW=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),yW=BigInt(1),vW=BigInt(2),bW=(e,t)=>(e+t/vW)/t;function wW(e){const t=gW,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),c=e*e*e%t,u=c*c*e%t,d=K$(u,n,t)*u%t,h=K$(d,n,t)*u%t,f=K$(h,vW,t)*c%t,p=K$(f,i,t)*f%t,g=K$(p,o,t)*p%t,m=K$(g,a,t)*g%t,y=K$(m,l,t)*m%t,v=K$(y,a,t)*g%t,b=K$(v,n,t)*u%t,w=K$(b,s,t)*p%t,x=K$(w,r,t)*c%t,A=K$(x,vW,t);if(!xW.eql(xW.sqr(A),e))throw new Error("Cannot find square root");return A}const xW=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=j$)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=Y$(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=X$(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:N$(i),ZERO:j$,ONE:U$,create:t=>G$(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return j$<=t&&t<e},is0:e=>e===j$,isOdd:e=>(e&U$)===U$,neg:t=>G$(-t,e),eql:(e,t)=>e===t,sqr:t=>G$(t*t,e),add:(t,n)=>G$(t+n,e),sub:(t,n)=>G$(t-n,e),mul:(t,n)=>G$(t*n,e),pow:(e,t)=>function(e,t,n){if(n<j$)throw new Error("Expected power > 0");if(n===j$)return e.ONE;if(n===U$)return t;let r=e.ONE,i=t;for(;n>j$;)n&U$&&(r=e.mul(r,i)),i=e.sqr(i),n>>=U$;return r}(a,e,t),div:(t,n)=>G$(t*Q$(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Q$(t,e),sqrt:r.sqrt||(e=>s(a,e)),invertBatch:e=>function(e,t){const n=new Array(t.length),r=t.reduce(((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r))),e.ONE),i=e.inv(r);return t.reduceRight(((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r))),i),n}(a,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>n?I$(e,o):P$(e,o),fromBytes:e=>{if(e.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${e.length}`);return n?T$(e):_$(e)}});return Object.freeze(a)}(gW,void 0,void 0,{sqrt:wW}),AW=function(e,t){const n=t=>fW({...e,...pW(t)});return Object.freeze({...n(t),create:n})}({a:BigInt(0),b:BigInt(7),Fp:xW,n:mW,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=mW,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-yW*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=bW(o*e,t),l=bW(-r*e,t);let c=G$(e-a*n-l*i,t),u=G$(-a*r-l*o,t);const d=c>s,h=u>s;if(d&&(c=t-c),h&&(u=t-u),c>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:c,k2neg:h,k2:u}}}},qH);BigInt(0);AW.ProjectivePoint;class EW{#re;constructor(e){RB(32===$B(e),"invalid private key","privateKey","[REDACTED]"),this.#re=VB(e)}get privateKey(){return this.#re}get publicKey(){return EW.computePublicKey(this.#re)}get compressedPublicKey(){return EW.computePublicKey(this.#re,!0)}sign(e){RB(32===$B(e),"invalid digest length","digest",e);const t=AW.sign(FB(e),FB(this.#re),{lowS:!0});return b$.from({r:oF(t.r,32),s:oF(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=EW.computePublicKey(e);return VB(AW.getSharedSecret(FB(this.#re),BB(t),!1))}static computePublicKey(e,t){let n=BB(e,"key");if(32===n.length){return VB(AW.getPublicKey(n,!!t))}if(64===n.length){const e=new Uint8Array(65);e[0]=4,e.set(n,1),n=e}return VB(AW.ProjectivePoint.fromHex(n).toRawBytes(t))}static recoverPublicKey(e,t){RB(32===$B(e),"invalid digest length","digest",e);const n=b$.from(t);let r=AW.Signature.fromCompact(FB(HB([n.r,n.s])));r=r.addRecoveryBit(n.yParity);const i=r.recoverPublicKey(FB(e));return RB(null!=i,"invalid signautre for digest","signature",t),"0x"+i.toHex(!1)}static addPoints(e,t,n){const r=AW.ProjectivePoint.fromHex(EW.computePublicKey(e).substring(2)),i=AW.ProjectivePoint.fromHex(EW.computePublicKey(t).substring(2));return"0x"+r.add(i).toHex(!!n)}}function SW(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function kW(e,t,n){let r=0;for(let i=0;i<n;i++)r=256*r+e[t+i];return r}function CW(e,t,n,r){const i=[];for(;n<t+1+r;){const o=_W(e,n);i.push(o.result),OB((n+=o.consumed)<=t+1+r,"child data too short","BUFFER_OVERRUN",{buffer:e,length:r,offset:t})}return{consumed:1+r,result:i}}function _W(e,t){OB(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});const n=t=>{OB(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const r=e[t]-247;n(t+1+r);const i=kW(e,t+1,r);return n(t+1+r+i),CW(e,t,t+1+r,r+i)}if(e[t]>=192){const r=e[t]-192;return n(t+1+r),CW(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;n(t+1+r);const i=kW(e,t+1,r);n(t+1+r+i);return{consumed:1+r+i,result:VB(e.slice(t+1+r,t+1+r+i))}}if(e[t]>=128){const r=e[t]-128;n(t+1+r);return{consumed:1+r,result:VB(e.slice(t+1,t+1+r))}}return{consumed:1,result:SW(e[t])}}function TW(e){const t=BB(e,"data"),n=_W(t,0);return RB(n.consumed===t.length,"unexpected junk after rlp payload","data",e),n.result}function PW(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function IW(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(IW(e))})),t.length<=55)return t.unshift(192+t.length),t;const n=PW(t.length);return n.unshift(247+n.length),n.concat(t)}const t=Array.prototype.slice.call(BB(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const n=PW(t.length);return n.unshift(183+n.length),n.concat(t)}const OW="0123456789abcdef";function RW(e){let t="0x";for(const n of IW(e))t+=OW[n>>4],t+=OW[15&n];return t}function NW(e,t){return function(e){let t;return t="string"===typeof e?EW.computePublicKey(e,!1):e.publicKey,yj(cj("0x"+t.substring(4)).substring(26))}(EW.recoverPublicKey(e,t))}const MW=BigInt(0),DW=BigInt(2),LW=BigInt(27),BW=BigInt(28),FW=BigInt(35),jW=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),UW=131072;function zW(e,t){let n=e.toString(16);for(;n.length<2;)n="0"+n;return n+=l$(t).substring(4),"0x"+n}function VW(e){return"0x"===e?null:yj(e)}function HW(e,t){try{return lz(e)}catch(n){RB(!1,n.message,t,e)}}function $W(e,t){return"0x"===e?0:iF(e,t)}function WW(e,t){if("0x"===e)return MW;const n=eF(e,t);return RB(n<=jW,"value exceeds uint size",t,n),n}function GW(e,t){const n=eF(e,"value"),r=sF(n);return RB(r.length<=32,"value too large",`tx.${t}`,n),r}function qW(e){return lz(e).map((e=>[e.address,e.storageKeys]))}function KW(e,t){RB(Array.isArray(e),`invalid ${t}`,"value",e);for(let n=0;n<e.length;n++)RB(jB(e[n],32),"invalid ${ param } hash",`value[${n}]`,e[n]);return e}function QW(e,t){let n;try{if(n=$W(t[0],"yParity"),0!==n&&1!==n)throw new Error("bad yParity")}catch(s){RB(!1,"invalid yParity","yParity",t[0])}const r=qB(t[1],32),i=qB(t[2],32),o=b$.from({r:r,s:i,yParity:n});e.signature=o}class XW{#ie;#oe;#t;#se;#ae;#le;#ce;#ue;#de;#he;#fe;#pe;#ge;#me;#ye;#ve;get type(){return this.#ie}set type(e){switch(e){case null:this.#ie=null;break;case 0:case"legacy":this.#ie=0;break;case 1:case"berlin":case"eip-2930":this.#ie=1;break;case 2:case"london":case"eip-1559":this.#ie=2;break;case 3:case"cancun":case"eip-4844":this.#ie=3;break;default:RB(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=this.#oe;return null==e&&3===this.type?Ez:e}set to(e){this.#oe=null==e?null:yj(e)}get nonce(){return this.#se}set nonce(e){this.#se=iF(e,"value")}get gasLimit(){return this.#ae}set gasLimit(e){this.#ae=eF(e)}get gasPrice(){const e=this.#le;return null!=e||0!==this.type&&1!==this.type?e:MW}set gasPrice(e){this.#le=null==e?null:eF(e,"gasPrice")}get maxPriorityFeePerGas(){const e=this.#ce;return null==e?2===this.type||3===this.type?MW:null:e}set maxPriorityFeePerGas(e){this.#ce=null==e?null:eF(e,"maxPriorityFeePerGas")}get maxFeePerGas(){const e=this.#ue;return null==e?2===this.type||3===this.type?MW:null:e}set maxFeePerGas(e){this.#ue=null==e?null:eF(e,"maxFeePerGas")}get data(){return this.#t}set data(e){this.#t=VB(e)}get value(){return this.#de}set value(e){this.#de=eF(e,"value")}get chainId(){return this.#he}set chainId(e){this.#he=eF(e)}get signature(){return this.#fe||null}set signature(e){this.#fe=null==e?null:b$.from(e)}get accessList(){const e=this.#pe||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#pe=null==e?null:lz(e)}get maxFeePerBlobGas(){const e=this.#ge;return null==e&&3===this.type?MW:e}set maxFeePerBlobGas(e){this.#ge=null==e?null:eF(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#me;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){RB(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)RB(jB(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#me=e}get blobs(){return null==this.#ve?null:this.#ve.map((e=>Object.assign({},e)))}set blobs(e){if(null==e)return void(this.#ve=null);const t=[],n=[];for(let r=0;r<e.length;r++){const i=e[r];if(UB(i)){OB(this.#ye,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=BB(i);if(RB(e.length<=UW,"blob is too large",`blobs[${r}]`,i),e.length!==UW){const t=new Uint8Array(UW);t.set(e),e=t}const o=this.#ye.blobToKzgCommitment(e),s=VB(this.#ye.computeBlobKzgProof(e,o));t.push({data:VB(e),commitment:VB(o),proof:s}),n.push(zW(1,o))}else{const e=VB(i.commitment);t.push({data:VB(i.data),commitment:e,proof:VB(i.proof)}),n.push(zW(1,e))}}this.#ve=t,this.#me=n}get kzg(){return this.#ye}set kzg(e){this.#ye=e}constructor(){this.#ie=null,this.#oe=null,this.#se=0,this.#ae=MW,this.#le=null,this.#ce=null,this.#ue=null,this.#t="0x",this.#de=MW,this.#he=MW,this.#fe=null,this.#pe=null,this.#ge=null,this.#me=null,this.#ve=null,this.#ye=null}get hash(){return null==this.signature?null:cj(this.#be(!0,!1))}get unsignedHash(){return cj(this.unsignedSerialized)}get from(){return null==this.signature?null:NW(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:EW.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#be(e,t){OB(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const n=[GW(e.nonce,"nonce"),GW(e.gasPrice||0,"gasPrice"),GW(e.gasLimit,"gasLimit"),e.to||"0x",GW(e.value,"value"),e.data];let r=MW;if(e.chainId!=MW)r=eF(e.chainId,"tx.chainId"),RB(!t||null==t.networkV||t.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(r=t)}if(!t)return r!==MW&&(n.push(sF(r)),n.push("0x"),n.push("0x")),RW(n);let i=BigInt(27+t.yParity);return r!==MW?i=b$.getChainIdV(r,t.v):BigInt(t.v)!==i&&RB(!1,"tx.chainId/sig.v mismatch","sig",t),n.push(sF(i)),n.push(sF(t.r)),n.push(sF(t.s)),RW(n)}(this,n);case 1:return function(e,t){const n=[GW(e.chainId,"chainId"),GW(e.nonce,"nonce"),GW(e.gasPrice||0,"gasPrice"),GW(e.gasLimit,"gasLimit"),e.to||"0x",GW(e.value,"value"),e.data,qW(e.accessList||[])];return t&&(n.push(GW(t.yParity,"recoveryParam")),n.push(sF(t.r)),n.push(sF(t.s))),HB(["0x01",RW(n)])}(this,n);case 2:return function(e,t){const n=[GW(e.chainId,"chainId"),GW(e.nonce,"nonce"),GW(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),GW(e.maxFeePerGas||0,"maxFeePerGas"),GW(e.gasLimit,"gasLimit"),e.to||"0x",GW(e.value,"value"),e.data,qW(e.accessList||[])];return t&&(n.push(GW(t.yParity,"yParity")),n.push(sF(t.r)),n.push(sF(t.s))),HB(["0x02",RW(n)])}(this,n);case 3:return function(e,t,n){const r=[GW(e.chainId,"chainId"),GW(e.nonce,"nonce"),GW(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),GW(e.maxFeePerGas||0,"maxFeePerGas"),GW(e.gasLimit,"gasLimit"),e.to||Ez,GW(e.value,"value"),e.data,qW(e.accessList||[]),GW(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),KW(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(r.push(GW(t.yParity,"yParity")),r.push(sF(t.r)),r.push(sF(t.s)),n)?HB(["0x03",RW([r,n.map((e=>e.data)),n.map((e=>e.commitment)),n.map((e=>e.proof))])]):HB(["0x03",RW(r)])}(this,n,t?this.blobs:null)}OB(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#be(!0,!0)}get unsignedSerialized(){return this.#be(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,n=null!=this.accessList,r=null!=this.#ge||this.#me;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&OB(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),OB(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),OB(0!==this.type||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):t?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(r&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return XW.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new XW;if("string"===typeof e){const t=BB(e);if(t[0]>=127)return XW.from(function(e){const t=TW(e);RB(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const n={type:0,nonce:$W(t[0],"nonce"),gasPrice:WW(t[1],"gasPrice"),gasLimit:WW(t[2],"gasLimit"),to:VW(t[3]),value:WW(t[4],"value"),data:VB(t[5]),chainId:MW};if(6===t.length)return n;const r=WW(t[6],"v"),i=WW(t[7],"r"),o=WW(t[8],"s");if(i===MW&&o===MW)n.chainId=r;else{let e=(r-FW)/DW;e<MW&&(e=MW),n.chainId=e,RB(e!==MW||r===LW||r===BW,"non-canonical legacy v","v",t[6]),n.signature=b$.from({r:qB(t[7],32),s:qB(t[8],32),v:r})}return n}(t));switch(t[0]){case 1:return XW.from(function(e){const t=TW(BB(e).slice(1));RB(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",VB(e));const n={type:1,chainId:WW(t[0],"chainId"),nonce:$W(t[1],"nonce"),gasPrice:WW(t[2],"gasPrice"),gasLimit:WW(t[3],"gasLimit"),to:VW(t[4]),value:WW(t[5],"value"),data:VB(t[6]),accessList:HW(t[7],"accessList")};return 8===t.length||QW(n,t.slice(8)),n}(t));case 2:return XW.from(function(e){const t=TW(BB(e).slice(1));RB(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",VB(e));const n={type:2,chainId:WW(t[0],"chainId"),nonce:$W(t[1],"nonce"),maxPriorityFeePerGas:WW(t[2],"maxPriorityFeePerGas"),maxFeePerGas:WW(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:WW(t[4],"gasLimit"),to:VW(t[5]),value:WW(t[6],"value"),data:VB(t[7]),accessList:HW(t[8],"accessList")};return 9===t.length||QW(n,t.slice(9)),n}(t));case 3:return XW.from(function(e){let t=TW(BB(e).slice(1)),n="3",r=null;if(4===t.length&&Array.isArray(t[0])){n="3 (network format)";const e=t[1],i=t[2],o=t[3];RB(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),RB(Array.isArray(i),"invalid network format: commitments not an array","fields[2]",i),RB(Array.isArray(o),"invalid network format: proofs not an array","fields[3]",o),RB(e.length===i.length,"invalid network format: blobs/commitments length mismatch","fields",t),RB(e.length===o.length,"invalid network format: blobs/proofs length mismatch","fields",t),r=[];for(let n=0;n<t[1].length;n++)r.push({data:e[n],commitment:i[n],proof:o[n]});t=t[0]}RB(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${n}`,"data",VB(e));const i={type:3,chainId:WW(t[0],"chainId"),nonce:$W(t[1],"nonce"),maxPriorityFeePerGas:WW(t[2],"maxPriorityFeePerGas"),maxFeePerGas:WW(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:WW(t[4],"gasLimit"),to:VW(t[5]),value:WW(t[6],"value"),data:VB(t[7]),accessList:HW(t[8],"accessList"),maxFeePerBlobGas:WW(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};r&&(i.blobs=r),RB(null!=i.to,`invalid address for transaction type: ${n}`,"data",e),RB(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let o=0;o<i.blobVersionedHashes.length;o++)RB(jB(i.blobVersionedHashes[o],32),`invalid blobVersionedHash at index ${o}: must be length 32`,"data",e);return 11===t.length||QW(i,t.slice(11)),i}(t))}OB(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new XW;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=b$.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&(RB(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),RB(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&(RB(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),RB(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}const JW="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const YW=BigInt(58);function ZW(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):RB(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class eG{name;constructor(e){CB(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}const tG=new RegExp("^(ipfs)://(.*)$","i"),nG=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),tG,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class rG{provider;address;name;#we;#xe;constructor(e,t,n){CB(this,{provider:e,address:t,name:n}),this.#we=null,this.#xe=new yV(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#we&&(this.#we=(async()=>{try{return await this.#xe.supportsInterface("0x9061b923")}catch(e){if(TB(e,"CALL_EXCEPTION"))return!1;throw this.#we=null,e}})()),await this.#we}async#Ae(e,t){t=(t||[]).slice();const n=this.#xe.interface;t.unshift(FH(this.name));let r=null;await this.supportsWildcard()&&(r=n.getFunction(e),OB(r,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[jH(this.name,255),n.encodeFunctionData(r,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#xe[e](...t);return r?n.decodeFunctionResult(r,i)[0]:i}catch(i){if(!TB(i,"CALL_EXCEPTION"))throw i}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#Ae("addr(bytes32)");return null==e||e===Ez?null:e}catch(i){if(TB(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let t=e+2147483648;const n=await this.#Ae("addr(bytes32,uint)",[t]);if(jB(n,20))return yj(n)}let t=null;for(const o of this.provider.plugins)if(o instanceof eG&&o.supportsCoinType(e)){t=o;break}if(null==t)return null;const n=await this.#Ae("addr(bytes32,uint)",[e]);if(null==n||"0x"===n)return null;const r=await t.decodeAddress(e,n);if(null!=r)return r;OB(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const t=await this.#Ae("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#Ae("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",n=parseInt(t[4],16);if(t[5].length===2*n)return`${e}://${function(e){const t=BB(e);let n=rF(t),r="";for(;n;)r=JW[Number(n%YW)]+r,n/=YW;for(let i=0;i<t.length&&!t[i];i++)r=JW[0]+r;return r}("0x"+t[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return`bzz://${n[1]}`;OB(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(null==n)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:n});for(let r=0;r<nG.length;r++){const i=n.match(nG[r]);if(null==i)continue;const o=i[1].toLowerCase();switch(o){case"https":case"data":return e.push({type:"url",value:n}),{linkage:e,url:n};case"ipfs":{const t=ZW(n);return e.push({type:"ipfs",value:n}),e.push({type:"url",value:t}),{linkage:e,url:t}}case"erc721":case"erc1155":{const r="erc721"===o?"tokenURI(uint256)":"uri(uint256)";e.push({type:o,value:n});const s=await this.getAddress();if(null==s)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const a=(i[2]||"").split("/");if(2!==a.length)return e.push({type:`!${o}caip`,value:i[2]||""}),{url:null,linkage:e};const l=a[1],c=new yV(a[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===o){const t=await c.ownerOf(l);if(s!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===o){const t=await c.balanceOf(s,l);if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let u=await c[r](l);if(null==u||"0x"===u)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:u}),"erc1155"===o&&(u=u.replace("{id}",oF(l,32).substring(2)),e.push({type:"metadata-url-expanded",value:u})),u.match(/^ipfs:/i)&&(u=ZW(u)),e.push({type:"metadata-url",value:u});let d={};const h=await new wz(u).send();h.assertOk();try{d=h.bodyJson}catch(t){try{e.push({type:"!metadata",value:h.bodyText})}catch(t){const n=h.body;return n&&e.push({type:"!metadata",value:VB(n)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!d)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(d)});let f=d.image;if("string"!==typeof f)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(f.match(/^(https:\/\/|data:)/i));else{if(null==f.match(tG))return e.push({type:"!imageUrl-ipfs",value:f}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:f}),f=ZW(f)}return e.push({type:"url",value:f}),{linkage:e,url:f}}}}}catch(t){}return{linkage:e,url:null}}static async getEnsAddress(e){const t=await e.getNetwork(),n=t.getPlugin("org.ethers.plugins.network.Ens");return OB(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),n.address}static async#Ee(e,t){const n=await rG.getEnsAddress(e);try{const r=new yV(n,["function resolver(bytes32) view returns (address)"],e),i=await r.resolver(FH(t),{enableCcipRead:!0});return i===Ez?null:i}catch(r){throw r}return null}static async fromName(e,t){let n=t;for(;;){if(""===n||"."===n)return null;if("eth"!==t&&"eth"===n)return null;const r=await rG.#Ee(e,n);if(null!=r){const i=new rG(e,r,t);return n===t||await i.supportsWildcard()?i:null}n=n.split(".").slice(1).join(".")}}}const iG=BigInt(0);function oG(e,t){return function(n){return null==n?t:e(n)}}function sG(e,t){return n=>{if(t&&null==n)return null;if(!Array.isArray(n))throw new Error("not an array");return n.map((t=>e(t)))}}function aG(e,t){return n=>{const r={};for(const o in e){let s=o;if(t&&o in t&&!(s in n))for(const e of t[o])if(e in n){s=e;break}try{const t=e[o](n[s]);void 0!==t&&(r[o]=t)}catch(i){OB(!1,`invalid value for value.${o} (${i instanceof Error?i.message:"not-an-error"})`,"BAD_DATA",{value:n})}}return r}}function lG(e){return RB(jB(e,!0),"invalid data","value",e),e}function cG(e){return RB(jB(e,32),"invalid hash","value",e),e}const uG=aG({address:yj,blockHash:cG,blockNumber:iF,data:lG,index:iF,removed:oG((function(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}RB(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}),!1),topics:sG(cG),transactionHash:cG,transactionIndex:iF},{index:["logIndex"]});const dG=aG({hash:oG(cG),parentHash:cG,parentBeaconBlockRoot:oG(cG,null),number:iF,timestamp:iF,nonce:oG(lG),difficulty:eF,gasLimit:eF,gasUsed:eF,stateRoot:oG(cG,null),receiptsRoot:oG(cG,null),blobGasUsed:oG(eF,null),excessBlobGas:oG(eF,null),miner:oG(yj),prevRandao:oG(cG,null),extraData:lG,baseFeePerGas:oG(eF)},{prevRandao:["mixHash"]});const hG=aG({transactionIndex:iF,blockNumber:iF,transactionHash:cG,address:yj,topics:sG(cG),data:lG,index:iF,blockHash:cG},{index:["logIndex"]});const fG=aG({to:oG(yj,null),from:oG(yj,null),contractAddress:oG(yj,null),index:iF,root:oG(VB),gasUsed:eF,blobGasUsed:oG(eF,null),logsBloom:oG(lG),blockHash:cG,hash:cG,logs:sG((function(e){return hG(e)})),blockNumber:iF,cumulativeGasUsed:eF,effectiveGasPrice:oG(eF),blobGasPrice:oG(eF,null),status:oG(iF),type:oG(iF,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function pG(e){e.to&&eF(e.to)===iG&&(e.to="0x0000000000000000000000000000000000000000");const t=aG({hash:cG,index:oG(iF,void 0),type:e=>"0x"===e||null==e?0:iF(e),accessList:oG(lz,null),blobVersionedHashes:oG(sG(cG,!0),null),blockHash:oG(cG,null),blockNumber:oG(iF,null),transactionIndex:oG(iF,null),from:yj,gasPrice:oG(eF),maxPriorityFeePerGas:oG(eF),maxFeePerGas:oG(eF),maxFeePerBlobGas:oG(eF,null),gasLimit:eF,to:oG(yj,null),value:eF,nonce:iF,data:lG,creates:oG(yj,null),chainId:oG(eF,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=function(e){const t=yj(e.from);let n=eF(e.nonce,"tx.nonce").toString(16);return n="0"===n?"0x":n.length%2?"0x0"+n:"0x"+n,yj(WB(cj(RW([t,n])),12))}(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=b$.from(e.signature):t.signature=b$.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&eF(t.blockHash)===iG&&(t.blockHash=null),t}class gG{name;constructor(e){CB(this,{name:e})}clone(){return new gG(this.name)}}class mG extends gG{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const n={effectiveBlock:e};function r(e,r){let i=(t||{})[e];null==i&&(i=r),RB("number"===typeof i,`invalud value for ${e}`,"costs",t),n[e]=i}r("txBase",21e3),r("txCreate",32e3),r("txDataZero",4),r("txDataNonzero",16),r("txAccessListStorageKey",1900),r("txAccessListAddress",2400),CB(this,n)}clone(){return new mG(this.effectiveBlock,this)}}class yG extends gG{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),CB(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new yG(this.address,this.targetNetwork)}}class vG extends gG{#C;#Se;get url(){return this.#C}get processFunc(){return this.#Se}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#C=e,this.#Se=t}clone(){return this}}const bG=new Map;class wG{#ke;#he;#Ce;constructor(e,t){this.#ke=e,this.#he=eF(t),this.#Ce=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#ke}set name(e){this.#ke=e}get chainId(){return this.#he}set chainId(e){this.#he=eF(e,"chainId")}matches(e){if(null==e)return!1;if("string"===typeof e){try{return this.chainId===eF(e)}catch(t){}return this.name===e}if("number"===typeof e||"bigint"===typeof e){try{return this.chainId===eF(e)}catch(t){}return!1}if("object"===typeof e){if(null!=e.chainId){try{return this.chainId===eF(e.chainId)}catch(t){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#Ce.values())}attachPlugin(e){if(this.#Ce.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Ce.set(e.name,e.clone()),this}getPlugin(e){return this.#Ce.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new wG(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new mG;let n=t.txBase;if(null==e.to&&(n+=t.txCreate),e.data)for(let r=2;r<e.data.length;r+=2)"00"===e.data.substring(r,r+2)?n+=t.txDataZero:n+=t.txDataNonzero;if(e.accessList){const r=lz(e.accessList);for(const e in r)n+=t.txAccessListAddress+t.txAccessListStorageKey*r[e].storageKeys.length}return n}static from(e){if(function(){if(EG)return;function e(e,t,n){const r=function(){const r=new wG(e,t);return null!=n.ensNetwork&&r.attachPlugin(new yG(null,n.ensNetwork)),r.attachPlugin(new mG),(n.plugins||[]).forEach((e=>{r.attachPlugin(e)})),r};wG.register(e,r),wG.register(t,r),n.altNames&&n.altNames.forEach((e=>{wG.register(e,r)}))}EG=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[AG("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[AG("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1})}(),null==e)return wG.from("mainnet");if("number"===typeof e&&(e=BigInt(e)),"string"===typeof e||"bigint"===typeof e){const t=bG.get(e);if(t)return t();if("bigint"===typeof e)return new wG("unknown",e);RB(!1,"unknown network","network",e)}if("function"===typeof e.clone){return e.clone()}if("object"===typeof e){RB("string"===typeof e.name&&"number"===typeof e.chainId,"invalid network object name or chainId","network",e);const t=new wG(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new yG(e.ensAddress,e.ensNetwork)),t}RB(!1,"invalid network","network",e)}static register(e,t){"number"===typeof e&&(e=BigInt(e));const n=bG.get(e);n&&RB(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),bG.set(e,t)}}function xG(e,t){const n=String(e);if(!n.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const r=n.split(".");if(1===r.length&&r.push(""),2!==r.length)throw new Error(`invalid gwei value: ${e}`);for(;r[1].length<t;)r[1]+="0";if(r[1].length>9){let e=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||e++,r[1]=e.toString()}return BigInt(r[0]+r[1])}function AG(e){return new vG(e,(async(e,t,n)=>{let r;n.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([n.send(),e()]);r=t;const o=r.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:xG(o.maxFee,9),maxPriorityFeePerGas:xG(o.maxPriorityFee,9)}}catch(i){OB(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:r,error:i})}}))}let EG=!1;function SG(e){return JSON.parse(JSON.stringify(e))}class kG{#_e;#Te;#Pe;#Ie;constructor(e){this.#_e=e,this.#Te=null,this.#Pe=4e3,this.#Ie=-2}get pollingInterval(){return this.#Pe}set pollingInterval(e){this.#Pe=e}async#Oe(){try{const e=await this.#_e.getBlockNumber();if(-2===this.#Ie)return void(this.#Ie=e);if(e!==this.#Ie){for(let t=this.#Ie+1;t<=e;t++){if(null==this.#Te)return;await this.#_e.emit("block",t)}this.#Ie=e}}catch(e){}null!=this.#Te&&(this.#Te=this.#_e._setTimeout(this.#Oe.bind(this),this.#Pe))}start(){this.#Te||(this.#Te=this.#_e._setTimeout(this.#Oe.bind(this),this.#Pe),this.#Oe())}stop(){this.#Te&&(this.#_e._clearTimeout(this.#Te),this.#Te=null)}pause(e){this.stop(),e&&(this.#Ie=-2)}resume(){this.start()}}class CG{#_e;#Oe;#Re;constructor(e){this.#_e=e,this.#Re=!1,this.#Oe=e=>{this._poll(e,this.#_e)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#Re||(this.#Re=!0,this.#Oe(-2),this.#_e.on("block",this.#Oe))}stop(){this.#Re&&(this.#Re=!1,this.#_e.off("block",this.#Oe))}pause(e){this.stop()}resume(){this.start()}}class _G extends CG{#Ne;#Me;constructor(e,t){super(e),this.#Ne=t,this.#Me=-2}pause(e){e&&(this.#Me=-2),super.pause(e)}async _poll(e,t){const n=await t.getBlock(this.#Ne);null!=n&&(-2===this.#Me?this.#Me=n.number:n.number>this.#Me&&(t.emit(this.#Ne,n.number),this.#Me=n.number))}}class TG extends CG{#Y;constructor(e,t){super(e),this.#Y=SG(t)}async _poll(e,t){throw new Error("@TODO")}}class PG extends CG{#De;constructor(e,t){super(e),this.#De=t}async _poll(e,t){const n=await t.getTransactionReceipt(this.#De);n&&t.emit(this.#De,n)}}class IG{#_e;#Y;#Te;#Re;#Ie;constructor(e,t){this.#_e=e,this.#Y=SG(t),this.#Te=this.#Oe.bind(this),this.#Re=!1,this.#Ie=-2}async#Oe(e){if(-2===this.#Ie)return;const t=SG(this.#Y);t.fromBlock=this.#Ie+1,t.toBlock=e;const n=await this.#_e.getLogs(t);if(0!==n.length)for(const r of n)this.#_e.emit(this.#Y,r),this.#Ie=r.blockNumber;else this.#Ie<e-60&&(this.#Ie=e-60)}start(){this.#Re||(this.#Re=!0,-2===this.#Ie&&this.#_e.getBlockNumber().then((e=>{this.#Ie=e})),this.#_e.on("block",this.#Te))}stop(){this.#Re&&(this.#Re=!1,this.#_e.off("block",this.#Te))}pause(e){this.stop(),e&&(this.#Ie=-2)}resume(){this.start()}}const OG=BigInt(2);function RG(e){return e&&"function"===typeof e.then}function NG(e,t){return e+":"+JSON.stringify(t,((e,t)=>{if(null==t)return"null";if("bigint"===typeof t)return`bigint:${t.toString()}`;if("string"===typeof t)return t.toLowerCase();if("object"===typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,n)=>(e[n]=t[n],e)),{})}return t}))}class MG{name;constructor(e){CB(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function DG(e){return(e=Array.from(new Set(e).values())).sort(),e}async function LG(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"===typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if(jB(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:NG("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:NG("orphan",t),filter:(n=t,JSON.parse(JSON.stringify(n)))}}var n;if(e.address||e.topics){const n=e,r={topics:(n.topics||[]).map((e=>null==e?null:Array.isArray(e)?DG(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(n.address){const e=[],i=[],o=n=>{jB(n)?e.push(n):i.push((async()=>{e.push(await WU(n,t))})())};Array.isArray(n.address)?n.address.forEach(o):o(n.address),i.length&&await Promise.all(i),r.address=DG(e.map((e=>e.toLowerCase())))}return{filter:r,tag:NG("event",r),type:"event"}}RB(!1,"unknown ProviderEvent","event",e)}function BG(){return(new Date).getTime()}const FG={cacheTimeout:250,pollingInterval:4e3};class jG{#Le;#Ce;#Be;#Fe;#je;#Ue;#ze;#Ve;#He;#$e;#We;#u;constructor(e,t){if(this.#u=Object.assign({},FG,t||{}),"any"===e)this.#Ue=!0,this.#je=null;else if(e){const t=wG.from(e);this.#Ue=!1,this.#je=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#Ue=!1,this.#je=null;this.#Ve=-1,this.#ze=new Map,this.#Le=new Map,this.#Ce=new Map,this.#Be=null,this.#Fe=!1,this.#He=1,this.#$e=new Map,this.#We=!1}get pollingInterval(){return this.#u.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#Ce.values())}attachPlugin(e){if(this.#Ce.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Ce.set(e.name,e.connect(this)),this}getPlugin(e){return this.#Ce.get(e)||null}get disableCcipRead(){return this.#We}set disableCcipRead(e){this.#We=!!e}async#Ge(e){const t=this.#u.cacheTimeout;if(t<0)return await this._perform(e);const n=NG(e.method,e);let r=this.#ze.get(n);return r||(r=this._perform(e),this.#ze.set(n,r),setTimeout((()=>{this.#ze.get(n)===r&&this.#ze.delete(n)}),t)),await r}async ccipReadFetch(e,t,n){if(this.disableCcipRead||0===n.length||null==e.to)return null;const r=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const t=n[a],l=t.replace("{sender}",r).replace("{data}",i),c=new wz(l);-1===t.indexOf("{data}")&&(c.body={data:i,sender:r}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:c,index:a,urls:n});let u="unknown error";const d=await c.send();try{const e=d.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:c,result:e}),e.data;e.message&&(u=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:c,result:e})}catch(s){}OB(d.statusCode<400||d.statusCode>=500,`response not found during CCIP fetch: ${u}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:t,errorMessage:u}}),o.push(u)}OB(!1,`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,t){return new Lz(function(e){const t=dG(e);return t.transactions=e.transactions.map((e=>"string"===typeof e?e:pG(e))),t}(e),this)}_wrapLog(e,t){return new Bz(function(e){return uG(e)}(e),this)}_wrapTransactionReceipt(e,t){return new Fz(function(e){return fG(e)}(e),this)}_wrapTransactionResponse(e,t){return new jz(pG(e),this)}_detectNetwork(){OB(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){OB(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=iF(await this.#Ge({method:"getBlockNumber"}),"%response");return this.#Ve>=0&&(this.#Ve=e),e}_getAddress(e){return WU(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return jB(e)?jB(e,32)?e:aF(e):("bigint"===typeof e&&(e=iF(e,"blockTag")),"number"===typeof e?e>=0?aF(e):this.#Ve>=0?aF(this.#Ve+e):this.getBlockNumber().then((t=>aF(t+e))):void RB(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?DG(e.map((e=>e.toLowerCase()))):e.toLowerCase())),n="blockHash"in e?e.blockHash:void 0,r=(e,r,i)=>{let o;switch(e.length){case 0:break;case 1:o=e[0];break;default:e.sort(),o=e}if(n&&(null!=r||null!=i))throw new Error("invalid filter");const s={};return o&&(s.address=o),t.length&&(s.topics=t),r&&(s.fromBlock=r),i&&(s.toBlock=i),n&&(s.blockHash=n),s};let i,o,s=[];if(e.address)if(Array.isArray(e.address))for(const a of e.address)s.push(this._getAddress(a));else s.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),s.filter((e=>"string"!==typeof e)).length||null!=i&&"string"!==typeof i||null!=o&&"string"!==typeof o?Promise.all([Promise.all(s),i,o]).then((e=>r(e[0],e[1],e[2]))):r(s,i,o)}_getTransactionRequest(e){const t=Dz(e),n=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const r=WU(t[e],this);RG(r)?n.push(async function(){t[e]=await r}()):t[e]=r})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);RG(e)?n.push(async function(){t.blockTag=await e}()):t.blockTag=e}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(null==this.#je){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#je===e&&(this.#je=null),t}})();return this.#je=e,(await e).clone()}const e=this.#je,[t,n]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==n.chainId&&(this.#Ue?(this.emit("network",n,t),this.#je===e&&(this.#je=Promise.resolve(n))):OB(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:n,priorityFee:r}=await kB({_block:this.#qe("latest",!1),gasPrice:(async()=>{try{return eF(await this.#Ge({method:"getGasPrice"}),"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{return eF(await this.#Ge({method:"getPriorityFee"}),"%response")}catch(e){}return null})()});let i=null,o=null;const s=this._wrapBlock(t,e);return s&&s.baseFeePerGas&&(o=null!=r?r:BigInt("1000000000"),i=s.baseFeePerGas*OG+o),new Mz(n,i,o)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const e=new wz(n.url),r=await n.processFunc(t,this,e);return new Mz(r.gasPrice,r.maxFeePerGas,r.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return RG(t)&&(t=await t),eF(await this.#Ge({method:"estimateGas",transaction:t}),"%response")}async#Ke(e,t,n){OB(n<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const r=Dz(e);try{return VB(await this._perform({method:"call",transaction:r,blockTag:t}))}catch(i){if(!this.disableCcipRead&&PB(i)&&i.data&&n>=0&&"latest"===t&&null!=r.to&&"0x556f1830"===WB(i.data,0,4)){const e=i.data,o=await WU(r.to,this);let s;try{s=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};OB($B(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=WB(e,0,32);OB(WB(n,0,12)===WB(GG,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=WB(n,12);try{const n=[],r=iF(WB(e,32,64)),i=iF(WB(e,r,r+32)),o=WB(e,r+32);for(let e=0;e<i;e++){const t=UG(o,32*e);if(null==t)throw new Error("abort");n.push(t)}t.urls=n}catch(i){OB(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=zG(e,64);if(null==n)throw new Error("abort");t.calldata=n}catch(i){OB(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}OB(WB(e,100,128)===WB(GG,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=WB(e,96,100);try{const n=zG(e,128);if(null==n)throw new Error("abort");t.extraData=n}catch(i){OB(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map((e=>t[e])),t}(WB(i.data,4))}catch(i){OB(!1,i.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:r,info:{data:e}})}OB(s.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:e,reason:"OffchainLookup",transaction:r,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:s.errorArgs}});const a=await this.ccipReadFetch(r,s.calldata,s.urls);OB(null!=a,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:r,info:{data:i.data,errorArgs:s.errorArgs}});const l={to:o,data:HB([s.selector,WG([a,s.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const e=await this.#Ke(l,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(i){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:i}),i}}throw i}}async#Qe(e){const{value:t}=await kB({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:n}=await kB({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#Qe(this.#Ke(t,n,e.enableCcipRead?0:-1))}async#Xe(e,t,n){let r=this._getAddress(t),i=this._getBlockTag(n);return"string"===typeof r&&"string"===typeof i||([r,i]=await Promise.all([r,i])),await this.#Qe(this.#Ge(Object.assign(e,{address:r,blockTag:i})))}async getBalance(e,t){return eF(await this.#Xe({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return iF(await this.#Xe({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return VB(await this.#Xe({method:"getCode"},e,t))}async getStorage(e,t,n){const r=eF(t,"position");return VB(await this.#Xe({method:"getStorage",position:r},e,n))}async broadcastTransaction(e){const{blockNumber:t,hash:n,network:r}=await kB({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=XW.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,r).replaceableTransaction(t)}async#qe(e,t){if(jB(e,32))return await this.#Ge({method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return"string"!==typeof n&&(n=await n),await this.#Ge({method:"getBlock",blockTag:n,includeTransactions:t})}async getBlock(e,t){const{network:n,params:r}=await kB({network:this.getNetwork(),params:this.#qe(e,!!t)});return null==r?null:this._wrapBlock(r,n)}async getTransaction(e){const{network:t,params:n}=await kB({network:this.getNetwork(),params:this.#Ge({method:"getTransaction",hash:e})});return null==n?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){const{network:t,params:n}=await kB({network:this.getNetwork(),params:this.#Ge({method:"getTransactionReceipt",hash:e})});if(null==n)return null;if(null==n.gasPrice&&null==n.effectiveGasPrice){const t=await this.#Ge({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){const{result:t}=await kB({network:this.getNetwork(),result:this.#Ge({method:"getTransactionResult",hash:e})});return null==t?null:VB(t)}async getLogs(e){let t=this._getFilter(e);RG(t)&&(t=await t);const{network:n,params:r}=await kB({network:this.getNetwork(),params:this.#Ge({method:"getLogs",filter:t})});return r.map((e=>this._wrapLog(e,n)))}_getProvider(e){OB(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await rG.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){const t=FH((e=yj(e)).substring(2).toLowerCase()+".addr.reverse");try{const n=await rG.getEnsAddress(this),r=new yV(n,["function resolver(bytes32) view returns (address)"],this),i=await r.resolver(t);if(null==i||i===Ez)return null;const o=new yV(i,["function name(bytes32) view returns (string)"],this),s=await o.name(t);return await this.resolveName(s)!==e?null:s}catch(n){if(TB(n,"BAD_DATA")&&"0x"===n.value)return null;if(TB(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){const r=null!=t?t:1;return 0===r?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let o=null;const s=async n=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&n-i.blockNumber+1>=r)return t(i),void(o&&(clearTimeout(o),o=null))}catch(i){console.log("EEE",i)}this.once("block",s)};null!=n&&(o=setTimeout((()=>{null!=o&&(o=null,this.off("block",s),i(IB("timeout","TIMEOUT",{reason:"timeout"})))}),n)),s(await this.getBlockNumber())}))}async waitForBlock(e){OB(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#$e.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#$e.delete(e))}_setTimeout(e,t){null==t&&(t=0);const n=this.#He++,r=()=>{this.#$e.delete(n),e()};if(this.paused)this.#$e.set(n,{timer:null,func:r,time:t});else{const e=setTimeout(r,t);this.#$e.set(n,{timer:e,func:r,time:BG()})}return n}_forEachSubscriber(e){for(const t of this.#Le.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new MG(e.type);case"block":{const e=new kG(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new _G(this,e.type);case"event":return new IG(this,e.filter);case"transaction":return new PG(this,e.hash);case"orphan":return new TG(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const n of this.#Le.values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),null!=this.#Be&&t.pause(this.#Be);break}}async#Je(e,t){let n=await LG(e,this);return"event"===n.type&&t&&t.length>0&&!0===t[0].removed&&(n=await LG({orphan:"drop-log",log:t[0]},this)),this.#Le.get(n.tag)||null}async#Ye(e){const t=await LG(e,this),n=t.tag;let r=this.#Le.get(n);if(!r){r={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#Le.set(n,r)}return r}async on(e,t){const n=await this.#Ye(e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,null!=this.#Be&&n.subscriber.pause(this.#Be)),this}async once(e,t){const n=await this.#Ye(e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,null!=this.#Be&&n.subscriber.pause(this.#Be)),this}async emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=await this.#Je(e,n);if(!i||0===i.listeners.length)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((t=>{let{listener:r,once:i}=t;const o=new Vz(this,i?null:r,e);try{r.call(this,...n,o)}catch(s){}return!i})),0===i.listeners.length&&(i.started&&i.subscriber.stop(),this.#Le.delete(i.tag)),o>0}async listenerCount(e){if(e){const t=await this.#Je(e);return t?t.listeners.length:0}let t=0;for(const{listeners:n}of this.#Le.values())t+=n.length;return t}async listeners(e){if(e){const t=await this.#Je(e);return t?t.listeners.map((e=>{let{listener:t}=e;return t})):[]}let t=[];for(const{listeners:n}of this.#Le.values())t=t.concat(n.map((e=>{let{listener:t}=e;return t})));return t}async off(e,t){const n=await this.#Je(e);if(!n)return this;if(t){const e=n.listeners.map((e=>{let{listener:t}=e;return t})).indexOf(t);e>=0&&n.listeners.splice(e,1)}return t&&0!==n.listeners.length||(n.started&&n.subscriber.stop(),this.#Le.delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:n,subscriber:r}=await this.#Ye(e);n&&r.stop(),this.#Le.delete(t)}else for(const[t,{started:n,subscriber:r}]of this.#Le)n&&r.stop(),this.#Le.delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#Fe}destroy(){this.removeAllListeners();for(const e of this.#$e.keys())this._clearTimeout(e);this.#Fe=!0}get paused(){return null!=this.#Be}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#Ve=-1,null!=this.#Be){if(this.#Be==!!e)return;OB(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((t=>t.pause(e))),this.#Be=!!e;for(const t of this.#$e.values())t.timer&&clearTimeout(t.timer),t.time=BG()-t.time}resume(){if(null!=this.#Be){this._forEachSubscriber((e=>e.resume())),this.#Be=null;for(const e of this.#$e.values()){let t=e.time;t<0&&(t=0),e.time=BG(),setTimeout(e.func,t)}}}}function UG(e,t){try{const n=zG(e,t);if(n)return Vj(n)}catch(n){}return null}function zG(e,t){if("0x"===e)return null;try{const n=iF(WB(e,t,t+32)),r=iF(WB(e,n,n+32));return WB(e,n+32,n+32+r)}catch(n){}return null}function VG(e){const t=sF(e);if(t.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(t,32-t.length),n}function HG(e){if(e.length%32===0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}const $G=new Uint8Array([]);function WG(e){const t=[];let n=0;for(let r=0;r<e.length;r++)t.push($G),n+=32;for(let r=0;r<e.length;r++){const i=BB(e[r]);t[r]=VG(n),t.push(VG(i.length)),t.push(HG(i)),n+=32+32*Math.ceil(i.length/32)}return HB(t)}const GG="0x0000000000000000000000000000000000000000000000000000000000000000";function qG(e,t){if(e.provider)return e.provider;OB(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function KG(e,t){let n=Dz(t);if(null!=n.to&&(n.to=WU(n.to,e)),null!=n.from){const t=n.from;n.from=Promise.all([e.getAddress(),WU(t,e)]).then((e=>{let[t,n]=e;return RB(t.toLowerCase()===n.toLowerCase(),"transaction from mismatch","tx.from",n),t}))}else n.from=e.getAddress();return await kB(n)}class QG{provider;constructor(e){CB(this,{provider:e||null})}async getNonce(e){return qG(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await KG(this,e)}async populateTransaction(e){const t=qG(this,"populateTransaction"),n=await KG(this,e);null==n.nonce&&(n.nonce=await this.getNonce("pending")),null==n.gasLimit&&(n.gasLimit=await this.estimateGas(n));const r=await this.provider.getNetwork();if(null!=n.chainId){RB(eF(n.chainId)===r.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=r.chainId;const i=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!i?0!==n.type&&1!==n.type||!i||RB(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):RB(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type){const e=await t.getFeeData();OB(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==n.gasPrice&&(n.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==n.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(n.type=2,null!=n.gasPrice){const e=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=e,n.maxPriorityFeePerGas=e}else null==n.maxFeePerGas&&(n.maxFeePerGas=e.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(OB(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==n.gasPrice&&(n.gasPrice=e.gasPrice),n.type=0):OB(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==n.type&&3!==n.type||(null==n.maxFeePerGas&&(n.maxFeePerGas=e.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else n.type=2;return await kB(n)}async estimateGas(e){return qG(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return qG(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=qG(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=qG(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const r=XW.from(n);return await t.broadcastTransaction(await this.signTransaction(r))}}class XG{#_e;#Ze;#Te;#Re;#et;#tt;constructor(e){this.#_e=e,this.#Ze=null,this.#Te=this.#Oe.bind(this),this.#Re=!1,this.#et=null,this.#tt=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#Oe(e){try{null==this.#Ze&&(this.#Ze=this._subscribe(this.#_e));let e=null;try{e=await this.#Ze}catch(t){if(!TB(t,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==t.operation)throw t}if(null==e)return this.#Ze=null,void this.#_e._recoverSubscriber(this,this._recover(this.#_e));const n=await this.#_e.getNetwork();if(this.#et||(this.#et=n),this.#et.chainId!==n.chainId)throw new Error("chaid changed");if(this.#tt)return;const r=await this.#_e.send("eth_getFilterChanges",[e]);await this._emitResults(this.#_e,r)}catch(t){console.log("@TODO",t)}this.#_e.once("block",this.#Te)}#nt(){const e=this.#Ze;e&&(this.#Ze=null,e.then((e=>{this.#_e.destroyed||this.#_e.send("eth_uninstallFilter",[e])})))}start(){this.#Re||(this.#Re=!0,this.#Oe(-2))}stop(){this.#Re&&(this.#Re=!1,this.#tt=!0,this.#nt(),this.#_e.off("block",this.#Te))}pause(e){e&&this.#nt(),this.#_e.off("block",this.#Te)}resume(){this.start()}}class JG extends XG{#rt;constructor(e,t){var n;super(e),this.#rt=(n=t,JSON.parse(JSON.stringify(n)))}_recover(e){return new IG(e,this.#rt)}async _subscribe(e){return await e.send("eth_newFilter",[this.#rt])}async _emitResults(e,t){for(const n of t)e.emit(this.#rt,e._wrapLog(n,e._network))}}class YG extends XG{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const ZG="bigint,boolean,function,number,string,symbol".split(/,/g);function eq(e){if(null==e||ZG.indexOf(typeof e)>=0)return e;if("function"===typeof e.getAddress)return e;if(Array.isArray(e))return e.map(eq);if("object"===typeof e)return Object.keys(e).reduce(((t,n)=>(t[n]=e[n],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function tq(e){return new Promise((t=>{setTimeout(t,e)}))}function nq(e){return e?e.toLowerCase():e}function rq(e){return e&&"number"===typeof e.pollingInterval}const iq={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class oq extends QG{address;constructor(e,t){super(e),CB(this,{address:t=yj(t)})}connect(e){OB(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=eq(e),n=[];if(t.from){const r=t.from;n.push((async()=>{const n=await WU(r,this.provider);RB(null!=n&&n.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=n})())}else t.from=this.address;if(null==t.gasLimit&&n.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;n.push((async()=>{t.to=await WU(e,this.provider)})())}n.length&&await Promise.all(n);const r=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[r])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(e);return await new Promise(((e,r)=>{const i=[1e3,100];let o=0;const s=async()=>{try{const r=await this.provider.getTransaction(n);if(null!=r)return void e(r.replaceableTransaction(t))}catch(a){if(TB(a,"CANCELLED")||TB(a,"BAD_DATA")||TB(a,"NETWORK_ERROR"))return null==a.info&&(a.info={}),a.info.sendTransactionHash=n,void r(a);if(TB(a,"INVALID_ARGUMENT")&&(o++,null==a.info&&(a.info={}),a.info.sendTransactionHash=n,o>10))return void r(a);this.provider.emit("error",IB("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:a}))}this.provider._setTimeout((()=>{s()}),i.pop()||4e3)};s()}))}async signTransaction(e){const t=eq(e);if(t.from){const n=await WU(t.from,this.provider);RB(null!=n&&n.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=n}else t.from=this.address;const n=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[n])}async signMessage(e){const t="string"===typeof e?zj(e):e;return await this.provider.send("personal_sign",[VB(t),this.address.toLowerCase()])}async signTypedData(e,t,n){const r=eq(n),i=await sz.resolveNames(e,t,r,(async e=>{const t=await WU(e);return RB(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(sz.getPayload(i.domain,t,i.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"===typeof e?zj(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),VB(t)])}}class sq extends jG{#u;#it;#ot;#st;#at;#et;#lt;#ct(){if(this.#st)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#st=setTimeout((()=>{this.#st=null;const e=this.#ot;for(this.#ot=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#u.batchMaxCount;){t.push(e.shift());const n=JSON.stringify(t.map((e=>e.payload)));if(n.length>this.#u.batchMaxSize){e.unshift(t.pop());break}}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const n=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:n});for(const{resolve:e,reject:r,payload:i}of t){if(this.destroyed){r(IB("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=n.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?r(this.getRpcError(i,t)):e(t.result);else{const e=IB("missing response for request","BAD_DATA",{value:n,info:{payload:i}});this.emit("error",e),r(e)}}}catch(n){this.emit("debug",{action:"receiveRpcError",error:n});for(const{reject:e}of t)e(n)}})()}}),e)}constructor(e,t){super(e,t),this.#it=1,this.#u=Object.assign({},iq,t||{}),this.#ot=[],this.#st=null,this.#et=null,this.#lt=null;{let e=null;const t=new Promise((t=>{e=t}));this.#at={promise:t,resolve:e}}const n=this._getOption("staticNetwork");"boolean"===typeof n?(RB(!n||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),n&&null!=e&&(this.#et=wG.from(e))):n&&(RB(null==e||n.matches(e),"staticNetwork MUST match network object","options",t),this.#et=n)}_getOption(e){return this.#u[e]}get _network(){return OB(this.#et,"network is not available yet","NETWORK_ERROR"),this.#et}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&eF(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const n=await this.getFeeData();null==n.maxFeePerGas&&null==n.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#et)return this.#et}return this.#lt?await this.#lt:this.ready?(this.#lt=(async()=>{try{const e=wG.from(eF(await this.send("eth_chainId",[])));return this.#lt=null,e}catch(e){throw this.#lt=null,e}})(),await this.#lt):(this.#lt=(async()=>{const e={id:this.#it++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#lt=null}catch(n){throw this.#lt=null,this.emit("debug",{action:"receiveRpcError",error:n}),n}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return wG.from(eF(t.result));throw this.getRpcError(e,t)})(),await this.#lt)}_start(){null!=this.#at&&null!=this.#at.resolve&&(this.#at.resolve(),this.#at=null,(async()=>{for(;null==this.#et&&!this.destroyed;)try{this.#et=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",IB("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await tq(1e3)}this.#ct()})())}async _waitUntilReady(){if(null!=this.#at)return await this.#at.promise}_getSubscriber(e){return"pending"===e.type?new YG(this):"event"===e.type?this._getOption("polling")?new IG(this,e.filter):new JG(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new MG("orphan"):super._getSubscriber(e)}get ready(){return null==this.#at}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((n=>{if(null==e[n])return;let r=n;"gasLimit"===n&&(r="gas"),t[r]=aF(eF(e[n],`tx.${n}`))})),["from","to","data"].forEach((n=>{null!=e[n]&&(t[n]=VB(e[n]))})),e.accessList&&(t.accessList=lz(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[nq(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[nq(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[nq(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[nq(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(nq):e.filter.address=nq(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:n}=e,{error:r}=t;if("eth_estimateGas"===n&&r.message){const t=r.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return IB("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:r}})}if("eth_call"===n||"eth_estimateGas"===n){const t=lq(r),i=VU.getBuiltinCallException("eth_call"===n?"call":"estimateGas",e.params[0],t?t.data:null);return i.info={error:r,payload:e},i}const i=JSON.stringify(function(e){const t=[];return cq(e,t),t}(r));if("string"===typeof r.message&&r.message.match(/user denied|ethers-user-denied/i)){return IB("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:r}})}if("eth_sendRawTransaction"===n||"eth_sendTransaction"===n){const t=e.params[0];if(i.match(/insufficient funds|base fee exceeds gas limit/i))return IB("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:r}});if(i.match(/nonce/i)&&i.match(/too low/i))return IB("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:r}});if(i.match(/replacement transaction/i)&&i.match(/underpriced/i))return IB("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:r}});if(i.match(/only replay-protected/i))return IB("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:t,info:{error:r}}})}let o=!!i.match(/the method .* does not exist/i);return o||r&&r.details&&r.details.startsWith("Unauthorized method:")&&(o=!0),o?IB("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:r,payload:e}}):IB("could not coalesce error","UNKNOWN_ERROR",{error:r,payload:e})}send(e,t){if(this.destroyed)return Promise.reject(IB("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const n=this.#it++,r=new Promise(((r,i)=>{this.#ot.push({resolve:r,reject:i,payload:{method:e,params:t,id:n,jsonrpc:"2.0"}})}));return this.#ct(),r}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"===typeof e){const n=await t;if(e>=n.length)throw new Error("no such account");return new oq(this,n[e])}const{accounts:n}=await kB({network:this.getNetwork(),accounts:t});e=yj(e);for(const r of n)if(yj(r)===e)return new oq(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new oq(this,e)))}destroy(){this.#st&&(clearTimeout(this.#st),this.#st=null);for(const{payload:e,reject:t}of this.#ot)t(IB("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#ot=[],super.destroy()}}class aq extends sq{#ut;constructor(e,t){super(e,t);let n=this._getOption("pollingInterval");null==n&&(n=iq.pollingInterval),this.#ut=n}_getSubscriber(e){const t=super._getSubscriber(e);return rq(t)&&(t.pollingInterval=this.#ut),t}get pollingInterval(){return this.#ut}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#ut=e,this._forEachSubscriber((e=>{rq(e)&&(e.pollingInterval=this.#ut)}))}}function lq(e){if(null==e)return null;if("string"===typeof e.message&&e.message.match(/revert/i)&&jB(e.data))return{message:e.message,data:e.data};if("object"===typeof e){for(const t in e){const n=lq(e[t]);if(n)return n}return null}if("string"===typeof e)try{return lq(JSON.parse(e))}catch(t){}return null}function cq(e,t){if(null!=e){if("string"===typeof e.message&&t.push(e.message),"object"===typeof e)for(const n in e)cq(e[n],t);if("string"===typeof e)try{return cq(JSON.parse(e),t)}catch(n){}}}class uq extends aq{#j;constructor(e,t,n){const r=Object.assign({},null!=n?n:{},{batchMaxCount:1});RB(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,r),this.#j=async(t,n)=>{const r={method:t,params:n};this.emit("debug",{action:"sendEip1193Request",payload:r});try{const t=await e.request(r);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(gK){const t=new Error(gK.message);throw t.code=gK.code,t.data=gK.data,t.payload=r,this.emit("debug",{action:"receiveEip1193Error",error:t}),t}}}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){RB(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#j(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(gK){return[{id:e.id,error:{code:gK.code,data:gK.data,message:gK.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"===typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#j("eth_requestAccounts",[])}catch(t){const e=t.payload;throw this.getRpcError(e,{id:e.id,error:t})}return await super.getSigner(e)}}const dq=BigInt(-1),hq=BigInt(0),fq=BigInt(1),pq=BigInt(5),gq={};let mq="0000";for(;mq.length<80;)mq+=mq;function yq(e){let t=mq;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function vq(e,t,n){const r=BigInt(t.width);if(t.signed){const t=fq<<r-fq;OB(null==n||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e=e>hq?JB(ZB(e,r),r):-JB(ZB(-e,r),r)}else{const t=fq<<r;OB(null==n||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:n,fault:"overflow",value:e}),e=(e%t+t)%t&t-fq}return e}function bq(e){"number"===typeof e&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if("string"===typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);RB(i,"invalid fixed format","format",e),t="u"!==i[1],n=parseInt(i[2]),r=parseInt(i[3])}else if(e){const i=e,o=(e,t,n)=>null==i[e]?n:(RB(typeof i[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,i[e]),i[e]);t=o("signed","boolean",t),n=o("width","number",n),r=o("decimals","number",r)}RB(n%8===0,"invalid FixedNumber width (not byte aligned)","format.width",n),RB(r<=80,"invalid FixedNumber decimals (too large)","format.decimals",r);return{signed:t,width:n,decimals:r,name:(t?"":"u")+"fixed"+String(n)+"x"+String(r)}}class wq{format;#dt;#ht;#ft;_value;constructor(e,t,n){DB(e,gq,"FixedNumber"),this.#ht=t,this.#dt=n;const r=function(e,t){let n="";e<hq&&(n="-",e*=dq);let r=e.toString();if(0===t)return n+r;for(;r.length<=t;)r=mq+r;const i=r.length-t;for(r=r.substring(0,i)+"."+r.substring(i);"0"===r[0]&&"."!==r[1];)r=r.substring(1);for(;"0"===r[r.length-1]&&"."!==r[r.length-2];)r=r.substring(0,r.length-1);return n+r}(t,n.decimals);CB(this,{format:n.name,_value:r}),this.#ft=yq(n.decimals)}get signed(){return this.#dt.signed}get width(){return this.#dt.width}get decimals(){return this.#dt.decimals}get value(){return this.#ht}#pt(e){RB(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#gt(e,t){return e=vq(e,this.#dt,t),new wq(gq,e,this.#dt)}#mt(e,t){return this.#pt(e),this.#gt(this.#ht+e.#ht,t)}addUnsafe(e){return this.#mt(e)}add(e){return this.#mt(e,"add")}#yt(e,t){return this.#pt(e),this.#gt(this.#ht-e.#ht,t)}subUnsafe(e){return this.#yt(e)}sub(e){return this.#yt(e,"sub")}#vt(e,t){return this.#pt(e),this.#gt(this.#ht*e.#ht/this.#ft,t)}mulUnsafe(e){return this.#vt(e)}mul(e){return this.#vt(e,"mul")}mulSignal(e){this.#pt(e);const t=this.#ht*e.#ht;return OB(t%this.#ft===hq,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#gt(t/this.#ft,"mulSignal")}#bt(e,t){return OB(e.#ht!==hq,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#pt(e),this.#gt(this.#ht*this.#ft/e.#ht,t)}divUnsafe(e){return this.#bt(e)}div(e){return this.#bt(e,"div")}divSignal(e){OB(e.#ht!==hq,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#pt(e);const t=this.#ht*this.#ft;return OB(t%e.#ht===hq,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#gt(t/e.#ht,"divSignal")}cmp(e){let t=this.value,n=e.value;const r=this.decimals-e.decimals;return r>0?n*=yq(r):r<0&&(t*=yq(-r)),t<n?-1:t>n?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#ht;return this.#ht<hq&&(e-=this.#ft-fq),e=this.#ht/this.#ft*this.#ft,this.#gt(e,"floor")}ceiling(){let e=this.#ht;return this.#ht>hq&&(e+=this.#ft-fq),e=this.#ht/this.#ft*this.#ft,this.#gt(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=pq*yq(t-1);let r=this.value+n;const i=yq(t);return r=r/i*i,vq(r,this.#dt,"round"),new wq(gq,r,this.#dt)}isZero(){return this.#ht===hq}isNegative(){return this.#ht<hq}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return wq.fromString(this.toString(),e)}static fromValue(e,t,n){const r=null==t?0:iF(t),i=bq(n);let o=eF(e,"value");const s=r-i.decimals;if(s>0){const t=yq(s);OB(o%t===hq,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=t}else s<0&&(o*=yq(-s));return vq(o,i,"fromValue"),new wq(gq,o,i)}static fromString(e,t){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);RB(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const r=bq(t);let i=n[2]||"0",o=n[3]||"";for(;o.length<r.decimals;)o+=mq;OB(o.substring(r.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),o=o.substring(0,r.decimals);const s=BigInt(n[1]+i+o);return vq(s,r,"fromString"),new wq(gq,s,r)}static fromBytes(e,t){let n=rF(BB(e,"value"));const r=bq(t);return r.signed&&(n=JB(n,r.width)),vq(n,r,"fromBytes"),new wq(gq,n,r)}}const xq=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Aq(e){return function(e,t){let n=18;if("string"===typeof t){const e=xq.indexOf(t);RB(e>=0,"invalid unit","unit",t),n=3*e}else null!=t&&(n=iF(t,"unit"));return wq.fromValue(e,n,{decimals:n,width:512}).toString()}(e,18)}function Eq(e){return function(e,t){RB("string"===typeof e,"value must be a string","value",e);let n=18;if("string"===typeof t){const e=xq.indexOf(t);RB(e>=0,"invalid unit","unit",t),n=3*e}else null!=t&&(n=iF(t,"unit"));return wq.fromString(e,{decimals:n,width:512}).value}(e,18)}const Sq=xu((()=>({container:{margin:"( 100% - 20px)"}}))),kq=()=>{const{user:e,addToTransferHistory:t}=IC(),[n,r]=(0,i.useState)(null),[o,s]=(0,i.useState)(null),[a,l]=(0,i.useState)(""),[c,u]=(0,i.useState)(""),[d,h]=(0,i.useState)(""),[f,p]=(0,i.useState)(""),[g,m]=(0,i.useState)(""),[y,v]=(0,i.useState)(""),[b,w]=(0,i.useState)(""),x=ne(),A=Sq();return(0,mt.jsxs)(dn,{className:A.container,maxWidth:"sm",style:{marginTop:"50px",marginBottom:"50px",border:"1px solid #CFB53B",borderRadius:"30px",boxShadow:"0px 1px 10px #CFB53B"},children:[(0,mt.jsx)(wB,{onClick:()=>x("/"),style:{position:"relative",top:20,left:-0,fontSize:"24px",color:"#CFB53B",cursor:"pointer"}}),(0,mt.jsxs)(p_,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,style:{fontFamily:"Montserrat",paddingBottom:"20px"},children:[(0,mt.jsx)(Sn,{variant:"h4",gutterBottom:!0,children:"Token Management"}),e&&(0,mt.jsx)(pa,{variant:"contained",color:"primary",onClick:async()=>{try{if(window.ethereum){const e=new uq(window.ethereum);await e.send("eth_requestAccounts",[]);const t=await e.getSigner();r(e),s(t);const n=await t.getAddress();l(n)}else alert("Please install MetaMask!")}catch(e){console.error("Error connecting wallet:",e),alert("Failed to connect wallet. Please try again.")}},children:"Connect Wallet"}),!e&&(0,mt.jsx)(Sn,{variant:"body1",color:"error",children:"Please log in to connect your account."}),a&&(0,mt.jsxs)(Sn,{variant:"body1",gutterBottom:!0,children:["Connected Address: ",a]}),(0,mt.jsx)($_,{label:"Token Contract Address",variant:"outlined",fullWidth:!0,value:c,onChange:e=>u(e.target.value)}),(0,mt.jsx)(pa,{variant:"contained",color:"secondary",onClick:async()=>{try{if(!o||!c)return;const e=new yV(c,["function balanceOf(address owner) view returns (uint256)"],o),t=await e.balanceOf(a);m(Aq(t))}catch(e){console.error("Error getting token balance:",e.message||e),alert(`An error occurred while fetching the token balance: ${e.message||e}`)}},children:"Get Token Balance"}),g&&(0,mt.jsxs)(Sn,{variant:"body1",children:["Token Balance: ",g]}),(0,mt.jsx)($_,{label:"Spender Address for Allowance",variant:"outlined",fullWidth:!0,value:b,onChange:e=>w(e.target.value)}),(0,mt.jsx)(pa,{variant:"contained",color:"secondary",onClick:async()=>{if(o&&c&&b)try{const e=new yV(c,["function allowance(address owner, address spender) view returns (uint256)"],o),t=await e.allowance(a,b);v(Aq(t))}catch(e){console.error("Error checking allowance:",e),alert("Failed to check allowance. Please try again.")}},children:"Check Allowance"}),y&&(0,mt.jsxs)(Sn,{variant:"body1",children:["Allowance: ",y]}),(0,mt.jsx)($_,{label:"Recipient Address",variant:"outlined",fullWidth:!0,value:d,onChange:e=>h(e.target.value)}),(0,mt.jsx)($_,{label:"Amount to Transfer",variant:"outlined",fullWidth:!0,value:f,onChange:e=>p(e.target.value)}),(0,mt.jsx)(pa,{variant:"contained",color:"secondary",onClick:async()=>{if(o&&c&&d&&f)try{const n=new yV(c,["function transfer(address to, uint256 amount) returns (bool)"],o),r=Eq(f),i=await n.transfer(d,r);await i.wait(),alert("Transfer Successful!"),e&&await t({tokenAddress:c,recipientAddress:d,amount:f,date:(new Date).toISOString(),transactionHash:i.hash})}catch(n){console.error("Error during token transfer:",n),alert("An error occurred. Check the console for details.")}else alert("Please fill in all fields.")},children:"Transfer Tokens"})]})]})},Cq=(e,t)=>(0,Se.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),_q=e=>(0,Se.A)({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}});const Tq=function(e){const t=wt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,mt.jsxs)(i.Fragment,{children:[(0,mt.jsx)(xo,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((t=>{let[n,i]=t;var o;r[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(o=i.palette)?void 0:o.mode}}));let i=(0,Se.A)({html:Cq(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,Se.A)({margin:0},_q(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return o&&(i=[i,o]),i}(e,r)}),n]})};const Pq=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:s}=e,a=mr();i.useEffect((()=>{if(o)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==r||r(e,"escapeKeyDown")}}),[o,r]);const l=Jr(((e,t)=>{null==r||r(e,t)})),c=Jr((e=>{r&&null!=e&&a.start(e,(()=>{l(null,"timeout")}))}));i.useEffect((()=>(o&&c(t),a.clear)),[o,t,c,a]);const u=a.clear,d=i.useCallback((()=>{null!=t&&c(null!=s?s:.5*t)}),[t,s,c]),h=e=>t=>{const n=e.onFocus;null==n||n(t),u()},f=e=>t=>{const n=e.onMouseEnter;null==n||n(t),u()},p=e=>t=>{const n=e.onMouseLeave;null==n||n(t),d()};return i.useEffect((()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}}),[n,o,d,u]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,Se.A)({},Un(e),Un(t));return(0,Se.A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),d()}),onFocus:h(n),onMouseEnter:f(n),onMouseLeave:p(n)});var r},onClickAway:e=>{null==r||r(e,"clickaway")}}};function Iq(e){return e.substring(2).toLowerCase()}function Oq(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:s="onTouchEnd"}=e,a=i.useRef(!1),l=i.useRef(null),c=i.useRef(!1),u=i.useRef(!1);i.useEffect((()=>(setTimeout((()=>{c.current=!0}),0),()=>{c.current=!1})),[]);const d=Dn(t.ref,l),h=Jr((e=>{const t=u.current;u.current=!1;const r=Tn(l.current);if(!c.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(a.current)return void(a.current=!1);let i;i=e.composedPath?e.composedPath().indexOf(l.current)>-1:!r.documentElement.contains(e.target)||l.current.contains(e.target),i||!n&&t||o(e)})),f=e=>n=>{u.current=!0;const r=t.props[e];r&&r(n)},p={ref:d};return!1!==s&&(p[s]=f(s)),i.useEffect((()=>{if(!1!==s){const e=Iq(s),t=Tn(l.current),n=()=>{a.current=!0};return t.addEventListener(e,h),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,h),t.removeEventListener("touchmove",n)}}}),[h,s]),!1!==r&&(p[r]=f(r)),i.useEffect((()=>{if(!1!==r){const e=Iq(r),t=Tn(l.current);return t.addEventListener(e,h),()=>{t.removeEventListener(e,h)}}}),[h,r]),(0,mt.jsx)(i.Fragment,{children:i.cloneElement(t,p)})}function Rq(e){return _t("MuiSnackbarContent",e)}Tt("MuiSnackbarContent",["root","message","action"]);const Nq=["action","className","message","role"],Mq=pt(Nt,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,Me.tL)(t.palette.background.default,n);return(0,Se.A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),Dq=pt("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),Lq=pt("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Bq=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiSnackbarContent"}),{action:r,className:i,message:o,role:s="alert"}=n,a=(0,Ee.A)(n,Nq),l=n,c=(e=>{const{classes:t}=e;return _e({root:["root"],action:["action"],message:["message"]},Rq,t)})(l);return(0,mt.jsxs)(Mq,(0,Se.A)({role:s,square:!0,elevation:6,className:Ce(c.root,i),ownerState:l,ref:t},a,{children:[(0,mt.jsx)(Dq,{className:c.message,ownerState:l,children:o}),r?(0,mt.jsx)(Lq,{className:c.action,ownerState:l,children:r}):null]}))}));function Fq(e){return _t("MuiSnackbar",e)}Tt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const jq=["onEnter","onExited"],Uq=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],zq=pt("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${At(n.anchorOrigin.vertical)}${At(n.anchorOrigin.horizontal)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,Se.A)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})})})),Vq=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiSnackbar"}),r=Pr(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:h,ContentProps:f,disableWindowBlurListener:p=!1,message:g,open:m,TransitionComponent:y=Br,transitionDuration:v=o,TransitionProps:{onEnter:b,onExited:w}={}}=n,x=(0,Ee.A)(n.TransitionProps,jq),A=(0,Ee.A)(n,Uq),E=(0,Se.A)({},n,{anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:p,TransitionComponent:y,transitionDuration:v}),S=(e=>{const{classes:t,anchorOrigin:n}=e;return _e({root:["root",`anchorOrigin${At(n.vertical)}${At(n.horizontal)}`]},Fq,t)})(E),{getRootProps:k,onClickAway:C}=Pq((0,Se.A)({},E)),[_,T]=i.useState(!0),P=Wn({elementType:zq,getSlotProps:k,externalForwardedProps:A,ownerState:E,additionalProps:{ref:t},className:[S.root,d]});return!m&&_?null:(0,mt.jsx)(Oq,(0,Se.A)({onClickAway:C},h,{children:(0,mt.jsx)(zq,(0,Se.A)({},P,{children:(0,mt.jsx)(y,(0,Se.A)({appear:!0,in:m,timeout:v,direction:"top"===a?"down":"up",onEnter:(e,t)=>{T(!1),b&&b(e,t)},onExited:e=>{T(!0),w&&w(e)}},x,{children:u||(0,mt.jsx)(Bq,(0,Se.A)({message:g,action:s},f))}))}))}))})),Hq=Vq;function $q(e){return _t("MuiAlert",e)}const Wq=Tt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function Gq(e){return _t("MuiIconButton",e)}const qq=Tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Kq=["edge","children","className","color","disabled","disableFocusRipple","size"],Qq=pt(Qs,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${At(n.color)}`],n.edge&&t[`edge${At(n.edge)}`],t[`size${At(n.size)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,Se.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Me.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,Se.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,Se.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,Se.A)({},i&&{backgroundColor:t.vars?`rgba(${i.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,Me.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${qq.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),Xq=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:s="default",disabled:a=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=(0,Ee.A)(n,Kq),d=(0,Se.A)({},n,{edge:r,color:s,disabled:a,disableFocusRipple:l,size:c}),h=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e;return _e({root:["root",n&&"disabled","default"!==r&&`color${At(r)}`,i&&`edge${At(i)}`,`size${At(o)}`]},Gq,t)})(d);return(0,mt.jsx)(Qq,(0,Se.A)({className:Ce(h.root,o),centerRipple:!0,focusRipple:!l,disabled:a,ref:t},u,{ownerState:d,children:i}))})),Jq=Xq,Yq=ho((0,mt.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Zq=ho((0,mt.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),eK=ho((0,mt.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),tK=ho((0,mt.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),nK=ho((0,mt.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),rK=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],iK=pt(Nt,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${At(n.color||n.severity)}`]]}})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?Me.e$:Me.a,r="light"===t.palette.mode?Me.a:Me.e$;return(0,Se.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[i]=e;return{props:{colorSeverity:i,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${i}Color`]:n(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${i}StandardBg`]:r(t.palette[i].light,.9),[`& .${Wq.icon}`]:t.vars?{color:t.vars.palette.Alert[`${i}IconColor`]}:{color:t.palette[i].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:n(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${Wq.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.dark})).map((e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,Se.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${n}FilledColor`],backgroundColor:t.vars.palette.Alert[`${n}FilledBg`]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}}))]})})),oK=pt("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),sK=pt("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),aK=pt("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),lK={success:(0,mt.jsx)(Yq,{fontSize:"inherit"}),warning:(0,mt.jsx)(Zq,{fontSize:"inherit"}),error:(0,mt.jsx)(eK,{fontSize:"inherit"}),info:(0,mt.jsx)(tK,{fontSize:"inherit"})},cK=i.forwardRef((function(e,t){const n=wt({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:s="Close",color:a,components:l={},componentsProps:c={},icon:u,iconMapping:d=lK,onClose:h,role:f="alert",severity:p="success",slotProps:g={},slots:m={},variant:y="standard"}=n,v=(0,Ee.A)(n,rK),b=(0,Se.A)({},n,{color:a,severity:p,variant:y,colorSeverity:a||p}),w=(e=>{const{variant:t,color:n,severity:r,classes:i}=e;return _e({root:["root",`color${At(n||r)}`,`${t}${At(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]},$q,i)})(b),x={slots:(0,Se.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},m),slotProps:(0,Se.A)({},c,g)},[A,E]=gT("closeButton",{elementType:Jq,externalForwardedProps:x,ownerState:b}),[S,k]=gT("closeIcon",{elementType:nK,externalForwardedProps:x,ownerState:b});return(0,mt.jsxs)(iK,(0,Se.A)({role:f,elevation:0,ownerState:b,className:Ce(w.root,o),ref:t},v,{children:[!1!==u?(0,mt.jsx)(oK,{ownerState:b,className:w.icon,children:u||d[p]||lK[p]}):null,(0,mt.jsx)(sK,{ownerState:b,className:w.message,children:i}),null!=r?(0,mt.jsx)(aK,{ownerState:b,className:w.action,children:r}):null,null==r&&h?(0,mt.jsx)(aK,{ownerState:b,className:w.action,children:(0,mt.jsx)(A,(0,Se.A)({size:"small","aria-label":s,title:s,color:"inherit",onClick:h},E,{children:(0,mt.jsx)(S,(0,Se.A)({fontSize:"small"},k))}))}):null]}))})),uK=cK,dK=()=>{const{alert:e,setAlert:t}=IC(),n=(e,n)=>{"clickaway"!==n&&t({open:!1})};return(0,mt.jsx)(Hq,{open:e.open,autoHideDuration:3e3,onClose:n,children:(0,mt.jsx)(uK,{onClose:n,elevation:10,variant:"filled",severity:e.type,children:e.message})})},hK=xu((()=>({App:{backgroundColor:"#14161a",color:"white",minHeight:"100vh"}}))),fK=ct({palette:{mode:"dark",primary:{main:"#ffd700"}}}),pK=()=>{const e=hK();return(0,mt.jsxs)(_u,{theme:fK,children:[(0,mt.jsx)(Tq,{}),(0,mt.jsxs)(we,{children:[(0,mt.jsxs)("div",{className:e.App,children:[(0,mt.jsx)(AP,{}),(0,mt.jsxs)(ye,{children:[(0,mt.jsx)(ge,{path:"/",element:(0,mt.jsx)(vI,{})}),(0,mt.jsx)(ge,{path:"/coins/:id",element:(0,mt.jsx)(AB,{})}),(0,mt.jsx)(ge,{path:"/tokens",element:(0,mt.jsx)(kq,{})})]})]}),(0,mt.jsx)(dK,{})]})]})};s.createRoot(document.getElementById("root")).render((0,mt.jsx)(i.StrictMode,{children:(0,mt.jsx)(PC,{children:(0,mt.jsx)(pK,{})})}))})()})();
//# sourceMappingURL=main.2a737b44.js.map